From e42753beae24588dbf699d7ad497ec1e705fa454 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 29 Oct 2014 21:50:21 +0000 Subject: [PATCH] Fixed angles-snap to (0,0,0) on forced classchange Edited trigger_zombieclass so that it saves the original view angle of the player --- .../entities/entities/trigger_zombieclass/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gamemodes/zombiesurvival/entities/entities/trigger_zombieclass/init.lua b/gamemodes/zombiesurvival/entities/entities/trigger_zombieclass/init.lua index 99d7088..2de4653 100644 --- a/gamemodes/zombiesurvival/entities/entities/trigger_zombieclass/init.lua +++ b/gamemodes/zombiesurvival/entities/entities/trigger_zombieclass/init.lua @@ -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