Fix ugly hack of using -4 for fuelcen reached
This commit is contained in:
parent
ae88d2ed8b
commit
85b95efc70
|
@ -25,6 +25,7 @@ struct object;
|
||||||
extern void change_guidebot_name(void);
|
extern void change_guidebot_name(void);
|
||||||
extern void do_escort_menu(void);
|
extern void do_escort_menu(void);
|
||||||
extern void detect_escort_goal_accomplished(int index);
|
extern void detect_escort_goal_accomplished(int index);
|
||||||
|
void detect_escort_goal_fuelcen_accomplished();
|
||||||
extern void set_escort_special_goal(int key);
|
extern void set_escort_special_goal(int key);
|
||||||
void recreate_thief(struct object *objp);
|
void recreate_thief(struct object *objp);
|
||||||
void init_buddy_for_level(void);
|
void init_buddy_for_level(void);
|
||||||
|
|
|
@ -304,6 +304,14 @@ static void record_escort_goal_accomplished()
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------
|
||||||
|
void detect_escort_goal_fuelcen_accomplished()
|
||||||
|
{
|
||||||
|
if (!Buddy_allowed_to_talk)
|
||||||
|
return;
|
||||||
|
if (Escort_special_goal == ESCORT_GOAL_ENERGYCEN)
|
||||||
|
record_escort_goal_accomplished();
|
||||||
|
}
|
||||||
|
|
||||||
void detect_escort_goal_accomplished(int index)
|
void detect_escort_goal_accomplished(int index)
|
||||||
{
|
{
|
||||||
if (!Buddy_allowed_to_talk)
|
if (!Buddy_allowed_to_talk)
|
||||||
|
@ -344,8 +352,6 @@ if ((Escort_goal_index <= ESCORT_GOAL_RED_KEY) && (index >= 0)) {
|
||||||
if (Escort_special_goal != -1)
|
if (Escort_special_goal != -1)
|
||||||
{
|
{
|
||||||
if (Escort_special_goal == ESCORT_GOAL_ENERGYCEN) {
|
if (Escort_special_goal == ESCORT_GOAL_ENERGYCEN) {
|
||||||
if (index == -4)
|
|
||||||
record_escort_goal_accomplished();
|
|
||||||
} else if ((Objects[index].type == OBJ_POWERUP) && (Escort_special_goal == ESCORT_GOAL_POWERUP))
|
} else if ((Objects[index].type == OBJ_POWERUP) && (Escort_special_goal == ESCORT_GOAL_POWERUP))
|
||||||
record_escort_goal_accomplished(); // Any type of powerup picked up will do.
|
record_escort_goal_accomplished(); // Any type of powerup picked up will do.
|
||||||
else if ((Objects[index].type == Objects[Escort_goal_index].type) && (Objects[index].id == Objects[Escort_goal_index].id)) {
|
else if ((Objects[index].type == Objects[Escort_goal_index].type) && (Objects[index].id == Objects[Escort_goal_index].id)) {
|
||||||
|
|
|
@ -579,7 +579,7 @@ fix fuelcen_give_fuel(segment *segp, fix MaxAmountCanTake )
|
||||||
fix amount;
|
fix amount;
|
||||||
|
|
||||||
#if defined(DXX_BUILD_DESCENT_II)
|
#if defined(DXX_BUILD_DESCENT_II)
|
||||||
detect_escort_goal_accomplished(-4); // UGLY! Hack! -4 means went through fuelcen.
|
detect_escort_goal_fuelcen_accomplished();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// if (Station[segp->value].MaxCapacity<=0) {
|
// if (Station[segp->value].MaxCapacity<=0) {
|
||||||
|
|
Loading…
Reference in a new issue