Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

be_ea.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

void EA_Action (int client, int action)
void EA_Attack (int client)
void EA_Command (int client, char *command)
void EA_Crouch (int client)
void EA_DelayedJump (int client)
void EA_EndRegular (int client, float thinktime)
void EA_Gesture (int client)
void EA_GetInput (int client, float thinktime, bot_input_t *input)
void EA_Jump (int client)
void EA_Move (int client, vec3_t dir, float speed)
void EA_MoveBack (int client)
void EA_MoveDown (int client)
void EA_MoveForward (int client)
void EA_MoveLeft (int client)
void EA_MoveRight (int client)
void EA_MoveUp (int client)
void EA_ResetInput (int client)
void EA_Respawn (int client)
void EA_Say (int client, char *str)
void EA_SayTeam (int client, char *str)
void EA_SelectWeapon (int client, int weapon)
int EA_Setup (void)
void EA_Shutdown (void)
void EA_Talk (int client)
void EA_Use (int client)
void EA_View (int client, vec3_t viewangles)
void EA_Walk (int client)


Function Documentation

void EA_Action int  client,
int  action
 

Definition at line 286 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

00287 {
00288     bot_input_t *bi;
00289 
00290     bi = &botinputs[client];
00291 
00292     bi->actionflags |= action;
00293 } //end of function EA_Action

void EA_Attack int  client  ) 
 

Definition at line 160 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

Referenced by BotTravel_BFGJump(), BotTravel_Grapple(), and BotTravel_RocketJump().

00161 {
00162     bot_input_t *bi;
00163 
00164     bi = &botinputs[client];
00165 
00166     bi->actionflags |= ACTION_ATTACK;
00167 } //end of the function EA_Attack

void EA_Command int  client,
char *  command
 

Definition at line 136 of file be_ea.c.

References botlib_import_s::BotClientCommand, and botimport.

Referenced by BotEnterChat(), BotResetGrapple(), and BotTravel_Grapple().

00137 {
00138     botimport.BotClientCommand(client, command);
00139 } //end of the function EA_Command

void EA_Crouch int  client  ) 
 

Definition at line 258 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

Referenced by BotTravel_Crouch(), BotTravel_Walk(), and BotWalkInDirection().

00259 {
00260     bot_input_t *bi;
00261 
00262     bi = &botinputs[client];
00263 
00264     bi->actionflags |= ACTION_CROUCH;
00265 } //end of the function EA_Crouch

void EA_DelayedJump int  client  ) 
 

Definition at line 237 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

Referenced by BotTravel_Jump().

00238 {
00239     bot_input_t *bi;
00240 
00241     bi = &botinputs[client];
00242 
00243     if (bi->actionflags & ACTION_JUMPEDLASTFRAME)
00244     {
00245         bi->actionflags &= ~ACTION_DELAYEDJUMP;
00246     } //end if
00247     else
00248     {
00249         bi->actionflags |= ACTION_DELAYEDJUMP;
00250     } //end if
00251 } //end of the function EA_DelayedJump

void EA_EndRegular int  client,
float  thinktime
 

Definition at line 416 of file be_ea.c.

00417 {
00418 /*
00419     bot_input_t *bi;
00420     int jumped = qfalse;
00421 
00422     bi = &botinputs[client];
00423 
00424     bi->actionflags &= ~ACTION_JUMPEDLASTFRAME;
00425 
00426     bi->thinktime = thinktime;
00427     botimport.BotInput(client, bi);
00428 
00429     bi->thinktime = 0;
00430     VectorClear(bi->dir);
00431     bi->speed = 0;
00432     jumped = bi->actionflags & ACTION_JUMP;
00433     bi->actionflags = 0;
00434     if (jumped) bi->actionflags |= ACTION_JUMPEDLASTFRAME;
00435 */
00436 } //end of the function EA_EndRegular

void EA_Gesture int  client  ) 
 

Definition at line 122 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

00123 {
00124     bot_input_t *bi;
00125 
00126     bi = &botinputs[client];
00127 
00128     bi->actionflags |= ACTION_GESTURE;
00129 } //end of the function EA_Gesture

void EA_GetInput int  client,
float  thinktime,
bot_input_t input
 

Definition at line 443 of file be_ea.c.

References bot_input_t, botinputs, Com_Memcpy(), input, and bot_input_s::thinktime.

00444 {
00445     bot_input_t *bi;
00446 //  int jumped = qfalse;
00447 
00448     bi = &botinputs[client];
00449 
00450 //  bi->actionflags &= ~ACTION_JUMPEDLASTFRAME;
00451 
00452     bi->thinktime = thinktime;
00453     Com_Memcpy(input, bi, sizeof(bot_input_t));
00454 
00455     /*
00456     bi->thinktime = 0;
00457     VectorClear(bi->dir);
00458     bi->speed = 0;
00459     jumped = bi->actionflags & ACTION_JUMP;
00460     bi->actionflags = 0;
00461     if (jumped) bi->actionflags |= ACTION_JUMPEDLASTFRAME;
00462     */
00463 } //end of the function EA_GetInput

Here is the call graph for this function:

void EA_Jump int  client  ) 
 

Definition at line 216 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

Referenced by BotCheckBarrierJump(), BotTravel_BarrierJump(), BotTravel_BFGJump(), BotTravel_Jump(), BotTravel_RocketJump(), and BotWalkInDirection().

00217 {
00218     bot_input_t *bi;
00219 
00220     bi = &botinputs[client];
00221 
00222     if (bi->actionflags & ACTION_JUMPEDLASTFRAME)
00223     {
00224         bi->actionflags &= ~ACTION_JUMP;
00225     } //end if
00226     else
00227     {
00228         bi->actionflags |= ACTION_JUMP;
00229     } //end if
00230 } //end of the function EA_Jump

void EA_Move int  client,
vec3_t  dir,
float  speed
 

Definition at line 384 of file be_ea.c.

References bot_input_t, botinputs, bot_input_s::dir, bot_input_s::speed, and VectorCopy.

Referenced by BotCheckBarrierJump(), BotFinishTravel_BarrierJump(), BotFinishTravel_Elevator(), BotFinishTravel_FuncBobbing(), BotFinishTravel_Jump(), BotFinishTravel_JumpPad(), BotFinishTravel_Walk(), BotFinishTravel_WalkOffLedge(), BotFinishTravel_WaterJump(), BotFinishTravel_WeaponJump(), BotMoveInGoalArea(), BotSwimInDirection(), BotTravel_BarrierJump(), BotTravel_BFGJump(), BotTravel_Crouch(), BotTravel_Elevator(), BotTravel_FuncBobbing(), BotTravel_Grapple(), BotTravel_Jump(), BotTravel_JumpPad(), BotTravel_Ladder(), BotTravel_RocketJump(), BotTravel_Swim(), BotTravel_Teleport(), BotTravel_Walk(), BotTravel_WalkOffLedge(), and BotWalkInDirection().

00385 {
00386     bot_input_t *bi;
00387 
00388     bi = &botinputs[client];
00389 
00390     VectorCopy(dir, bi->dir);
00391     //cap speed
00392     if (speed > MAX_USERMOVE) speed = MAX_USERMOVE;
00393     else if (speed < -MAX_USERMOVE) speed = -MAX_USERMOVE;
00394     bi->speed = speed;
00395 } //end of the function EA_Move

void EA_MoveBack int  client  ) 
 

Definition at line 342 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

00343 {
00344     bot_input_t *bi;
00345 
00346     bi = &botinputs[client];
00347 
00348     bi->actionflags |= ACTION_MOVEBACK;
00349 } //end of the function EA_MoveBack

void EA_MoveDown int  client  ) 
 

Definition at line 314 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

00315 {
00316     bot_input_t *bi;
00317 
00318     bi = &botinputs[client];
00319 
00320     bi->actionflags |= ACTION_MOVEDOWN;
00321 } //end of the function EA_MoveDown

void EA_MoveForward int  client  ) 
 

Definition at line 328 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

Referenced by BotTravel_Ladder(), and BotTravel_WaterJump().

00329 {
00330     bot_input_t *bi;
00331 
00332     bi = &botinputs[client];
00333 
00334     bi->actionflags |= ACTION_MOVEFORWARD;
00335 } //end of the function EA_MoveForward

void EA_MoveLeft int  client  ) 
 

Definition at line 356 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

00357 {
00358     bot_input_t *bi;
00359 
00360     bi = &botinputs[client];
00361 
00362     bi->actionflags |= ACTION_MOVELEFT;
00363 } //end of the function EA_MoveLeft

void EA_MoveRight int  client  ) 
 

Definition at line 370 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

00371 {
00372     bot_input_t *bi;
00373 
00374     bi = &botinputs[client];
00375 
00376     bi->actionflags |= ACTION_MOVERIGHT;
00377 } //end of the function EA_MoveRight

void EA_MoveUp int  client  ) 
 

Definition at line 300 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

Referenced by BotTravel_WaterJump().

00301 {
00302     bot_input_t *bi;
00303 
00304     bi = &botinputs[client];
00305 
00306     bi->actionflags |= ACTION_MOVEUP;
00307 } //end of the function EA_MoveUp

void EA_ResetInput int  client  ) 
 

Definition at line 470 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, botinputs, bot_input_s::dir, bot_input_s::speed, bot_input_s::thinktime, and VectorClear.

00471 {
00472     bot_input_t *bi;
00473     int jumped = qfalse;
00474 
00475     bi = &botinputs[client];
00476     bi->actionflags &= ~ACTION_JUMPEDLASTFRAME;
00477 
00478     bi->thinktime = 0;
00479     VectorClear(bi->dir);
00480     bi->speed = 0;
00481     jumped = bi->actionflags & ACTION_JUMP;
00482     bi->actionflags = 0;
00483     if (jumped) bi->actionflags |= ACTION_JUMPEDLASTFRAME;
00484 } //end of the function EA_ResetInput

void EA_Respawn int  client  ) 
 

Definition at line 202 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

00203 {
00204     bot_input_t *bi;
00205 
00206     bi = &botinputs[client];
00207 
00208     bi->actionflags |= ACTION_RESPAWN;
00209 } //end of the function EA_Respawn

void EA_Say int  client,
char *  str
 

Definition at line 52 of file be_ea.c.

References botlib_import_s::BotClientCommand, botimport, and va().

00053 {
00054     botimport.BotClientCommand(client, va("say %s", str) );
00055 } //end of the function EA_Say

Here is the call graph for this function:

void EA_SayTeam int  client,
char *  str
 

Definition at line 62 of file be_ea.c.

References botlib_import_s::BotClientCommand, botimport, and va().

00063 {
00064     botimport.BotClientCommand(client, va("say_team %s", str));
00065 } //end of the function EA_SayTeam

Here is the call graph for this function:

void EA_SelectWeapon int  client,
int  weapon
 

Definition at line 146 of file be_ea.c.

References bot_input_t, botinputs, and bot_input_s::weapon.

Referenced by BotTravel_BFGJump(), and BotTravel_RocketJump().

00147 {
00148     bot_input_t *bi;
00149 
00150     bi = &botinputs[client];
00151 
00152     bi->weapon = weapon;
00153 } //end of the function EA_SelectWeapon

int EA_Setup void   ) 
 

Definition at line 491 of file be_ea.c.

References bot_input_t, botinputs, botlibglobals, GetClearedHunkMemory(), and botlib_globals_s::maxclients.

Referenced by Export_BotLibSetup().

00492 {
00493     //initialize the bot inputs
00494     botinputs = (bot_input_t *) GetClearedHunkMemory(
00495                                     botlibglobals.maxclients * sizeof(bot_input_t));
00496     return BLERR_NOERROR;
00497 } //end of the function EA_Setup

Here is the call graph for this function:

void EA_Shutdown void   ) 
 

Definition at line 504 of file be_ea.c.

References botinputs, and FreeMemory().

Referenced by Export_BotLibShutdown().

00505 {
00506     FreeMemory(botinputs);
00507     botinputs = NULL;
00508 } //end of the function EA_Shutdown

Here is the call graph for this function:

void EA_Talk int  client  ) 
 

Definition at line 174 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

00175 {
00176     bot_input_t *bi;
00177 
00178     bi = &botinputs[client];
00179 
00180     bi->actionflags |= ACTION_TALK;
00181 } //end of the function EA_Talk

void EA_Use int  client  ) 
 

Definition at line 188 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

00189 {
00190     bot_input_t *bi;
00191 
00192     bi = &botinputs[client];
00193 
00194     bi->actionflags |= ACTION_USE;
00195 } //end of the function EA_Use

void EA_View int  client,
vec3_t  viewangles
 

Definition at line 402 of file be_ea.c.

References bot_input_t, botinputs, VectorCopy, and bot_input_s::viewangles.

Referenced by BotTravel_BFGJump(), and BotTravel_RocketJump().

00403 {
00404     bot_input_t *bi;
00405 
00406     bi = &botinputs[client];
00407 
00408     VectorCopy(viewangles, bi->viewangles);
00409 } //end of the function EA_View

void EA_Walk int  client  ) 
 

Definition at line 272 of file be_ea.c.

References bot_input_s::actionflags, bot_input_t, and botinputs.

Referenced by BotTravel_Walk().

00273 {
00274     bot_input_t *bi;
00275 
00276     bi = &botinputs[client];
00277 
00278     bi->actionflags |= ACTION_WALK;
00279 } //end of the function EA_Walk


Generated on Thu Aug 25 13:46:23 2005 for Quake III Arena by  doxygen 1.3.9.1