zombiesurvival-evolved/gamemodes/zombiesurvival/entities/weapons/weapon_zs_sigilfragment/init.lua
William Moodhe e9da54c2f9 ZS updates for 2014-2018
Too many changes to list.
2018-05-01 18:32:59 -04:00

19 lines
514 B
Lua

INC_SERVER()
function SWEP:DoTeleport(target)
local owner = self:GetOwner()
local effectdata = EffectData()
effectdata:SetOrigin(owner:WorldSpaceCenter())
effectdata:SetEntity(owner)
util.Effect(self.TeleportEffect, effectdata, true, true)
effectdata:SetOrigin(target:WorldSpaceCenter())
util.Effect(self.TeleportEffect, effectdata, true, true)
owner:SetPos(target:GetPos())
owner:SetBarricadeGhosting(true, true)
if self:GetPrimaryAmmoCount() <= 0 then
owner:StripWeapon(self:GetClass())
end
end