View Issue Details

IDProjectCategoryView StatusLast Update
0004982The Dark ModAIpublic11.02.2024 04:37
Reportergrayman Assigned To 
PrioritynormalSeveritynormalReproducibilityN/A
Status newResolutionopen 
Product VersionTDM 2.07 
Summary0004982: KO'ed AI should drown faster
DescriptionThere 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.)
Tagsrealism, water

Relationships

related to 0003295 new Make new damage def for drowning AI 

Activities

STiFU

STiFU

01.02.2019 18:23

developer   ~0011531

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.
grayman

grayman

01.02.2019 19:00

viewer   ~0011533

Last edited: 01.02.2019 19:01

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.

grayman

grayman

26.10.2020 23:07

viewer   ~0012839

Removing myself as "Assigned To" because I doubt I will ever have time to work on it.

Issue History

Date Modified Username Field Change
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
18.02.2019 21:17 STiFU Relationship added related to 0003295
22.03.2020 12:09 grayman Target Version TDM 2.08 => TDM 2.09
26.10.2020 23:07 grayman Assigned To grayman =>
26.10.2020 23:07 grayman Note Added: 0012839
15.12.2020 11:15 nbohr1more Target Version TDM 2.09 => TDM 2.10
16.02.2021 15:05 stgatilov Assigned To => stgatilov
16.02.2021 15:05 stgatilov Status assigned => new
16.02.2021 15:07 stgatilov Assigned To stgatilov =>
15.03.2021 15:45 stgatilov Target Version TDM 2.10 =>
11.02.2024 04:37 Fiver Tag Attached: water
11.02.2024 04:37 Fiver Tag Attached: realism