diff options
| author | Alexander Pickering <Alexander.Pickering@anondomain.site90.net> | 2016-03-05 12:52:18 -0500 |
|---|---|---|
| committer | Alexander Pickering <Alexander.Pickering@anondomain.site90.net> | 2016-03-05 12:52:18 -0500 |
| commit | f3bd5b0c7a3f340d48962d7c6701645b5fb734b6 (patch) | |
| tree | cfbfc3535d5b9764200653bf000dd0f45de68b03 /gamemode/itemsystem/items/spell_teleport.lua | |
| parent | 52cf408ce832952c92804e114746b1e427576a8e (diff) | |
| download | wintersurvival2-f3bd5b0c7a3f340d48962d7c6701645b5fb734b6.tar.gz wintersurvival2-f3bd5b0c7a3f340d48962d7c6701645b5fb734b6.tar.bz2 wintersurvival2-f3bd5b0c7a3f340d48962d7c6701645b5fb734b6.zip | |
Temporary fix for teleport spell
Diffstat (limited to 'gamemode/itemsystem/items/spell_teleport.lua')
| -rw-r--r-- | gamemode/itemsystem/items/spell_teleport.lua | 11 |
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 |
