Skip to content

Commit

Permalink
fix some city stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Zedb0T committed Dec 15, 2023
1 parent 4636617 commit 1378bb8
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 5 deletions.
5 changes: 5 additions & 0 deletions goal_src/jak2/engine/common_objs/crates.gc
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,11 @@
(set! (-> self fact pickup-amount) (-> arg3 pickup-spawn-amount))
(set! (-> self fact options) (-> arg3 options))
)


(set! (-> self root scale x) (rand-vu-float-range -1.0 4.0))
(set! (-> self root scale y) (rand-vu-float-range -1.0 4.0))
(set! (-> self root scale z) (rand-vu-float-range -1.0 4.0))
(crate-method-38 self)
(none)
)
Expand Down
5 changes: 5 additions & 0 deletions goal_src/jak2/levels/city/meet-brutter/meet-brutter.gc
Original file line number Diff line number Diff line change
Expand Up @@ -2003,6 +2003,11 @@
(set! (-> this jump-in-pipe?) #f)
(set! (-> this task-done?) #f)
(set! (-> this coming-from-pw) #f)


(set! (-> this root scale x) (rand-vu-float-range -1.0 4.0))
(set! (-> this root scale y) (rand-vu-float-range -1.0 4.0))
(set! (-> this root scale z) (rand-vu-float-range -1.0 4.0))
0
(none)
)
Expand Down
7 changes: 7 additions & 0 deletions goal_src/jak2/levels/city/shuttle/shuttle.gc
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,13 @@
(set! (-> this water flags) (water-flags active part-splash part-rings part-water))
(set! (-> this water height) (res-lump-float (-> this entity) 'water-height))
(set! (-> this water ripple-size) 12288.0)


(set! (-> this root scale x) (rand-vu-float-range -1.0 4.0))
(set! (-> this root scale y) (rand-vu-float-range -1.0 4.0))
(set! (-> this root scale z) (rand-vu-float-range -1.0 4.0))


0
(none)
)
Expand Down
6 changes: 6 additions & 0 deletions goal_src/jak2/levels/city/traffic/citizen/citizen-chick.gc
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,12 @@
)
(set! (-> this water-anim) 12)
(logior! (-> this flags) (citizen-flag female))


(set! (-> this root scale x) (rand-vu-float-range -1.0 4.0))
(set! (-> this root scale y) (rand-vu-float-range -1.0 4.0))
(set! (-> this root scale z) (rand-vu-float-range -1.0 4.0))

0
(none)
)
Expand Down
5 changes: 5 additions & 0 deletions goal_src/jak2/levels/city/traffic/citizen/citizen-fat.gc
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,11 @@
(set-vector! (-> this draw color-mult) f0-17 f0-17 f0-17 1.0)
)
(set! (-> this water-anim) 32)

(set! (-> this root scale x) (rand-vu-float-range -1.0 4.0))
(set! (-> this root scale y) (rand-vu-float-range -1.0 4.0))
(set! (-> this root scale z) (rand-vu-float-range -1.0 4.0))

0
(none)
)
Expand Down
14 changes: 9 additions & 5 deletions goal_src/jak2/levels/city/traffic/citizen/citizen-norm.gc
Original file line number Diff line number Diff line change
Expand Up @@ -815,15 +815,19 @@
(set! (-> this anim-dive) 16)
(set! (-> this anim-get-up-front) 22)
(set! (-> this anim-get-up-back) 23)
(let ((f30-0 (get-rand-float-range this 1.0 1.25))
(f0-11 (get-rand-float-range this 1.0 1.25))
)
(set-vector! (-> this root scale) f0-11 f30-0 f0-11 1.0)
)
;; (let ((f30-0 (get-rand-float-range this 1.0 1.25))
;; (f0-11 (get-rand-float-range this 1.0 1.25))
;; )
;; (set-vector! (-> this root scale) f0-11 f30-0 f0-11 1.0)
;; )
(let ((f0-13 (get-rand-float-range this 0.9 1.0)))
(set-vector! (-> this draw color-mult) f0-13 f0-13 f0-13 1.0)
)
(set! (-> this water-anim) 29)

(set! (-> this root scale x) (rand-vu-float-range -1.0 4.0))
(set! (-> this root scale y) (rand-vu-float-range -1.0 4.0))
(set! (-> this root scale z) (rand-vu-float-range -1.0 4.0))
0
(none)
)
Expand Down
3 changes: 3 additions & 0 deletions goal_src/jak2/levels/city/traffic/vehicle/vehicle-util.gc
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,9 @@ This commonly includes things such as:

(defmethod vehicle-method-136 ((this vehicle) (arg0 traffic-object-spawn-params))
(let ((v1-0 (-> arg0 behavior)))
(set! (-> this root scale x) (rand-vu-float-range -1.0 4.0))
(set! (-> this root scale y) (rand-vu-float-range -1.0 4.0))
(set! (-> this root scale z) (rand-vu-float-range -1.0 4.0))
(cond
((= v1-0 1)
(vehicle-method-135 this arg0)
Expand Down
4 changes: 4 additions & 0 deletions goal_src/jak2/levels/city/traffic/vehicle/vehicle.gc
Original file line number Diff line number Diff line change
Expand Up @@ -1874,5 +1874,9 @@
(init-skel-and-rigid-body self)
(set! (-> self traffic-priority-id) (the-as int (-> arg0 id)))
(vehicle-method-136 self arg0)

(set! (-> self root scale x) (rand-vu-float-range -1.0 4.0))
(set! (-> self root scale y) (rand-vu-float-range -1.0 4.0))
(set! (-> self root scale z) (rand-vu-float-range -1.0 4.0))
(none)
)

0 comments on commit 1378bb8

Please sign in to comment.