mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 17:20:26 +03:00
Add check to prevent submarine sink into the ground
This commit is contained in:
@@ -51,6 +51,7 @@ if (!isDedicated) then {
|
||||
player_regularSave = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_regularSave.sqf";
|
||||
player_forceSave = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_forceSave.sqf";
|
||||
vehicle_getOut = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_getOut.sqf";
|
||||
submarine_surface = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\submarine_surface.sqf";
|
||||
|
||||
//Objects
|
||||
object_setpitchbank = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_setpitchbank.sqf";
|
||||
|
||||
@@ -11,13 +11,15 @@ if (_this isKindOf "AllVehicles") then {
|
||||
_this addeventhandler ["HandleDamage",{ _this call fnc_veh_handleDam } ];
|
||||
_this addeventhandler ["Killed",{ _this call fnc_veh_handleKilled } ];
|
||||
_this addEventHandler ["GetOut", { _this call vehicle_getOut }];
|
||||
if (_this isKindOf "Submarine_DZE_base") then {
|
||||
_this addEventHandler ["GetIn", { _this spawn submarine_surface }];
|
||||
};
|
||||
|
||||
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