Fixed param handling of expl_obj in do_explosion_sequence for the case that free_object_slots might have it set to OF_SHOULD_BE_DEAD before it's actually attached to another object
This commit is contained in:
parent
d7a8f5ad84
commit
43190e625e
|
@ -1,5 +1,9 @@
|
|||
D1X-Rebirth Changelog
|
||||
|
||||
20090222
|
||||
--------
|
||||
main/fireball.c: Fixed param handling of expl_obj in do_explosion_sequence for the case that free_object_slots might have it set to OF_SHOULD_BE_DEAD before it's actually attached to another object
|
||||
|
||||
20090217
|
||||
--------
|
||||
main/object.c, main/object.h: Made Max_used_objects an absolute defined value; Made num_objects globally available
|
||||
|
|
|
@ -992,8 +992,9 @@ void do_explosion_sequence(object *obj)
|
|||
explode_model(del_obj); //explode a polygon model
|
||||
|
||||
//set some parm in explosion
|
||||
if (expl_obj) {
|
||||
|
||||
//If num_objects < MAX_USED_OBJECTS, expl_obj could be set to dead before this setting causing the delete_obj not to be removed. If so, directly delete del_obj
|
||||
if (expl_obj && !(expl_obj->flags & OF_SHOULD_BE_DEAD))
|
||||
{
|
||||
if (del_obj->movement_type == MT_PHYSICS) {
|
||||
expl_obj->movement_type = MT_PHYSICS;
|
||||
expl_obj->mtype.phys_info = del_obj->mtype.phys_info;
|
||||
|
|
Loading…
Reference in a new issue