mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 08:15:59 -10:00
change Player_use_ai from int to bool
This commit is contained in:
1 parent
3bf6d43022
commit
60b676cba9
5 files changed
+11
-10
No files matched your search
@@ -30,7 +30,7 @@
|
||||
#include <map>
|
||||
|
||||
// Extern functions/variables
|
||||
extern int Player_use_ai;
|
||||
extern bool Player_use_ai;
|
||||
extern int get_wing_index(object *objp, int wingnum);
|
||||
extern object * get_wing_leader(int wingnum);
|
||||
extern int Cmdline_autopilot_interruptable;
|
||||
@@ -270,7 +270,7 @@ bool StartAutopilot()
|
||||
LockAPConv = _timestamp(); // lock convergence instantly
|
||||
else
|
||||
LockAPConv = _timestamp(3 * MILLISECONDS_PER_SECOND); // 3 seconds before we lock convergence
|
||||
Player_use_ai = 1;
|
||||
Player_use_ai = true;
|
||||
set_time_compression(1);
|
||||
lock_time_compression(true);
|
||||
|
||||
@@ -858,7 +858,7 @@ void EndAutoPilot()
|
||||
|
||||
set_time_compression(1);
|
||||
lock_time_compression(false);
|
||||
Player_use_ai = 0;
|
||||
Player_use_ai = false;
|
||||
//Clear AI Goals
|
||||
|
||||
if (CinematicStarted) // clear cinematic if we need to
|
||||
|
||||
@@ -6421,7 +6421,7 @@ bool post_process_mission(mission *pm)
|
||||
|
||||
// Kazan - player use AI at start?
|
||||
if (pm->flags[Mission::Mission_Flags::Player_start_ai])
|
||||
Player_use_ai = 1;
|
||||
Player_use_ai = true;
|
||||
|
||||
// Assign squadron information
|
||||
if (!Fred_running && (Player != nullptr) && (pm->squad_name[0] != '\0') && (Game_mode & GM_CAMPAIGN_MODE) && !(Game_mode & GM_MULTIPLAYER)) {
|
||||
|
||||
+4
-3
@@ -13749,11 +13749,12 @@ void sexp_set_squadron_wings(int node)
|
||||
/**
|
||||
* Trigger whether player uses the game AI for stuff
|
||||
*/
|
||||
void sexp_player_use_ai(int flag)
|
||||
void sexp_player_use_ai(bool use_ai)
|
||||
{
|
||||
Player_use_ai = flag ? 1 : 0;
|
||||
Player_use_ai = use_ai;
|
||||
|
||||
if (!flag) {
|
||||
if (!use_ai)
|
||||
{
|
||||
Player_ai->ai_override_flags.reset();
|
||||
Player_obj->phys_info.flags &= ~PF_MANEUVER_NO_DAMP;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ extern player Players[MAX_PLAYERS];
|
||||
extern int Player_num; // player num of person playing on this machine
|
||||
extern player *Player; // pointer to my information
|
||||
|
||||
extern int Player_use_ai;
|
||||
extern bool Player_use_ai;
|
||||
extern angles chase_slew_angles; // The viewing angles in which viewer_slew_angles will chase to.
|
||||
|
||||
extern angles Player_flight_cursor;
|
||||
|
||||
@@ -53,7 +53,7 @@ int Player_num;
|
||||
player *Player = NULL;
|
||||
|
||||
// Goober5000
|
||||
int Player_use_ai = 0;
|
||||
bool Player_use_ai = false;
|
||||
|
||||
int lua_game_control = 0;
|
||||
|
||||
@@ -1461,7 +1461,7 @@ void player_level_init()
|
||||
Player_ship = NULL;
|
||||
Player_ai = NULL;
|
||||
|
||||
Player_use_ai = 0; // Goober5000
|
||||
Player_use_ai = false; // Goober5000
|
||||
|
||||
if(Player == NULL)
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user