mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-22 03:16:27 +03:00
Init more or less done
This commit is contained in:
@@ -4,16 +4,21 @@ ASSIGN DAMAGE HANDLER TO A UNIT
|
||||
- unit call fnc_veh_ResetEH
|
||||
************************************************************/
|
||||
|
||||
_this removeAllEventHandlers "HandleDamage";
|
||||
_this removeAllEventHandlers "Killed";
|
||||
_this addeventhandler ["HandleDamage",{ _this call vehicle_handleDamage } ];
|
||||
_this addeventhandler ["Killed",{ _this call vehicle_handleKilled } ];
|
||||
if (_this isKindOf "AllVehicles") then {
|
||||
|
||||
if (isServer) then {
|
||||
_this removeAllEventHandlers "GetOut";
|
||||
_this removeAllEventHandlers "GetIn";
|
||||
_this addEventHandler ["GetOut", {[(_this select 0),"all"] call server_updateObject;}];
|
||||
_this addEventHandler ["GetIn", {[(_this select 0),"all"] call server_updateObject; _this call server_checkIfTowed;}];
|
||||
};
|
||||
_this removeAllEventHandlers "HandleDamage";
|
||||
_this removeAllEventHandlers "Killed";
|
||||
_this addeventhandler ["HandleDamage",{ _this call fnc_veh_handleDam } ];
|
||||
_this addeventhandler ["Killed",{ _this call fnc_veh_handleKilled } ];
|
||||
_this addEventHandler ["GetOut", { _this call vehicle_getOut }];
|
||||
|
||||
//diag_log(format["%1: all EH reset for %2", __FILE__, _this]);
|
||||
if (isServer) then {
|
||||
_this removeAllEventHandlers "GetOut";
|
||||
_this removeAllEventHandlers "GetIn";
|
||||
_this addEventHandler ["GetOut", {[(_this select 0),"all",true] call server_updateObject;}];
|
||||
_this addEventHandler ["GetIn", {[(_this select 0),"all",true] call server_updateObject; _this call server_checkIfTowed;}];
|
||||
//_this addEventHandler ["Engine", { }];
|
||||
};
|
||||
|
||||
//diag_log(format["%1: all EH reset for %2", __FILE__, _this]);
|
||||
};
|
||||
Reference in New Issue
Block a user