mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Try syncing individually on each client
This commit is contained in:
parent
1a20df808e
commit
fdbaeabc47
@ -122,11 +122,6 @@
|
||||
_object setMass _mass;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(awake), {
|
||||
params ["_object", "_awake"];
|
||||
_object awake _awake;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(disableWeaponAssembly), {
|
||||
params ["_object", "_set"];
|
||||
_object enableWeaponDisassembly (_set < 1);
|
||||
|
@ -67,6 +67,18 @@ if (isNil QGVAR(maxWeightCarryRun)) then {
|
||||
_clone setMimic "unconscious";
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(syncCorpse),{
|
||||
params ["_corpse"];
|
||||
|
||||
[{
|
||||
_this awake true;
|
||||
|
||||
[{
|
||||
_this awake false;
|
||||
}, _this] call CBA_fnc_execNextFrame;
|
||||
}, _corpse] call CBA_fnc_execNextFrame;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(moveCorpse), {
|
||||
params ["_corpse", "_dir", "_pos"];
|
||||
|
||||
@ -76,10 +88,8 @@ if (isNil QGVAR(maxWeightCarryRun)) then {
|
||||
// Bring corpse back to clone's position
|
||||
_corpse setPosATL _pos;
|
||||
|
||||
// Sync the corpse
|
||||
[QEGVAR(common,awake), [_corpse, true]] call CBA_fnc_globalEvent;
|
||||
[QEGVAR(common,awake), [_corpse, false]] call CBA_fnc_globalEvent;
|
||||
[QEGVAR(common,awake), [_corpse, true]] call CBA_fnc_globalEvent;
|
||||
// Sync the corpse with its position
|
||||
[QGVAR(syncCorpse), _corpse] call CBA_fnc_globalEvent;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Display event handler
|
||||
|
@ -54,17 +54,11 @@ if (_isInRemainsCollector) then {
|
||||
};
|
||||
|
||||
// Make sure clone has the same wound textures as the corpse
|
||||
private _targetDamage = damage _target;
|
||||
|
||||
if (_targetDamage != 0) then {
|
||||
_clone setDamage (_targetDamage min 0.99); // don't kill the clone
|
||||
};
|
||||
|
||||
private _relevantHitpoints = ["HitHead", "HitBody", "HitHands", "HitLegs"];
|
||||
_clone setDamage ((damage _target) min 0.99); // don't kill the clone
|
||||
|
||||
{
|
||||
_clone setHitPointDamage [_x, (_target getHitPointDamage _x) min 0.99];
|
||||
} forEach _relevantHitpoints;
|
||||
} forEach ["HitHead", "HitBody", "HitHands", "HitLegs"]; // relevant hitpoints
|
||||
|
||||
// Disable all damage
|
||||
_clone allowDamage false;
|
||||
|
Loading…
Reference in New Issue
Block a user