27 #include "../client/client.h"
28 #include "../client/cl_shared.h"
29 #include "../client/cl_lua.h"
30 #include "../client/renderer/r_state.h"
31 #include "../client/ui/ui_main.h"
32 #include "../common/routing.h"
33 #include "../server/server.h"
34 #include "../server/sv_rma.h"
36 #define RMA_HIGHEST_SUPPORTED_SEED 50
89 if (filterId && !
Q_streq(filterId, md->
id))
103 Com_Printf(
"\nMap: %s Assembly: %s AssNr: %i\n", p, asmName, mapCount);
112 bool didItOnce =
false;
114 for (iterDrop = md->
aircraft; iterDrop || !didItOnce; iterDrop = iterDrop->
next) {
115 const char* craft =
nullptr;
117 craft = (
const char*) (iterDrop->
data);
122 Cvar_Set(
"rm_drop",
"+craft_drop_firebird");
125 for (iterUfo = md->
ufos; iterUfo || !didItOnce; iterUfo = iterUfo->
next) {
126 const char* ufo =
nullptr;
128 ufo = (
const char*) (iterUfo->
data);
132 Cvar_Set(
"rm_ufo",
"+craft_ufo_scout");
143 typedef struct skip_info {
151 skip_info
const skip_list[] = {
155 { -1,
"frozen",
"nature_medium",0, 0 },
156 { 11,
"village",
"medium", 0, 0 },
157 { 19,
"village",
"medium", 0, 0 },
158 { -1,
"village",
"medium_noufo", 0, 0 },
159 { -1,
"village",
"small", 0, 0 },
163 for (skip_info
const* e = skip_list; e !=
endof(skip_list); ++e) {
164 if (e->seed >= 0 &&
i != e->seed)
166 if (e->map && !
Q_streq(p, e->map))
170 if (e->craft && !
Q_streq(craft, e->craft))
172 if (e->ufo && !
Q_streq(ufo, e->ufo))
188 ASSERT_TRUE(numPlaced != 0);
190 ASSERT_TRUE(time < 30000);
192 Com_Printf(
"\nMap: %s Assembly: %s Seed: %i tiles: %i ms: %li\n", p, asmName,
i, numPlaced, time);
#define RMA_HIGHEST_SUPPORTED_SEED
char * SV_GetConfigString(int index)
void * LIST_GetByIdx(linkedList_t *list, int index)
Get an entry of a linked list by its index in the list.
memPool_t * sv_genericPool
void Com_ParseScripts(bool onlyServer)
void Com_Printf(const char *const fmt,...)
gltexunit_t texunits[MAX_GL_TEXUNITS]
cvar_t * masterserver_url
const char * Com_GetRandomMapAssemblyNameForCraft(const char *craftID)
Returns the name of an aircraft or an ufo that is used in the ump files for the random map assembly...
TEST_F(MapDefMassRMATest, DISABLED_MapDefsMassRMA)
This test cycles through the list of map definitions found in the maps.ufo script and builds each map...
memPool_t * cl_genericPool
static void TearDownTestCase()
gltexunit_t * active_texunit
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
void CL_InitLua(void)
Initializes the ui-lua interfacing environment.
#define Mem_CreatePool(name)
static void SetUpTestCase()
memPool_t * com_networkPool
const char * TEST_GetStringProperty(const char *name)
int SV_AssembleMap(const char *mapTheme, const char *assembly, char *asmTiles, char *asmPos, char *entityString, const unsigned int seed, bool print)
char mapStr[MAX_TOKEN_CHARS *MAX_TILESTRINGS]
memPool_t * vid_imagePool
#define MapDef_Foreach(var)
cvar_t * Cvar_Set(const char *varName, const char *value,...)
Sets a cvar value.
cvar_t * sv_dumpmapassembly
int Sys_Milliseconds(void)
char posStr[MAX_TOKEN_CHARS *MAX_TILESTRINGS]