1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00

Ownership

Добавлена установка владельцев энтити стандартными фнукциями GMod'а
This commit is contained in:
kosmik641
2025-11-06 08:26:50 +03:00
parent a3b01b69a4
commit 499770d9d3
3 changed files with 26 additions and 5 deletions

View File

@@ -37,8 +37,9 @@ function ENT:Use(_,ply)
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 CPPI and IsValid(self.Owner) then
self.Cover:CPPISetOwner(self.Owner)
if IsValid(self.Owner) then
self.Cover:SetOwner(self.Owner)
if CPPI then self.Cover:CPPISetOwner(self.Owner) end
end
if self.Code then self:SetNW2Int("Code",self.Code) end
elseif self:GetModel() == "models/metrostroi_train/reversor/reversor_collection_box2.mdl" then