49static const char*
mapName =
"test_routing";
72 ASSERT_EQ(pos[0], 128);
73 ASSERT_EQ(pos[1], 128);
78 ASSERT_EQ(pos[0], 130);
79 ASSERT_EQ(pos[1], 128);
83 ASSERT_EQ(gridPos, 1);
86 const byte crouchingState = 0;
106 ASSERT_EQ(lengthUnstored, lengthStored);
206 const byte crouchingState = 0;
219 Edict* ent =
nullptr;
302 ASSERT_EQ(
getDVz(dv1), 0x04);
305 ASSERT_EQ(dv2, 0x0603);
308 ASSERT_EQ(dv2, 0x0604);
static forbiddenList_t forbiddenList
A list of locations that cannot be moved to.
actorSizeEnum_t fieldSize
pos3_t * forbiddenListPos
static void TearDownTestCase()
static void SetUpTestCase()
Common model code header (for bsp and others).
void CM_LoadMap(const char *tiles, bool day, const char *pos, const char *entityString, mapData_t *mapData, mapTiles_t *mapTiles)
Loads in the map and all submodels.
definitions common between client and server, but not game lib
#define ROUTING_NOT_REACHABLE
#define ACTOR_SIZE_NORMAL
int FS_CheckFile(const char *fmt,...)
Just returns the filelength and -1 if the file wasn't found.
Edict * G_EdictsGetNextInUse(Edict *lastEnt)
Iterate through the entities that are in use.
functions to handle the storage and lifecycle of all edicts in the game module.
Local definitions for game module.
void G_CompleteRecalcRouting(void)
Misc utility functions for game module.
void Grid_CalcPathing(const Routing &routing, const actorSizeEnum_t actorSize, pathing_t *path, const pos3_t from, int maxTUs, forbiddenList_t *fb_list)
Recalculate the pathing table for the given actor(-position).
pos_t Grid_MoveLength(const pathing_t *path, const pos3_t to, byte crouchingState, bool stored)
Return the needed TUs to walk to a given position.
int Grid_GetTUsForDirection(const int dir, bool crouched)
Returns the amounts of TUs that are needed to perform one step into the given direction.
pos_t Grid_Fall(const Routing &routing, const actorSizeEnum_t actorSize, const pos3_t pos)
Calculated the new height level when something falls down from a certain position.
void Grid_MoveStore(pathing_t *path)
Caches the calculated move.
Battlescape grid functions.
#define VecToPos(v, p)
Map boundary is +/- MAX_WORLD_WIDTH - to get into the positive area we add the possible max negative ...
#define Mem_AllocType(type)
void Com_ParseScripts(bool onlyServer)
Main server include file.
void SV_Map(bool day, const char *levelstring, const char *assembly, bool verbose=true)
Change the server to a new map, taking all connected clients along with it.
void SV_ShutdownGameProgs(void)
Called when either the entire server is being killed, or it is changing to a different game directory...
serverInstanceGame_t * sv
A list of locations that cannot be moved to.
static mapTiles_t mapTiles
static const char * mapName
TEST_F(RoutingTest, MapLoading)
#define VectorSet(v, x, y, z)