getHitpoints function doesn't support reflector hitpoints
During tests of https://github.com/acemod/ACE3/pull/2230 i noticed that after dragging or carrying lamp reflectors are always working (event if damaged before).
The reason is that this dont support reflector hitpoints (or selections? only getHit return anything)
https://github.com/acemod/ACE3/blob/master/addons/common/functions/fnc_fixFloating.sqf#L24
I'll investigate. Doubt those can be manipulated with setHitPointDamage and getHitPointDamage though.
@commy2 look at #2279
@commy2 i've prepared https://github.com/acemod/ACE3/pull/2279 but have problem with setdamage.
I advice that you use the new
getAllHitPointsDamage cursorTarget
command
@SzwedzikPL
What about:
[cursorTarget] call ace_common_fnc_getReflectorsWithSelections
?
The problem is not exactly that getHitpoints doesn't support reflectors
After dragging some object (i.e. lamp with reflectors) we'r calling:
https://github.com/acemod/ACE3/blob/master/addons/dragging/functions/fnc_dropObject.sqf#L60
And in fixFloating fnc we do not support reflectors, so thats why reflectors are always working after drag/carry (even if damaged before)
https://github.com/acemod/ACE3/blob/master/addons/common/functions/fnc_fixFloating.sqf#L24
k. I understand now.
I'll see that I fix this after 3.3.0. Currently cleaning up (== incorperating new commands...) all the other stuff with hitpoints.
https://github.com/acemod/ACE3/pull/2319
@commy2 ok. Should I close https://github.com/acemod/ACE3/pull/2279 ?
Nah. Leave it open for now.
Fixed in #2601. Sry for this taking a month. Had other priorities even though this ended up being really simple.
This is not fixed. Please test it with https://github.com/acemod/ACE3/pull/2230
- Place
Portable Lights (double)fromObjects (construction) - Shot to one of the reflectors
- Carry lamp
- Place lamp
You'll see that after placing both reflectors are working.
allowDamage false from fixCollision blocks adding damage from setHitIndex
biki says
"The command does not prevent object from taking scripted damage such as setDamage or setHit. "
Can reproduce with this code having no effect:
qq1 allowDamage false;
qq1 setHitIndex [0,1];
Pabst, you are my hero again!
And a big FU to you BI.
Wiki is wrong. The same happens with:
cursorTarget allowDamage false;
cursorTarget setHit ["light_1_hitpoint", 1]
Can we swap order of the events? Or do we need to look into a proper "allowDamage" handler so we can disable and then reenable?
We can not swap the order of these commands. We will need a proper allowDamage function like forceWalk etc.
https://github.com/acemod/ACE3/issues/2757
Wiki is wrong. The same happens with:
Edit the BIKI! :grin:
Edited it. Also added that allowDamage false soldiers can still drown. (R.I.P. Ghost)