mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
@@ -15,20 +15,21 @@ class Submarine_DZE_base: Submarine
|
||||
mapSize = 6;
|
||||
vehicleClass = "DayZ Epoch Vehicles";
|
||||
//vehicle characteristics
|
||||
maxSpeed = 125;
|
||||
maxSpeed = 60;
|
||||
brakeDistance = 20;
|
||||
armor = 20;
|
||||
armor = 40;
|
||||
damageResistance = 0.00318;
|
||||
crewVulnerable = 1;
|
||||
castDriverShadow = 0;
|
||||
castCargoShadow = 0;
|
||||
supplyRadius = 5;
|
||||
fuelCapacity = 150;
|
||||
hasGunner = 0;
|
||||
enableManualFire = 0;
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
precision = 10;
|
||||
enableGPS = false;
|
||||
enableGPS = 0;
|
||||
memoryPointsGetInDriver = "pos driver";
|
||||
memoryPointsGetInDriverDir = "pos driver dir";
|
||||
memoryPointsGetInCargo = "pos cargo";
|
||||
|
||||
13
SQF/dayz_code/compile/submarine_surface.sqf
Normal file
13
SQF/dayz_code/compile/submarine_surface.sqf
Normal file
@@ -0,0 +1,13 @@
|
||||
local _vehicle = _this select 0;
|
||||
local _unit = _this select 2;
|
||||
local _driver = driver _vehicle;
|
||||
|
||||
if ((_unit != player) || {!(isNull _driver) && {_driver != _unit}}) exitwith {};
|
||||
|
||||
while {_vehicle isKindOf "Submarine_DZE_base"} do {
|
||||
local _pos = getposATL _vehicle;
|
||||
if (((_vehicle animationphase "dive") > 0.5) && {(_pos select 2) < 10}) then {
|
||||
_vehicle animate ["dive", 0];
|
||||
};
|
||||
uisleep 1;
|
||||
};
|
||||
@@ -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]);
|
||||
|
||||
@@ -59,7 +59,7 @@ if (_characterID != "?") then {
|
||||
//if player object is alive lets sync the player and remove the body and if ghosting is active add the player id to the array
|
||||
if (alive _playerObj) then {
|
||||
// High priority. Sync must finish fast before player object isNull
|
||||
[_playerObj,nil,"",[],_inCombat] call server_playerSync;
|
||||
[_playerObj,nil,nil,nil,_inCombat] call server_playerSync;
|
||||
|
||||
/*
|
||||
Low priority code below this point where
|
||||
@@ -71,7 +71,7 @@ if (_characterID != "?") then {
|
||||
// Moved setVariables to server_playerSync since they are high priority
|
||||
// Messages are low priority. Player object not needed
|
||||
diag_log format["PLAYER COMBAT LOGGED: %1(%3) at location %2",_playerName,_playerPos,_playerUID];
|
||||
[nil, nil, rTitleText, format["PLAYER COMBAT LOGGED: %1",_playerName], "PLAIN"] call RE; // Message whole server
|
||||
[nil, nil, rTitleText, format["Player %1 combat logged at location %2.",_playerName, mapGridPosition _playerPos], "PLAIN"] call RE; // Message whole server
|
||||
};
|
||||
|
||||
if (dayz_enableGhosting) then {
|
||||
|
||||
@@ -239,7 +239,7 @@ _playerObj setVariable ["lastTime",diag_ticktime];
|
||||
|
||||
//set server-side inventory variable to monitor player gear
|
||||
if (count _inventory > 2) then {
|
||||
_playerObj setVariable["ServerMagArray",[_inventory select 1,_inventory select 2], false];
|
||||
_playerObj setVariable["ServerMagArray",[_inventory select 1,_inventory select 2,_inventory select 0], false];
|
||||
};
|
||||
|
||||
//Record Player Login/LogOut
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
local _character = _this select 0;
|
||||
local _magazines = _this select 1;
|
||||
local _dayz_onBack = _this select 2;
|
||||
local _weapons = _this select 3;
|
||||
local _weaponsPlayer = _this select 3;
|
||||
local _characterID = _character getVariable ["characterID","0"];
|
||||
local _playerUID = getPlayerUID _character;
|
||||
local _charPos = getPosATL _character;
|
||||
@@ -41,7 +41,7 @@ local _usec_Dead = _character getVariable ["USEC_isDead",false];
|
||||
local _lastTime = _character getVariable ["lastTime",-1];
|
||||
local _modelChk = _character getVariable ["model_CHK",""];
|
||||
local _temp = round (_character getVariable ["temperature",100]);
|
||||
local _lastMagazines = _character getVariable ["ServerMagArray",[[],""]];
|
||||
local _lastMagazines = _character getVariable ["ServerMagArray",[[],"",[]]];
|
||||
//Get difference between current stats and stats at last sync
|
||||
local _statsDiff = [_character,_playerUID] call server_getStatsDiff;
|
||||
_humanity = _statsDiff select 0;
|
||||
@@ -54,11 +54,17 @@ local _charPosLen = count _charPos;
|
||||
local _magTemp = [];
|
||||
|
||||
if (!isNil "_magazines") then {
|
||||
_playerGear = [_weapons,_magazines,_dayz_onBack];
|
||||
_character setVariable["ServerMagArray",[_magazines,_dayz_onBack], false];
|
||||
_playerGear = [_weaponsPlayer,_magazines,_dayz_onBack];
|
||||
_character setVariable["ServerMagArray",[_magazines,_dayz_onBack,_weaponsPlayer], false];
|
||||
} else {
|
||||
//check Magazines everytime they aren't sent by player_forceSave
|
||||
_magTemp = (_lastMagazines select 0);
|
||||
if (isNil "_dayz_onBack") then {
|
||||
_dayz_onBack = _lastMagazines select 1;
|
||||
};
|
||||
if (isNil "_weaponsPlayer") then {
|
||||
_weaponsPlayer = _lastMagazines select 2;
|
||||
};
|
||||
if (count _magTemp > 0) then {
|
||||
_magazines = [(magazines _character),20] call array_reduceSize;
|
||||
{
|
||||
@@ -77,10 +83,14 @@ if (!isNil "_magazines") then {
|
||||
};
|
||||
} forEach (_lastMagazines select 0);
|
||||
_magazines = _magTemp - ["0"];
|
||||
_magazines = [_magazines, (_lastMagazines select 1)];
|
||||
_magazines = [_magazines,_dayz_onBack,_weaponsPlayer];
|
||||
_character setVariable["ServerMagArray",_magazines, false];
|
||||
_playerGear = [_weapons,_magazines select 0,_magazines select 1];
|
||||
_playerGear = [_magazines select 2,_magazines select 0,_magazines select 1];
|
||||
} else {
|
||||
_magazines = [_magTemp,_dayz_onBack,_weaponsPlayer];
|
||||
};
|
||||
_character setVariable["ServerMagArray",_magazines, false];
|
||||
_playerGear = [_magazines select 2,_magazines select 0,_magazines select 1];
|
||||
};
|
||||
|
||||
//Check if update is requested
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
5 allMissionObjects !"[_x,2,0,false,false] spawn BIS_Effects_Burn;\n};\n} count allMissionObjects \"SpawnableWreck\";"
|
||||
5 allowDammage
|
||||
5 allUnits !"} count allUnits;\nlbSort _playerList;" !"if (getPlayerUID _x == _this) exitWith {\n_player = _x;\n};\n} count allUnits;" !"owner _x publicVariableClient \"PVDZ_groupInvite\";\n};\n} count allUnits;" !=" select 1 != 0}) exitWith {\n_targeted = true;\n};\n};\n} count allUnits;\nif (_targeted) exitWith {localize \"str_player_fail_wear4\" "
|
||||
5 attachTo !"(_variation * 2)) - _variation)];\n_bolt attachTo [_hitObject,_val,_hitMemoryPt];" !"player playActionNow \"PutDown\";\nuiSleep 2;\n_flare attachTo [player,[0,0,0],\"granat2\"];" !"tchmove \"ainjpfalmstpsnonwrfldnon_carried_still\";\n_dragee attachto [_unit,[-0.2, 0.2, 0]];" !"_source setDropInterval 0.02;\n_point attachTo [_unit,_modelPos,_wound];" !" attachto [_v,[0,0,0],\"destructionEffect" !"publicVariable \"PVDZ_drg_RaDrag\";\n\n_dragee attachto [_unit,[0.1, 1.01, 0]];" !="_l1 attachTo [_lh,[0,0,0],\"light\"];" !"_objectHelper attachTo [player,_offset];" !"_object attachTo [player,_offset];\n\n_position = getPosATL _object;" !="_vehicle attachTo [_liftHeli,[0,0,-7]];" !="_obj attachTo [_axis];" !"_objectSnapGizmo attachTo [_object,[_x select 0,_x select 1,_x select 2]];" !="_vehicle attachTo [_towTruck,[1.3,-2,2.3]];" !"localize \"STR_EPOCH_ACTIONS_ATTACHTOHELI\"," !=" (getDir _object);\n_objectHelper setPosATL _newPos;\n_object attachTo [_objectHelper];\n_x setobjecttexture [0,\"#(argb,8,8,3)color" !"rInput false; disableUserInput false;\nuiSleep .5;\n\n\n_dragee attachto [_medic,[0.1, 1.01, 0]];\n\n\nPVDZ_send = [_dragee,\"DragPlayer"
|
||||
5 attachTo !"(_variation * 2)) - _variation)];\n_bolt attachTo [_hitObject,_val,_hitMemoryPt];" !"player playActionNow \"PutDown\";\nuiSleep 2;\n_flare attachTo [player,[0,0,0],\"granat2\"];" !"tchmove \"ainjpfalmstpsnonwrfldnon_carried_still\";\n_dragee attachto [_unit,[-0.2, 0.2, 0]];" !"_source setDropInterval 0.02;\n_point attachTo [_unit,_modelPos,_wound];" !" attachto [_v,[0,0,0],\"destructionEffect" !"publicVariable \"PVDZ_drg_RaDrag\";\n\n_dragee attachto [_unit,[0.1, 1.01, 0]];" !="_l1 attachTo [_lh,[0,0,0],\"light\"];" !"_objectHelper attachTo [player,_offset];" !"_object attachTo [player,_offset];\n\n_position = getPosATL _object;" !="_vehicle attachTo [_liftHeli,[0,0,-7]];" !="_obj attachTo [_axis];" !"_objectSnapGizmo attachTo [_object,[_x select 0,_x select 1,_x select 2]];" !="_vehicle attachTo [_towTruck,[1.3,-2,2.3]];" !"localize \"STR_EPOCH_ACTIONS_ATTACHTOHELI\"," !=" (getDir _object);\n_objectHelper setPosATL _newPos;\n_object attachTo [_objectHelper];\n_x setobjecttexture [0,\"#(argb,8,8,3)color" !"rInput false; disableUserInput false;\nuiSleep .5;\n\n\n_dragee attachto [_medic,[0.1, 1.01, 0]];\n\n\nPVDZ_send = [_dragee,\"DragPlayer" !="cts, 3];\nif (count _dropObjects > 0) exitWith {};\n\n\n_dragee attachto [_medic,[0.1, 1.01, 0]];\n\n\nPVDZ_send = [_dragee,\"CarryPlaye"
|
||||
1 bankMoney !=" [\"globalMoney\", _globalCoins, true];\nplayer setVariable [\"bankMoney\", _bankCoins, true];\n};\ndayz_musicH = [] spawn player_music" !="]];\nctrlSetText [23002,format[\"%1 %2\",player getVariable [\"bankMoney\",0] call BIS_fnc_numberText,CurrencyName]];\n};\n\nATMDialogWi" !="ariable [\"cashMoney\",0];\n_bankCoins = player getVariable [\"bankMoney\",0];\n_globalCoins = player getVariable [\"globalMoney\",0];\n}" !=" \nZSC_limitOnBank = true; \nZSC_bankObjects = [\"\"]; \nZSC_maxBankMoney = 500000; \nZSC_defaultStorageMultiplier = 200; \nZSC_MaxMone" !="Z_showBankUI) then {\nlocal _bankAmt = player getVariable [\"bankMoney\",0];\n_string = _string + format [\"<t size='0.9'>%1 </t><img"
|
||||
5 buttonSetAction
|
||||
5 callExtension
|
||||
|
||||
Reference in New Issue
Block a user