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;
|
_object setMass _mass;
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
[QGVAR(awake), {
|
|
||||||
params ["_object", "_awake"];
|
|
||||||
_object awake _awake;
|
|
||||||
}] call CBA_fnc_addEventHandler;
|
|
||||||
|
|
||||||
[QGVAR(disableWeaponAssembly), {
|
[QGVAR(disableWeaponAssembly), {
|
||||||
params ["_object", "_set"];
|
params ["_object", "_set"];
|
||||||
_object enableWeaponDisassembly (_set < 1);
|
_object enableWeaponDisassembly (_set < 1);
|
||||||
|
@ -67,6 +67,18 @@ if (isNil QGVAR(maxWeightCarryRun)) then {
|
|||||||
_clone setMimic "unconscious";
|
_clone setMimic "unconscious";
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] 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), {
|
[QGVAR(moveCorpse), {
|
||||||
params ["_corpse", "_dir", "_pos"];
|
params ["_corpse", "_dir", "_pos"];
|
||||||
|
|
||||||
@ -76,10 +88,8 @@ if (isNil QGVAR(maxWeightCarryRun)) then {
|
|||||||
// Bring corpse back to clone's position
|
// Bring corpse back to clone's position
|
||||||
_corpse setPosATL _pos;
|
_corpse setPosATL _pos;
|
||||||
|
|
||||||
// Sync the corpse
|
// Sync the corpse with its position
|
||||||
[QEGVAR(common,awake), [_corpse, true]] call CBA_fnc_globalEvent;
|
[QGVAR(syncCorpse), _corpse] call CBA_fnc_globalEvent;
|
||||||
[QEGVAR(common,awake), [_corpse, false]] call CBA_fnc_globalEvent;
|
|
||||||
[QEGVAR(common,awake), [_corpse, true]] call CBA_fnc_globalEvent;
|
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
// Display event handler
|
// Display event handler
|
||||||
|
@ -54,17 +54,11 @@ if (_isInRemainsCollector) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Make sure clone has the same wound textures as the corpse
|
// Make sure clone has the same wound textures as the corpse
|
||||||
private _targetDamage = damage _target;
|
_clone setDamage ((damage _target) min 0.99); // don't kill the clone
|
||||||
|
|
||||||
if (_targetDamage != 0) then {
|
|
||||||
_clone setDamage (_targetDamage min 0.99); // don't kill the clone
|
|
||||||
};
|
|
||||||
|
|
||||||
private _relevantHitpoints = ["HitHead", "HitBody", "HitHands", "HitLegs"];
|
|
||||||
|
|
||||||
{
|
{
|
||||||
_clone setHitPointDamage [_x, (_target getHitPointDamage _x) min 0.99];
|
_clone setHitPointDamage [_x, (_target getHitPointDamage _x) min 0.99];
|
||||||
} forEach _relevantHitpoints;
|
} forEach ["HitHead", "HitBody", "HitHands", "HitLegs"]; // relevant hitpoints
|
||||||
|
|
||||||
// Disable all damage
|
// Disable all damage
|
||||||
_clone allowDamage false;
|
_clone allowDamage false;
|
||||||
|
Loading…
Reference in New Issue
Block a user