Files
DayZ-Epoch/SQF/dayz_code/actions/pzombie/pz_attack.sqf
icomrade c3ed4e49e1 Replace sleep with uiSleep
see the below links for more info. uiSleep is based off of a more
accurate method of tracking time, whereas sleep can fluctuate depending
on application performance since it is based on framerate.
https://community.bistudio.com/wiki/uiSleep
https://community.bistudio.com/wiki/sleep_vs_uiSleep
https://community.bistudio.com/wiki/sleep
2016-02-17 13:03:17 -05:00

26 lines
586 B
Plaintext

private ["_ent","_rnd","_move","_isZombie"];
if (!isNull cursorTarget) then {
_ent = cursorTarget;
_rnd = (round(random 9)) + 1;
_move = "ZombieStandingAttack" + str(_rnd);
player playMoveNow _move;
_isZombie = _ent isKindOf "zZombie_base";
if(player distance _ent < 5) then {
if (_ent isKindOf "Animal" || _isZombie) then {
_ent setDamage 1;
} else {
/* PVS/PVC - Skaronator */
PVDZE_send = [_ent,"PZ_BreakLegs",[_ent,player]];
publicVariableServer "PVDZE_send";
};
[player,"hit",0,false] call dayz_zombieSpeak;
};
uiSleep 1;
player switchmove "";
};