View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004982||The Dark Mod||AI||public||31.01.2019 13:10||18.02.2019 21:17|
|Product Version||TDM 2.07|
|Target Version||TDM 2.08||Fixed in Version|
|Summary||0004982: KO'ed AI should drown faster|
|Description||There have been reports of KOing AI and dropping them into water, expecting they'll drown.|
But it takes a long time.
Investigate and make sure that drowning is more realistic. (I.e. there's no 'grace period' like there is with the player, who is conscious.)
|Tags||No tags attached.|
|As far as I can tell, AI use the same airless damage routine as the player. Hence, reducing their airtics should already do the trick.|
AI and the Player use different routines. (UpdateAir())
What I was looking for was if AI were KO'ed, not to let the "grace period" apply. That code is already there. So reducing the airtics for a KO'ed AI won't change anything, since it's already reduced to 0 each time the AI breathes.
One problem I see is the setting of m_AirCheckInterval, which is set once at spawn time, to a random duration of 1-5 seconds. So if an AI is assigned a value near 5, he'll drown more slowly than an AI who's assigned a value near 1.
To provide more uniformity, m_AirCheckInterval should prolly be recalculated each time UpdateAir() is run, rather than use a fixed value set at spawn time.
Math with current code:
Assume 100 health.
Air damage is 10.
Quick-dying KO'ed AI will die in (1 + random interval)*health/damage, so (1+0)*100/10 = 10 seconds. Slower dying AI can take up to (1+4)*100/10 = 50 seconds. It's these later guys that are prolly causing the reports to come in.
Math with random intervals recalculated each breath:
(1+4/2)*100/10 = 30 seconds.
To make them die more quickly, the "4" can be lowered, so a random duration will be between, say, 1s and 3s, which would reduce death to
(1+2/2)*100/10 = 20 seconds.
Something like that.
|31.01.2019 13:10||grayman||New Issue|
|31.01.2019 13:10||grayman||Status||new => assigned|
|31.01.2019 13:10||grayman||Assigned To||=> grayman|
|01.02.2019 18:23||STiFU||Note Added: 0011531|
|01.02.2019 19:00||grayman||Note Added: 0011533|
|01.02.2019 19:01||grayman||Note Edited: 0011533||View Revisions|
|18.02.2019 21:17||STiFU||Relationship added||related to 0003295|