Page MenuHomeFeedback Tracker

handleDamage event is wrong for units in far-away static weapons
New, WishlistPublic

Description

On a clean game restart, "handleDamage" event handler will return incorrect results when hitting a far-away unit in a static weapon, for example:
[B Alpha 1-2:1 (Pabst Mirror (2)),"",5.93981,O Alpha 1-1:1 (Pabst Mirror) REMOTE,"B_762x54_Ball",-1]

Note the extremly high damage done (5.9 from a basic 7.62mm to body armor at range) and that is only returning a single line for structural damage instead of the normal return covering all hitpoints hit. I believe this is also why it ignores the unit's armor.

Once the player either zooms in enough (2nd zoom level on marksman @ 100m) or walks close enough to the any static weapon of the same type it will start returning normal handleDamage output. Once it works, it will continue to work throughout mission restarts.

We think that this is due to some kind of LOD issue. The game doesn't have the correct fire-LOD until it is loaded by getting close enough or zooming in.

This is reproduce-able in vanilla 1.54 and in 1.56 RC. {F27981}

Details

Legacy ID
549340211
Severity
None
Resolution
Open
Reproducibility
Always
Category
Health System
Steps To Reproduce
  1. Put a manned .50 cal static weapon (B_HMG_01_high_F) at least 100m from the player.
  2. Add a handleDamge EH:

{ _x addEventHandler ["HandleDamage", {diag_log text format ["HD: %1", _this]}]; } forEach allUnits; };

  1. Watch the output of handleDamage on the unit when shooting it (do not use a high powered scope).
  2. Restart and move very close or zoom in and notice change in output is now normal. Normal results will continue though mission restarts. It will take a full game restart to reproduce the error again.

In example mission compare results from using base zoom, then restart and use high zoom (Numpad +) on the marksman scope.

Additional Information

Incorrect (when shooting at range):
HD: [B Alpha 1-1:1,"",10.7343,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",-1]
HD: [B Alpha 1-1:1,"",10.7343,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",-1]

Expected (once moved close or high zoom used):
HD: [B Alpha 1-2:1,"head",0,<NULL-object>,"B_762x54_Ball",2]
HD: [B Alpha 1-2:1,"",0.322263,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",-1]
HD: [B Alpha 1-2:1,"",0.322263,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",-1]
HD: [B Alpha 1-2:1,"face_hub",0.0148875,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",0]
HD: [B Alpha 1-2:1,"neck",0.0619113,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",1]
HD: [B Alpha 1-2:1,"head",0,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",2]
HD: [B Alpha 1-2:1,"pelvis",0.0170523,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",3]
HD: [B Alpha 1-2:1,"spine1",0.0124072,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",4]
HD: [B Alpha 1-2:1,"spine2",0.611909,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",5]
HD: [B Alpha 1-2:1,"spine3",0.611909,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",6]
HD: [B Alpha 1-2:1,"body",0,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",7]
HD: [B Alpha 1-2:1,"arms",0.302021,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",8]
HD: [B Alpha 1-2:1,"hands",0.15242,O Alpha 1-1:1 (Pabst Mirror),"B_762x54_Ball",9]

Event Timeline

PabstMirror edited Additional Information. (Show Details)
PabstMirror set Category to Health System.
PabstMirror set Reproducibility to Always.
PabstMirror set Severity to None.
PabstMirror set Resolution to Open.
PabstMirror set Legacy ID to 549340211.May 8 2016, 1:40 PM

I just tried to preload object and did the trick

{1 preloadObject _x} foreach allunits

Unfortunately I'm not in a position to tell you if this is a bug or as designed.