Reconstructed player hit messages.
This commit is contained in:
parent
7578f3814f
commit
e9330907b7
24
src/game.cpp
24
src/game.cpp
|
@ -31,6 +31,16 @@ static const char *klineInsult[] = {
|
|||
static const char *klineVenusInsult[] = {
|
||||
"Fool.", "And now you're nothing but a DEAD hero."
|
||||
};
|
||||
static const char *phoebePlayerHitMessage[3] = {
|
||||
"Oops! Sorry!",
|
||||
"Whoops! Are you OK, Chris?",
|
||||
"Oh, sorry! I didn't see you there!"
|
||||
};
|
||||
static const char *ursulaPlayerHitMessage[3] = {
|
||||
"Get out of the way!",
|
||||
"Don't fly into my missiles!",
|
||||
"Dammit, Chris, you made me miss!"
|
||||
};
|
||||
|
||||
|
||||
void game_init()
|
||||
|
@ -699,9 +709,17 @@ static void game_doBullets()
|
|||
player.hit = 5;
|
||||
}
|
||||
|
||||
if ((bullet->owner->classDef == CD_PHOEBE) ||
|
||||
(bullet->owner->classDef == CD_URSULA))
|
||||
getPlayerHitMessage(bullet->owner);
|
||||
if (player.shield > 0)
|
||||
{
|
||||
if (bullet->owner->classDef == CD_PHOEBE)
|
||||
{
|
||||
setRadioMessage(FS_PHOEBE, phoebePlayerHitMessage[rand() % 3], 0);
|
||||
}
|
||||
else if (bullet->owner->classDef == CD_URSULA)
|
||||
{
|
||||
setRadioMessage(FS_URSULA, ursulaPlayerHitMessage[rand() % 3], 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (bullet->id == WT_CHARGER)
|
||||
{
|
||||
|
|
|
@ -27,12 +27,6 @@ static const char *missFireMessage[5] = {
|
|||
"Open your eyes!",
|
||||
};
|
||||
|
||||
static const char *playerHitMessage[3] = {
|
||||
"Oops! Sorry!",
|
||||
"Get out of the way!",
|
||||
"Don't fly into my missiles!",
|
||||
};
|
||||
|
||||
void getMissFireMessage(object *ally)
|
||||
{
|
||||
int faceToUse = FS_PHOEBE;
|
||||
|
@ -44,15 +38,3 @@ void getMissFireMessage(object *ally)
|
|||
|
||||
setRadioMessage(faceToUse, missFireMessage[rand() % 5], 0);
|
||||
}
|
||||
|
||||
void getPlayerHitMessage(object *ally)
|
||||
{
|
||||
int faceToUse = FS_PHOEBE;
|
||||
|
||||
if (ally == &aliens[ALIEN_PHOEBE])
|
||||
faceToUse = FS_PHOEBE;
|
||||
else
|
||||
faceToUse = FS_URSULA;
|
||||
|
||||
setRadioMessage(faceToUse, playerHitMessage[rand() % 3], 0);
|
||||
}
|
||||
|
|
|
@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#ifndef MESSAGES_H
|
||||
#define MESSAGES_H
|
||||
|
||||
extern void getKillMessage(object *ally);
|
||||
extern void getMissFireMessage(object *ally);
|
||||
extern void getPlayerHitMessage(object *ally);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue