ludic.wildlife, ludic.npc (18.3): a crowd walker carries its walker's id (set_crowd(a, id), -1 off)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 00:32:25 +03:00
parent 24c16ebee4
commit 9ec1b3a9bf
6 changed files with 13 additions and 5 deletions

View file

@ -64,7 +64,10 @@ function np_crowd_want(p: NpcPerson, speed: float) -> void {
p.goal_z = p.tz
p.goal_speed = speed
}
export function npc_set_crowd(p: NpcPerson, on: bool) -> void { p.crowd = on }
export function npc_set_crowd(p: NpcPerson, id: int) -> void {
p.crowd_id = id
p.crowd = id >= 0
}
export function npc_moved(p: NpcPerson, x: float, z: float, vx: float, vz: float) -> void {
let dx = x - p.x
let dz = z - p.z