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

View File

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

View File

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