mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Fixe for exploding new spaned Vehicles
"HitHull" > 0.95 causes exploding Landvehicles
This commit is contained in:
parent
52e02b954c
commit
e286914461
@ -29,7 +29,7 @@ if !(isNull _vehObj) then{
|
|||||||
// add random damage to vehicle (avoid setting engine or fuel to 100% damage to prevent instant destruction)
|
// add random damage to vehicle (avoid setting engine or fuel to 100% damage to prevent instant destruction)
|
||||||
if (_spawnDamaged) then {
|
if (_spawnDamaged) then {
|
||||||
{
|
{
|
||||||
_maxDamage = if (_x in ["HitEngine","HitFuel"]) then {0.9} else {1};
|
_maxDamage = if (_x in ["HitEngine","HitFuel","HitHull"]) then {0.9} else {1};
|
||||||
_vehObj setHitIndex [_forEachIndex,((random 1 max 0.1) min _maxDamage)];
|
_vehObj setHitIndex [_forEachIndex,((random 1 max 0.1) min _maxDamage)];
|
||||||
} forEach ((getAllHitPointsDamage _vehObj) param [0,[]]);
|
} forEach ((getAllHitPointsDamage _vehObj) param [0,[]]);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user