Commit Graph

3 Commits (8cb5f2a5673165d732790e6440e9cd90b71074d4)

Author SHA1 Message Date
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
ζeh Matt 08fae7be6e
Pass the prng from world where appropriate 3 years ago
elsid 675c0ab72f
Apply uniform random deviation to AI reaction timer
This allows to distribute AI reaction calls over time.

Before this change actors appearing at the same frame will react in the same
frame over and over because AI reaction period is constant. It creates a
non-uniform CPU usage over frames. If a single frame has too many AI reactions
it may cause stuttering when there are too many actors on a scene for current
system.

Another concern is a synchronization of actions between creatures and NPC.
They start to go or hit at the same frame that is unnatural.
4 years ago