This commit is contained in:
vbawol
2013-01-25 20:28:26 -06:00
parent aaa01cb0dd
commit fbb55f318c
16 changed files with 547 additions and 186 deletions

View File

@@ -61,12 +61,6 @@ if (!isDedicated) then {
zombie_loiter = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_loiter.sqf"; //Server compile, used for loiter behaviour
zombie_generate = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_generate.sqf"; //Server compile, used for loiter behaviour
//Wild
//wild_spawnZombies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\wild_spawnZombies.sqf";
//Maps
//fnc_MapEventHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fnc_MapEventHandler.sqf";
//
dog_findTargetAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dog_findTargetAgent.sqf";
@@ -225,61 +219,6 @@ if (!isDedicated) then {
_success
};
dayz_disableRespawn = {
private["_display","_btnRespawn"];
if(r_fracture_legs) exitWith {};
disableSerialization;
waitUntil {
_display = findDisplay 49;
!isNull _display;
};
_btnRespawn = _display displayCtrl 1010;
_btnRespawn ctrlEnable false;
};
abort_enable = 0 spawn {};
dayz_disableAbort = {
private["_display","_btnAbort","_combattimeout","_zAround"];
_combattimeout = player getVariable["combattimeout",0];
_zAround = (count (player nearEntities ["zZombie_Base",50]) > 0);
if (_zAround || _combattimeout > time) then {
disableSerialization;
waitUntil {
_display = findDisplay 49;
!isNull _display;
};
_btnAbort = _display displayCtrl 104;
_btnAbort ctrlEnable false;
if (_zAround && _combattimeout <= time) then {
if (!scriptDone abort_enable) then {
terminate abort_enable;
sleep 0.5;
};
abort_enable = [] spawn {
private["_timeOut","_timeMax","_display","_btnAbort"];
_timeOut = 0;
_timeMax = 30;
disableSerialization;
while {_timeOut <= _timeMax} do {
scopeName "loop";
_display = findDisplay 49;
if (!isNull _display) then {
if (_timeOut == _timeMax) then {
_btnAbort = _display displayCtrl 104;
_btnAbort ctrlEnable true;
};
cutText [format ["You can Abort in %1",(_timeMax - _timeOut)], "PLAIN DOWN"];
} else {
breakOut "loop";
};
_timeOut = _timeOut + 1;
sleep 1;
};
cutText ["", "PLAIN DOWN"];
};
};
};
};
dayz_spaceInterrupt = {
private ["_dikCode", "_handled"];
@@ -334,12 +273,12 @@ if (!isDedicated) then {
if ((_dikCode == 0x38 or _dikCode == 0xB8) and (time - dayz_lastCheckBit > 10)) then {
call dayz_forceSave;
};
*/
if (_dikCode in actionKeys "IngamePause") then {
call dayz_forceSave;
_id = [] spawn dayz_disableRespawn;
_id = [] spawn dayz_disableAbort;
};
*/
_handled
};
@@ -462,6 +401,8 @@ if (!isDedicated) then {
fnc_isInsideBuilding = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_isInsideBuilding.sqf"; //_isInside = [_unit,_building] call fnc_isInsideBuilding;
dayz_zombieSpeak = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_speak.sqf"; //Used to generate random speech for a unit
vehicle_getHitpoints = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_getHitpoints.sqf";
local_gutObject = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_gutObject.sqf"; //Generated on the server (or local to unit) when gutting an object
local_gutObjectZ = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_gutObjectZ.sqf"; //Generated on the server (or local to unit) when gutting an object
local_zombieDamage = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandlerZ.sqf"; //Generated by the client who created a zombie to track damage
local_setFuel = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_setFuel.sqf"; //Generated when someone refuels a vehicle
local_eventKill = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_eventKill.sqf"; //Generated when something is killed

View File

@@ -53,6 +53,8 @@ registerBroadcastRpc = {
["dayzSetFuel", { (_this select 1) call local_setFuel; } ] call registerBroadcastRpc;
["dayzSetFix", { (_this select 1) call object_setFixServer; } ] call registerBroadcastRpc;
["dayzSetDate", { setDate (_this select 1); } ] call registerBroadcastRpc;
["dayzGutBody", { (_this select 1) call local_gutObject; } ] call registerBroadcastRpc;
["dayzGutBodyZ", { (_this select 1) call local_gutObjectZ; } ] call registerBroadcastRpc;
//EHs that setVariable "medForceUpdate" need to run on the server too
["usecMorphine", { (_this select 1) call player_medMorphine; } ] call registerBroadcastRpc;
["usecBandage", { (_this select 1) call player_medBandage; } ] call registerBroadcastRpc;