Merge pull request #635 from vbawol/zabn-edits

Zabn edits
This commit is contained in:
zabn
2013-10-28 14:24:24 -07:00
5 changed files with 23 additions and 18 deletions

View File

@@ -193,8 +193,7 @@ if (_hasrequireditem) then {
cutText ["Planning construction: PgUp = raise, PgDn = lower, Q or E = flip 180, and Space-Bar to build.", "PLAIN DOWN"];
_previewCounter = 60;
_objHupDiff = 0;
_objHdwnDiff = 0;
_objHDiff = 0;
while {_isOk} do {
@@ -261,35 +260,29 @@ if (_hasrequireditem) then {
if(_zheightdirection == "up") then {
_position set [2,((_position select 2)+0.1)];
_objHupDiff = _objHupDiff + 0.1;
_objHdwnDiff = _objHdwnDiff - 0.1;
_objHDiff = _objHDiff + 0.1;
};
if(_zheightdirection == "down") then {
_position set [2,((_position select 2)-0.1)];
_objHdwnDiff = _objHdwnDiff + 0.1;
_objHupDiff = _objHupDiff - 0.1;
_objHDiff = _objHDiff - 0.1;
};
if(_zheightdirection == "up_alt") then {
_position set [2,((_position select 2)+1)];
_objHupDiff = _objHupDiff + 1;
_objHdwnDiff = _objHdwnDiff - 1;
};
if(_zheightdirection == "down_alt") then {
_position set [2,((_position select 2)-1)];
_objHdwnDiff = _objHdwnDiff + 1;
_objHupDiff = _objHupDiff - 1;
_objHDiff = _objHDiff - 1;
};
if(_zheightdirection == "up_ctrl") then {
_position set [2,((_position select 2)+0.01)];
_objHupDiff = _objHupDiff + 0.01;
_objHdwnDiff = _objHdwnDiff - 0.01;
};
if(_zheightdirection == "down_ctrl") then {
_position set [2,((_position select 2)-0.01)];
_objHdwnDiff = _objHdwnDiff + 0.01;
_objHupDiff = _objHupDiff - 0.01;
_objHDiff = _objHDiff - 0.01;
};
_object setDir (getDir _object);
@@ -302,7 +295,7 @@ if (_hasrequireditem) then {
};
sleep 1;
sleep 0.5;
_location2 = getPosATL player;
@@ -318,12 +311,12 @@ if (_hasrequireditem) then {
if(_location1 distance _location2 > 5) exitWith {
_isOk = false;
_cancel = true;
_reason = "Moving too fast.";
_reason = "You've moved to far away from where you started building (within 5 meters).";
detach _object;
deleteVehicle _object;
};
cutText [format["%1",_previewCounter], "PLAIN DOWN"];
[format["<t size='0.6'>Time left to build: %1</t>",(ceil(_previewCounter))],0,0.8,0.5,0,0,8] spawn BIS_fnc_dynamicText;
if(_previewCounter <= 0) exitWith {
_isOk = false;
@@ -333,9 +326,9 @@ if (_hasrequireditem) then {
deleteVehicle _object;
};
_previewCounter = _previewCounter - 1;
_previewCounter = _previewCounter - 0.5;
if((_objHdwnDiff > 5) or (_objHupDiff > 5)) exitWith {
if(abs(_objHDiff) > 5) exitWith {
_isOk = false;
_cancel = true;
_reason = "Cannot move up or down more than 5 meters";

View File

@@ -624,6 +624,11 @@ if(!isDedicated) then {
if(isNil "DZE_ForceNameTagsOff") then {
DZE_ForceNameTagsOff = false;
};
if(isNil "DZE_FriendlySaving") then {
DZE_FriendlySaving = true;
};
DZE_Friends = [];
DZE_CanPickup = true;
DZE_Q = false;

View File

@@ -1085,6 +1085,9 @@ class FSM
" //Reload players state" \n
" if (count _state > 2) then {" \n
" dayz_temperatur = _state select 2;" \n
" }; " \n
" if ((count _state > 3) and DZE_FriendlySaving) then {" \n
" DZE_Friends = _state select 3;" \n
" }; " \n
"} else {" \n
" _currentWpn = ""Makarov"";" \n

View File

@@ -15,6 +15,7 @@ _maxDistancePlayer = DZE_teleport select 3;
_maxDistanceVehicle = DZE_teleport select 4;
player setVariable ["temperature",dayz_temperatur,true];
player setVariable ["friendlyTo",DZE_Friends,true];
dayz_myLoad = (((count dayz_myBackpackMags) * 0.2) + (count dayz_myBackpackWpns)) + (((count dayz_myMagazines) * 0.1) + (count dayz_myWeapons * 0.5));

View File

@@ -165,6 +165,9 @@ if (_characterID != "0") then {
};
_temp = round(_character getVariable ["temperature",100]);
_currentState = [_currentWpn,_currentAnim,_temp];
if(DZE_FriendlySaving) then {
_currentState set [(count _currentState),(_character getVariable ["friendlyTo",[]])];
};
/*
Everything is ready, now publish to HIVE
*/