mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Destroy projectile on all clients
The projectile needs to be destroyed on all clients to stop it from being simulated. If not destroyed where projectile is local, it will still explode when hitting the ground. If not destroyed on remote clients, the projectile will still be visible but deal no damage
This commit is contained in:
parent
d8eb425ece
commit
d50491f44f
@ -90,5 +90,11 @@ GVAR(projectilesToIntercept) = [];
|
||||
};
|
||||
}] call CBA_fnc_addClassEventHandler;
|
||||
|
||||
// Needed on all clients to properly destroy it. Despite the fact that deleteVehicle is AG EG, unless if you delete it on all clients there will still be missiles seen
|
||||
[QGVAR(destroyProjectile), {
|
||||
params ["_projectile"];
|
||||
deleteVehicle _projectile;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
ADDON = true;
|
||||
|
||||
|
@ -45,7 +45,7 @@ GVAR(interceptors) = GVAR(interceptors) select {
|
||||
// if we overshot target, dont take out target
|
||||
if (_minDistance <= _lastDistance && { GVAR(proximityFuseFailureChance) <= random 1 }) then {
|
||||
private _explosion = createVehicle ["SmallSecondary", _target, [], 0, "CAN_COLLIDE"];
|
||||
deleteVehicle _target;
|
||||
[QGVAR(destroyProjectile), [_target]] call CBA_fnc_globalEvent;
|
||||
};
|
||||
false
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user