Quake II RTX doxygen
1.0 dev
|
|
Go to the source code of this file.
◆ LIST_DECL()
static LIST_DECL |
( |
cl_locations |
| ) |
|
|
static |
◆ LOC_Add_f()
Definition at line 268 of file locs.c.
273 Com_Printf(
"Usage: %s <name>\n",
Cmd_Argv(0));
278 Com_Printf(
"Must be in a level.\n");
284 List_Append(&cl_locations, &loc->
entry);
Referenced by LOC_Init().
◆ LOC_AddLocationsToScene()
Definition at line 177 of file locs.c.
188 memset(&ent, 0,
sizeof(ent));
190 ent.skin = R_RegisterSkin(
"models/items/c_head/skin.pcx");
197 LIST_FOR_EACH(
location_t, loc, &cl_locations, entry) {
199 dist = VectorLength(dir);
205 VectorCopy(loc->
origin, ent.origin);
207 if (loc == nearest) {
208 ent.origin[2] += 10.0f * sin(
cl.
time * 0.01f);
Referenced by CL_AddEntities().
◆ LOC_Alloc()
◆ LOC_Delete_f()
Definition at line 287 of file locs.c.
292 Com_Printf(
"Must be in a level.\n");
298 Com_Printf(
"No closest location.\n");
302 List_Remove(&loc->
entry);
Referenced by LOC_Init().
◆ LOC_FindClosest()
Definition at line 138 of file locs.c.
147 LIST_FOR_EACH(
location_t, loc, &cl_locations, entry) {
148 VectorSubtract(pos, loc->
origin, dir);
149 dist = VectorLength(dir);
157 cl.
bsp->nodes, MASK_SOLID);
158 if (trace.fraction != 1.0f) {
163 if (dist < minDist) {
Referenced by LOC_AddLocationsToScene(), LOC_Delete_f(), LOC_Here_m(), LOC_There_m(), and LOC_Update_f().
◆ LOC_FreeLocations()
◆ LOC_Here_m()
static size_t LOC_Here_m |
( |
char * |
buffer, |
|
|
size_t |
size |
|
) |
| |
|
static |
◆ LOC_Init()
◆ LOC_LoadLocations()
Definition at line 59 of file locs.c.
61 char path[MAX_OSPATH];
71 ret = FS_LoadFile(path, (
void **)&buffer);
73 if (ret != Q_ERR_NOENT) {
74 Com_EPrintf(
"Couldn't load %s: %s\n", path,
Q_ErrorString(ret));
93 Com_WPrintf(
"Line %d is incomplete in %s\n", line, path);
99 List_Append(&cl_locations, &loc->
entry);
111 Com_DPrintf(
"Loaded %d location%s from %s\n",
112 count, count == 1 ?
"" :
"s", path);
Referenced by CL_Begin().
◆ LOC_There_m()
static size_t LOC_There_m |
( |
char * |
buffer, |
|
|
size_t |
size |
|
) |
| |
|
static |
◆ LOC_Update_f()
Definition at line 306 of file locs.c.
311 Com_Printf(
"Usage: %s <name>\n",
Cmd_Argv(0));
316 Com_Printf(
"Must be in a level.\n");
322 Com_Printf(
"No closest location.\n");
Referenced by LOC_Init().
◆ LOC_Write_f()
Definition at line 332 of file locs.c.
334 char buffer[MAX_OSPATH];
340 Com_Printf(
"Must be in a level.\n");
344 if (LIST_EMPTY(&cl_locations)) {
345 Com_Printf(
"No locations to write.\n");
349 f =
FS_EasyOpenFile(buffer,
sizeof(buffer), FS_MODE_WRITE | FS_FLAG_TEXT,
356 LIST_FOR_EACH(
location_t, loc, &cl_locations, entry) {
358 (
int)(loc->
origin[0] * 8),
359 (
int)(loc->
origin[1] * 8),
360 (
int)(loc->
origin[2] * 8),
365 Com_Printf(
"Wrote %d location%s to %s\n",
366 count, count == 1 ?
"" :
"s", buffer);
Referenced by LOC_Init().
◆ loc_dist
◆ loc_draw
◆ loc_trace
void CM_BoxTrace(trace_t *trace, vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, mnode_t *headnode, int brushmask)
qhandle_t FS_EasyOpenFile(char *buf, size_t size, unsigned mode, const char *dir, const char *name, const char *ext)
static void LOC_Update_f(void)
static void LOC_Write_f(void)
void Cmd_AddCommand(const char *name, xcommand_t function)
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags)
const char * Q_ErrorString(qerror_t error)
static void LOC_Delete_f(void)
ssize_t FS_FPrintf(qhandle_t f, const char *format,...)
static cvar_t * loc_trace
void Cmd_TokenizeString(const char *text, qboolean macroExpand)
char * Cmd_RawArgsFrom(int from)
void V_AddEntity(entity_t *ent)
static location_t * LOC_Alloc(const char *name)
qhandle_t R_RegisterModel(const char *name)
vec3_t playerEntityOrigin
size_t Q_strlcpy(char *dst, const char *src, size_t size)
#define V_AddLight(org, intensity, r, g, b)
static size_t LOC_Here_m(char *buffer, size_t size)
static void LOC_Add_f(void)
static size_t LOC_There_m(char *buffer, size_t size)
static location_t * LOC_FindClosest(vec3_t pos)
void Cmd_AddMacro(const char *name, xmacro_t function)
void FS_FCloseFile(qhandle_t f)
size_t Q_concat(char *dest, size_t size,...)