ludic.nav, ludic.wildlife (18.4): a walker's separation, and a species' spacing
nav_crowd_add takes how hard a walker keeps its distance, and WildSpecies.spacing (default 2) is a species' room from others walking by, which the valley hands the crowd. Both libraries are rebuilt; nav 15/15 on the Mac and the PC, DLL KERNEL32 only. wildlife 26/26. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
95f2087148
commit
d83eabfdf1
8 changed files with 17 additions and 14 deletions
|
|
@ -20,11 +20,12 @@ function nv_crowd_drop(nav_st: mut NavState, kind: int) -> void {
|
|||
nav_st.nv_crowds[kind] = null
|
||||
}
|
||||
|
||||
# a walker at (x, y, z) with its width, height, top speed and taste: its index, or -1
|
||||
export function nav_crowd_add(nav_st: NavState, kind: int, x: float, y: float, z: float, radius: float, height: float, speed: float, filter: int) -> int {
|
||||
# a walker at (x, y, z) with its width, height, top speed, taste and how hard it keeps its distance
|
||||
# from the others (2 an ordinary walker): its index, or -1
|
||||
export function nav_crowd_add(nav_st: NavState, kind: int, x: float, y: float, z: float, radius: float, height: float, speed: float, filter: int, separation: float) -> int {
|
||||
let c = nv_crowd(nav_st, kind)
|
||||
if c == null { return -1 }
|
||||
return nvc_crowd_add(c, x, y, z, radius, height, speed, filter)
|
||||
return nvc_crowd_add(c, x, y, z, radius, height, speed, filter, separation)
|
||||
}
|
||||
export function nav_crowd_remove(nav_st: NavState, kind: int, i: int) -> void {
|
||||
let c = nv_crowd(nav_st, kind)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue