Fixed angles-snap to (0,0,0) on forced classchange
Edited trigger_zombieclass so that it saves the original view angle of the player
This commit is contained in:
parent
cb1818b86f
commit
e42753beae
1 changed files with 4 additions and 0 deletions
|
@ -52,6 +52,7 @@ function ENT:Touch(ent)
|
|||
if string.lower(v.Name) == self.TouchClass then
|
||||
local prev = ent:GetZombieClass()
|
||||
local prevpos = ent:GetPos()
|
||||
local prevang = ent:GetAngles()
|
||||
ent:SetZombieClass(k)
|
||||
ent:UnSpectateAndSpawn()
|
||||
if self.OneTime then
|
||||
|
@ -59,6 +60,7 @@ function ENT:Touch(ent)
|
|||
end
|
||||
if self.InstantChange then
|
||||
ent:SetPos(prevpos)
|
||||
ent:SetEyeAngles(prevang)
|
||||
end
|
||||
|
||||
break
|
||||
|
@ -83,6 +85,7 @@ function ENT:EndTouch(ent)
|
|||
if string.lower(v.Name) == self.EndTouchClass then
|
||||
local prev = ent:GetZombieClass()
|
||||
local prevpos = ent:GetPos()
|
||||
local prevang = ent:GetAngles()
|
||||
ent:SetZombieClass(k)
|
||||
ent:UnSpectateAndSpawn()
|
||||
if self.OneTime then
|
||||
|
@ -90,6 +93,7 @@ function ENT:EndTouch(ent)
|
|||
end
|
||||
if self.InstantChange then
|
||||
ent:SetPos(prevpos)
|
||||
ent:SetEyeAngles(prevang)
|
||||
end
|
||||
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue