1.0.1.94 DEV BUILD

This commit is contained in:
[VB]AWOL
2013-08-26 02:29:18 -05:00
parent f7f0f23681
commit c911a7cdab
46 changed files with 1461 additions and 731 deletions

View File

@@ -337,7 +337,7 @@ class FSM
" _currentState = [_currentWpn,_currentAnim,_temp];" \n
" " \n
" dayz_Magazines = _magazineArray;" \n
" dayzPlayerSave = [player,dayz_Magazines,false];" \n
" dayzPlayerSave = [player,dayz_Magazines,false,true];" \n
" publicVariableServer ""dayzPlayerSave"";" \n
" " \n
" if (isServer) then {" \n
@@ -763,8 +763,13 @@ class FSM
"_setDir = _worldspace select 0;" \n
"_setPos = _worldspace select 1;" \n
"" \n
"player setPosATL _setPos;" \n
"player setDir _setDir;" \n
"if(dayz_paraSpawn and !(player isKindOf ""PZombie_VB"")) then {" \n
" _para = createVehicle [""ParachuteWest"", _setPos, [], 0, ""FLY""]; " \n
" player moveInDriver _para;" \n
"} else {" \n
" player setPosATL _setPos;" \n
" player setDir _setDir;" \n
"};" \n
"" \n
"{" \n
" if (player getVariable[""hit_""+_x,false]) then { " \n
@@ -986,7 +991,7 @@ class FSM
name = "Load_In";
init = /*%FSM<STATEINIT""">*/"//Reveal action types" \n
"" \n
"{player reveal _x} forEach (nearestObjects [getPosATL player, [""AllVehicles"",""WeaponHolder"",""StashSmall"",""StashMedium"",""TentStorage"",""BuiltItems"",""ModularItems"",""DZE_Base_Object""], 50]);" \n
"{player reveal _x} forEach (nearestObjects [getPosATL player, dayz_reveal, 50]);" \n
"" \n
"dayz_clientPreload = true;" \n
"3 fadeSound 1;" \n
@@ -1091,7 +1096,7 @@ class FSM
"" \n
"reload player;" \n
"" \n
"if (_currentAnim != """") then {" \n
"if (_currentAnim != """" and !dayz_paraSpawn) then {" \n
" [objNull, player, rSwitchMove,_currentAnim] call RE;" \n
"};" \n
"if (_currentWpn != """") then {" \n

View File

@@ -1,12 +1,9 @@
private["_refObj","_size","_vel","_speed","_hunger","_thirst","_array","_unsaved","_timeOut","_result","_lastSave"];
private ["_refObj","_size","_vel","_speed","_hunger","_thirst","_timeOut","_result","_factor","_randomSpot","_mylastPos","_distance","_lastTemp","_rnd","_listTalk","_bloodChanged","_id","_messTimer","_display","_control","_combatdisplay","_combatcontrol","_timeleft","_inVehicle","_tempPos","_lastUpdate","_foodVal","_thirstVal","_lowBlood","_startcombattimer","_combattimeout","_myPos","_lastPos","_debug"];
disableSerialization;
_timeOut = 0;
_messTimer = 0;
_lastSave = 0;
_lastTemp = dayz_temperatur;
_debug = getMarkerpos "respawn_west";
_isBandit = false;
_isHero = false;
player setVariable ["temperature",dayz_temperatur,true];
@@ -26,7 +23,6 @@ while {true} do {
_size = (sizeOf typeOf _refObj) * _factor;
_vel = velocity player;
_speed = round((_vel distance [0,0,0]) * 3.5);
_saveTime = (playersNumber west * 2) + 10;
//reset position
_randomSpot = true;
@@ -39,16 +35,19 @@ while {true} do {
if (_distance < 500) then {
_randomSpot = false;
};
_distance = _mylastPos distance _tempPos;
if (_distance > 400) then {
_randomSpot = false;
if (!isNil "_mylastPos") then {
_distance = _mylastPos distance _tempPos;
if (_distance > 400) then {
_randomSpot = false;
};
};
if (_randomSpot) then {
_mylastPos = _tempPos;
};
dayz_mylastPos = _mylastPos;
if (!isNil "_mylastPos") then {
dayz_mylastPos = _mylastPos;
};
dayz_areaAffect = _size;
if (_speed > 0.1) then {
@@ -213,27 +212,17 @@ while {true} do {
};
//Save Checker
if (dayz_unsaved) then {
if ((diag_tickTime - dayz_lastSave) > _saveTime) then {
dayzPlayerSave = [player,dayz_Magazines,false,false];
publicVariableServer "dayzPlayerSave";
if (isServer) then {
dayzPlayerSave call server_playerSync;
};
dayz_lastSave = diag_tickTime;
dayz_Magazines = [];
if (dayz_unsaved or ((time - dayz_lastSave) > 300)) then {
dayzPlayerSave = [player,dayz_Magazines,false,false];
publicVariableServer "dayzPlayerSave";
// diag_log format["Save Checker: %1", dayzPlayerSave];
if (isServer) then {
dayzPlayerSave call server_playerSync;
};
_lastSave = _lastSave + 2;
} else {
dayz_lastSave = diag_tickTime;
_lastSave = 0;
};
if (!dayz_unsaved) then {
dayz_lastSave = diag_tickTime;
dayz_lastSave = time;
dayz_Magazines = [];
};
//Attach Trigger Current Object
@@ -284,16 +273,18 @@ while {true} do {
};
_lastPos = getPosATL player;
if (player == vehicle player) then {
if (_mylastPos distance _lastPos > 200) then {
if (alive player) then {
player setPosATL _mylastPos;
if (!isNil "_mylastPos") then {
if (player == vehicle player) then {
if (_mylastPos distance _lastPos > 200) then {
if (alive player) then {
player setPosATL _mylastPos;
};
};
};
} else {
if (_mylastPos distance _lastPos > 800) then {
if (alive player) then {
player setPosATL _mylastPos;
} else {
if (_mylastPos distance _lastPos > 800) then {
if (alive player) then {
player setPosATL _mylastPos;
};
};
};
};