mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
69
lua/entities/lvs_base/sv_duping.lua
Normal file
69
lua/entities/lvs_base/sv_duping.lua
Normal file
@@ -0,0 +1,69 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
-- attempt at fixing dupe support
|
||||
|
||||
function ENT:PostEntityPaste(Player,Ent,CreatedEntities)
|
||||
if not self.SetAI then return end
|
||||
|
||||
if IsValid( Player ) and Player:IsAdmin() then return end
|
||||
|
||||
self:SetAI( false )
|
||||
end
|
||||
|
||||
local Active
|
||||
local EngineActive
|
||||
local CrosshairFilterEnts
|
||||
local DoorHandlers
|
||||
local pPodKeyIndex
|
||||
local pSeats
|
||||
|
||||
function ENT:PreEntityCopy()
|
||||
Active = self:GetActive()
|
||||
EngineActive = self:GetEngineActive()
|
||||
|
||||
self:SetlvsReady( false )
|
||||
self:SetActive( false )
|
||||
self:SetEngineActive( false )
|
||||
|
||||
CrosshairFilterEnts = self.CrosshairFilterEnts
|
||||
DoorHandlers = self._DoorHandlers
|
||||
pSeats = self.pSeats
|
||||
pPodKeyIndex = self.pPodKeyIndex
|
||||
|
||||
self.CrosshairFilterEnts = nil
|
||||
self._DoorHandlers = nil
|
||||
self.pPodKeyIndex = nil
|
||||
self.pSeats = nil
|
||||
end
|
||||
|
||||
function ENT:PostEntityCopy()
|
||||
timer.Simple(0, function()
|
||||
if not IsValid( self ) then return end
|
||||
|
||||
self:SetlvsReady( true )
|
||||
self:SetActive( Active )
|
||||
self:SetEngineActive( EngineActive )
|
||||
|
||||
Active = nil
|
||||
EngineActive = nil
|
||||
end)
|
||||
|
||||
self.CrosshairFilterEnts = CrosshairFilterEnts
|
||||
self._DoorHandlers = DoorHandlers
|
||||
self.pPodKeyIndex = pPodKeyIndex
|
||||
self.pSeats = pSeats
|
||||
|
||||
CrosshairFilterEnts = nil
|
||||
DoorHandlers = nil
|
||||
pSeats = nil
|
||||
pPodKeyIndex = nil
|
||||
end
|
||||
Reference in New Issue
Block a user