#include "../game/q_shared.h"
#include "l_memory.h"
#include "l_script.h"
#include "l_precomp.h"
#include "l_struct.h"
#include "aasfile.h"
#include "../game/botlib.h"
#include "../game/be_aas.h"
#include "be_aas_funcs.h"
#include "be_aas_def.h"
Include dependency graph for be_aas_bspq3.c:

Go to the source code of this file.
|
|
Definition at line 50 of file be_aas_bspq3.c. |
|
|
|
Referenced by AAS_FreeBSPEntities(), and AAS_ParseBSPEntities(). |
|
|
Referenced by AAS_FreeBSPEntities(), AAS_ParseBSPEntities(), and AAS_ValueForBSPEpairKey(). |
|
|
|
|
|
|
|
||||||||||||||||||||
|
Definition at line 242 of file be_aas_bspq3.c. 00243 {
00244 return 0;
00245 } //end of the function AAS_BoxEntities
|
|
|
Definition at line 264 of file be_aas_bspq3.c. References botimport, bspworld, bsp_s::numentities, and PRT_MESSAGE. Referenced by AAS_ValueForBSPEpairKey(). 00265 {
00266 if (ent <= 0 || ent >= bspworld.numentities)
00267 {
00268 botimport.Print(PRT_MESSAGE, "bsp entity out of range\n");
00269 return qfalse;
00270 } //end if
00271 return qtrue;
00272 } //end of the function AAS_BSPEntityInRange
|
|
||||||||||||||||||||
|
Definition at line 232 of file be_aas_bspq3.c. References bsp_link_t. Referenced by AAS_UpdateEntity(). 00233 {
00234 return NULL;
00235 } //end of the function AAS_BSPLinkEntity
|
|
||||||||||||||||||||||||
|
Definition at line 212 of file be_aas_bspq3.c. References botimport, and botlib_import_s::BSPModelMinsMaxsOrigin. Referenced by AAS_GetJumpPadInfo(), AAS_Reachability_Elevator(), AAS_Reachability_FuncBobbing(), AAS_Reachability_Teleport(), AAS_UpdateEntity(), BotFuncBobStartEnd(), BotOnMover(), MoverBottomCenter(), and MoverDown(). 00213 {
00214 botimport.BSPModelMinsMaxsOrigin(modelnum, angles, mins, maxs, origin);
00215 } //end of the function AAS_BSPModelMinsMaxs
|
|
||||||||||||||||||||||||||||
|
Definition at line 450 of file be_aas_bspq3.c. 00451 {
00452 return 0;
00453 } //end of the function AAS_BSPTraceLight
|
|
|
Definition at line 460 of file be_aas_bspq3.c. References AAS_FreeBSPEntities(), bspworld, Com_Memset(), bsp_s::dentdata, bsp_s::entdatasize, FreeMemory(), and bsp_s::loaded. Referenced by AAS_LoadBSPFile(), and AAS_Shutdown(). 00461 {
00462 AAS_FreeBSPEntities();
00463
00464 if (bspworld.dentdata) FreeMemory(bspworld.dentdata);
00465 bspworld.dentdata = NULL;
00466 bspworld.entdatasize = 0;
00467 //
00468 bspworld.loaded = qfalse;
00469 Com_Memset( &bspworld, 0, sizeof(bspworld) );
00470 } //end of the function AAS_DumpBSPData
|
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||
|
Definition at line 170 of file be_aas_bspq3.c. References botimport, bsp_trace_t, Com_Memcpy(), botlib_import_s::EntityTrace, bsp_trace_s::fraction, and qboolean. Referenced by AAS_AreaEntityCollision(). 00173 {
00174 bsp_trace_t enttrace;
00175
00176 botimport.EntityTrace(&enttrace, start, boxmins, boxmaxs, end, entnum, contentmask);
00177 if (enttrace.fraction < trace->fraction)
00178 {
00179 Com_Memcpy(trace, &enttrace, sizeof(bsp_trace_t));
00180 return qtrue;
00181 } //end if
00182 return qfalse;
00183 } //end of the function AAS_EntityCollision
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 323 of file be_aas_bspq3.c. References AAS_ValueForBSPEpairKey(), atof(), MAX_EPAIRKEY, and value. Referenced by AAS_GetJumpPadInfo(), AAS_Reachability_Elevator(), AAS_Reachability_FuncBobbing(), AAS_Reachability_Teleport(), BotInitInfoEntities(), and BotInitLevelItems(). 00324 {
00325 char buf[MAX_EPAIRKEY];
00326
00327 *value = 0;
00328 if (!AAS_ValueForBSPEpairKey(ent, key, buf, MAX_EPAIRKEY)) return qfalse;
00329 *value = atof(buf);
00330 return qtrue;
00331 } //end of the function AAS_FloatForBSPEpairKey
|
Here is the call graph for this function:

|
|
Definition at line 353 of file be_aas_bspq3.c. References bsp_entity_t, bsp_epair_t, bspworld, bsp_s::entities, bsp_entity_s::epairs, FreeMemory(), i, bsp_epair_s::key, bsp_epair_s::next, bsp_s::numentities, and bsp_epair_s::value. Referenced by AAS_DumpBSPData(), and AAS_ParseBSPEntities(). 00354 {
00355 int i;
00356 bsp_entity_t *ent;
00357 bsp_epair_t *epair, *nextepair;
00358
00359 for (i = 1; i < bspworld.numentities; i++)
00360 {
00361 ent = &bspworld.entities[i];
00362 for (epair = ent->epairs; epair; epair = nextepair)
00363 {
00364 nextepair = epair->next;
00365 //
00366 if (epair->key) FreeMemory(epair->key);
00367 if (epair->value) FreeMemory(epair->value);
00368 FreeMemory(epair);
00369 } //end for
00370 } //end for
00371 bspworld.numentities = 0;
00372 } //end of the function AAS_FreeBSPEntities
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 202 of file be_aas_bspq3.c. 00203 {
00204 return qtrue;
00205 } //end of the function AAS_inPHS
|
|
||||||||||||
|
Definition at line 191 of file be_aas_bspq3.c. References botimport, botlib_import_s::inPVS, p2, and qboolean.
|
|
||||||||||||||||
|
Definition at line 338 of file be_aas_bspq3.c. References AAS_ValueForBSPEpairKey(), atoi, MAX_EPAIRKEY, and value. Referenced by AAS_Reachability_FuncBobbing(), AAS_SetWeaponJumpAreaFlags(), AAS_TravelFlagsForTeam(), and BotInitLevelItems(). 00339 {
00340 char buf[MAX_EPAIRKEY];
00341
00342 *value = 0;
00343 if (!AAS_ValueForBSPEpairKey(ent, key, buf, MAX_EPAIRKEY)) return qfalse;
00344 *value = atoi(buf);
00345 return qtrue;
00346 } //end of the function AAS_IntForBSPEpairKey
|
Here is the call graph for this function:

|
|
Definition at line 478 of file be_aas_bspq3.c. References AAS_DumpBSPData(), AAS_ParseBSPEntities(), botimport, botlib_import_s::BSPEntityData, bspworld, Com_Memcpy(), bsp_s::dentdata, bsp_s::entdatasize, GetClearedHunkMemory(), bsp_s::loaded, and strlen(). Referenced by AAS_CalcReachAndClusters(), and AAS_LoadFiles(). 00479 {
00480 AAS_DumpBSPData();
00481 bspworld.entdatasize = strlen(botimport.BSPEntityData()) + 1;
00482 bspworld.dentdata = (char *) GetClearedHunkMemory(bspworld.entdatasize);
00483 Com_Memcpy(bspworld.dentdata, botimport.BSPEntityData(), bspworld.entdatasize);
00484 AAS_ParseBSPEntities();
00485 bspworld.loaded = qtrue;
00486 return BLERR_NOERROR;
00487 } //end of the function AAS_LoadBSPFile
|
Here is the call graph for this function:

|
|
Definition at line 252 of file be_aas_bspq3.c. References bspworld, and bsp_s::numentities. Referenced by AAS_BestReachableFromJumpPadArea(), AAS_GetJumpPadInfo(), AAS_Reachability_Elevator(), AAS_Reachability_FuncBobbing(), AAS_Reachability_JumpPad(), AAS_Reachability_Teleport(), AAS_SetWeaponJumpAreaFlags(), BotInitInfoEntities(), BotInitLevelItems(), and BotSetBrushModelTypes(). 00253 {
00254 ent++;
00255 if (ent >= 1 && ent < bspworld.numentities) return ent;
00256 return 0;
00257 } //end of the function AAS_NextBSPEntity
|
|
|
Definition at line 379 of file be_aas_bspq3.c. References AAS_FreeBSPEntities(), botimport, bsp_entity_t, bsp_epair_t, bspworld, bsp_s::dentdata, bsp_s::entdatasize, bsp_s::entities, bsp_entity_s::epairs, FreeScript(), GetClearedHunkMemory(), GetHunkMemory(), bsp_epair_s::key, LoadScriptMemory(), bsp_epair_s::next, bsp_s::numentities, PRT_MESSAGE, PS_ExpectTokenType(), PS_ReadToken(), SCFL_NOSTRINGESCAPECHARS, SCFL_NOSTRINGWHITESPACES, script, ScriptError(), SetScriptFlags(), strcmp(), strcpy(), token_s::string, StripDoubleQuotes(), strlen(), token, token_t, TT_STRING, token_s::type, and bsp_epair_s::value. Referenced by AAS_LoadBSPFile(). 00380 {
00381 script_t *script;
00382 token_t token;
00383 bsp_entity_t *ent;
00384 bsp_epair_t *epair;
00385
00386 script = LoadScriptMemory(bspworld.dentdata, bspworld.entdatasize, "entdata");
00387 SetScriptFlags(script, SCFL_NOSTRINGWHITESPACES|SCFL_NOSTRINGESCAPECHARS);//SCFL_PRIMITIVE);
00388
00389 bspworld.numentities = 1;
00390
00391 while(PS_ReadToken(script, &token))
00392 {
00393 if (strcmp(token.string, "{"))
00394 {
00395 ScriptError(script, "invalid %s\n", token.string);
00396 AAS_FreeBSPEntities();
00397 FreeScript(script);
00398 return;
00399 } //end if
00400 if (bspworld.numentities >= MAX_BSPENTITIES)
00401 {
00402 botimport.Print(PRT_MESSAGE, "too many entities in BSP file\n");
00403 break;
00404 } //end if
00405 ent = &bspworld.entities[bspworld.numentities];
00406 bspworld.numentities++;
00407 ent->epairs = NULL;
00408 while(PS_ReadToken(script, &token))
00409 {
00410 if (!strcmp(token.string, "}")) break;
00411 epair = (bsp_epair_t *) GetClearedHunkMemory(sizeof(bsp_epair_t));
00412 epair->next = ent->epairs;
00413 ent->epairs = epair;
00414 if (token.type != TT_STRING)
00415 {
00416 ScriptError(script, "invalid %s\n", token.string);
00417 AAS_FreeBSPEntities();
00418 FreeScript(script);
00419 return;
00420 } //end if
00421 StripDoubleQuotes(token.string);
00422 epair->key = (char *) GetHunkMemory(strlen(token.string) + 1);
00423 strcpy(epair->key, token.string);
00424 if (!PS_ExpectTokenType(script, TT_STRING, 0, &token))
00425 {
00426 AAS_FreeBSPEntities();
00427 FreeScript(script);
00428 return;
00429 } //end if
00430 StripDoubleQuotes(token.string);
00431 epair->value = (char *) GetHunkMemory(strlen(token.string) + 1);
00432 strcpy(epair->value, token.string);
00433 } //end while
00434 if (strcmp(token.string, "}"))
00435 {
00436 ScriptError(script, "missing }\n");
00437 AAS_FreeBSPEntities();
00438 FreeScript(script);
00439 return;
00440 } //end if
00441 } //end while
00442 FreeScript(script);
00443 } //end of the function AAS_ParseBSPEntities
|
Here is the call graph for this function:

|
|
Definition at line 160 of file be_aas_bspq3.c. References botimport, point, and botlib_import_s::PointContents. Referenced by AAS_ClientMovementPrediction(), AAS_Reachability_Grapple(), AAS_Reachability_Jump(), AAS_Reachability_Swim(), AAS_Swimming(), BotFinishTravel_WaterJump(), BotGapDistance(), and BotInitLevelItems(). 00161 {
00162 return botimport.PointContents(point);
00163 } //end of the function AAS_PointContents
|
|
||||||||||||||||||||||||||||
|
Definition at line 147 of file be_aas_bspq3.c. References botimport, bsp_trace_t, and botlib_import_s::Trace. Referenced by AAS_DropToFloor(), AAS_Reachability_Grapple(), AAS_WeaponJumpZVelocity(), BotCheckBlocked(), BotExportTest(), BotInitLevelItems(), BotItemGoalInVisButNotVisible(), BotOnMover(), BotOnTopOfEntity(), BotReachabilityArea(), BotTravel_Grapple(), and BotVisible(). 00148 {
00149 bsp_trace_t bsptrace;
00150 botimport.Trace(&bsptrace, start, mins, maxs, end, passent, contentmask);
00151 return bsptrace;
00152 } //end of the function AAS_Trace
|
|
|
Definition at line 223 of file be_aas_bspq3.c. References bsp_link_t. Referenced by AAS_UnlinkInvalidEntities(), and AAS_UpdateEntity(). 00224 {
00225 } //end of the function AAS_UnlinkFromBSPLeaves
|
|
||||||||||||||||||||
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 302 of file be_aas_bspq3.c. References AAS_ValueForBSPEpairKey(), MAX_EPAIRKEY, sscanf(), v, v1, v2, and VectorClear. Referenced by AAS_GetJumpPadInfo(), AAS_Reachability_Elevator(), AAS_Reachability_FuncBobbing(), AAS_Reachability_Teleport(), AAS_SetWeaponJumpAreaFlags(), BotInitInfoEntities(), and BotInitLevelItems(). 00303 {
00304 char buf[MAX_EPAIRKEY];
00305 double v1, v2, v3;
00306
00307 VectorClear(v);
00308 if (!AAS_ValueForBSPEpairKey(ent, key, buf, MAX_EPAIRKEY)) return qfalse;
00309 //scanf into doubles, then assign, so it is vec_t size independent
00310 v1 = v2 = v3 = 0;
00311 sscanf(buf, "%lf %lf %lf", &v1, &v2, &v3);
00312 v[0] = v1;
00313 v[1] = v2;
00314 v[2] = v3;
00315 return qtrue;
00316 } //end of the function AAS_VectorForBSPEpairKey
|
Here is the call graph for this function:

|
|
|
Definition at line 87 of file be_aas_bspq3.c. Referenced by AAS_BSPEntityInRange(), AAS_DumpBSPData(), AAS_FreeBSPEntities(), AAS_LoadBSPFile(), AAS_NextBSPEntity(), AAS_ParseBSPEntities(), and AAS_ValueForBSPEpairKey(). |
1.3.9.1