issues
search
dvize
/
Donuts
MIT License
16
stars
12
forks
source link
Fix more issues with despawning
#12
Closed
DrakiaXYZ
closed
1 year ago
DrakiaXYZ
commented
1 year ago
Don't despawn any bots that haven't been alive for atleast 10 seconds (Stops issues with despawning a bot directly after it spawns)
Perf optimization: Don't use LINQ (memory allocation), and use .sqrMagnitude instead of Vector3.distance (avoid square root)
Remove bot from bleeding character list before despawning
Switch to new despawn method that doesn't utilize asset pool, to avoid issues we had with gameObject re-use