2014-10-02 08:49:54 +08:00
|
|
|
CLASS.Name = "Poison Zombie"
|
|
|
|
CLASS.TranslationName = "class_poison_zombie"
|
|
|
|
CLASS.Description = "description_poison_zombie"
|
|
|
|
CLASS.Help = "controls_poison_zombie"
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
CLASS.BetterVersion = "Wild Poison Zombie"
|
|
|
|
|
2014-10-02 08:49:54 +08:00
|
|
|
CLASS.Model = Model("models/Zombie/Poison.mdl")
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
CLASS.Wave = 4 / 6
|
2014-10-02 08:49:54 +08:00
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
CLASS.Health = 440
|
2014-10-02 08:49:54 +08:00
|
|
|
CLASS.Speed = 150
|
2018-05-02 06:32:59 +08:00
|
|
|
CLASS.JumpPower = DEFAULT_JUMP_POWER * 1.081
|
2014-10-02 08:49:54 +08:00
|
|
|
CLASS.SWEP = "weapon_zs_poisonzombie"
|
|
|
|
|
|
|
|
CLASS.Mass = DEFAULT_MASS * 1.5
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
CLASS.Points = CLASS.Health/GM.PoisonZombiePointRatio
|
2014-10-02 08:49:54 +08:00
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
CLASS.PainSounds = {"npc/zombie_poison/pz_pain1.wav", "npc/zombie_poison/pz_pain2.wav", "npc/zombie_poison/pz_pain3.wav"}
|
|
|
|
CLASS.DeathSounds = {"npc/zombie_poison/pz_die1.wav", "npc/zombie_poison/pz_die2.wav"}
|
2014-10-02 08:49:54 +08:00
|
|
|
CLASS.VoicePitch = 0.6
|
|
|
|
|
|
|
|
CLASS.ViewOffset = Vector(0, 0, 50)
|
|
|
|
CLASS.Hull = {Vector(-16, -16, 0), Vector(16, 16, 64)}
|
|
|
|
CLASS.HullDuck = {Vector(-16, -16, 0), Vector(16, 16, 35)}
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
CLASS.BloodColor = BLOOD_COLOR_YELLOW
|
|
|
|
|
|
|
|
local math_random = math.random
|
|
|
|
|
|
|
|
local ACT_IDLE = ACT_IDLE
|
|
|
|
local ACT_WALK = ACT_WALK
|
|
|
|
local STEPSOUNDTIME_NORMAL = STEPSOUNDTIME_NORMAL
|
|
|
|
local STEPSOUNDTIME_WATER_FOOT = STEPSOUNDTIME_WATER_FOOT
|
|
|
|
local STEPSOUNDTIME_ON_LADDER = STEPSOUNDTIME_ON_LADDER
|
|
|
|
local STEPSOUNDTIME_WATER_KNEE = STEPSOUNDTIME_WATER_KNEE
|
|
|
|
|
2014-10-02 08:49:54 +08:00
|
|
|
function CLASS:CalcMainActivity(pl, velocity)
|
2018-05-02 06:32:59 +08:00
|
|
|
if velocity:Length2DSqr() <= 1 then
|
|
|
|
return ACT_IDLE, -1
|
2014-10-02 08:49:54 +08:00
|
|
|
end
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
return ACT_WALK, -1
|
2014-10-02 08:49:54 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
function CLASS:PlayerFootstep(pl, vFootPos, iFoot, strSoundName, fVolume, pFilter)
|
2018-05-02 06:32:59 +08:00
|
|
|
if iFoot == 0 and math_random(3) < 3 then
|
|
|
|
pl:EmitSound("npc/zombie_poison/pz_right_foot1.wav")
|
2014-10-02 08:49:54 +08:00
|
|
|
else
|
2018-05-02 06:32:59 +08:00
|
|
|
pl:EmitSound("npc/zombie_poison/pz_left_foot1.wav")
|
2014-10-02 08:49:54 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
|
|
|
function CLASS:PlayerStepSoundTime(pl, iType, bWalking)
|
|
|
|
if iType == STEPSOUNDTIME_NORMAL or iType == STEPSOUNDTIME_WATER_FOOT then
|
|
|
|
return 365 - pl:GetVelocity():Length()
|
|
|
|
elseif iType == STEPSOUNDTIME_ON_LADDER then
|
|
|
|
return 300
|
|
|
|
elseif iType == STEPSOUNDTIME_WATER_KNEE then
|
|
|
|
return 450
|
|
|
|
end
|
|
|
|
|
|
|
|
return 150
|
|
|
|
end
|
|
|
|
|
|
|
|
function CLASS:DoAnimationEvent(pl, event, data)
|
|
|
|
if event == PLAYERANIMEVENT_ATTACK_PRIMARY then
|
|
|
|
pl:AnimRestartGesture(GESTURE_SLOT_ATTACK_AND_RELOAD, ACT_MELEE_ATTACK1, true)
|
|
|
|
return ACT_INVALID
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
if not CLIENT then return end
|
|
|
|
|
|
|
|
CLASS.Icon = "zombiesurvival/killicons/poisonzombie"
|