Menu

Commit [r3685]  Maximize  Restore  History

1. New model header command attackthrottle.

attackthrottle {rate} {time}

rate: chance to cancel attack (must be between 0.0 and 1.0)
time: in seconds, how long should this entity stay tame until next check, the engine will generate a random number between 0 and this value.

note: some action will cancel the timer, for example, getting hit. Seeing the target block or attacking will also affects the timer. A value of 0.5-0.75 should be OK.

2. Move AI character grab logic from move code to attack code.

3. Only check attack every 4 loops. Assume it won't cause much difference because even 0.04 second is beyond human reaction. This should be able to save some CPU power.

utunnels 2012-05-03