Fix crash.
parent
5891a6d016
commit
3a770829d0
|
@ -124,17 +124,15 @@ function quake.register_bullet(name, def)
|
|||
--quando non è un player allora è una entity quindi la memorizzo per alleggerire il numero di accessi
|
||||
local entity = moveresult.collisions[1].object:get_luaentity()
|
||||
--i prossimi 2 check servono a verificare l'entità sia un proiettile
|
||||
if entity then
|
||||
if entity.initial_properties ~= nil then
|
||||
|
||||
if entity.initial_properties.is_bullet then
|
||||
--distrugge sia il proiettile con cui collide che se stesso
|
||||
entity:_destroy()
|
||||
self:_destroy()
|
||||
return
|
||||
end
|
||||
if entity and entity.initial_properties ~= nil then
|
||||
|
||||
if entity.initial_properties.is_bullet then
|
||||
--distrugge sia il proiettile con cui collide che se stesso
|
||||
entity:_destroy()
|
||||
self:_destroy()
|
||||
return
|
||||
end
|
||||
|
||||
end
|
||||
else
|
||||
--se non è presente il campo object distrugge comunque il proiettile per prevenire crash ed errori
|
||||
|
|
Loading…
Reference in New Issue