Merge pull request #127 from BClark09/master
3 fixes related to zombie teams receiving human features
This commit is contained in:
commit
fffe25a9fe
3 changed files with 4 additions and 3 deletions
|
@ -131,7 +131,7 @@ function ENT:Think()
|
||||||
|
|
||||||
local object = self:GetObject()
|
local object = self:GetObject()
|
||||||
local owner = self:GetOwner()
|
local owner = self:GetOwner()
|
||||||
if not object:IsValid() or object:IsNailed() or not owner:IsValid() or not owner:Alive() then
|
if not object:IsValid() or object:IsNailed() or not owner:IsValid() or not owner:Alive() or not owner:Team() == TEAM_HUMAN then
|
||||||
self:Remove()
|
self:Remove()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
|
@ -154,7 +154,7 @@ function SWEP:MeleeSwing()
|
||||||
|
|
||||||
local tr = owner:MeleeTrace(self.MeleeRange, self.MeleeSize, filter)
|
local tr = owner:MeleeTrace(self.MeleeRange, self.MeleeSize, filter)
|
||||||
if tr.Hit then
|
if tr.Hit then
|
||||||
local damagemultiplier = owner.BuffMuscular and 1.2 or 1
|
local damagemultiplier = (owner.BuffMuscular and owner:Team()==TEAM_HUMAN) and 1.2 or 1
|
||||||
local damage = self.MeleeDamage * damagemultiplier
|
local damage = self.MeleeDamage * damagemultiplier
|
||||||
local hitent = tr.Entity
|
local hitent = tr.Entity
|
||||||
local hitflesh = tr.MatType == MAT_FLESH or tr.MatType == MAT_BLOODYFLESH or tr.MatType == MAT_ANTLION or tr.MatType == MAT_ALIENFLESH
|
local hitflesh = tr.MatType == MAT_FLESH or tr.MatType == MAT_BLOODYFLESH or tr.MatType == MAT_ANTLION or tr.MatType == MAT_ALIENFLESH
|
||||||
|
|
|
@ -85,7 +85,8 @@ function meta:ChangeTeam(teamid)
|
||||||
if oldteam ~= teamid then
|
if oldteam ~= teamid then
|
||||||
gamemode.Call("OnPlayerChangedTeam", self, oldteam, teamid)
|
gamemode.Call("OnPlayerChangedTeam", self, oldteam, teamid)
|
||||||
end
|
end
|
||||||
|
self:DoNoodleArmBones()
|
||||||
|
self:DoMuscularBones()
|
||||||
self:CollisionRulesChanged()
|
self:CollisionRulesChanged()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue