improved vehicle destruction code

This commit is contained in:
Alexsandro Percy 2023-08-24 20:14:00 -03:00
parent 758ce12162
commit 59f4865a07
3 changed files with 8 additions and 0 deletions

View file

@ -42,9 +42,11 @@ function airutils.get_stand_pos(thing) -- thing can be luaentity or objectref.
local colbox = {}
if type(thing) == 'table' then
pos = thing.object:get_pos()
if not thing.object:get_properties() then return false end
colbox = thing.object:get_properties().collisionbox
elseif type(thing) == 'userdata' then
pos = thing:get_pos()
if not thing:get_properties() then return false end
colbox = thing:get_properties().collisionbox
else
return false