Merge pull request #127 from BClark09/master

3 fixes related to zombie teams receiving human features
This commit is contained in:
William Moodhe / JetBoom 2015-04-05 23:25:54 -04:00
commit fffe25a9fe
3 changed files with 4 additions and 3 deletions

View file

@ -131,7 +131,7 @@ function ENT:Think()
local object = self:GetObject()
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()
return
end

View file

@ -154,7 +154,7 @@ function SWEP:MeleeSwing()
local tr = owner:MeleeTrace(self.MeleeRange, self.MeleeSize, filter)
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 hitent = tr.Entity
local hitflesh = tr.MatType == MAT_FLESH or tr.MatType == MAT_BLOODYFLESH or tr.MatType == MAT_ANTLION or tr.MatType == MAT_ALIENFLESH

View file

@ -85,7 +85,8 @@ function meta:ChangeTeam(teamid)
if oldteam ~= teamid then
gamemode.Call("OnPlayerChangedTeam", self, oldteam, teamid)
end
self:DoNoodleArmBones()
self:DoMuscularBones()
self:CollisionRulesChanged()
end