mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 01:30:26 +03:00
+ Fixed females unable to select gender after death. + Fixed Alice and Assault packs inventory issues created with last patch. + Fixed being unable to take items that may have already been claimed by another player. Should work if no other players are within 6 meters. + Cooking, Crafting, Repairing, and Salvaging all now require full Medic animation cycle to complete. You can cancel the process just by moving. + Traders that deal with magazine items now require full Medic animation cycle per trade. Also, number of possible trades now based on quantity of available items being sold or cost divided by available bars. + Changed several PublicVariable calls from 1.7.6.1 code sync that should have been PublicVariableServer. + Fixed Bio-meat was not causing infection and increased chance of infection from "Bad Food" to 50/50. + Added distance checks (5m) for player zombie attacks. + Fixed player zombie was unable to feed.
71 lines
2.1 KiB
Plaintext
71 lines
2.1 KiB
Plaintext
private["_position","_tent","_location","_isOk","_backpack","_tentType","_trg","_key"];
|
|
//check if can pitch here
|
|
call gear_ui_init;
|
|
_playerPos = getPosATL player;
|
|
_item = _this;
|
|
_hastentitem = _this in magazines player;
|
|
_location = player modeltoworld [0,2.5,0];
|
|
_location set [2,0];
|
|
_building = nearestObject [(vehicle player), "HouseBase"];
|
|
_isOk = [(vehicle player),_building] call fnc_isInsideBuilding;
|
|
//_isOk = true;
|
|
|
|
//diag_log ("Pitch Tent: " + str(_isok) );
|
|
|
|
_config = configFile >> "CfgMagazines" >> _item;
|
|
_text = getText (_config >> "displayName");
|
|
|
|
if (!_hastentitem) exitWith {cutText [format[(localize "str_player_31"),_text,"pitch"] , "PLAIN DOWN"]};
|
|
|
|
//blocked
|
|
if (["concrete",dayz_surfaceType] call fnc_inString) then { _isOk = true; diag_log ("surface concrete"); };
|
|
//Block Tents in pounds
|
|
_objectsPond = nearestObjects [_playerPos, [], 10];
|
|
{
|
|
_isPond = ["pond",str(_x),false] call fnc_inString;
|
|
if (_isPond) then {
|
|
_pondPos = (_x worldToModel _playerPos) select 2;
|
|
if (_pondPos < 0) then {
|
|
_isOk = true;
|
|
};
|
|
};
|
|
} forEach _objectsPond;
|
|
|
|
//diag_log ("Pitch Tent: " + str(_isok) );
|
|
|
|
if (!_isOk) then {
|
|
//remove tentbag
|
|
player removeMagazine _item;
|
|
_dir = round(direction player);
|
|
|
|
//wait a bit
|
|
player playActionNow "Medic";
|
|
sleep 1;
|
|
|
|
_dis=20;
|
|
_sfx = "tentunpack";
|
|
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
|
|
|
sleep 5;
|
|
//place tent (local)
|
|
_tent = createVehicle ["TentStorage", _location, [], 0, "CAN_COLLIDE"];
|
|
_tent setdir _dir;
|
|
_tent setpos _location;
|
|
player reveal _tent;
|
|
_location = getPosATL _tent;
|
|
|
|
_tent setVariable ["characterID",dayz_characterID,true];
|
|
|
|
//player setVariable ["tentUpdate",["Land_A_tent",_dir,_location,[dayz_tentWeapons,dayz_tentMagazines,dayz_tentBackpacks]],true];
|
|
|
|
//["dayzPublishObj",[dayz_characterID,_tent,[_dir,_location],"TentStorage"]] call callRpcProcedure;
|
|
dayzPublishObj = [dayz_characterID,_tent,[_dir,_location],"TentStorage"];
|
|
publicVariableServer "dayzPublishObj";
|
|
|
|
cutText [localize "str_success_tent_pitch", "PLAIN DOWN"];
|
|
} else {
|
|
cutText [localize "str_fail_tent_pitch", "PLAIN DOWN"];
|
|
};
|
|
|