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
03db82be7d
commit
6d018dc5fc
|
@ -1,5 +1,9 @@
|
|||
D2X-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, main/weapon.c: Made Max_used_objects an absolute defined value; Made num_objects globally available; Restricted Weapon drops to MAX_USED_OBJECTS; When dropping Secondary weapon, drop 4-pack if possible
|
||||
|
|
|
@ -1221,8 +1221,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