This commit is contained in:
A Clark
2012-12-16 15:29:19 -06:00
parent f378947145
commit 416490f553
124 changed files with 2996 additions and 67 deletions

View File

@@ -1,7 +1,14 @@
private["_unit","_vehicle","_targets","_move","_rnd","_wound","_type","_dir","_hpList","_hp","_damage","_chance","_strH","_dam","_total","_result","_tPos","_zPos","_inAngle","_cantSee","_isZombieInside","_building","_isPlayerInside"];
private["_isZombie","_unit","_vehicle","_targets","_move","_rnd","_wound","_type","_dir","_hpList","_hp","_damage","_chance","_strH","_dam","_total","_result","_tPos","_zPos","_inAngle","_cantSee","_isZombieInside","_building","_isPlayerInside"];
_unit = _this;
_vehicle = (vehicle player);
_isZombie = _unit isKindOf "zZombie_base";
if(_isZombie) then {
_type = "zombie";
} else {
_type = "dog";
};
_targets = _unit getVariable ["targets",[]];
//if (!(_vehicle in _targets)) exitWith {};
@@ -15,11 +22,11 @@ if (r_player_unconscious && _vehicle == player) then {
_move = "ZombieFeed" + str(_rnd);
} else {
_unit doMove (getPos player);
if (_type == "zombie") then {
_rnd = round(random 9) + 1;
_move = "ZombieStandingAttack" + str(_rnd);
} else {
if (_type == "dog") then {
_move = "Dog_Attack";
} else {
_rnd = round(random 9) + 1;
_move = "ZombieStandingAttack" + str(_rnd);
};
};
_dir = [_unit,player] call BIS_Fnc_dirTo;
@@ -84,12 +91,12 @@ if (_vehicle != player) then {
_wound = DAYZ_woundHit_dog call BIS_fnc_selectRandomWeighted;
_damage = 0.3 + random (1.0);
} else {
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
_wound = DAYZ_woundHit call BIS_fnc_selectRandomWeighted;
} else {
_wound = DAYZ_woundHit_ok call BIS_fnc_selectRandomWeighted;
};
_damage = 0.1 + random (1.2);
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
_wound = DAYZ_woundHit call BIS_fnc_selectRandomWeighted;
} else {
_wound = DAYZ_woundHit_ok call BIS_fnc_selectRandomWeighted;
};
_damage = 0.1 + random (1.2);
};
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));