diff options
Diffstat (limited to 'entities')
| -rw-r--r-- | entities/entities/gms_buildsite.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/entities/entities/gms_buildsite.lua b/entities/entities/gms_buildsite.lua index 5fb4698..919c725 100644 --- a/entities/entities/gms_buildsite.lua +++ b/entities/entities/gms_buildsite.lua @@ -77,10 +77,8 @@ function ENT:OnUse( ply ) -- Prevent fools from trapping other players inside just-built structures/props for id, ply in pairs( player.GetAll() ) do - local mindist = self:OBBMaxs() - self:OBBMins() - mindist = ( mindist.x + mindist.y + mindist.z ) / 3 - if ( ply:GetPos():Distance( self:LocalToWorld( self:OBBCenter() ) ) < mindist ) then + if ( ply:GetPos():WithinAABox(self:GetPhysicsObject():GetAABB()) ) then ply:SendMessage( "Too close to other players!", 3, Color( 200, 10, 10, 255 ) ) return end |
