aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/spell_teleport.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/itemsystem/items/spell_teleport.lua')
-rw-r--r--gamemode/itemsystem/items/spell_teleport.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/gamemode/itemsystem/items/spell_teleport.lua b/gamemode/itemsystem/items/spell_teleport.lua
index 686d5d1..9c31f25 100644
--- a/gamemode/itemsystem/items/spell_teleport.lua
+++ b/gamemode/itemsystem/items/spell_teleport.lua
@@ -26,11 +26,11 @@ ITEM.CD = 0.25
All saved points are stored in a global table where
ITEM.savedpoint[player] = <saved point vector>
]]
-ITEM.savedpoint = {}
+local savedpoint = {}
function ITEM:DoTeleport(score,pl,self)
print("DoTeleport called!")
- if ITEM.savedpoint[pl] == nil then return end
+ if savedpoint[pl] == nil then return end
print("Fully successfull teleport callback:")
print(pl)
local aim = pl:GetAimVector()
@@ -39,7 +39,7 @@ function ITEM:DoTeleport(score,pl,self)
D:SetPos(pl:GetShootPos() + aim * 200)
D:SetOwner(pl)
D:SetAngles(aim:Angle())
- D.endpoint = ITEM.savedpoint[pl]
+ D.endpoint = savedpoint[pl]
D:Spawn()
D:Activate()
pl:EmitSound(Sound("physics/flesh/flesh_impact_hard.wav"),100,math.random(90,110))
@@ -71,7 +71,7 @@ end
function ITEM:OnSecondary(pl,tr)
print("Endpoint set?")
ParticleEffect("firetest",pl:GetPos(),pl:GetAngles(),pl)
- ITEM.savedpoint[pl] = pl:GetPos()
+ savedpoint[pl] = pl:GetPos()
end
function ITEM:OnPrimary(pl,tr)