mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 19:06:29 +03:00
Optimize save after trade
See my comment on b806043
Veh_setFixServer only runs on the server, so the client does not need to
compile it.
The PVDZ_veh_Save PVEH is only added on the server, so it should never
be sent with regular publicVariable anymore.
This commit is contained in:
@@ -9,18 +9,8 @@ if (_selection != "" and local _unit) then {
|
||||
//player sidechat str _damage;
|
||||
_unit setVariable [_strH,_damage,true];
|
||||
if (_damage == 0) then {
|
||||
if (isServer) then {
|
||||
[_unit,"repair"] call server_updateObject
|
||||
} else {
|
||||
PVDZ_veh_Save = [_unit,"repair"];
|
||||
publicVariable "PVDZ_veh_Save";
|
||||
};
|
||||
[_unit,"repair"] call server_updateObject;
|
||||
} else {
|
||||
if (isServer) then {
|
||||
[_unit,"damage"] call server_updateObject
|
||||
} else {
|
||||
PVDZ_veh_Save = [_unit,"damage"];
|
||||
publicVariable "PVDZ_veh_Save";
|
||||
};
|
||||
[_unit,"damage"] call server_updateObject;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user