Page MenuHomeFeedback Tracker

[BUG] Spectacular "HandleDamage" failure [video]
Feedback, WishlistPublic

Description

Adding "handledamage" and feeding 0 damage to the engine causes never ending avalanche of explosions:

http://www.youtube.com/watch?v=Pz8UGlqLcvI

Details

Legacy ID
3914345050
Severity
None
Resolution
Open
Reproducibility
Have Not Tried
Operating System
Windows 7
Category
Engine
Steps To Reproduce

Create AH-9 on Altis next to powerline.
In init field of the heli type:

this addeventhandler ["handledamage", {0}];

This should stop it from taking damage.
Fly into powerline.
Watch game getting confused.

Adding no handledamage EH or adding
this addeventhandler ["handledamage", {_this select 2}];

doesn't seem to cause any problems.

Other combinations that cause avalanche:

this addeventhandler ["handledamage", {0.01}];
this addeventhandler ["handledamage", {0.1}];
this addeventhandler ["handledamage", {0.9}];

Event Timeline

Killzone_Kid edited Additional Information. (Show Details)
Killzone_Kid set Category to Engine.
Killzone_Kid set Reproducibility to Have Not Tried.
Killzone_Kid set Severity to None.
Killzone_Kid set Resolution to Open.
Killzone_Kid set Legacy ID to 3914345050.May 7 2016, 4:25 PM
Bohemia added a subscriber: AD2001.Sep 1 2013, 12:11 PM

That is a real bad bug

MadDogX added a subscriber: MadDogX.May 7 2016, 4:25 PM

Tested and successfully reproduced in latest dev build.

Bohemia added a subscriber: Bohemia.May 7 2016, 4:25 PM

That was one of the most amazing bugs I've ever seen, it made me cry from laugher.

Today's handledamage change did not affect this bug

A word on the street this should be fixed tomorrow!

I am really very sorry for confusion. I didn't pay enough attention. I was talking about this one: http://feedback.arma3.com/view.php?id=6644

I've investigated this issue further. These are my finding:

The chain explosion is caused by repeated calling of custom air destruction script. This initially is called from the "killed" config event handler. This leads me to believe that somehow config event handler "killed" ignores the fact that handledamage event handler returns 0. Handledamage keeps helicopter alive while config "killed" keeps on executing because helicopter is supposed to be dead.

Script added "killed" event handler never gets executed. Further more I found error in scripted destruction script which is located in a3\functions_f\Effects\fn_effectKilledAirDestruction.sqf

line 47: if (_velz>1) then (_v setvelocity [velocity _v select 0,velocity _v select 1,0]);

the use of () instead of {}

Changing category from scripting to engine

Soon will be a year since this has been submitted. Just wondering is this going to be fixed at all?

bux578 added a subscriber: bux578.May 7 2016, 4:25 PM

This is coming from the AGM-Team:

Even:

(vehicle player) removeAllEventHandlers "EPEContactStart"; (vehicle player) removeAllEventHandlers "EPEContact"; (vehicle player) removeAllEventHandlers "EPEContactEnd"; (vehicle player) removeAllEventHandlers "Hit"; (vehicle player) removeAllEventHandlers "HitPart"; (vehicle player) removeAllEventHandlers "HandleDamage"; (vehicle player) addEventHandler ["HandleDamage", {(_this select 2) min 0.89}];

still results in explosions

If you remove the killed EH

(vehicle player) removeAllEventHandlers "Killed";

no more explosions but the helicopter still dies

using:

(vehicle player) removeAllEventHandlers "EpeContactStart"; (vehicle player) removeAllEventHandlers "EpeContact"; (vehicle player) removeAllEventHandlers "EPEContactContactEnd"; (vehicle player) removeAllEventHandlers "Hit"; (vehicle player) removeAllEventHandlers "HitPart"; (vehicle player) removeAllEventHandlers "Killed"; (vehicle player) removeAllEventHandlers "HandleDamage"; (vehicle player) addEventHandler ["epeContact", {(_this select 0) setdamage 0}];

works, at least partially. The chopper bounces a couple of times then it explodes when it rolls over

BIS_fnc_KK updated the task description. (Show Details)
BIS_fnc_KK edited Steps To Reproduce. (Show Details)
BIS_fnc_KK edited Additional Information. (Show Details)
BIS_fnc_KK set Operating System to Windows 7.
BIS_fnc_KK added a subscriber: DarkDruid.

Revision: 147668

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.May 30 2021, 1:09 PM
BIS_fnc_KK changed the task status from Assigned to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.