Pass objptridx_t to do_controlcen_destroyed_stuff

This commit is contained in:
Kp 2014-01-11 22:52:00 +00:00
parent 70b8a2bb6d
commit 0b529d16c7
4 changed files with 8 additions and 8 deletions

View file

@ -114,7 +114,7 @@ void do_controlcen_frame(objptridx_t obj);
extern void init_controlcen_for_level(void);
extern void calc_controlcen_gun_point(reactor *reactor, object *obj,int gun_num);
extern void do_controlcen_destroyed_stuff(object *objp);
void do_controlcen_destroyed_stuff(objptridx_t objp);
extern void do_controlcen_dead_frame(void);
extern fix Countdown_timer;

View file

@ -2283,7 +2283,7 @@ static void do_boss_dying_frame(object *objp)
if (Boss_dying_start_time + BOSS_DEATH_DURATION < GameTime64 || GameTime64+(F1_0*2) < Boss_dying_start_time)
{
Boss_dying_start_time=GameTime64; // make sure following only happens one time!
do_controlcen_destroyed_stuff(NULL);
do_controlcen_destroyed_stuff(object_none);
explode_object(objp, F1_0/4);
digi_link_sound_to_object2(SOUND_BADASS_EXPLOSION, objp-Objects, 0, F2_0, F1_0*512);
}
@ -2409,7 +2409,7 @@ static void do_boss_dying_frame(object *objp)
if (rval)
{
Boss_dying_start_time=GameTime64; // make sure following only happens one time!
do_controlcen_destroyed_stuff(NULL);
do_controlcen_destroyed_stuff(object_none);
explode_object(objp, F1_0/4);
digi_link_sound_to_object2(SOUND_BADASS_EXPLOSION, objp-Objects, 0, F2_0, F1_0*512);
}

View file

@ -246,7 +246,7 @@ void do_countdown_frame()
// This code is common to whether control center is implicitly imbedded in a boss,
// or is an object of its own.
// if objp == NULL that means the boss was the control center and don't set Dead_controlcen_object_num
void do_controlcen_destroyed_stuff(object *objp)
void do_controlcen_destroyed_stuff(objptridx_t objp)
{
int i;
@ -277,10 +277,10 @@ void do_controlcen_destroyed_stuff(object *objp)
Countdown_timer = i2f(Total_countdown_time);
if (!Control_center_present || objp==NULL)
if (!Control_center_present || objp==object_none)
return;
Dead_controlcen_object_num = objp-Objects;
Dead_controlcen_object_num = objp;
}
// -----------------------------------------------------------------------------

View file

@ -1097,7 +1097,7 @@ static void kill_and_so_forth(void)
}
}
do_controlcen_destroyed_stuff(NULL);
do_controlcen_destroyed_stuff(object_none);
for (i=0; i<Num_triggers; i++) {
if (trigger_is_exit(&Triggers[i])) {
@ -1172,7 +1172,7 @@ static int HandleTestKey(int key)
#endif
case KEY_DEBUGGED+KEY_Y:
do_controlcen_destroyed_stuff(NULL);
do_controlcen_destroyed_stuff(object_none);
break;
#if defined(DXX_BUILD_DESCENT_II)