#include "../game/q_shared.h"
#include "l_memory.h"
#include "l_script.h"
#include "l_precomp.h"
#include "l_struct.h"
#include "../game/botlib.h"
#include "be_interface.h"
Include dependency graph for be_ea.c:

Go to the source code of this file.
Defines | |
| #define | ACTION_JUMPEDLASTFRAME 128 |
| #define | MAX_COMMANDARGUMENTS 10 |
| #define | MAX_USERMOVE 400 |
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_DropInv (int client, char *inv) |
| void | EA_DropItem (int client, char *it) |
| 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_Tell (int client, int clientto, char *str) |
| void | EA_Use (int client) |
| void | EA_UseInv (int client, char *inv) |
| void | EA_UseItem (int client, char *it) |
| void | EA_View (int client, vec3_t viewangles) |
| void | EA_Walk (int client) |
Variables | |
| bot_input_t * | botinputs |
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
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
|
|
|
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
|
|
||||||||||||
|
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
|
|
|
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
|
|
|
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
|
|
||||||||||||
|
Definition at line 112 of file be_ea.c. References botlib_import_s::BotClientCommand, botimport, and va(). 00113 {
00114 botimport.BotClientCommand(client, va("invdrop %s", inv));
00115 } //end of the function EA_DropInv
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 92 of file be_ea.c. References botlib_import_s::BotClientCommand, botimport, and va(). 00093 {
00094 botimport.BotClientCommand(client, va("drop %s", it));
00095 } //end of the function EA_DropItem
|
Here is the call graph for this function:

|
||||||||||||
|
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
|
|
|
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
|
|
||||||||||||||||
|
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:

|
|
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
|
|
||||||||||||||||
|
|
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
|
|
|
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
|
|
|
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
|
|
|
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
|
|
|
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
|
|
|
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
|
|
|
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
|
|
|
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
|
|
||||||||||||
|
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:

|
||||||||||||
|
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:

|
||||||||||||
|
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
|
|
|
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:

|
|
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:

|
|
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
|
|
||||||||||||||||
|
Definition at line 72 of file be_ea.c. References botlib_import_s::BotClientCommand, botimport, and va(). 00073 {
00074 botimport.BotClientCommand(client, va("tell %d, %s", clientto, str));
00075 } //end of the function EA_SayTeam
|
Here is the call graph for this function:

|
|
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
|
|
||||||||||||
|
Definition at line 102 of file be_ea.c. References botlib_import_s::BotClientCommand, botimport, and va(). 00103 {
00104 botimport.BotClientCommand(client, va("invuse %s", inv));
00105 } //end of the function EA_UseInv
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 82 of file be_ea.c. References botlib_import_s::BotClientCommand, botimport, and va(). 00083 {
00084 botimport.BotClientCommand(client, va("use %s", it));
00085 } //end of the function EA_UseItem
|
Here is the call graph for this function:

|
||||||||||||
|
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
|
|
|
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
|
|
|
Definition at line 44 of file be_ea.c. Referenced by EA_Action(), EA_Attack(), EA_Crouch(), EA_DelayedJump(), EA_Gesture(), EA_GetInput(), EA_Jump(), EA_Move(), EA_MoveBack(), EA_MoveDown(), EA_MoveForward(), EA_MoveLeft(), EA_MoveRight(), EA_MoveUp(), EA_ResetInput(), EA_Respawn(), EA_SelectWeapon(), EA_Setup(), EA_Shutdown(), EA_Talk(), EA_Use(), EA_View(), and EA_Walk(). |
1.3.9.1