26 #include "../client.h"
27 #include "../cgame/cl_game.h"
29 #include "../../shared/parse.h"
32 #define MISC_MODEL_GLOW 9
33 #define SPAWNFLAG_NO_DAY 8
110 #define MIN_AMBIENT_COMPONENT 0.1
111 #define MIN_AMBIENT_SUM 0.50
121 Com_Printf(
"The selected team is not usable. "
122 "The map doesn't support %i teams but only %i teams\n",
181 VectorScale(sunColor, sunIntensity/255.0, sunColor);
186 for (
int i = 0;
i < 3;
i++)
205 if (entData->
model[0] ==
'\0') {
206 Com_Printf(
"misc_model without \"model\" specified\n");
224 Com_Printf(
"Warning: Model has animation set, but also a tag - use the tag and skip the animation\n");
238 Com_Printf(
"Warning: Model has frame and anim parameters - using frame (no animation)\n");
261 if (entData->
light < 1.0)
327 const char* entityToken =
Com_Parse(&es);
332 if (entityToken[0] !=
'{')
333 Com_Error(
ERR_DROP,
"V_ParseEntitystring: found %s when expecting {", entityToken);
349 if (entityToken[0] ==
'}')
354 for (
const value_t*
v = localEntityValues;
v->string;
v++)
355 if (
Q_streq(entityToken,
v->string)) {
#define Vector2NotEmpty(a)
#define VectorCopy(src, dest)
#define VectorSet(v, x, y, z)
vec_t ColorNormalize(const vec3_t in, vec3_t out)
static const vec3_t scale
void CL_AddMapParticle(const char *ptl, const vec3_t origin, const vec2_t wait, const char *info, int levelflags)
Spawns the map particle.
void CL_SpawnParseEntitystring(void)
Parse the map entity string and spawns those entities that are client-side only.
static void SP_worldspawn(const localEntityParse_t *entData)
void Com_Printf(const char *const fmt,...)
int CL_GetConfigStringInteger(int index)
void LMT_Init(localModel_t *localModel)
#define VectorScale(in, scale, out)
void Com_Error(int code, const char *fmt,...)
static const value_t localEntityValues[]
void Q_strncpyz(char *dest, const char *src, size_t destsize)
Safe strncpy that ensures a trailing zero.
void AngleVectors(const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Create the rotation matrix in order to rotate something.
struct localEntityParse_s localEntityParse_t
#define Vector4Set(v, r, g, b, a)
static void SP_misc_particle(const localEntityParse_t *entData)
localModel_t * LM_GetByID(const char *id)
bool GAME_IsMultiplayer(void)
#define VectorNotEmpty(a)
const char * entStringPos
const GLuint *typedef void(APIENTRY *GenRenderbuffersEXT_t)(GLsizei
static void SP_misc_model(const localEntityParse_t *entData)
static void SP_light(const localEntityParse_t *entData)
int Com_EParseValue(void *base, const char *token, valueTypes_t type, int ofs, size_t size)
#define PATHFINDING_HEIGHT
15 max, adjusting above 8 will require a rewrite to the DV code
localModel_t * LM_AddModel(const char *model, const vec3_t origin, const vec3_t angles, int entnum, int levelflags, int renderFlags, const vec3_t scale)
Prepares local (not known or handled by the server) models to the map, which will be added later in L...
const char * Com_Parse(const char *data_p[], char *target, size_t size, bool replaceWhitespaces)
Parse a token out of a string.
static void SP_misc_sound(const localEntityParse_t *entData)
char mapEntityString[MAX_MAP_ENTSTRING]
#define MEMBER_SIZEOF(TYPE, MEMBER)
#define Vector2Copy(src, dest)
void(* think)(struct localModel_s *localModel)
void LE_AddAmbientSound(const char *sound, const vec3_t origin, int levelflags, float volume, float attenuation)
Adds ambient sounds from misc_sound entities.
#define MIN_AMBIENT_COMPONENT
void Cvar_SetValue(const char *varName, float value)
Expands value to a string and calls Cvar_Set.
QGL_EXTERN int GLboolean GLfloat * v
#define Vector4Copy(src, dest)
static const spawn_t spawns[]
void R_AddStaticLight(const vec3_t origin, float radius, const vec3_t color)
Add static light for model lighting (world already got them baked into lightmap)
static void CL_SpawnCall(const localEntityParse_t *entData)
Finds the spawn function for the entity and calls it.
#define SND_VOLUME_DEFAULT