mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-02 00:42:29 +00:00
Фикс self:GetOwner()
Добавлено наследование от базового класса "base_gmodentity" для корректной работы E2 (enitiy():owner()) Заменен self:GetOwner() на self:GetPlayer()/SetPlayer() там, где это необходимо
This commit is contained in:
@@ -34,11 +34,10 @@ function ENT:Use(_,ply)
|
||||
self.Cover:SetPos(self:LocalToWorld(Vector(0,0,5.7)))
|
||||
self.Cover:SetAngles(self:GetAngles())
|
||||
self.Cover:Spawn()
|
||||
self.Cover:SetOwner(self.Owner)
|
||||
local phys = self.Cover:GetPhysicsObject()
|
||||
phys:ApplyForceCenter(self.Cover:GetUp()*phys:GetMass()*40+self.Cover:GetRight()*phys:GetMass()*35 )
|
||||
if IsValid(self.Owner) then
|
||||
self.Cover:SetOwner(self.Owner)
|
||||
self.Cover:SetPlayer(self.Owner)
|
||||
if CPPI then self.Cover:CPPISetOwner(self.Owner) end
|
||||
end
|
||||
if self.Code then self:SetNW2Int("Code",self.Code) end
|
||||
|
||||
Reference in New Issue
Block a user