27 #include "../common/common.h"
28 #include "../common/cmodel.h"
29 #include "../common/grid.h"
30 #include "../game/g_local.h"
31 #include "../game/g_edicts.h"
32 #include "../game/g_utils.h"
33 #include "../server/server.h"
49 static 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;
208 forbiddenList.
reset();
219 Edict* ent =
nullptr;
302 ASSERT_EQ(
getDVz(dv1), 0x04);
305 ASSERT_EQ(dv2, 0x0603);
308 ASSERT_EQ(dv2, 0x0604);
Edict * G_EdictsGetNextInUse(Edict *lastEnt)
Iterate through the entities that are in use.
int Grid_GetTUsForDirection(const int dir, bool crouched)
Returns the amounts of TUs that are needed to perform one step into the given direction.
#define VectorSet(v, x, y, z)
int FS_CheckFile(const char *fmt,...)
Just returns the filelength and -1 if the file wasn't found.
TEST_F(RoutingTest, MapLoading)
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_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)
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 Com_ParseScripts(bool onlyServer)
static void SetUpTestCase()
void G_CompleteRecalcRouting(void)
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.
serverInstanceGame_t * sv
#define VecToPos(v, p)
Map boundary is +/- MAX_WORLD_WIDTH - to get into the positive area we add the possible max negative ...
static forbiddenList_t forbiddenList
A list of locations that cannot be moved to.
actorSizeEnum_t fieldSize
void Grid_MoveStore(pathing_t *path)
Caches the calculated move.
void add(pos3_t pos, byte *entSize)
#define Mem_AllocType(type)
static void TearDownTestCase()
A list of locations that cannot be moved to.
#define ACTOR_SIZE_NORMAL
#define ROUTING_NOT_REACHABLE
void SV_ShutdownGameProgs(void)
Called when either the entire server is being killed, or it is changing to a different game directory...
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.
pos3_t * forbiddenListPos
static mapTiles_t mapTiles
static const char * mapName