Some cleanup.

This commit is contained in:
onpon4 2016-01-03 14:31:39 -05:00
parent 16473a715f
commit e5e7d6b9c4
5 changed files with 223 additions and 222 deletions

View File

@ -101,6 +101,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MAX_SHOPSHAPES 6 #define MAX_SHOPSHAPES 6
#define MAX_CARGO 20 #define MAX_CARGO 20
#define MAX_INFOLINES 3 #define MAX_INFOLINES 3
#define MAX_EVENTS 20
#define MAX_STATUSLINES 30 #define MAX_STATUSLINES 30
#define SHIP_HIT_INDEX 60 #define SHIP_HIT_INDEX 60

View File

@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "Starfighter.h" #include "Starfighter.h"
static Event gameEvent[20]; static Event events[MAX_EVENTS];
static const char *klineGreeting[] = { static const char *klineGreeting[] = {
"How nice to see you again, Bainfield!", "How nice to see you again, Bainfield!",
"It all ends here, rebel!", "It all ends here, rebel!",
@ -29,13 +29,13 @@ static const char *klineGreeting[] = {
void events_init() void events_init()
{ {
for (int i = 0 ; i < 20 ; i++) for (int i = 0 ; i < MAX_EVENTS ; i++)
{ {
gameEvent[i].time = 0; events[i].time = 0;
gameEvent[i].face = -1; events[i].face = -1;
strcpy(gameEvent[i].message, ""); strcpy(events[i].message, "");
gameEvent[i].entity = -1; events[i].entity = -1;
gameEvent[i].flag = 0; events[i].flag = 0;
} }
switch (game.area) switch (game.area)
@ -43,332 +43,332 @@ void events_init()
case MISN_INTERCEPTION: case MISN_INTERCEPTION:
if ((aliens[ALIEN_KLINE].classDef == CD_KLINE) && if ((aliens[ALIEN_KLINE].classDef == CD_KLINE) &&
(aliens[ALIEN_KLINE].active)) (aliens[ALIEN_KLINE].active))
gameEvent[0].time = 2; events[0].time = 2;
gameEvent[0].face = FACE_KLINE; events[0].face = FACE_KLINE;
strcpy(gameEvent[0].message, klineGreeting[rand() % 4]); strcpy(events[0].message, klineGreeting[rand() % 4]);
break; break;
case MISN_MOEBO: case MISN_MOEBO:
gameEvent[0].time = 2; events[0].time = 2;
gameEvent[0].face = FACE_SID; events[0].face = FACE_SID;
strcpy(gameEvent[0].message, "You should try and destroy some of the frigate's weaponary, it'll help!"); strcpy(events[0].message, "You should try and destroy some of the frigate's weaponary, it'll help!");
gameEvent[1].time = 120; events[1].time = 120;
gameEvent[1].face = FACE_SID; events[1].face = FACE_SID;
strcpy(gameEvent[1].message, "Chris, get a move on! The frigate is almost in range!"); strcpy(events[1].message, "Chris, get a move on! The frigate is almost in range!");
gameEvent[2].time = 150; events[2].time = 150;
gameEvent[2].face = FACE_SID; events[2].face = FACE_SID;
strcpy(gameEvent[2].message, "The frigate is charging its cannon!"); strcpy(events[2].message, "The frigate is charging its cannon!");
gameEvent[3].time = 170; events[3].time = 170;
gameEvent[3].face = FACE_SID; events[3].face = FACE_SID;
strcpy(gameEvent[3].message, "Chris, HURRY!!!"); strcpy(events[3].message, "Chris, HURRY!!!");
gameEvent[4].time = 180; events[4].time = 180;
gameEvent[4].face = FACE_SID; events[4].face = FACE_SID;
strcpy(gameEvent[4].message, "Oh my god..."); strcpy(events[4].message, "Oh my god...");
gameEvent[4].entity = ALIEN_BOSS; events[4].entity = ALIEN_BOSS;
gameEvent[4].flag = FL_LEAVESECTOR | FL_IMMORTAL; events[4].flag = FL_LEAVESECTOR | FL_IMMORTAL;
break; break;
case MISN_NEROD: case MISN_NEROD:
gameEvent[0].time = 2; events[0].time = 2;
gameEvent[0].face = FACE_PHOEBE; events[0].face = FACE_PHOEBE;
strcpy(gameEvent[0].message, "Hey, over here! Destroy this tug so I can break free!"); strcpy(events[0].message, "Hey, over here! Destroy this tug so I can break free!");
break; break;
case MISN_ALLEZ: case MISN_ALLEZ:
gameEvent[0].time = 2; events[0].time = 2;
gameEvent[0].face = FACE_CREW; events[0].face = FACE_CREW;
strcpy(gameEvent[0].message, "Thank God! Please, help us! If they destroy this ship..."); strcpy(events[0].message, "Thank God! Please, help us! If they destroy this ship...");
gameEvent[1].time = 6; events[1].time = 6;
gameEvent[1].face = FACE_CHRIS; events[1].face = FACE_CHRIS;
strcpy(gameEvent[1].message, "How long do you need?"); strcpy(events[1].message, "How long do you need?");
gameEvent[2].time = 10; events[2].time = 10;
gameEvent[2].face = FACE_CREW; events[2].face = FACE_CREW;
strcpy(gameEvent[2].message, "Just a few minutes!"); strcpy(events[2].message, "Just a few minutes!");
gameEvent[3].time = 60; events[3].time = 60;
gameEvent[3].face = FACE_CREW; events[3].face = FACE_CREW;
strcpy(gameEvent[3].message, "Alright! We've got the weapons working again! Now to look at the engines..."); strcpy(events[3].message, "Alright! We've got the weapons working again! Now to look at the engines...");
gameEvent[3].entity = ALIEN_GOODTRANSPORT; events[3].entity = ALIEN_GOODTRANSPORT;
gameEvent[3].flag = -FL_NOFIRE; events[3].flag = -FL_NOFIRE;
gameEvent[4].time = 80; events[4].time = 80;
gameEvent[4].face = FACE_CREW; events[4].face = FACE_CREW;
strcpy(gameEvent[4].message, "DAMN! The guns are offline again! What you guys doing back there?!"); strcpy(events[4].message, "DAMN! The guns are offline again! What you guys doing back there?!");
gameEvent[4].entity = ALIEN_GOODTRANSPORT; events[4].entity = ALIEN_GOODTRANSPORT;
gameEvent[4].flag = FL_NOFIRE; events[4].flag = FL_NOFIRE;
gameEvent[5].time = 100; events[5].time = 100;
gameEvent[5].face = FACE_CREW; events[5].face = FACE_CREW;
strcpy(gameEvent[5].message, "Chris, HELP!! We've lost all system power! We're a sitting duck out here!"); strcpy(events[5].message, "Chris, HELP!! We've lost all system power! We're a sitting duck out here!");
gameEvent[5].entity = ALIEN_GOODTRANSPORT; events[5].entity = ALIEN_GOODTRANSPORT;
gameEvent[5].flag = FL_DISABLED; events[5].flag = FL_DISABLED;
gameEvent[6].time = 120; events[6].time = 120;
gameEvent[6].face = FACE_CREW; events[6].face = FACE_CREW;
strcpy(gameEvent[6].message, "Just a little longer..."); strcpy(events[6].message, "Just a little longer...");
gameEvent[7].time = 140; events[7].time = 140;
gameEvent[7].face = FACE_CREW; events[7].face = FACE_CREW;
strcpy(gameEvent[7].message, "Okay! We've fixed that one. We think we've found the problem with the engines too..."); strcpy(events[7].message, "Okay! We've fixed that one. We think we've found the problem with the engines too...");
gameEvent[7].entity = ALIEN_GOODTRANSPORT; events[7].entity = ALIEN_GOODTRANSPORT;
gameEvent[7].flag = -FL_DISABLED; events[7].flag = -FL_DISABLED;
gameEvent[8].time = 177; events[8].time = 177;
gameEvent[8].face = FACE_CREW; events[8].face = FACE_CREW;
strcpy(gameEvent[8].message, "Engines fixed! Let's move!"); strcpy(events[8].message, "Engines fixed! Let's move!");
gameEvent[9].time = 180; events[9].time = 180;
gameEvent[9].entity = ALIEN_GOODTRANSPORT; events[9].entity = ALIEN_GOODTRANSPORT;
gameEvent[9].flag = FL_LEAVESECTOR | FL_IMMORTAL; events[9].flag = FL_LEAVESECTOR | FL_IMMORTAL;
break; break;
case MISN_ELAMALE: case MISN_ELAMALE:
gameEvent[0].time = 5; events[0].time = 5;
gameEvent[0].face = FACE_PHOEBE; events[0].face = FACE_PHOEBE;
strcpy(gameEvent[0].message, "Ummm... something about this doesn't look right! They should be offering more resistance than this!"); strcpy(events[0].message, "Ummm... something about this doesn't look right! They should be offering more resistance than this!");
gameEvent[1].time = -8; events[1].time = -8;
gameEvent[1].face = FACE_PHOEBE; events[1].face = FACE_PHOEBE;
strcpy(gameEvent[1].message, "DAMMIT! It's a trap! Come on, Chris, we have to leave NOW!!"); strcpy(events[1].message, "DAMMIT! It's a trap! Come on, Chris, we have to leave NOW!!");
gameEvent[2].time = -9; events[2].time = -9;
gameEvent[2].entity = ALIEN_PHOEBE; events[2].entity = ALIEN_PHOEBE;
gameEvent[2].flag = FL_LEAVESECTOR; events[2].flag = FL_LEAVESECTOR;
gameEvent[3].time = -13; events[3].time = -13;
gameEvent[3].face = FACE_SID; events[3].face = FACE_SID;
strcpy(gameEvent[3].message, "Chris, wh..."); strcpy(events[3].message, "Chris, wh...");
gameEvent[4].time = -15; events[4].time = -15;
gameEvent[4].face = FACE_KLINE; events[4].face = FACE_KLINE;
strcpy(gameEvent[4].message, "So finally I meet the man who has been causing us so much trouble!"); strcpy(events[4].message, "So finally I meet the man who has been causing us so much trouble!");
gameEvent[5].time = -20; events[5].time = -20;
gameEvent[5].face = FACE_CHRIS; events[5].face = FACE_CHRIS;
strcpy(gameEvent[5].message, "I see you've jammed up my warp drive. Who are you?"); strcpy(events[5].message, "I see you've jammed up my warp drive. Who are you?");
gameEvent[6].time = -25; events[6].time = -25;
gameEvent[6].face = FACE_KLINE; events[6].face = FACE_KLINE;
strcpy(gameEvent[6].message, "I am Kline Kethlan. And I am here to put to a stop to your worthless little crusade!"); strcpy(events[6].message, "I am Kline Kethlan. And I am here to put to a stop to your worthless little crusade!");
gameEvent[7].time = -31; events[7].time = -31;
gameEvent[7].face = FACE_CHRIS; events[7].face = FACE_CHRIS;
strcpy(gameEvent[7].message, "Kline Kethlan, huh? You sure sound confident."); strcpy(events[7].message, "Kline Kethlan, huh? You sure sound confident.");
gameEvent[8].time = -36; events[8].time = -36;
gameEvent[8].face = FACE_KLINE; events[8].face = FACE_KLINE;
strcpy(gameEvent[8].message, "Nowhere to run, nowhere to hide, and no one to help you! This will certainly be interesting..."); strcpy(events[8].message, "Nowhere to run, nowhere to hide, and no one to help you! This will certainly be interesting...");
gameEvent[9].time = -42; events[9].time = -42;
gameEvent[9].entity = ALIEN_KLINE; events[9].entity = ALIEN_KLINE;
gameEvent[9].flag = -(FL_IMMORTAL | FL_NOFIRE); events[9].flag = -(FL_IMMORTAL | FL_NOFIRE);
break; break;
case MISN_ODEON: case MISN_ODEON:
gameEvent[0].time = 2; events[0].time = 2;
gameEvent[0].face = FACE_URSULA; events[0].face = FACE_URSULA;
strcpy(gameEvent[0].message, "Unidentified craft sighted. Will proceed to destroy all targets."); strcpy(events[0].message, "Unidentified craft sighted. Will proceed to destroy all targets.");
gameEvent[1].time = 8; events[1].time = 8;
gameEvent[1].face = FACE_CHRIS; events[1].face = FACE_CHRIS;
strcpy(gameEvent[1].message, "Looks like she's got one of those homing missile launchers too! Any advice, Phoebe?"); strcpy(events[1].message, "Looks like she's got one of those homing missile launchers too! Any advice, Phoebe?");
gameEvent[2].time = 14; events[2].time = 14;
gameEvent[2].face = FACE_PHOEBE; events[2].face = FACE_PHOEBE;
strcpy(gameEvent[2].message, "Just try and dodge them!"); strcpy(events[2].message, "Just try and dodge them!");
break; break;
case MISN_ALMARTHA: case MISN_ALMARTHA:
gameEvent[0].time = 1; events[0].time = 1;
gameEvent[0].face = FACE_CHRIS; events[0].face = FACE_CHRIS;
strcpy(gameEvent[0].message, "Nice ship!"); strcpy(events[0].message, "Nice ship!");
gameEvent[1].time = 7; events[1].time = 7;
gameEvent[1].face = FACE_KRASS; events[1].face = FACE_KRASS;
strcpy(gameEvent[1].message, "Thanks, boy. Made it myself!"); strcpy(events[1].message, "Thanks, boy. Made it myself!");
gameEvent[2].time = 60; events[2].time = 60;
gameEvent[2].face = FACE_KRASS; events[2].face = FACE_KRASS;
strcpy(gameEvent[2].message, "Hey, boy, we've got company! Looks like your friends didn't do a very good job after all!"); strcpy(events[2].message, "Hey, boy, we've got company! Looks like your friends didn't do a very good job after all!");
gameEvent[2].entity = ALIEN_BOSS_PART1; events[2].entity = ALIEN_BOSS_PART1;
gameEvent[2].flag = -FL_ACTIVATE; events[2].flag = -FL_ACTIVATE;
gameEvent[3].time = 90; events[3].time = 90;
gameEvent[3].entity = ALIEN_BOSS_PART2; events[3].entity = ALIEN_BOSS_PART2;
gameEvent[3].flag = -FL_ACTIVATE; events[3].flag = -FL_ACTIVATE;
gameEvent[4].time = 93; events[4].time = 93;
gameEvent[4].face = FACE_KRASS; events[4].face = FACE_KRASS;
strcpy(gameEvent[4].message, "Keep those things off my back or it'll cost you extra!!!"); strcpy(events[4].message, "Keep those things off my back or it'll cost you extra!!!");
gameEvent[5].time = 120; events[5].time = 120;
gameEvent[5].entity = ALIEN_BOSS_PART3; events[5].entity = ALIEN_BOSS_PART3;
gameEvent[5].flag = -FL_ACTIVATE; events[5].flag = -FL_ACTIVATE;
gameEvent[6].time = 140; events[6].time = 140;
gameEvent[6].face = FACE_PHOEBE; events[6].face = FACE_PHOEBE;
strcpy(gameEvent[6].message, "Hey! Did we miss anything exciting?"); strcpy(events[6].message, "Hey! Did we miss anything exciting?");
gameEvent[6].entity = ALIEN_PHOEBE; events[6].entity = ALIEN_PHOEBE;
gameEvent[6].flag = -FL_ACTIVATE; events[6].flag = -FL_ACTIVATE;
gameEvent[7].time = 140; events[7].time = 140;
gameEvent[7].entity = ALIEN_URSULA; events[7].entity = ALIEN_URSULA;
gameEvent[7].flag = -FL_ACTIVATE; events[7].flag = -FL_ACTIVATE;
gameEvent[8].time = 150; events[8].time = 150;
gameEvent[8].face = FACE_KRASS; events[8].face = FACE_KRASS;
strcpy(gameEvent[8].message, "I've earned my fee. I'll see you around, boy!"); strcpy(events[8].message, "I've earned my fee. I'll see you around, boy!");
gameEvent[8].entity = ALIEN_GOODTRANSPORT; events[8].entity = ALIEN_GOODTRANSPORT;
gameEvent[8].flag = FL_LEAVESECTOR; events[8].flag = FL_LEAVESECTOR;
break; break;
case MISN_POSWIC: case MISN_POSWIC:
gameEvent[0].time = 90; events[0].time = 90;
gameEvent[0].face = FACE_SID; events[0].face = FACE_SID;
strcpy(gameEvent[0].message, "DAMMIT! It's getting away! We've got to stop it!"); strcpy(events[0].message, "DAMMIT! It's getting away! We've got to stop it!");
gameEvent[0].entity = ALIEN_BOSS; events[0].entity = ALIEN_BOSS;
gameEvent[0].flag = FL_LEAVESECTOR; events[0].flag = FL_LEAVESECTOR;
break; break;
case MISN_SATURN: case MISN_SATURN:
gameEvent[0].time = 45; events[0].time = 45;
gameEvent[0].face = FACE_SID; events[0].face = FACE_SID;
strcpy(gameEvent[0].message, "Chris! Another two of those ray cannons just arrived in your sector!"); strcpy(events[0].message, "Chris! Another two of those ray cannons just arrived in your sector!");
gameEvent[0].entity = 11; events[0].entity = 11;
gameEvent[0].flag = -FL_ACTIVATE; events[0].flag = -FL_ACTIVATE;
gameEvent[1].time = 45; events[1].time = 45;
gameEvent[1].entity = 12; events[1].entity = 12;
gameEvent[1].flag = -FL_ACTIVATE; events[1].flag = -FL_ACTIVATE;
gameEvent[2].time = 90; events[2].time = 90;
gameEvent[2].face = FACE_SID; events[2].face = FACE_SID;
strcpy(gameEvent[2].message, "Two more!"); strcpy(events[2].message, "Two more!");
gameEvent[2].entity = 13; events[2].entity = 13;
gameEvent[2].flag = -FL_ACTIVATE; events[2].flag = -FL_ACTIVATE;
gameEvent[3].time = 90; events[3].time = 90;
gameEvent[3].entity = 14; events[3].entity = 14;
gameEvent[3].flag = -FL_ACTIVATE; events[3].flag = -FL_ACTIVATE;
break; break;
case MISN_JUPITER: case MISN_JUPITER:
gameEvent[0].time = 1; events[0].time = 1;
gameEvent[0].entity = 10; events[0].entity = 10;
gameEvent[0].flag = -FL_ACTIVATE; events[0].flag = -FL_ACTIVATE;
gameEvent[1].time = 2; events[1].time = 2;
gameEvent[1].face = FACE_URSULA; events[1].face = FACE_URSULA;
strcpy(gameEvent[1].message, "It's a trap! My God! It's Tyler!"); strcpy(events[1].message, "It's a trap! My God! It's Tyler!");
gameEvent[2].time = 8; events[2].time = 8;
gameEvent[2].face = FACE_KRASS; events[2].face = FACE_KRASS;
strcpy(gameEvent[2].message, "I'm a mercenary, what do you expect?! WEAPCO hired me to do a job, just like you have been doing."); strcpy(events[2].message, "I'm a mercenary, what do you expect?! WEAPCO hired me to do a job, just like you have been doing.");
gameEvent[3].time = 14; events[3].time = 14;
gameEvent[3].face = FACE_CHRIS; events[3].face = FACE_CHRIS;
strcpy(gameEvent[3].message, "Good point. It would be foolish to expect anything else."); strcpy(events[3].message, "Good point. It would be foolish to expect anything else.");
gameEvent[4].time = 15; events[4].time = 15;
gameEvent[4].entity = 11; events[4].entity = 11;
gameEvent[4].flag = -FL_ACTIVATE; events[4].flag = -FL_ACTIVATE;
gameEvent[5].time = 20; events[5].time = 20;
gameEvent[5].face = FACE_KRASS; events[5].face = FACE_KRASS;
strcpy(gameEvent[5].message, "Now if you'll assist me in dying quickly, I have a cheque to earn, boy..."); strcpy(events[5].message, "Now if you'll assist me in dying quickly, I have a cheque to earn, boy...");
gameEvent[6].time = 25; events[6].time = 25;
gameEvent[6].face = FACE_CHRIS; events[6].face = FACE_CHRIS;
strcpy(gameEvent[6].message, "I have a name, you know. Do you remember it?"); strcpy(events[6].message, "I have a name, you know. Do you remember it?");
gameEvent[4].time = 45; events[4].time = 45;
gameEvent[4].entity = 12; events[4].entity = 12;
gameEvent[4].flag = -FL_ACTIVATE; events[4].flag = -FL_ACTIVATE;
gameEvent[4].time = 45; events[4].time = 45;
gameEvent[4].entity = 13; events[4].entity = 13;
gameEvent[4].flag = -FL_ACTIVATE; events[4].flag = -FL_ACTIVATE;
break; break;
case MISN_EARTH: case MISN_EARTH:
gameEvent[0].time = 2; events[0].time = 2;
gameEvent[0].face = FACE_KLINE; events[0].face = FACE_KLINE;
strcpy(gameEvent[0].message, "That's far enough, Bainfield. You've been lucky so far, but your luck is about to run out!"); strcpy(events[0].message, "That's far enough, Bainfield. You've been lucky so far, but your luck is about to run out!");
gameEvent[1].time = 8; events[1].time = 8;
gameEvent[1].face = FACE_CHRIS; events[1].face = FACE_CHRIS;
strcpy(gameEvent[1].message, "Yeah, right! Like I'd lose to you after coming this far!"); strcpy(events[1].message, "Yeah, right! Like I'd lose to you after coming this far!");
break; break;
case MISN_VENUS: case MISN_VENUS:
gameEvent[0].time = 2; events[0].time = 2;
gameEvent[0].face = FACE_CHRIS; events[0].face = FACE_CHRIS;
strcpy(gameEvent[0].message, "WEAPCO is finished, Kethlan! You have nowhere to run, nowhere to hide, and no one to help you."); strcpy(events[0].message, "WEAPCO is finished, Kethlan! You have nowhere to run, nowhere to hide, and no one to help you.");
gameEvent[1].time = 8; events[1].time = 8;
gameEvent[1].face = FACE_KLINE; events[1].face = FACE_KLINE;
strcpy(gameEvent[1].message, "You underestimate me, Bainfield."); strcpy(events[1].message, "You underestimate me, Bainfield.");
break; break;
} }
} }
void event_check() void events_check()
{ {
for (int i = 0 ; i < 20 ; i++) for (int i = 0 ; i < MAX_EVENTS ; i++)
{ {
if (engine.timeTaken == gameEvent[i].time) if (engine.timeTaken == events[i].time)
{ {
if (strcmp(gameEvent[i].message, "@none@") != 0) if (strcmp(events[i].message, "@none@") != 0)
{ {
setRadioMessage(gameEvent[i].face, gameEvent[i].message, 1); setRadioMessage(events[i].face, events[i].message, 1);
} }
if (gameEvent[i].entity > -1) if (events[i].entity > -1)
{ {
if (gameEvent[i].flag != -FL_ACTIVATE) if (events[i].flag != -FL_ACTIVATE)
{ {
aliens[gameEvent[i].entity].flags += gameEvent[i].flag; aliens[events[i].entity].flags += events[i].flag;
} }
else else
{ {
aliens[gameEvent[i].entity].active = true; aliens[events[i].entity].active = true;
aliens[gameEvent[i].entity].x = ((int)player.x + aliens[events[i].entity].x = ((int)player.x +
RANDRANGE(400, 800)); RANDRANGE(400, 800));
aliens[gameEvent[i].entity].y = ((int)player.y + aliens[events[i].entity].y = ((int)player.y +
RANDRANGE(-400, 800)); RANDRANGE(-400, 800));
} }
} }
gameEvent[i].time = 0; events[i].time = 0;
} }
} }
} }
void event_sync() void events_sync()
{ {
for (int i = 0 ; i < 20 ; i++) for (int i = 0 ; i < MAX_EVENTS ; i++)
{ {
if (gameEvent[i].time < 0) if (events[i].time < 0)
{ {
gameEvent[i].time = engine.timeTaken + abs(gameEvent[i].time); events[i].time = engine.timeTaken + abs(events[i].time);
} }
} }
} }

View File

@ -31,7 +31,7 @@ typedef struct Event_ {
} Event; } Event;
void events_init(); void events_init();
void event_check(); void events_check();
void event_sync(); void events_sync();
#endif #endif

View File

@ -1718,7 +1718,7 @@ static void game_doHud()
engine.timeTaken++; engine.timeTaken++;
engine.counter2 = SDL_GetTicks() + 1000; engine.counter2 = SDL_GetTicks() + 1000;
if (engine.missionCompleteTimer == 0) if (engine.missionCompleteTimer == 0)
event_check(); events_check();
} }
if ((engine.timeMission) && (!engine.cheatTime) && (player.shield > 0)) if ((engine.timeMission) && (!engine.cheatTime) && (player.shield > 0))
@ -1748,7 +1748,7 @@ static void game_doHud()
currentMission.timeLimit2[i]--; currentMission.timeLimit2[i]--;
} }
checkTimer(); checkTimer();
event_check(); events_check();
} }
if ((engine.seconds == 0) && (engine.minutes == 0)) if ((engine.seconds == 0) && (engine.minutes == 0))
@ -1761,7 +1761,7 @@ static void game_doHud()
currentMission.timeLimit2[i]--; currentMission.timeLimit2[i]--;
} }
checkTimer(); checkTimer();
event_check(); events_check();
engine.counter = (SDL_GetTicks() + 1000); engine.counter = (SDL_GetTicks() + 1000);
} }
} }

View File

@ -527,7 +527,7 @@ static char revealHiddenObjectives()
if (game.area == MISN_ELAMALE) if (game.area == MISN_ELAMALE)
{ {
mission_killAllEnemies(); mission_killAllEnemies();
event_sync(); events_sync();
aliens[ALIEN_KLINE].active = true; aliens[ALIEN_KLINE].active = true;
aliens[ALIEN_KLINE].x = player.x + 1000; aliens[ALIEN_KLINE].x = player.x + 1000;
aliens[ALIEN_KLINE].y = player.y; aliens[ALIEN_KLINE].y = player.y;