1.7.5.M1D7

This commit is contained in:
A Clark
2013-01-07 12:45:28 -06:00
parent ef2920120c
commit 944cd01129
33 changed files with 7972 additions and 469 deletions

View File

@@ -63,6 +63,10 @@ if (!isDedicated) then {
//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";
@@ -87,6 +91,8 @@ if (!isDedicated) then {
player_dropWeapon = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_dropWeapon.sqf";
player_setTrap = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_setTrap.sqf";
object_pickup = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_pickup.sqf";
player_flipvehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_flipvehicle.sqf";
player_sleep = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf";
//ui
player_selectSlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";
@@ -185,10 +191,10 @@ if (!isDedicated) then {
_tPos = eyePos _target; //(getPosASL _target);
_zPos = eyePos _agent; //(getPosASL _agent);
if ((count _tPos > 0) and (count _zPos > 0)) then {
_cantSee = terrainIntersectASL [(eyePos _target), (eyePos _agent)];
_cantSee = terrainIntersectASL [_tPos, _zPos];
//diag_log ("terrainIntersectASL: " + str(_cantSee));
if (!_cantSee) then {
_cantSee = lineIntersects [(eyePos _target), (eyePos _agent)];
_cantSee = lineIntersects [_tPos, _zPos];
//diag_log ("lineIntersects: " + str(_cantSee));
};
};
@@ -230,10 +236,12 @@ if (!isDedicated) then {
_btnRespawn ctrlEnable false;
};
abort_enable = 0 spawn {};
dayz_disableAbort = {
private["_display","_btnAbort","_combattimeout"];
private["_display","_btnAbort","_combattimeout","_zAround"];
_combattimeout = player getVariable["combattimeout",0];
if(_combattimeout < time) exitWith {};
_zAround = (count (player nearEntities ["zZombie_Base",50]) > 0);
if (_zAround || _combattimeout > time) then {
disableSerialization;
waitUntil {
_display = findDisplay 49;
@@ -241,6 +249,35 @@ if (!isDedicated) then {
};
_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 = {

View File

@@ -1,26 +1,5 @@
//Medical Event Handlers
"norrnRaLW" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\load_wounded.sqf"};
"norrnRLact" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\load\load_wounded.sqf"};
"norrnRDead" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\deadState.sqf"};
"usecBleed" addPublicVariableEventHandler {_id = (_this select 1) spawn fnc_usec_damageBleed};
"usecBandage" addPublicVariableEventHandler {(_this select 1) call player_medBandage};
"usecInject" addPublicVariableEventHandler {(_this select 1) call player_medInject};
"usecEpi" addPublicVariableEventHandler {(_this select 1) call player_medEpi};
"usecTransfuse" addPublicVariableEventHandler {(_this select 1) call player_medTransfuse};
"usecMorphine" addPublicVariableEventHandler {(_this select 1) call player_medMorphine};
"usecPainK" addPublicVariableEventHandler {(_this select 1) call player_medPainkiller};
"dayzHit" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageHandler};
"dayzHitV" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageVehicle};
"dayzHideBody" addPublicVariableEventHandler {hideBody (_this select 1)};
"dayzGutBody" addPublicVariableEventHandler {(_this select 1) spawn local_gutObject};
"dayzSetFuel" addPublicVariableEventHandler {(_this select 1) spawn local_sefFuel};
"dayzSetFix" addPublicVariableEventHandler {(_this select 1) call object_setFixServer};
"dayzDelLocal" addPublicVariableEventHandler {(_this select 1) call object_delLocal};
"dayzVehicleInit" addPublicVariableEventHandler {(_this select 1) call fnc_vehicleEventHandler};
"dayzHumanity" addPublicVariableEventHandler {(_this select 1) spawn player_humanityChange};
"dayz_serverObjectMonitor" addPublicVariableEventHandler {dayz_serverObjectMonitor = dayz_safety};
"dayzSetFuel" addPublicVariableEventHandler {(_this select 1) call local_sefFuel};
//Server only
if (isServer) then {
"dayzDeath" addPublicVariableEventHandler {(_this select 1) call server_playerDied};
"dayzDiscoAdd" addPublicVariableEventHandler {dayz_disco set [count dayz_disco,(_this select 1)];};
@@ -34,21 +13,34 @@ if (isServer) then {
"dayzTraderMenu" addPublicVariableEventHandler {(_this select 1) call server_traders}; // for all traders
"dayzLogin" addPublicVariableEventHandler {(_this select 1) call server_playerLogin};
"dayzLogin2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
// "dayzPlayerMorph" addPublicVariableEventHandler {(_this select 1) call server_playerMorph};
// "dayzUpdate" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_processUpdate};
"dayzPlayerMorph" addPublicVariableEventHandler {(_this select 1) call server_playerMorph};
"dayzLoginRecord" addPublicVariableEventHandler {(_this select 1) call dayz_recordLogin};
// "dayzCharSave" addPublicVariableEventHandler {(_this select 1) call server_playerSync};
"dayzCharDisco" addPublicVariableEventHandler {(_this select 1) call server_characterSync};
"dayzSetFix" addPublicVariableEventHandler {(_this select 1) call object_setFixServer};
"dayzGutBody" addPublicVariableEventHandler {(_this select 1) spawn local_gutObject};
"usecMorphine" addPublicVariableEventHandler {
(_this select 1) select 0 setVariable["hit_legs",0];
(_this select 1) select 0 setVariable["hit_hands",0];
};
};
//Client only
if (!isDedicated) then {
"norrnRaLW" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\load_wounded.sqf"};
"norrnRLact" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\load\load_wounded.sqf"};
"usecMorphine" addPublicVariableEventHandler {(_this select 1) call player_medMorphine};
"usecBleed" addPublicVariableEventHandler {_id = (_this select 1) spawn fnc_usec_damageBleed};
"usecBandage" addPublicVariableEventHandler {(_this select 1) call player_medBandage};
"usecEpi" addPublicVariableEventHandler {(_this select 1) call player_medEpi};
"usecTransfuse" addPublicVariableEventHandler {(_this select 1) call player_medTransfuse};
"usecPainK" addPublicVariableEventHandler {(_this select 1) call player_medPainkiller};
"dayzHideBody" addPublicVariableEventHandler {hideBody (_this select 1)};
"dayzHumanity" addPublicVariableEventHandler {(_this select 1) spawn player_humanityChange};
"dayzHitV" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageVehicle};
"dayzSetDate" addPublicVariableEventHandler {setDate (_this select 1)};
"dayzFlies" addPublicVariableEventHandler {(_this select 1) call spawn_flies};
"dayzRoadFlare" addPublicVariableEventHandler {(_this select 1) spawn object_roadFlare};
"norrnRaDrag" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\animDrag.sqf"};
"norrnRnoAnim" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\noAnim.sqf"};
// "changeCharacter" addPublicVariableEventHandler {(_this select 1) call player_serverModelChange};
// "dayzSwitch" addPublicVariableEventHandler {(_this select 1) call server_switchPlayer};
"dayzFire" addPublicVariableEventHandler {nul=(_this select 1) spawn BIS_Effects_Burn};
};

View File

@@ -11,6 +11,10 @@ Camo1_DZ = "Camo1_DZ";
Soldier1_DZ = "Soldier1_DZ";
Rocket_DZ = "Rocket_DZ";
AllPlayers = ["Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ"];
AllPlayersVehicles = ["Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","AllVehicles"];
PZombie_VB = "PZombie_VB";
pz_policeman = "pz_policeman";
@@ -89,6 +93,7 @@ dayz_resetSelfActions = {
s_player_deleteBuild = -1;
s_player_forceSave = -1;
s_player_flipveh = -1;
s_player_sleep = -1;
s_player_movedog = -1;
s_player_speeddog = -1;
s_player_calldog = -1;

View File

@@ -17,4 +17,6 @@ _eh2 = _unit addeventhandler ["Killed",{ _this call vehicle_handleKilled } ];
if (isServer) then {
_eh3 = _unit addEventHandler ["GetOut", {[(_this select 0),"all"] call server_updateObject;}];
_eh4 = _unit addEventHandler ["GetIn", {[(_this select 0),"all"] call server_updateObject;}];
_eh5 = _unit addEventHandler ["Killed",{ _this call vehicle_handleKilled } ];
_eh6 = _unit addeventhandler ["HandleDamage",{ _this call vehicle_handleDamage } ];
};