aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/itemsystem')
-rw-r--r--gamemode/itemsystem/items/spell_teleport.lua11
1 files changed, 7 insertions, 4 deletions
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