;;-*-Lisp-*-
(in-package goal)

;; name: wasgun-manager.gc
;; name in dgo: wasgun-manager
;; dgos: WCB

;; DECOMP BEGINS

(define *wasgun-speedmult* 1.0)

(deftype task-manager-wascity-gungame (task-manager)
  ((wascity-gungame-entity  entity)
   (check-timer             time-frame)
   (actor-group             (pointer actor-group))
   (actor-group-count       int32)
   (cur-group               int8)
   (halfway-up?             symbol)
   (nskeet                  int16)
   (hopped-out              time-frame)
   (miss-count              int16)
   (last-miss-count         int16)
   (launch-time             time-frame)
   (win-time                time-frame)
   (lose-time               time-frame)
   (last-hit-time           time-frame)
   (added-points-time       time-frame)
   (point-queue             int16)
   (skeet-hit               int16)
   (shot-count-at-last-hit  int16)
   (bonus-mult              int16)
   (numshots                int16)
   (queue-time              int32)
   (event-length            time-frame)
   (event-time              time-frame)
   (shot-timer              time-frame)
   (wct                     handle)
   (wave                    int32)
   (event                   int32)
   (goal-amount             int8)
   (score                   int32)
   (hud-score               handle)
   (hud-goal                handle)
   (hud-miss                handle)
   (hud-reticle             handle)
   (hud-active?             symbol)
   (been-out-of-turret?     symbol)
   (won?                    symbol)
   (lost?                   symbol)
   (game-score              uint8)
   (task-gold               uint16)
   (task-silver             uint16)
   (task-bronze             uint16)
   (score-bronze            int32)
   (score-silver            int32)
   (score-gold              int32)
   (score-high              int32)
   (sound-id                sound-id)
   )
  (:methods
    (task-manager-wascity-gungame-method-32 (_type_) none)
    (task-manager-wascity-gungame-method-33 (_type_) none)
    (task-manager-wascity-gungame-method-34 (_type_) none)
    (task-manager-wascity-gungame-method-35 (_type_) none)
    (task-manager-wascity-gungame-method-36 (_type_) none)
    (task-manager-wascity-gungame-method-37 (_type_) none)
    (task-manager-wascity-gungame-method-38 (_type_) none)
    (task-manager-wascity-gungame-method-39 (_type_) float)
    (task-manager-wascity-gungame-method-40 (_type_) float)
    (task-manager-wascity-gungame-method-41 (_type_) float)
    )
  )


(defskelgroup skel-skeet wascity-skeet wascity-skeet-lod0-jg wascity-skeet-idle-ja
              ((wascity-skeet-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 2 0 3)
              )

(defskelgroup skel-skeet-explode wascity-skeet wascity-skeet-explode-lod0-jg wascity-skeet-explode-idle-ja
              ((wascity-skeet-explode-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 15)
              )

(define *skeet-exploder-params*
  (new 'static 'joint-exploder-static-params
    :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
      (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 20 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 21 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 22 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 23 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 24 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 25 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 26 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 27 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 28 :parent-joint-index -1)
      )
    :collide-spec (collide-spec backgnd)
    )
  )

(defskelgroup skel-skeet-b wascity-skeet-b wascity-skeet-b-lod0-jg wascity-skeet-b-idle-ja
              ((wascity-skeet-b-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 2 0 3)
              )

(defskelgroup skel-skeet-b-explode wascity-skeet-b wascity-skeet-b-explode-lod0-jg wascity-skeet-b-explode-idle-ja
              ((wascity-skeet-b-explode-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 15)
              )

(define *skeet-b-exploder-params*
  (new 'static 'joint-exploder-static-params
    :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
      (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1)
      )
    :collide-spec (collide-spec backgnd)
    )
  )

(defskelgroup skel-skeet-c wascity-skeet-c wascity-skeet-c-lod0-jg wascity-skeet-c-idle-ja
              ((wascity-skeet-c-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 2 0 3)
              )

(defskelgroup skel-skeet-c-explode wascity-skeet-c wascity-skeet-c-explode-lod0-jg wascity-skeet-c-explode-idle-ja
              ((wascity-skeet-c-explode-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 15)
              )

(define *skeet-c-exploder-params*
  (new 'static 'joint-exploder-static-params
    :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
      (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1)
      )
    :collide-spec (collide-spec backgnd)
    )
  )

(deftype hip-skeet-event (structure)
  ((min-time  uint32)
   (max-time  uint32)
   (mode      skeet-mode)
   (angle     degrees)
   (speed     meters)
   )
  )


(define *skeet-data*
  (the-as (array (array hip-skeet-event))
    (new 'static 'boxed-array :type array
      (new 'static 'boxed-array :type hip-skeet-event
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xa)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xc)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xc)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x15)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xb)
          :angle (degrees 90)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xc)
          :angle (degrees 90)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x10)
          :angle (degrees 35)
          :speed (meters 170)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x17)
          :angle (degrees 35)
          :speed (meters 170)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        )
      (new 'static 'boxed-array :type hip-skeet-event
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 90)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 90)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xb)
          :angle (degrees 90)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x12)
          :angle (degrees 90)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-x8)
          :angle (degrees 35)
          :speed (meters 170)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x10)
          :angle (degrees 35)
          :speed (meters 170)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xf)
          :angle (degrees 35)
          :speed (meters 170)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x17)
          :angle (degrees 35)
          :speed (meters 170)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xd)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 60)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.25) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 60)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.25) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 60)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.25) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x12)
          :angle (degrees 60)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x12)
          :angle (degrees 60)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.125) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x13)
          :angle (degrees 60)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.125) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x14)
          :angle (degrees 60)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.125) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x15)
          :angle (degrees 60)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xb)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x10)
          :angle (degrees 35)
          :speed (meters 170)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x17)
          :angle (degrees 35)
          :speed (meters 170)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xa)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xd)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xb)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x12)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xb)
          :angle (degrees 90)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xc)
          :angle (degrees 90)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xb)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x10)
          :angle (degrees 35)
          :speed (meters 170)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x17)
          :angle (degrees 35)
          :speed (meters 170)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xa)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x3)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xd)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xb)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x4)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x12)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x2)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x5)
          :angle (degrees 50.000004)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xb)
          :angle (degrees 90)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xc)
          :angle (degrees 90)
          :speed (meters 140)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event :min-time (seconds 1) :angle (degrees 45) :speed (meters 150))
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event :min-time (seconds 1) :angle (degrees 55) :speed (meters 155))
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-x8)
          :angle (degrees 57)
          :speed (meters 160)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x10)
          :angle (degrees 60)
          :speed (meters 165)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x7)
          :angle (degrees 45)
          :speed (meters 150)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode a-x7)
          :angle (degrees 55)
          :speed (meters 155)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode b-xf)
          :angle (degrees 57)
          :speed (meters 160)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18))
        (new 'static 'hip-skeet-event
          :min-time (seconds 1)
          :mode (skeet-mode c-x17)
          :angle (degrees 60)
          :speed (meters 165)
          )
        (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18))
        )
      )
    )
  )

(define *skeet-rigid-body-constants* (new 'static 'rigid-body-object-constants
                                       :info (new 'static 'rigid-body-info
                                         :mass 1.5
                                         :inv-mass 0.6666667
                                         :linear-damping 0.97
                                         :angular-damping 0.94
                                         :bounce-factor 0.75
                                         :friction-factor 0.99
                                         :cm-offset-joint (new 'static 'vector :w 1.0)
                                         :inertial-tensor-box (new 'static 'array meters 3 (meters 2.5) (meters 5) (meters 2.5))
                                         )
                                       :extra (new 'static 'rigid-body-object-extra-info
                                         :max-time-step 0.033333335
                                         :gravity (meters 20)
                                         :idle-distance (meters 200)
                                         :attack-force-scale 2.0
                                         )
                                       :name '*skeet-rigid-body-constants*
                                       )
        )

;; WARN: Return type mismatch symbol vs none.
(defmethod init-collision! ((this skeet))
  (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
    (set! (-> s5-0 penetrated-by) (penetrate))
    (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 1) 0)))
      (set! (-> s5-0 total-prims) (the-as uint 2))
      (set! (-> s4-0 prim-core collide-as) (collide-spec enemy obstacle))
      (set! (-> s4-0 prim-core action) (collide-action solid))
      (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 49152.0)
      (set! (-> s5-0 root-prim) s4-0)
      )
    (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
      (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle))
      (set! (-> v1-7 prim-core action) (collide-action solid))
      (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 49152.0)
      )
    (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
    (let ((v1-10 (-> s5-0 root-prim)))
      (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as))
      (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with))
      )
    (set! (-> this root) (the-as collide-shape-moving s5-0))
    )
  (set! (-> this root event-self) 'touched)
  (none)
  )

(defmethod get-trans ((this skeet) (arg0 int))
  "Get the `trans` for this process."
  (-> this root trans)
  )

(defun wasgun-manager-shot-missed ()
  (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node wascity-gungame-resolution)))
         (v1-5 (the-as task-manager-wascity-gungame (handle->process (if (-> v1-2 manager)
                                                                         (-> v1-2 manager manager)
                                                                         (the-as handle #f)
                                                                         )
                                                                     )
                       )
               )
         )
    (if v1-5
        (set! (-> v1-5 bonus-mult) 1)
        )
    )
  0
  (none)
  )

(defbehavior skeet-standard-event-handler skeet ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
  (when (handle->process (-> self mgr))
    (case arg2
      (('touched 'touch)
       #f
       )
      (('attack)
       1.0
       (let ((gp-0 (the-as task-manager-wascity-gungame (-> self mgr process 0))))
         (cond
           ((= (+ (-> gp-0 shot-count-at-last-hit) 1) (-> gp-0 numshots))
            (if (or (and (zero? (-> gp-0 info index)) (< (-> gp-0 bonus-mult) 1))
                    (and (= (-> gp-0 info index) 1) (< (-> gp-0 bonus-mult) 8))
                    )
                (task-manager-wascity-gungame-method-41 gp-0)
                )
            (+! (-> gp-0 shot-count-at-last-hit) 1)
            )
           (else
             (task-manager-wascity-gungame-method-41 gp-0)
             (set! (-> gp-0 shot-count-at-last-hit) (-> gp-0 numshots))
             )
           )
         (let ((f0-2 (fmax 0.0 (fmin 1.0 (/ (* 0.0033333334 (the float (- (current-time) (-> self birth-time))))
                                            (* 0.0033333334 (the float (-> self time-to-live)))
                                            )
                                     )
                           )
                     )
               )
           (+! (-> gp-0 skeet-hit) 1)
           (set! (-> self mult) (the-as uint (-> gp-0 bonus-mult)))
           (if (or (and (zero? (-> gp-0 info index)) (< (-> gp-0 bonus-mult) 1))
                   (and (= (-> gp-0 info index) 1) (< (-> gp-0 bonus-mult) 8))
                   )
               (+! (-> gp-0 bonus-mult) 1)
               )
           (set! (-> self score) (the-as uint (+ (the int (* -90.0 f0-2)) 100)))
           )
         (case (-> self skeet-type)
           (((skeet-type a))
            (set! (-> self score) (-> self score))
            )
           (((skeet-type b))
            (+! (-> self score) 100)
            )
           (((skeet-type c))
            (+! (-> self score) 200)
            )
           )
         (+! (-> gp-0 point-queue) (* (-> self mult) (-> self score)))
         (set-time! (-> gp-0 last-hit-time))
         )
       (sound-play "skeet-explode")
       (set! (-> self disappear) #t)
       (cond
         ((logtest? (-> *part-group-id-table* 546 flags) (sp-group-flag sp13))
          (vector-copy! (-> *launch-matrix* trans) (-> self root trans))
          (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 546))
          )
         (else
           (vector-copy! (-> *launch-matrix* trans) (-> self root trans))
           (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 546))
           )
         )
       (go-virtual explode)
       )
      )
    )
  )

(defstate flying (skeet)
  :virtual #t
  :event skeet-standard-event-handler
  :enter (behavior ()
    (if (not (-> self skeet-sound-playing?))
        (set! (-> self skeet-sound-playing?) #t)
        )
    )
  :exit (behavior ()
    (when (-> self skeet-sound-playing?)
      (sound-stop (-> self skeet-sound))
      (set! (-> self skeet-sound-playing?) #f)
      )
    )
  :code (behavior ()
    (while (>= (-> self root trans y) (-> self initial-y))
      (sound-play "skeet-spin" :id (-> self skeet-sound))
      (suspend)
      )
    (cond
      ((logtest? (-> *part-group-id-table* 533 flags) (sp-group-flag sp13))
       (vector-copy! (-> *launch-matrix* trans) (-> self root trans))
       (part-tracker-spawn
         part-tracker-subsampler
         :to self
         :group (-> *part-group-id-table* 533)
         :duration (seconds 5)
         )
       )
      (else
        (vector-copy! (-> *launch-matrix* trans) (-> self root trans))
        (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 533) :duration (seconds 5))
        )
      )
    (sound-play "skeet-splash")
    (when (-> self minimap)
      (logior! (-> self minimap flags) (minimap-flag fade-out))
      (set! (-> self minimap) #f)
      )
    (suspend-for (seconds 1)
      )
    (sound-play "point-missed" :position (wascity-turret-gun-pos))
    (let ((v1-49 (handle->process (-> self mgr))))
      (when v1-49
        (if (< (-> (the-as task-manager-wascity-gungame v1-49) miss-count) 10)
            (+! (-> (the-as task-manager-wascity-gungame v1-49) miss-count) 1)
            )
        )
      )
    )
  :post (behavior ()
    (let ((gp-0 (new 'stack-no-clear 'vector)))
      (let ((s5-0 (new 'stack-no-clear 'vector))
            (f30-0 (* *wasgun-speedmult* (seconds-per-frame)))
            )
        (let ((a0-0 (-> self mgr process 0)))
          (set-vector!
            (-> self pacc)
            0.0
            (- (task-manager-wascity-gungame-method-40 (the-as task-manager-wascity-gungame a0-0)))
            0.0
            1.0
            )
          )
        (vector-float*! s5-0 (-> self pacc) f30-0)
        (vector+! (-> self pvel) (-> self pvel) s5-0)
        (vector-float*! gp-0 (-> self pvel) f30-0)
        )
      (vector+! (-> self root trans) (-> self root trans) gp-0)
      )
    (wascity-turret-add-radar (-> self root trans))
    (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (-> self rot-vel))
    (+! (-> self rot-vel) (* (-> self rot-acc) (seconds-per-frame)))
    (set! (-> self rot-vel) (fmax -5461.3335 (fmin 5461.3335 (-> self rot-vel))))
    (let ((gp-1 (the-as task-manager-wascity-gungame (handle->process (-> self mgr)))))
      (when gp-1
        (if (>= (-> gp-1 miss-count) 10)
            (go-virtual explode)
            )
        (when (and (nonzero? (-> gp-1 win-time)) (time-elapsed? (-> gp-1 win-time) (seconds 0.1)))
          (set-time! (-> gp-1 win-time))
          (go-virtual explode)
          )
        )
      )
    (let ((gp-2 'turret))
      (if (!= (send-event *target* 'query 'mode) gp-2)
          (go-virtual explode)
          )
      )
    (let ((s5-1 (new 'stack-no-clear 'vector))
          (gp-3 (ppointer->process (-> self parent)))
          )
      (transform-point-vector! s5-1 (-> self root trans))
      (+! (-> s5-1 x) -2048.0)
      (+! (-> s5-1 y) -2048.0)
      (when (-> self minimap)
        (when (and (< (-> s5-1 z) 32768.0) (< 0.0 (-> s5-1 z)))
          (if (< (-> s5-1 x) -254.0)
              (send-event (handle->process (-> (the-as task-manager-wascity-gungame gp-3) hud-reticle)) 'off-to-left)
              )
          (if (< 258.0 (-> s5-1 x))
              (send-event (handle->process (-> (the-as task-manager-wascity-gungame gp-3) hud-reticle)) 'off-to-right)
              )
          )
        )
      )
    (transform-post)
    )
  )

;; WARN: Return type mismatch (pointer process) vs (pointer joint-exploder).
(defmethod spawn-exploder ((this skeet))
  (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0))))
    (let ((s5-0 (new 'stack-no-clear 'vector))
          (f0-0 (rand-vu-float-range 0.5 1.5))
          )
      (vector+*! (-> gp-0 fountain-rand-transv-lo) (-> this root trans) *up-vector* 0.0)
      (vector-float*! s5-0 (-> this pvel) 1.0)
      (vector+*! s5-0 s5-0 *up-vector* 40960.0)
      (vector+*! (-> gp-0 fountain-rand-transv-lo) s5-0 *identity-vector* (* -204800.0 f0-0))
      (vector+*! (-> gp-0 fountain-rand-transv-hi) s5-0 *identity-vector* (* 204800.0 f0-0))
      )
    (set! (-> gp-0 gravity) -122880.0)
    (set! (-> gp-0 rot-speed) 16.0)
    (set! (-> gp-0 friction) 0.3)
    (let ((s5-1 (get-process *default-dead-pool* joint-exploder #x4000 0)))
      (the-as
        (pointer joint-exploder)
        (when s5-1
          (let ((t9-3 (method-of-type joint-exploder activate)))
            (t9-3 (the-as joint-exploder s5-1) this "joint-exploder" (the-as pointer #x70004000))
            )
          (let* ((s4-0 run-function-in-process)
                 (s3-0 s5-1)
                 (s2-0 joint-exploder-init-by-other)
                 (v1-13 (-> this skeet-type))
                 (a2-6
                   (cond
                     ((or (= v1-13 (skeet-type a))
                          (= v1-13 (skeet-type a-0))
                          (= v1-13 (skeet-type a-1))
                          (= v1-13 (skeet-type a-2))
                          (= v1-13 (skeet-type a-3))
                          (= v1-13 (skeet-type a-4))
                          (= v1-13 (skeet-type a-5))
                          (= v1-13 (skeet-type a-6))
                          (= v1-13 (skeet-type a-7))
                          )
                      (art-group-get-by-name *level* "skel-skeet-explode" (the-as (pointer level) #f))
                      )
                     ((or (= v1-13 (skeet-type b))
                          (= v1-13 (skeet-type b-8))
                          (= v1-13 (skeet-type b-9))
                          (= v1-13 (skeet-type b-10))
                          (= v1-13 (skeet-type b-11))
                          (= v1-13 (skeet-type b-12))
                          (= v1-13 (skeet-type b-13))
                          (= v1-13 (skeet-type b-14))
                          (= v1-13 (skeet-type b-15))
                          )
                      (art-group-get-by-name *level* "skel-skeet-b-explode" (the-as (pointer level) #f))
                      )
                     ((or (= v1-13 (skeet-type c))
                          (= v1-13 (skeet-type c-16))
                          (= v1-13 (skeet-type c-17))
                          (= v1-13 (skeet-type c-18))
                          (= v1-13 (skeet-type c-19))
                          (= v1-13 (skeet-type c-20))
                          (= v1-13 (skeet-type c-22))
                          (= v1-13 (skeet-type c-22))
                          (= v1-13 (skeet-type c-23))
                          )
                      (art-group-get-by-name *level* "skel-skeet-c-explode" (the-as (pointer level) #f))
                      )
                     (else
                       (art-group-get-by-name *level* "skel-skeet-explode" (the-as (pointer level) #f))
                       )
                     )
                   )
                 (a3-2 6)
                 (v1-19 (-> this skeet-type))
                 )
            ((the-as (function object object object object object object none) s4-0)
             s3-0
             s2-0
             a2-6
             a3-2
             gp-0
             (cond
               ((or (= v1-19 (skeet-type a)) (or (= v1-19 (skeet-type a-0))
                                                 (= v1-19 (skeet-type a-1))
                                                 (= v1-19 (skeet-type a-2))
                                                 (= v1-19 (skeet-type a-3))
                                                 (= v1-19 (skeet-type a-4))
                                                 (= v1-19 (skeet-type a-5))
                                                 (= v1-19 (skeet-type a-6))
                                                 (= v1-19 (skeet-type a-7))
                                                 )
                    )
                *skeet-exploder-params*
                )
               ((or (= v1-19 (skeet-type b))
                    (= v1-19 (skeet-type b-8))
                    (= v1-19 (skeet-type b-9))
                    (= v1-19 (skeet-type b-10))
                    (= v1-19 (skeet-type b-11))
                    (= v1-19 (skeet-type b-12))
                    (= v1-19 (skeet-type b-13))
                    (= v1-19 (skeet-type b-14))
                    (= v1-19 (skeet-type b-15))
                    )
                *skeet-b-exploder-params*
                )
               ((or (= v1-19 (skeet-type c))
                    (= v1-19 (skeet-type c-16))
                    (= v1-19 (skeet-type c-17))
                    (= v1-19 (skeet-type c-18))
                    (= v1-19 (skeet-type c-19))
                    (= v1-19 (skeet-type c-20))
                    (= v1-19 (skeet-type c-22))
                    (= v1-19 (skeet-type c-22))
                    (= v1-19 (skeet-type c-23))
                    )
                *skeet-c-exploder-params*
                )
               (else
                 *skeet-exploder-params*
                 )
               )
             )
            )
          (-> s5-1 ppointer)
          )
        )
      )
    )
  )

(defstate explode (skeet)
  :virtual #t
  :enter (behavior ()
    (set-time! (-> self state-time))
    (let ((v1-3 (-> self root root-prim)))
      (set! (-> v1-3 prim-core collide-as) (collide-spec))
      (set! (-> v1-3 prim-core collide-with) (collide-spec))
      )
    0
    (logior! (-> self draw status) (draw-control-status no-draw))
    (set! (-> self root root-prim local-sphere w) 491520.0)
    (let* ((v1-11 (-> self parent))
           (a0-3 (handle->process
                   (-> (the-as task-manager-wascity-gungame (if v1-11
                                                                (the-as task-manager-wascity-gungame (-> v1-11 0 self))
                                                                )
                               )
                       hud-reticle
                       )
                   )
                 )
           )
      (if (> (-> self score) 0)
          (hud-wasgun-method-28
            (the-as hud-wasgun a0-3)
            (the-as int (-> self score))
            (the-as int (-> self mult))
            (-> self root trans)
            )
          )
      )
    (when (-> self minimap)
      (logior! (-> self minimap flags) (minimap-flag fade-out))
      (set! (-> self minimap) #f)
      )
    )
  :trans (behavior ()
    '()
    )
  :code (behavior ()
    (spawn-exploder self)
    (while (-> self child)
      (suspend)
      )
    )
  :post (behavior ()
    (let ((v1-0 (new 'stack-no-clear 'vector)))
      (let ((a0-0 (new 'stack-no-clear 'vector))
            (f0-1 (* *wasgun-speedmult* (seconds-per-frame)))
            )
        (set-vector! (-> self pacc) 0.0 -327680.0 0.0 1.0)
        (vector-float*! a0-0 (-> self pacc) f0-1)
        (vector+! (-> self pvel) (-> self pvel) a0-0)
        (vector-float*! v1-0 (-> self pvel) f0-1)
        )
      (vector+! (-> self root trans) (-> self root trans) v1-0)
      )
    (transform-post)
    )
  )

(define *skeet-focus-pos* (new 'static 'vector :x 6583861.0 :y 68403.2 :z -2457600.0))

(defbehavior skeet-init-by-other skeet ((arg0 task-manager-wascity-gungame) (arg1 skeet-mode) (arg2 vector) (arg3 float) (arg4 float))
  (init-collision! self)
  (vector-copy! (-> self root trans) arg2)
  (set! (-> self angle) (-> arg2 w))
  (quaternion-identity! (-> self root quat))
  (quaternion-rotate-local-x! (-> self root quat) (-> self root quat) 16384.0)
  (set-vector! (-> self root scale) 2.0 2.0 2.0 1.0)
  (cond
    ((or (= arg1 (skeet-mode a-x19))
         (= arg1 (skeet-mode a-x0))
         (= arg1 (skeet-mode a-x1))
         (= arg1 (skeet-mode a-x2))
         (= arg1 (skeet-mode a-x3))
         (= arg1 (skeet-mode a-x4))
         (= arg1 (skeet-mode a-x5))
         (= arg1 (skeet-mode a-x6))
         (= arg1 (skeet-mode a-x7))
         )
     (initialize-skeleton
       self
       (the-as skeleton-group (art-group-get-by-name *level* "skel-skeet" (the-as (pointer level) #f)))
       (the-as pair 0)
       )
     (ja :group! (-> self draw art-group data 3) :num! min)
     (set! (-> self skeet-type) (skeet-type a))
     )
    ((or (= arg1 (skeet-mode b-x1a))
         (= arg1 (skeet-mode b-x8))
         (= arg1 (skeet-mode b-x9))
         (= arg1 (skeet-mode b-xa))
         (= arg1 (skeet-mode b-xb))
         (= arg1 (skeet-mode b-xc))
         (= arg1 (skeet-mode b-xd))
         (= arg1 (skeet-mode b-xe))
         (= arg1 (skeet-mode b-xf))
         )
     (initialize-skeleton
       self
       (the-as skeleton-group (art-group-get-by-name *level* "skel-skeet-b" (the-as (pointer level) #f)))
       (the-as pair 0)
       )
     (ja :group! (-> self draw art-group data 3) :num! min)
     (set! (-> self skeet-type) (skeet-type b))
     )
    ((or (= arg1 (skeet-mode c-x1b))
         (= arg1 (skeet-mode c-x10))
         (= arg1 (skeet-mode c-x11))
         (= arg1 (skeet-mode c-x12))
         (= arg1 (skeet-mode c-x13))
         (= arg1 (skeet-mode c-x14))
         (= arg1 (skeet-mode c-x15))
         (= arg1 (skeet-mode c-x16))
         (= arg1 (skeet-mode c-x17))
         )
     (initialize-skeleton
       self
       (the-as skeleton-group (art-group-get-by-name *level* "skel-skeet-c" (the-as (pointer level) #f)))
       (the-as pair 0)
       )
     (ja :group! (-> self draw art-group data 3) :num! min)
     (set! (-> self skeet-type) (skeet-type c))
     )
    )
  (alloc-rbody-control! self *skeet-rigid-body-constants*)
  (vector-reset! (-> self pacc))
  (set! (-> self rot-vel) -3640.889)
  (set! (-> self rot-acc) 0.0)
  (set! (-> self disappear) #f)
  (if (= arg3 0.0)
      (set! arg3 12743.111)
      )
  (let ((a0-46 arg0))
    (if (= arg4 0.0)
        (set! arg4 (task-manager-wascity-gungame-method-39 a0-46))
        )
    )
  (let ((s2-7 (new 'stack-no-clear 'vector))
        (f30-0 (-> arg2 w))
        )
    (set-vector! s2-7 0.0 0.0 1.0 1.0)
    (vector-rotate-x! s2-7 s2-7 (- arg3))
    (vector-rotate-y! (-> self pvel) s2-7 f30-0)
    )
  (vector-normalize! (-> self pvel) arg4)
  (set! (-> self initial-y) (-> arg2 y))
  (set! (-> self time-to-live)
        (the-as
          time-frame
          (the int (* 300.0 (/ (* 2.0 (-> self pvel y)) (task-manager-wascity-gungame-method-40 arg0))))
          )
        )
  (set-time! (-> self birth-time))
  (set! (-> self mult) (the-as uint 0))
  (set! (-> self score) (the-as uint 0))
  0
  (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 117) (the-as int #f) (the-as vector #t) 0))
  (set! (-> self draw light-index) (the-as uint 10))
  (set! (-> self draw lod-set lod 0 dist) 14336000.0)
  (logclear! (-> self mask) (process-mask actor-pause))
  (logior! (-> self mask) (process-mask no-kill))
  (sound-play "skeet-launch")
  (set! (-> self skeet-sound) (new-sound-id))
  (set! (-> self skeet-sound-playing?) #f)
  (go-virtual flying)
  )

;; WARN: Return type mismatch process vs skeet.
(defun spawn-skeet ((arg0 task-manager-wascity-gungame) (arg1 skeet-mode) (arg2 vector) (arg3 float) (arg4 float))
  (cond
    ((logtest? (-> *part-group-id-table* 533 flags) (sp-group-flag sp13))
     (vector-copy! (-> *launch-matrix* trans) arg2)
     (part-tracker-spawn
       part-tracker-subsampler
       :to arg0
       :group (-> *part-group-id-table* 533)
       :duration (seconds 5)
       )
     )
    (else
      (vector-copy! (-> *launch-matrix* trans) arg2)
      (part-tracker-spawn part-tracker :to arg0 :group (-> *part-group-id-table* 533) :duration (seconds 5))
      )
    )
  (let ((s1-2 (the-as process #f)))
    (let ((v1-33 (process-spawn skeet arg0 arg1 arg2 arg3 arg4 :name "skeet" :to arg0)))
      (if v1-33
          (set! s1-2 (-> v1-33 0))
          )
      )
    (set! (-> (the-as skeet s1-2) mgr) (process->handle arg0))
    (the-as skeet s1-2)
    )
  )

(define *skeet-offset-table* (new 'static 'boxed-array :type vector
                               (new 'static 'vector :x 5427200.0 :y 36864.0 :z -2732032.0 :w 16384.0)
                               (new 'static 'vector :w 3185.7778)
                               (new 'static 'vector :w 1911.4667)
                               (new 'static 'vector :w 637.1556)
                               (new 'static 'vector :w -637.1556)
                               (new 'static 'vector :w -1911.4667)
                               (new 'static 'vector :w -3185.7778)
                               (new 'static 'vector :x 7716864.0 :y 36864.0 :z -2502656.0 :w -18204.445)
                               )
        )

;; WARN: Return type mismatch symbol vs none.
(defun def-launch-circle ()
  (let ((gp-0 (new 'stack-no-clear 'vector)))
    8192.0
    (let ((s5-0 (new 'stack-no-clear 'vector))
          (f30-0 1720320.0)
          )
      (set-vector! s5-0 6583861.5 36864.0 -1960301.9 1.0)
      (let ((s4-0 1)
            (s3-0 6)
            )
        (while (>= s3-0 s4-0)
          (let ((f28-0 (+ 8192.0 (* 2339.2712 (the float s4-0)))))
            (set! (-> gp-0 y) 0.0)
            (set! (-> gp-0 x) (- (cos f28-0)))
            (set! (-> gp-0 z) (- (sin f28-0)))
            )
          (vector+*! gp-0 s5-0 gp-0 f30-0)
          (set! (-> gp-0 w) (-> *skeet-offset-table* s4-0 w))
          (vector-copy! (-> *skeet-offset-table* s4-0) gp-0)
          (+! s4-0 1)
          )
        )
      )
    )
  (none)
  )

;; WARN: Return type mismatch skeet vs none.
(defun spawn-skeet-enum ((arg0 task-manager-wascity-gungame) (arg1 skeet-mode) (arg2 int) (arg3 float) (arg4 float))
  (let ((s4-0 (new 'stack-no-clear 'vector)))
    (if (= (-> *skeet-offset-table* 1 y) 0.0)
        (def-launch-circle)
        )
    (vector-copy! s4-0 (-> *skeet-offset-table* arg2))
    (spawn-skeet arg0 arg1 s4-0 arg3 arg4)
    )
  (none)
  )

(defbehavior wasgun-standard-event-handler task-manager-wascity-gungame ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
  (case arg2
    (('setup)
     (if (or (task-node-open? (game-task-node wascity-defend-get-to))
             (task-node-open? (game-task-node wascity-defend-introduction))
             )
         (set-setting! 'extra-bank '((wascity1 wasdef1) (wascity2 wasdef2) (wascity3 wasdef3)) 0.0 0)
         (set-setting! 'extra-bank '((wascity1 wasgun1) (wascity3 wasgun2)) 0.0 0)
         )
     )
    )
  (taskman-event-handler self arg0 arg1 arg2 arg3)
  )

(defstate active (task-manager-wascity-gungame)
  :virtual #t
  :event wasgun-standard-event-handler
  :code (behavior ()
    (until #f
      (when *debug-segment*
        )
      (suspend)
      )
    #f
    )
  :post (behavior ()
    '()
    )
  )

(defmethod taskman-event-handler ((this task-manager-wascity-gungame) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
  (case arg2
    (('fire)
     (let ((v0-0 (the-as object (+ (-> this numshots) 1))))
       (set! (-> this numshots) (the-as int v0-0))
       v0-0
       )
     )
    (('event-over)
     (if (= (-> this info index) 1)
         #t
         (>= (+ (-> this point-queue) (-> this score)) 7000)
         )
     )
    (('fail)
     ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3)
     )
    (else
      ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3)
      )
    )
  )

;; WARN: disable def twice: 88. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
;; WARN: Function (method 26 task-manager-wascity-gungame) has a return type of none, but the expression builder found a return statement.
(defmethod task-manager-method-26 ((this task-manager-wascity-gungame))
  (local-vars (a0-16 symbol) (sv-160 int))
  (if (not (handle->process (-> this wct)))
      (set! (-> this wct) (process->handle (process-by-name "wascity-turret-1" *active-pool*)))
      )
  (send-event (handle->process (-> this wct)) 'radar-reset)
  (let ((s5-0 (new 'stack-no-clear 'vector)))
    (vector-copy! s5-0 (target-pos 0))
    (let ((a1-3 (new 'stack-no-clear 'vector)))
      (set! (-> a1-3 x) 6582272.0)
      (set! (-> a1-3 y) 262144.0)
      (set! (-> a1-3 z) -1955430.4)
      (set! (-> a1-3 w) 1.0)
      (set! a0-16 (cond
                    ((and (< 184320.0 (-> s5-0 y)) (let ((f0-5 (vector-vector-xz-distance-squared s5-0 a1-3))
                                                         (f1-1 163840.0)
                                                         )
                                                     (< f0-5 (* f1-1 f1-1))
                                                     )
                          )
                     (when (not (-> this halfway-up?))
                       (set! (-> this halfway-up?) #t)
                       (if (or (task-node-open? (game-task-node wascity-defend-get-to))
                               (task-node-open? (game-task-node wascity-defend-introduction))
                               )
                           (set-setting! 'extra-bank '((wascity1 wasdef1)) 0.0 0)
                           (set-setting! 'extra-bank '((wascity3 wasgun2)) 0.0 0)
                           )
                       (set! a0-16 #t)
                       (set! (-> *sky-work* disable-day-star) (the-as basic a0-16))
                       a0-16
                       )
                     )
                    (else
                      (when (-> this halfway-up?)
                        (set! (-> this halfway-up?) #f)
                        (set! (-> *sky-work* disable-day-star) #f)
                        #f
                        )
                      )
                    )
            )
      )
    )
  (when a0-16
    )
  (when (= (-> this shot-count-at-last-hit) (-> this numshots))
    (set! (-> this shot-timer) 0)
    0
    )
  (when (< (-> this shot-count-at-last-hit) (-> this numshots))
    (if (zero? (-> this shot-timer))
        (set-time! (-> this shot-timer))
        )
    (when (time-elapsed? (-> this shot-timer) (seconds 0.25))
      (set! (-> this bonus-mult) 1)
      (task-manager-wascity-gungame-method-41 this)
      )
    )
  (when (or (and (task-node-closed? (game-task-node wascity-defend-introduction))
                 (not (task-node-closed? (game-task-node wascity-defend-resolution)))
                 )
            (let ((v1-53 (-> *game-info* sub-task-list (game-task-node wascity-defend-introduction))))
              (handle->process (if (-> v1-53 manager)
                                   (-> v1-53 manager manager)
                                   (the-as handle #f)
                                   )
                               )
              )
            )
    (let ((gp-1 'turret))
      (if (= (send-event *target* 'query 'mode) gp-1)
          (task-node-close! (game-task-node wascity-defend-get-to) 'event)
          )
      )
    (return #f)
    )
  (send-event (handle->process (-> this hud-reticle)) 'reset-state)
  (let ((s5-1 (new 'stack-no-clear 'vector)))
    0.0
    (set-vector! s5-1 6585594.5 263189.94 -1938929.1 1.0)
    (let ((f0-11 (vector-vector-distance-squared s5-1 (target-pos 0)))
          (f1-4 409600.0)
          )
      (if (and (< (* f1-4 f1-4) f0-11) (!= (-> this info index) 1))
          (send-event this 'fail)
          )
      )
    )
  (task-manager-wascity-gungame-method-37 this)
  (when (and (time-elapsed? (-> this added-points-time) (-> this queue-time))
             (time-elapsed? (-> this last-hit-time) (seconds 1))
             (> (-> this point-queue) 0)
             )
    (set! (-> this last-miss-count) (-> this miss-count))
    (let ((s5-2 sound-play-by-name)
          (sname (static-sound-name "point-gained"))
          (s3-0 (new-sound-id))
          (s2-0 1024)
          (s1-0 0)
          (s0-0 0)
          )
      (set! sv-160 0)
      (let ((t2-0 (wascity-turret-gun-pos)))
        (s5-2 (the-as sound-name sname) s3-0 s2-0 s1-0 s0-0 (the-as sound-group sv-160) t2-0)
        )
      )
    (set-time! (-> this added-points-time))
    (cond
      ((< 33 (-> this point-queue))
       (+! (-> this score) 33)
       (+! (-> this point-queue) -33)
       (cond
         ((< 1650 (-> this point-queue))
          (+! (-> this score) 330)
          (+! (-> this point-queue) -330)
          (set! (-> this queue-time) 4)
          )
         ((or (and (>= (+ (-> this point-queue) (-> this score)) 7000) (zero? (-> this info index)))
              (< 660 (-> this point-queue))
              )
          (set! (-> this queue-time) 9)
          )
         ((< 495 (-> this point-queue))
          (set! (-> this queue-time) 18)
          )
         ((< 330 (-> this point-queue))
          (set! (-> this queue-time) 37)
          )
         ((< 165 (-> this point-queue))
          (set! (-> this queue-time) 75)
          )
         (else
           (set! (-> this queue-time) 150)
           )
         )
       )
      (else
        (+! (-> this score) (-> this point-queue))
        (set! (-> this point-queue) 0)
        0
        )
      )
    )
  (let ((s5-3 'turret))
    (cond
      ((= (send-event *target* 'query 'mode) s5-3)
       (when (and (zero? (-> this win-time))
                  (zero? (-> this lose-time))
                  (-> this been-out-of-turret?)
                  (not (-> this hud-active?))
                  )
         (set-setting! 'music 'wasgun 0.0 0)
         (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap))
         (set! (-> this hud-score)
               (ppointer->handle (process-spawn hud-big-score :init hud-init-by-other :name "hud-big-score" :to this))
               )
         (set! (-> this hud-goal)
               (ppointer->handle (process-spawn hud-goal :init hud-init-by-other :name "hud-goal" :to this))
               )
         (set! (-> this hud-miss)
               (ppointer->handle (process-spawn hud-miss :init hud-init-by-other :name "hud-miss" :to this))
               )
         (set! (-> this hud-reticle)
               (ppointer->handle (process-spawn hud-wasgun :init hud-init-by-other :name "hud-wasgun" :to this))
               )
         (set! (-> this hud-active?) #t)
         )
       (if (and (-> this been-out-of-turret?)
                (not (or (-> this won?) (-> this lost?)))
                (< (-> this miss-count) 10)
                (or (= (-> this info index) 1) (< (+ (-> this point-queue) (-> this score)) 7000))
                )
           (task-manager-wascity-gungame-method-35 this)
           )
       )
      (else
        (set! (-> this been-out-of-turret?) #t)
        (task-manager-wascity-gungame-method-32 this)
        (when (and (> (+ (-> this score) (-> this miss-count)) 0) (or (< (-> this score) 7000) (= (-> this info index) 1)))
          (set-time-limit this)
          (if (zero? (-> this info index))
              (send-event this 'fail)
              )
          )
        )
      )
    )
  (task-manager-wascity-gungame-method-36 this)
  (when #f
    (let ((s5-8 (new 'stack-no-clear 'vector)))
      (set-vector! s5-8 6017024.0 68403.2 -2928640.0 1.0)
      (spawn-skeet this (skeet-mode a-x19) s5-8 12743.111 (task-manager-wascity-gungame-method-39 this))
      )
    (set-time! (-> this launch-time))
    )
  (when (time-elapsed? (-> this check-timer) (seconds 0.1))
    (if (not (-> this wascity-gungame-entity))
        (task-manager-wascity-gungame-method-33 this)
        )
    (if (< 1.0 (-> *game-info* counter))
        (set! (-> this sound-id)
              (add-process *gui-control* this (gui-channel background) (gui-action queue) "miss001" -99.0 0)
              )
        )
    (set! (-> *game-info* counter) 0.0)
    (set-time! (-> this check-timer))
    )
  0
  (none)
  )

;; WARN: Return type mismatch object vs none.
;; WARN: Function (method 37 task-manager-wascity-gungame) has a return type of none, but the expression builder found a return statement.
(defmethod task-manager-wascity-gungame-method-37 ((this task-manager-wascity-gungame))
  (if (not (-> this hud-goal))
      (return #f)
      )
  (let ((gp-0 (the-as hud (handle->process (-> this hud-goal)))))
    (let* ((v1-7 (the-as hud (handle->process (-> this hud-miss))))
           (s4-0 format)
           (s3-0 (clear (-> v1-7 strings 1 text)))
           (s2-0 "~S")
           )
      (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0546) #f))
      (s4-0 s3-0 s2-0 *temp-string*)
      )
    (cond
      ((!= (-> this info index) 1)
       (let ((s5-1 format)
             (gp-1 (clear (-> gp-0 strings 1 text)))
             (s4-1 "~S")
             )
         (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f))
         (s5-1 gp-1 s4-1 *temp-string*)
         )
       )
      ((not (task-node-closed? (the-as game-task-node (-> this task-bronze))))
       (cond
         ((>= (-> *game-info* score) (the float (-> this score-gold)))
          (set! (-> *game-info* goal) (-> *game-info* score))
          (let ((s5-2 format)
                (gp-2 (clear (-> gp-0 strings 1 text)))
                (s4-2 "~S")
                )
            (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f))
            (s5-2 gp-2 s4-2 *temp-string*)
            )
          )
         ((>= (-> *game-info* score) (the float (-> this score-silver)))
          (set! (-> *game-info* goal) (the float (-> this score-gold)))
          (let ((s5-3 format)
                (gp-3 (clear (-> gp-0 strings 1 text)))
                (s4-3 "~S")
                )
            (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0137) #f))
            (s5-3 gp-3 s4-3 *temp-string*)
            )
          )
         ((>= (-> *game-info* score) (the float (-> this score-bronze)))
          (set! (-> *game-info* goal) (the float (-> this score-silver)))
          (let ((s5-4 format)
                (gp-4 (clear (-> gp-0 strings 1 text)))
                (s4-4 "~S")
                )
            (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0138) #f))
            (s5-4 gp-4 s4-4 *temp-string*)
            )
          )
         (else
           (set! (-> *game-info* goal) (the float (-> this score-bronze)))
           (let ((s5-5 format)
                 (gp-5 (clear (-> gp-0 strings 1 text)))
                 (s4-5 "~S")
                 )
             (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0139) #f))
             (s5-5 gp-5 s4-5 *temp-string*)
             )
           )
         )
       )
      ((not (task-node-closed? (the-as game-task-node (-> this task-silver))))
       (cond
         ((>= (-> *game-info* score) (the float (-> this score-gold)))
          (set! (-> *game-info* goal) (-> *game-info* score))
          (let ((s5-6 format)
                (gp-6 (clear (-> gp-0 strings 1 text)))
                (s4-6 "~S")
                )
            (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f))
            (s5-6 gp-6 s4-6 *temp-string*)
            )
          )
         ((>= (-> *game-info* score) (the float (-> this score-silver)))
          (set! (-> *game-info* goal) (the float (-> this score-gold)))
          (let ((s5-7 format)
                (gp-7 (clear (-> gp-0 strings 1 text)))
                (s4-7 "~S")
                )
            (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0137) #f))
            (s5-7 gp-7 s4-7 *temp-string*)
            )
          )
         (else
           (set! (-> *game-info* goal) (the float (-> this score-silver)))
           (let ((s5-8 format)
                 (gp-8 (clear (-> gp-0 strings 1 text)))
                 (s4-8 "~S")
                 )
             (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0138) #f))
             (s5-8 gp-8 s4-8 *temp-string*)
             )
           )
         )
       )
      ((not (task-node-closed? (the-as game-task-node (-> this task-gold))))
       (cond
         ((>= (-> *game-info* score) (the float (-> this score-gold)))
          (set! (-> *game-info* goal) (-> *game-info* score))
          (let ((s5-9 format)
                (gp-9 (clear (-> gp-0 strings 1 text)))
                (s4-9 "~S")
                )
            (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f))
            (s5-9 gp-9 s4-9 *temp-string*)
            )
          )
         (else
           (set! (-> *game-info* goal) (the float (-> this score-gold)))
           (let ((s5-10 format)
                 (gp-10 (clear (-> gp-0 strings 1 text)))
                 (s4-10 "~S")
                 )
             (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0137) #f))
             (s5-10 gp-10 s4-10 *temp-string*)
             )
           )
         )
       )
      (else
        (set! (-> *game-info* goal) (fmax (-> *game-info* score) (the float (-> this score-high))))
        (let ((s5-11 format)
              (gp-11 (clear (-> gp-0 strings 1 text)))
              (s4-11 "~S")
              )
          (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f))
          (s5-11 gp-11 s4-11 *temp-string*)
          )
        )
      )
    )
  (none)
  )

(defmethod task-manager-wascity-gungame-method-36 ((this task-manager-wascity-gungame))
  (with-pp
    (set! (-> *game-info* score) (the float (-> this score)))
    (set! (-> *game-info* miss) (the float (-> this miss-count)))
    (set! (-> *game-info* miss-max) 10.0)
    (if (!= (-> this info index) 1)
        (set! (-> *game-info* goal) 7000.0)
        )
    (when (and (>= (-> this score) 7000) (zero? (-> this point-queue)) (not (-> this won?)) (!= (-> this info index) 1))
      (set-time! (-> this win-time))
      (set! (-> this won?) #t)
      (talker-spawn-func (-> *talker-speech* 100) *entity-pool* (target-pos 0) (the-as region #f))
      )
    (when (and (-> this won?)
               (nonzero? (-> this win-time))
               (time-elapsed? (-> this win-time) (seconds 1))
               (or (zero? (-> this hopped-out))
                   (and (time-elapsed? (-> this hopped-out) (seconds 2)) (= (send-event *target* 'query 'mode) 'turret))
                   )
               )
      (send-event *target* 'end-mode 'turret)
      (set-time! (-> this hopped-out))
      (task-manager-wascity-gungame-method-32 this)
      )
    (let ((a1-3 (new 'stack-no-clear 'event-message-block)))
      (set! (-> a1-3 from) (process->ppointer pp))
      (set! (-> a1-3 num-params) 1)
      (set! (-> a1-3 message) 'query)
      (set! (-> a1-3 param 0) (the-as uint 'mode))
      (if (and (!= (send-event-function *target* a1-3) 'turret)
               (nonzero? (-> this hopped-out))
               (time-elapsed? (-> this hopped-out) (seconds 2))
               )
          (send-event this 'complete)
          )
      )
    (when (and (-> this lost?)
               (nonzero? (-> this lose-time))
               (time-elapsed? (-> this lose-time) (seconds 4))
               (or (zero? (-> this hopped-out)) (time-elapsed? (-> this hopped-out) (seconds 2)))
               )
      (send-event *target* 'end-mode 'turret)
      (set-time! (-> this hopped-out))
      (task-manager-wascity-gungame-method-32 this)
      (if (zero? (-> this info index))
          (send-event this 'fail)
          )
      )
    (when (and (>= (-> this miss-count) 10)
               (zero? (-> this point-queue))
               (not (-> this lost?))
               (or (< (+ (-> this point-queue) (-> this score)) 7000) (= (-> this info index) 1))
               (zero? (-> this win-time))
               )
      (set-time! (-> this lose-time))
      (set! (-> this lost?) #t)
      (if (= (-> this info index) 1)
          (talker-spawn-func (-> *talker-speech* 100) *entity-pool* (target-pos 0) (the-as region #f))
          )
      )
    0
    (none)
    )
  )

(define *skeet-launcher-pos* (new 'static 'vector :x 6590464.0 :y 36864.0 :z -5070848.0))

(define *skeet-target-pos* (new 'static 'vector :x 6590464.0 :y 36864.0 :z -2539520.0))

;; WARN: Return type mismatch skeet vs none.
(defun print-and-spawn-skeet ((arg0 task-manager-wascity-gungame) (arg1 skeet-mode) (arg2 vector) (arg3 degrees) (arg4 float))
  (let ((s2-1 (* 0.00000061035155 (vector-vector-distance *skeet-target-pos* arg2) arg4)))
    (format
      #t
      "((sktpos ~f ~f) ~f ~f)~%"
      (/ (-> arg2 x) METER_LENGTH)
      (/ (-> arg2 z) METER_LENGTH)
      (* 0.005493164 arg3)
      (/ s2-1 METER_LENGTH)
      )
    (spawn-skeet arg0 arg1 arg2 arg3 s2-1)
    )
  (none)
  )

(defmethod task-manager-wascity-gungame-method-34 ((this task-manager-wascity-gungame))
  (vector-! *skeet-launcher-pos* *skeet-launcher-pos* (target-pos 0))
  (vector-rotate-y!
    *skeet-launcher-pos*
    *skeet-launcher-pos*
    (* 72.81778 (analog-input (the-as int (-> *cpad-list* cpads 1 leftx)) 128.0 48.0 110.0 -1.0))
    )
  (vector+! *skeet-launcher-pos* *skeet-launcher-pos* (target-pos 0))
  (let ((s5-4 (vector-! (new 'stack-no-clear 'vector) *skeet-launcher-pos* (target-pos 0))))
    (set! (-> s5-4 y) 0.0)
    (vector-normalize! s5-4 1.0)
    (vector+*!
      *skeet-launcher-pos*
      *skeet-launcher-pos*
      s5-4
      (* 40960.0 (analog-input (the-as int (-> *cpad-list* cpads 1 lefty)) 128.0 48.0 110.0 -1.0))
      )
    (set! (-> *skeet-launcher-pos* y) 36864.0)
    (add-debug-sphere
      #t
      (bucket-id debug-no-zbuf1)
      *skeet-launcher-pos*
      (meters 10)
      (new 'static 'rgba :r #xff :a #x80)
      )
    (set! (-> *skeet-launcher-pos* w) (asin (/ (- (-> s5-4 x)) (vector-length s5-4))))
    )
  (if (cpad-pressed? 1 r1)
      (print-and-spawn-skeet
        this
        (skeet-mode a-x0)
        *skeet-launcher-pos*
        (+ 10940.871 (* 5461.3335 (analog-input (the-as int (-> *cpad-list* cpads 1 righty)) 128.0 48.0 110.0 -1.0)))
        573440.0
        )
      )
  (none)
  )

(defmethod task-manager-wascity-gungame-method-35 ((this task-manager-wascity-gungame))
  (local-vars (v1-21 int) (a2-0 int))
  (let ((s4-0 (-> *skeet-data* (-> this wave) (-> this event)))
        (s5-0 #t)
        )
    (when (zero? (-> this event-length))
      (set! (-> this event-length)
            (rand-vu-int-range (the-as int (-> s4-0 min-time)) (the-as int (+ (-> s4-0 min-time) (-> s4-0 max-time))))
            )
      (set-time! (-> this event-time))
      )
    (case (-> s4-0 mode)
      (((skeet-mode -x18))
       (set! s5-0 (time-elapsed?
                    (-> this event-time)
                    (the int (/ (the float (-> this event-length)) (task-manager-wascity-gungame-method-41 this)))
                    )
             )
       )
      (((skeet-mode a-x19) (skeet-mode b-x1a) (skeet-mode c-x1b) (skeet-mode -x1c))
       0
       0
       (let ((s3-0 0)
             (s2-1 (max 1 (min 4 (the int (* 0.0033333334 (the float (-> s4-0 min-time)))))))
             )
         (dotimes (s1-0 s2-1)
           (until (not (logtest? v1-21 s3-0))
             (set! a2-0 (rand-vu-int-range 2 5))
             (set! v1-21 (ash 1 a2-0))
             )
           (set! s3-0 (logior (ash 1 a2-0) s3-0))
           (spawn-skeet-enum this (-> s4-0 mode) a2-0 (-> s4-0 angle) (-> s4-0 speed))
           )
         )
       )
      (((skeet-mode a-x0)
        (skeet-mode a-x1)
        (skeet-mode a-x2)
        (skeet-mode a-x3)
        (skeet-mode a-x4)
        (skeet-mode a-x5)
        (skeet-mode a-x6)
        (skeet-mode a-x7)
        (skeet-mode b-x8)
        (skeet-mode b-x9)
        (skeet-mode b-xa)
        (skeet-mode b-xb)
        (skeet-mode b-xc)
        (skeet-mode b-xd)
        (skeet-mode b-xe)
        (skeet-mode b-xf)
        (skeet-mode c-x10)
        (skeet-mode c-x11)
        (skeet-mode c-x12)
        (skeet-mode c-x13)
        (skeet-mode c-x14)
        (skeet-mode c-x15)
        (skeet-mode c-x16)
        (skeet-mode c-x17)
        )
       (let ((a2-1 (logand (-> s4-0 mode) (skeet-mode a-x7))))
         0
         (spawn-skeet-enum this (-> s4-0 mode) (the-as int a2-1) (-> s4-0 angle) (-> s4-0 speed))
         )
       )
      )
    (when s5-0
      (set! (-> this event-length) 0)
      (+! (-> this event) 1)
      (when (>= (-> this event) (-> *skeet-data* (-> this wave) length))
        (set! (-> this event) 0)
        (+! (-> this wave) 1)
        (when (>= (-> this wave) (-> *skeet-data* length))
          (set! (-> this wave) 1)
          (when (>= (-> this wave) (-> *skeet-data* length))
            (format 0 "Warning: SKEET_REPEAT_WAVE_INDEX is set to ~d~%" 1)
            (format 0 "Warning: SKEET_REPEAT_WAVE_INDEX should be ~d or smaller~%" (+ (-> *skeet-data* length) -1))
            (set! (-> this wave) (+ (-> *skeet-data* length) -1))
            )
          )
        )
      )
    )
  0
  (none)
  )

(defmethod task-manager-wascity-gungame-method-33 ((this task-manager-wascity-gungame))
  (local-vars (sv-16 res-tag))
  (let ((s5-0 (entity-by-name "wascity-gungame-manager-1")))
    (when #f
      (format 0 "***** Found entity for wascity-gungame~%")
      (set! (-> this wascity-gungame-entity) s5-0)
      (set! sv-16 (new 'static 'res-tag))
      (let ((v1-1 (res-lump-data s5-0 'actor-groups pointer :tag-ptr (& sv-16))))
        (cond
          ((and v1-1 (nonzero? (-> sv-16 elt-count)))
           (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count)))
           (set! (-> this actor-group) (the-as (pointer actor-group) v1-1))
           )
          (else
            (format 0 "ERROR: task-manager-glider glider-manager entity missing actor-group!~%")
            )
          )
        )
      (set! (-> this cur-group) 0)
      0
      )
    )
  (none)
  )

;; WARN: Return type mismatch float vs none.
(defmethod task-manager-wascity-gungame-method-38 ((this task-manager-wascity-gungame))
  (set! (-> this goal-amount) -1)
  (game-info-method-27 *game-info* (the-as game-score (-> this game-score)) (the float (-> this score)))
  (set! (-> this goal-amount) 0)
  (cond
    ((>= (-> this score) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 3)))
     (set! (-> this goal-amount) 3)
     )
    ((>= (-> this score) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 2)))
     (set! (-> this goal-amount) 2)
     )
    ((>= (-> this score) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 1)))
     (set! (-> this goal-amount) 1)
     )
    )
  (when (and (>= (-> this goal-amount) 1) (not (task-node-closed? (the-as game-task-node (-> this task-bronze)))))
    (task-node-close! (the-as game-task-node (-> this task-bronze)) 'event)
    (give *game-info* 'skill (the float (-> this info user-count)) (the-as handle #f))
    )
  (when (and (>= (-> this goal-amount) 2) (not (task-node-closed? (the-as game-task-node (-> this task-silver)))))
    (task-node-close! (the-as game-task-node (-> this task-silver)) 'event)
    (give *game-info* 'skill (the float (-> this info user-count)) (the-as handle #f))
    )
  (when (and (>= (-> this goal-amount) 3) (not (task-node-closed? (the-as game-task-node (-> this task-gold)))))
    (task-node-close! (the-as game-task-node (-> this task-gold)) 'event)
    (give *game-info* 'skill (the float (-> this info user-count)) (the-as handle #f))
    )
  (none)
  )

(defmethod task-manager-wascity-gungame-method-41 ((this task-manager-wascity-gungame))
  1.0
  (let ((f30-0 (cond
                 ((= (-> this info index) 1)
                  (cond
                    ((= (-> this bonus-mult) 1)
                     0.8
                     )
                    ((= (-> this bonus-mult) 2)
                     0.9
                     )
                    ((= (-> this bonus-mult) 3)
                     1.0
                     )
                    ((= (-> this bonus-mult) 4)
                     1.1
                     )
                    ((= (-> this bonus-mult) 5)
                     1.2
                     )
                    ((= (-> this bonus-mult) 6)
                     1.25
                     )
                    ((= (-> this bonus-mult) 7)
                     1.3
                     )
                    ((= (-> this bonus-mult) 8)
                     1.35
                     )
                    (else
                      1.35
                      )
                    )
                  )
                 (else
                   0.8
                   )
                 )
               )
        )
    (set! *wasgun-speedmult* f30-0)
    (send-event (handle->process (-> this wct)) 'speed-mult f30-0)
    f30-0
    )
  )

(defmethod task-manager-wascity-gungame-method-40 ((this task-manager-wascity-gungame))
  (let ((f0-0 1.0))
    (* 245760.0 f0-0 f0-0)
    )
  )

(defmethod task-manager-wascity-gungame-method-39 ((this task-manager-wascity-gungame))
  573440.0
  )

;; WARN: Return type mismatch symbol vs none.
(defmethod task-manager-wascity-gungame-method-32 ((this task-manager-wascity-gungame))
  (when (= (-> this hud-active?) #t)
    (task-manager-wascity-gungame-method-38 this)
    (set-continue! *game-info* "wascityb-gungame-done" #f)
    (remove-setting! 'music)
    (remove-setting! 'minimap)
    (send-event (handle->process (-> this hud-score)) 'hide-and-die)
    (send-event (handle->process (-> this hud-miss)) 'hide-and-die)
    (send-event (handle->process (-> this hud-goal)) 'hide-and-die)
    (send-event (handle->process (-> this hud-reticle)) 'hide-and-die)
    (set! (-> this hud-score) (the-as handle #f))
    (set! (-> this hud-miss) (the-as handle #f))
    (set! (-> this hud-goal) (the-as handle #f))
    (set! (-> this hud-reticle) (the-as handle #f))
    (set! (-> this hud-active?) #f)
    )
  (none)
  )

(defmethod task-manager-method-25 ((this task-manager-wascity-gungame))
  (let ((t9-0 (method-of-type task-manager task-manager-method-25)))
    (t9-0 this)
    )
  (set-action!
    *gui-control*
    (gui-action stop)
    (-> this sound-id)
    (gui-channel none)
    (gui-action none)
    (the-as string #f)
    (the-as (function gui-connection symbol) #f)
    (the-as process #f)
    )
  (task-manager-wascity-gungame-method-32 this)
  (none)
  )

;; WARN: Return type mismatch connection vs none.
(defmethod set-time-limit ((this task-manager-wascity-gungame))
  (let ((t9-0 (method-of-type task-manager set-time-limit)))
    (t9-0 this)
    )
  (set! (-> this hud-score) (the-as handle #f))
  (set! (-> this hud-goal) (the-as handle #f))
  (set! (-> this hud-miss) (the-as handle #f))
  (set! (-> this hud-reticle) (the-as handle #f))
  (set! (-> this hud-active?) #f)
  (set! (-> this been-out-of-turret?) #f)
  (set! (-> this won?) #f)
  (set! (-> this lost?) #f)
  (set! (-> this halfway-up?) #f)
  (set! (-> this wct) (the-as handle #f))
  (cond
    ((task-node-open? (game-task-node wascity-defend-introduction))
     (set-setting! 'extra-bank '((wascity3 wascity4)) 0.0 0)
     )
    ((not (or (task-node-open? (game-task-node wascity-defend-get-to))
              (task-node-open? (game-task-node wascity-defend-resolution))
              )
          )
     (remove-setting! 'extra-bank)
     )
    )
  (set! (-> this goal-amount) -1)
  (set! (-> this task-gold) (the-as uint 60))
  (set! (-> this task-silver) (the-as uint 61))
  (set! (-> this task-bronze) (the-as uint 62))
  (set! (-> this game-score) (the-as uint 9))
  (set! (-> this score-gold) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 3)))
  (set! (-> this score-silver) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 2)))
  (set! (-> this score-bronze) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 1)))
  (set! (-> this score-high) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 0)))
  (set! (-> this score) 0)
  (set! (-> this wascity-gungame-entity) #f)
  (set! (-> this cur-group) 0)
  (set! (-> this actor-group-count) 0)
  (set! (-> this check-timer) (+ (current-time) (seconds 1)))
  (set! (-> this shot-timer) 0)
  (set! (-> this nskeet) 0)
  (set! (-> this hopped-out) 0)
  (set! (-> this miss-count) 0)
  (set! (-> this last-miss-count) 0)
  (set-time! (-> this launch-time))
  (set! (-> this win-time) 0)
  (set! (-> this lose-time) 0)
  (set-time! (-> this added-points-time))
  (set! (-> this last-hit-time) 0)
  (set! (-> this numshots) 0)
  (set! (-> this bonus-mult) 1)
  (task-manager-wascity-gungame-method-41 this)
  (set! (-> this queue-time) 150)
  (set! (-> this point-queue) 0)
  (set! (-> this skeet-hit) 0)
  (set! (-> this shot-count-at-last-hit) -1)
  (set! (-> this wave) 0)
  (set! (-> this event) 0)
  (if (zero? (-> this info index))
      (set-setting! 'music #f 0.0 0)
      )
  (none)
  )
