User:Monster Iestyn/Source Code Documentation/b_bot.h

From SRB2 Wiki
Jump to navigation Jump to search
Online link GitHub entry
File type C header file
#include guard none

This header file provides function prototypes for basic bot handling.

Function name Return type Params Defined in Description
B_BuildTiccmd void player_t *player,
ticcmd_t *cmd
b_bot.c Builds the ticcmd for the player, assuming the player is a bot. Note: the Lua hooks BotTiccmd and BotAI can both affect the exact behavior of this function
B_KeysToTiccmd void mobj_t *mo,
ticcmd_t *cmd,
boolean forward,
boolean backward,
boolean left,
boolean right,
boolean strafeleft,
boolean straferight,
boolean jump,
boolean spin
b_bot.c Converts key presses into a ticcmd for a bot player
B_CheckRespawn boolean player_t *player b_bot.c Determines if the bot player should respawn (true = yes, false = no)
B_MoveBlocked void player_t *player b_bot.c Called by P_XYMovement if a bot player cannot move this tic; this may cause the default bot AI to attempt to jump up the next tic if they are currently trying to follow the main player
B_RespawnBot void INT32 playernum b_bot.c Respawns the given player as a bot. Some of the bot player's stats will be set to match the stats of the main player (e.g. reverse gravity, scale, drowning/space countdown timers), and the bot player will be spawned directly above the position of the main player. If the bot player's skin has CA_FLY, they will fall down in their flying animation
B_HandleFlightIndicator void player_t *player b_bot.c Spawns a flight indicator icon over the bot player