From f3bd5b0c7a3f340d48962d7c6701645b5fb734b6 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 5 Mar 2016 12:52:18 -0500 Subject: Temporary fix for teleport spell --- gamemode/itemsystem/items/spell_teleport.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gamemode') diff --git a/gamemode/itemsystem/items/spell_teleport.lua b/gamemode/itemsystem/items/spell_teleport.lua index 6294955..4faed17 100644 --- a/gamemode/itemsystem/items/spell_teleport.lua +++ b/gamemode/itemsystem/items/spell_teleport.lua @@ -32,31 +32,34 @@ function ITEM:DoTeleport(score,pl,self) local aim = pl:GetAimVector() local D = ents.Create("ws_teleporter") - - D:SetPos(pl:GetShootPos()+aim*200) D:SetOwner(pl) D:SetAngles(aim:Angle()) - D:Spawn() D.endpoint = self.savedpoint + D:Spawn() + D:Activate() pl:EmitSound(Sound("physics/flesh/flesh_impact_hard.wav"),100,math.random(90,110)) end local teleportfunc = function(score, pl, self) print("teleportfunc called!") if(self.savedpoint == nil) then return end + if(score != 100) then return end print("Fully successfull teleport callback:") print(pl) + pl:SetPos(self.savedpoint) + --[[ local aim = pl:GetAimVector() local D = ents.Create("ws_teleporter") - + D:SetModel("models/props_wasteland/wood_fence02a.mdl") D:SetPos(pl:GetShootPos()+aim*200) D:SetOwner(pl) D:SetAngles(aim:Angle()) D:Spawn() D.endpoint = self.savedpoint + ]]-- pl:EmitSound(Sound("physics/flesh/flesh_impact_hard.wav"),100,math.random(90,110)) end -- cgit v1.2.3-70-g09d2