Files
DayZ-Epoch/SQF/dayz_code/actions/player_pushPlane.sqf
ebaydayz e074ef0d44 Fix rapid starvation and dehydration from chainsaw and chop wood
Chainsaw is never used in player_chopWood.sqf. It is only called via
right click on Hatchet which was removed anyway.

The player already takes a nutrition hit on every swing of the hatchet,
and it can take up to twelve swings to chop down one tree.
2017-01-05 19:38:03 -05:00

27 lines
831 B
Plaintext

private ["_dir","_nearPlayers","_object","_speed","_vel"];
_object = _this;
if (!local _object) exitWith {
localize "str_actions_pilot_seat" call dayz_rollingMessages;
};
_nearPlayers = {(isPlayer _x && _x != player)} count (player nearEntities ["CAManBase",8]);
if ((_object isKindOf "C130J_US_EP1" or _object isKindOf "MV22") && _nearPlayers < 1) exitWith {
localize "STR_EPOCH_NEED_HELP" call dayz_rollingMessages;
};
_vel = velocity _object;
_dir = direction _object;
_speed = -1;
_object setVelocity [
(_vel select 0) + (sin _dir * _speed),
(_vel select 1) + (cos _dir * _speed),
(_vel select 2)
];
// Alert Zombies
[player,20,true,(getPosATL player)] call player_alertZombies;
//Player can push in rapid succession resulting in quick dehydration or starvation
//["Working",0,[0,1,3,0]] call dayz_NutritionSystem;