diff --git a/dayz_code/actions/call_zombies.sqf b/dayz_code/actions/call_zombies.sqf index e1dc77c70..2b829522b 100644 --- a/dayz_code/actions/call_zombies.sqf +++ b/dayz_code/actions/call_zombies.sqf @@ -12,10 +12,10 @@ s_player_callzombies = 1; [player,"spotted",0,false] call dayz_zombieSpeak; -_id = [player,65,true,(getPosATL player)] spawn player_alertZombies; +_id = [player,100,true,(getPosATL player)] spawn player_alertZombies; // wait a bit -sleep 7; +sleep 3; // allow menu again s_player_callzombies = -1; diff --git a/dayz_code/actions/object_pickup.sqf b/dayz_code/actions/object_pickup.sqf index 4322e881c..aab4983f2 100644 --- a/dayz_code/actions/object_pickup.sqf +++ b/dayz_code/actions/object_pickup.sqf @@ -7,7 +7,15 @@ _holder = _array select 2; _playerID = getPlayerUID player; _text = getText (configFile >> _type >> _classname >> "displayName"); -_holder setVariable["claimed",_playerID,true]; +_claimedBy = _holder getVariable["claimed","0"]; + +// Only allow if not already claimed. +if (_claimedBy == "0") then { + // Since item was not claimed proceed with claiming it. + _holder setVariable["claimed",_playerID,true]; +}; + + if(_classname isKindOf "TrapBear") exitwith {deleteVehicle _holder;}; @@ -31,9 +39,9 @@ if(_classname == "WoodenArrow") then { }; if (_broken) exitWith { deleteVehicle _holder; cutText [localize "str_broken_arrow", "PLAIN DOWN"] }; -sleep 0.25; +sleep 1; -_claimedBy = _holder getVariable["claimed",0]; +_claimedBy = _holder getVariable["claimed","0"]; if (_claimedBy != _playerID) exitWith {cutText [format[(localize "str_player_beinglooted"),_text] , "PLAIN DOWN"]}; @@ -58,7 +66,7 @@ if (_isOk) then { }; }; } else { - _holder setVariable["claimed",0,true]; + _holder setVariable["claimed","0",true]; cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"]; if (_classname == "MeleeCrowbar") then { player removeMagazine 'crowbar_swing'; diff --git a/dayz_code/actions/pzombie/pz_attack.sqf b/dayz_code/actions/pzombie/pz_attack.sqf index f19bc98be..aa8da2dfd 100644 --- a/dayz_code/actions/pzombie/pz_attack.sqf +++ b/dayz_code/actions/pzombie/pz_attack.sqf @@ -10,7 +10,7 @@ _rnd = round(random 9) + 1; _move = "ZombieStandingAttack" + str(_rnd); player playMoveNow _move; -sleep 1; +sleep 0.25; _isZombie = _ent isKindOf "zZombie_base"; @@ -19,8 +19,8 @@ _isZombie = _ent isKindOf "zZombie_base"; if (_ent isKindOf "Animal" or _isZombie) then { _ent setDamage 1; } else { - //["usecBreakLegs",[_unit,player]] call broadcastRpcCallAll; - usecBreakLegs = [_unit,player]; + //["usecBreakLegs",[_item,player]] call broadcastRpcCallAll; + usecBreakLegs = [_item,player]; publicVariable "usecBreakLegs"; }; diff --git a/dayz_code/actions/trade_any_boat.sqf b/dayz_code/actions/trade_any_boat.sqf index 3930ba34c..84e9b81c2 100644 --- a/dayz_code/actions/trade_any_boat.sqf +++ b/dayz_code/actions/trade_any_boat.sqf @@ -55,6 +55,8 @@ if (_qty >= _qty_in) then { //place vehicle spawn marker (local) _veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"]; + + _location = (getPosATL _veh); //["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,dayz_playerUID]] call callRpcProcedure; dayzPublishVeh2 = [_veh,[_dir,_location],_part_out,false,dayz_playerUID]; diff --git a/dayz_code/actions/trade_any_vehicle.sqf b/dayz_code/actions/trade_any_vehicle.sqf index 1b863890a..b1838d88c 100644 --- a/dayz_code/actions/trade_any_vehicle.sqf +++ b/dayz_code/actions/trade_any_vehicle.sqf @@ -62,6 +62,8 @@ if (_qty >= _qty_in) then { //place vehicle spawn marker (local) _veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"]; + _location = (getPosATL _veh); + //["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,dayz_playerUID]] call callRpcProcedure; dayzPublishVeh2 = [_veh,[_dir,_location],_part_out,false,dayz_playerUID]; publicVariableServer "dayzPublishVeh2"; diff --git a/dayz_code/config.cpp b/dayz_code/config.cpp index 572fb24b0..fffdea9f1 100644 --- a/dayz_code/config.cpp +++ b/dayz_code/config.cpp @@ -40,7 +40,7 @@ class CfgMods hidePicture = 0; hideName = 0; action = "http://www.dayzepoch.com"; - version = "0.994"; + version = "0.995"; hiveVersion = 0.96; //0.93 }; }; diff --git a/dayz_code/medical/publicEH/medBreakLegs.sqf b/dayz_code/medical/publicEH/medBreakLegs.sqf index 8ed6834d5..3a7c7ffec 100644 --- a/dayz_code/medical/publicEH/medBreakLegs.sqf +++ b/dayz_code/medical/publicEH/medBreakLegs.sqf @@ -5,25 +5,36 @@ _array = _this; //_this select 0; _unit = _array select 0; _medic = _array select 1; -if (_unit == player) then { +if (local _unit && _unit == player) then { - // Make bleed - r_player_injured = true; - _unit setVariable ["USEC_injured",true,true]; + _unit setVariable["startcombattimer", 1, false]; - //Ensure Control is visible for bleeding - _display = uiNamespace getVariable 'DAYZ_GUI_display'; - _control = _display displayCtrl 1300; - _control ctrlShow true; + // Make bleed + if (random 2 < 1) then { + r_player_injured = true; + player setVariable ["USEC_injured",true,true]; + + //Ensure Control is visible for bleeding + _display = uiNamespace getVariable 'DAYZ_GUI_display'; + _control = _display displayCtrl 1300; + _control ctrlShow true; + }; // Make player infected - // r_player_infected = true; - // _unit setVariable["USEC_infected",true]; + if (random 5 < 1) then { + r_player_infected = true; + player setVariable["USEC_infected",true,true]; + }; -}; + // Break legs + if (random 25 < 1) then { + // break legs + }; + // Knock out + if (random 100 < 1) then { + // perform knockout + }; - -if (isServer) then { - _unit setVariable["medForceUpdate",true]; + player setVariable["medForceUpdate",true]; }; \ No newline at end of file diff --git a/dayz_code/rscTitles.hpp b/dayz_code/rscTitles.hpp index 44d7e94c8..72e643f19 100644 --- a/dayz_code/rscTitles.hpp +++ b/dayz_code/rscTitles.hpp @@ -137,7 +137,7 @@ class RscDisplayMain : RscStandardDisplay class DAYZ_Version : CA_Version { idc = -1; - text = "DayZ Epoch 0.994 (1.7.6.1)"; + text = "DayZ Epoch 0.995 (1.7.6.1)"; y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)"; }; delete CA_TitleMainMenu; diff --git a/dayz_server/compile/server_onPlayerDisconnect.sqf b/dayz_server/compile/server_onPlayerDisconnect.sqf index aee5db5c4..cd38a749a 100644 --- a/dayz_server/compile/server_onPlayerDisconnect.sqf +++ b/dayz_server/compile/server_onPlayerDisconnect.sqf @@ -37,8 +37,8 @@ if (!isNull _object) then { { [_x,"gear"] call server_updateObject } foreach (nearestObjects [getPosATL _object, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage"], 10]); if (alive _object) then { - //[_object,(magazines _object),true,true] call server_playerSync; - [_object,[],true] call server_playerSync; + [_object,(magazines _object),true,true] call server_playerSync; + //[_object,[],true,false] call server_playerSync; _myGroup = group _object; deleteVehicle _object; deleteGroup _myGroup; diff --git a/dayz_server/compile/server_playerSync.sqf b/dayz_server/compile/server_playerSync.sqf index 8dc8fc7a1..b55136e4e 100644 --- a/dayz_server/compile/server_playerSync.sqf +++ b/dayz_server/compile/server_playerSync.sqf @@ -23,7 +23,6 @@ _magazines = _this select 1; _forceGear = _this select 3; _force = true; - _characterID = _character getVariable ["characterID","0"]; _charPos = getPosATL _character; _isInVehicle = vehicle _character != _character;