cl_spawn.c File Reference

Client side entity spawning from map entity string. More...

#include "../client.h"
#include "../cl_game.h"
#include "cl_particle.h"
#include "cl_spawn.h"
#include "../../shared/parse.h"
Include dependency graph for cl_spawn.c:

Go to the source code of this file.

Data Structures

struct  localEntityParse_t
struct  spawn_t

Defines

#define MISC_MODEL_GLOW   9
#define SPAWNFLAG_NO_DAY   8
#define MIN_AMBIENT_COMPONENT   0.1
#define MIN_AMBIENT_SUM   1.25

Functions

static void SP_worldspawn (const localEntityParse_t *entData)
static void SP_misc_model (const localEntityParse_t *entData)
static void SP_misc_particle (const localEntityParse_t *entData)
static void SP_misc_sound (const localEntityParse_t *entData)
static void SP_light (const localEntityParse_t *entData)
static void CL_SpawnCall (const localEntityParse_t *entData)
 Finds the spawn function for the entity and calls it.
void CL_SpawnParseEntitystring (void)
 Parse the map entity string and spawns those entities that are client-side only.

Variables

static r_light_t sun
static const value_t localEntityValues []
static const spawn_t spawns []

Detailed Description

Client side entity spawning from map entity string.

Definition in file cl_spawn.c.


Define Documentation

#define MIN_AMBIENT_COMPONENT   0.1

Definition at line 216 of file cl_spawn.c.

Referenced by SP_worldspawn().

#define MIN_AMBIENT_SUM   1.25

Definition at line 217 of file cl_spawn.c.

Referenced by SP_worldspawn().

#define MISC_MODEL_GLOW   9

position in the spawnflags

Definition at line 34 of file cl_spawn.c.

Referenced by SP_misc_model().

#define SPAWNFLAG_NO_DAY   8

Definition at line 35 of file cl_spawn.c.

Referenced by SP_misc_particle(), and SP_misc_sound().


Function Documentation

static void CL_SpawnCall ( const localEntityParse_t entData  )  [static]

Finds the spawn function for the entity and calls it.

Definition at line 123 of file cl_spawn.c.

References localEntityParse_t::classname, spawn_t::name, and spawn_t::spawn.

Referenced by CL_SpawnParseEntitystring().

void CL_SpawnParseEntitystring ( void   ) 
static void SP_light ( const localEntityParse_t entData  )  [static]
static void SP_misc_model ( const localEntityParse_t entData  )  [static]
static void SP_misc_particle ( const localEntityParse_t entData  )  [static]
static void SP_misc_sound ( const localEntityParse_t entData  )  [static]
static void SP_worldspawn ( const localEntityParse_t entData  )  [static]

Variable Documentation

const value_t localEntityValues[] [static]
Initial value:
 {
    {"skin", V_INT, offsetof(localEntityParse_t, skin), MEMBER_SIZEOF(localEntityParse_t, skin)},
    {"maxteams", V_INT, offsetof(localEntityParse_t, maxteams), MEMBER_SIZEOF(localEntityParse_t, maxteams)},
    {"spawnflags", V_INT, offsetof(localEntityParse_t, spawnflags), MEMBER_SIZEOF(localEntityParse_t, spawnflags)},
    {"maxlevel", V_INT, offsetof(localEntityParse_t, maxLevel), MEMBER_SIZEOF(localEntityParse_t, maxLevel)},
    {"attenuation", V_FLOAT, offsetof(localEntityParse_t, attenuation), MEMBER_SIZEOF(localEntityParse_t, attenuation)},
    {"volume", V_FLOAT, offsetof(localEntityParse_t, volume), MEMBER_SIZEOF(localEntityParse_t, volume)},
    {"frame", V_INT, offsetof(localEntityParse_t, frame), MEMBER_SIZEOF(localEntityParse_t, frame)},
    {"angle", V_FLOAT, offsetof(localEntityParse_t, angle), MEMBER_SIZEOF(localEntityParse_t, angle)},
    {"wait", V_POS, offsetof(localEntityParse_t, wait), MEMBER_SIZEOF(localEntityParse_t, wait)},
    {"angles", V_VECTOR, offsetof(localEntityParse_t, angles), MEMBER_SIZEOF(localEntityParse_t, angles)},
    {"origin", V_VECTOR, offsetof(localEntityParse_t, origin), MEMBER_SIZEOF(localEntityParse_t, origin)},
    {"color", V_VECTOR, offsetof(localEntityParse_t, color), MEMBER_SIZEOF(localEntityParse_t, color)},
    {"modelscale_vec", V_VECTOR, offsetof(localEntityParse_t, scale), MEMBER_SIZEOF(localEntityParse_t, scale)},
    {"wait", V_POS, offsetof(localEntityParse_t, wait), MEMBER_SIZEOF(localEntityParse_t, wait)},
    {"classname", V_STRING, offsetof(localEntityParse_t, classname), 0},
    {"model", V_STRING, offsetof(localEntityParse_t, model), 0},
    {"anim", V_STRING, offsetof(localEntityParse_t, anim), 0},
    {"particle", V_STRING, offsetof(localEntityParse_t, particle), 0},
    {"noise", V_STRING, offsetof(localEntityParse_t, noise), 0},
    {"tag", V_STRING, offsetof(localEntityParse_t, tagname), 0},
    {"target", V_STRING, offsetof(localEntityParse_t, target), 0},
    {"targetname", V_STRING, offsetof(localEntityParse_t, targetname), 0},
    {"light", V_INT, offsetof(localEntityParse_t, light), MEMBER_SIZEOF(localEntityParse_t, light)},
    {"ambient_day", V_VECTOR, offsetof(localEntityParse_t, ambientDayColor), MEMBER_SIZEOF(localEntityParse_t, ambientDayColor)},
    {"ambient_night", V_VECTOR, offsetof(localEntityParse_t, ambientNightColor), MEMBER_SIZEOF(localEntityParse_t, ambientNightColor)},

    {NULL, 0, 0, 0}
}

Definition at line 69 of file cl_spawn.c.

const spawn_t spawns[] [static]
Initial value:
 {
    {"worldspawn", SP_worldspawn},
    {"misc_model", SP_misc_model},
    {"misc_particle", SP_misc_particle},
    {"misc_sound", SP_misc_sound},
    {"light", SP_light},

    {NULL, NULL}
}

Definition at line 110 of file cl_spawn.c.

r_light_t sun [static]

Definition at line 31 of file cl_spawn.c.

Referenced by R_Draw3DGlobe().


Generated by  doxygen 1.6.2