+ work around added to player zombie "get over" stuck animation issue.
+ added setpos to vaults, allows precise positioning
+ possible fix for damage spam at server start.
+ added player zombie attack move, Works with animals and zombies only
currently.
+ 10oz bars for all types of metal
+ fix for detecting near vehicles when selling fixes #81
This commit is contained in:
vbawol
2013-02-14 17:20:35 -06:00
parent 9f56cdcbfe
commit 58742df73a
14 changed files with 244 additions and 361 deletions

View File

@@ -0,0 +1,44 @@
private ["_item","_ent","_cnt","_index","_wound","_damage","_rnd","_move"];
_item = _this select 3;
_ent = _item;
// remove menu
player removeAction s_player_pzombiesattack;
s_player_pzombiesattack = 1;
_rnd = round(random 9) + 1;
_move = "ZombieStandingAttack" + str(_rnd);
player playMoveNow _move;
sleep 1;
_isZombie = _ent isKindOf "zZombie_base";
// TODO add distance check and maybe los
if (_ent isKindOf "Animal" or _isZombie) then {
_ent setDamage 1;
} else {
// TODO TEST AND Improve
_cnt = count (DAYZ_woundHit select 1);
_index = floor (random _cnt);
_index = (DAYZ_woundHit select 1) select _index;
_wound = (DAYZ_woundHit select 0) select _index;
_damage = 0.1 + random (1.2);
[_item, _wound, _damage, player,"zombie"] call fnc_usec_damageHandler;
};
[player,"hit",0,false] call dayz_zombieSpeak;
player switchmove "";
sleep 1;
s_player_pzombiesattack = -1;

View File

@@ -1,25 +1,19 @@
private["_item","_id","_regen","_isAnimal","_animalType","_isMan","_config","_isListed","_qty","_ent"];
private ["_item","_id","_regen","_isAnimal","_animalType","_isMan","_config","_isListed","_qty","_ent","_ctrlBlood","_rnd","_move","_display","_control","_bloodVal"];
_item = _this select 3;
_ent = _item;
disableSerialization;
player removeAction s_player_butcher;
s_player_butcher = 1;
if (_ent isKindOf "Animal") then {
_ent setDamage 1;
} else {
_ent setHit ["legs",1];
_ent setVariable ["hit_legs",2,true];
};
if(!(alive _item)) then {
_rnd = round(random 4) + 1;
_move = "ZombieFeed" + str(_rnd);
[nil, player, rSWITCHMOVE,_move] call RE;
sleep 5;
if(not alive _item) then {
_rnd = round(random 4) + 1;
_move = "ZombieFeed" + str(_rnd);
player playMoveNow _move;
sleep 1;
// player playActionNow "PutDown";
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
@@ -91,8 +85,10 @@ if(not alive _item) then {
_control ctrlShow true;
cutText [format[(localize "str_player_consumed"),_item, "PLAIN DOWN"];
cutText [format[(localize "str_player_consumed"),_animalType], "PLAIN DOWN"];
player switchmove "";
};
s_player_butcher = -1;