Overwrite oldest earthshaker even if not done
Otherwise the newest earthshaker will be lost.
This commit is contained in:
parent
d312248d45
commit
f5e7516448
|
@ -45,6 +45,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#include "args.h"
|
||||
#include "playsave.h"
|
||||
|
||||
#include "compiler-range_for.h"
|
||||
|
||||
static int POrderList (int num);
|
||||
static int SOrderList (int num);
|
||||
// Note, only Vulcan cannon requires ammo.
|
||||
|
@ -1020,19 +1022,15 @@ static void seismic_disturbance_frame(void)
|
|||
// Call this when a smega detonates to start the process of rocking the mine.
|
||||
void smega_rock_stuff(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<MAX_SMEGA_DETONATES; i++) {
|
||||
if (Smega_detonate_times[i] + SMEGA_SHAKE_TIME < GameTime64)
|
||||
Smega_detonate_times[i] = 0;
|
||||
}
|
||||
|
||||
for (i=0; i<MAX_SMEGA_DETONATES; i++) {
|
||||
if (Smega_detonate_times[i] == 0) {
|
||||
Smega_detonate_times[i] = GameTime64;
|
||||
break;
|
||||
}
|
||||
fix64 *least = &Smega_detonate_times[0];
|
||||
range_for (auto &i, Smega_detonate_times)
|
||||
{
|
||||
if (i + SMEGA_SHAKE_TIME < GameTime64)
|
||||
i = 0;
|
||||
if (*least > i)
|
||||
least = &i;
|
||||
}
|
||||
*least = GameTime64;
|
||||
}
|
||||
|
||||
int Super_mines_yes = 1;
|
||||
|
@ -1069,11 +1067,12 @@ void process_super_mines_frame(void)
|
|||
|
||||
for (j=0; j<=Highest_object_index; j++) {
|
||||
if ((Objects[j].type == OBJ_PLAYER) || (Objects[j].type == OBJ_ROBOT)) {
|
||||
if (j == parent_num)
|
||||
continue;
|
||||
fix dist;
|
||||
|
||||
dist = vm_vec_dist_quick(bombpos, &Objects[j].pos);
|
||||
|
||||
if (j != parent_num)
|
||||
if (dist - Objects[j].size < F1_0*20)
|
||||
{
|
||||
if (Objects[i].segnum == Objects[j].segnum)
|
||||
|
|
Loading…
Reference in a new issue