50 VM_Warning(prog,
"setorigin: can not modify world entity\n");
55 VM_Warning(prog,
"setorigin: can not modify free entity\n");
71 prog->
error_cmd(
"SetMinMaxSize: backwards mins/maxs");
120 if (
mod && !strcmp(
mod->name, m))
137 VM_Warning(prog,
"setmodel: model '%s' not precached\n", m);
151 VM_Warning(prog,
"setsize: can not modify world entity\n");
156 VM_Warning(prog,
"setsize: can not modify free entity\n");
188 if (fvolume < 0 || fvolume > 1)
190 VM_Warning(prog,
"VM_CL_sound: volume must be in range 0-1\n");
194 if (attenuation < 0 || attenuation > 4)
196 VM_Warning(prog,
"VM_CL_sound: attenuation must be in range 0-4\n");
224 VM_Warning(prog,
"VM_CL_sound: channel must be in range 0-127\n");
247 if (fvolume < 0 || fvolume > 1)
249 VM_Warning(prog,
"VM_CL_pointsound: volume must be in range 0-1\n");
253 if (attenuation < 0 || attenuation > 4)
255 VM_Warning(prog,
"VM_CL_pointsound: attenuation must be in range 0-4\n");
277#define CL_HitNetworkBrushModels(move) !((move) == MOVE_WORLDONLY)
278#define CL_HitNetworkPlayers(move) !((move) == MOVE_WORLDONLY || (move) == MOVE_NOMONSTERS)
299 if (isnan(
v1[0]) || isnan(
v1[1]) || isnan(
v1[2]) || isnan(
v2[0]) || isnan(
v2[1]) || isnan(
v2[2]))
300 prog->
error_cmd(
"%s: NAN errors detected in traceline('%f %f %f', '%f %f %f', %i, entity %i)\n", prog->
name,
v1[0],
v1[1],
v1[2],
v2[0],
v2[1],
v2[2], move,
PRVM_EDICT_TO_PROG(ent));
302 trace =
CL_TraceLine(
v1,
v2, move, ent,
CL_GenericHitSuperContentsMask(ent), 0, 0,
collision_extendtracelinelength.
value,
CL_HitNetworkBrushModels(move),
CL_HitNetworkPlayers(move), &svent,
true,
false);
339 if (isnan(
v1[0]) || isnan(
v1[1]) || isnan(
v1[2]) || isnan(
v2[0]) || isnan(
v2[1]) || isnan(
v2[2]))
340 prog->
error_cmd(
"%s: NAN errors detected in tracebox('%f %f %f', '%f %f %f', '%f %f %f', '%f %f %f', %i, entity %i)\n", prog->
name,
v1[0],
v1[1],
v1[2], m1[0], m1[1], m1[2], m2[0], m2[1], m2[2],
v2[0],
v2[1],
v2[2], move,
PRVM_EDICT_TO_PROG(ent));
342 trace =
CL_TraceBox(
v1, m1, m2,
v2, move, ent,
CL_GenericHitSuperContentsMask(ent), 0, 0,
collision_extendtraceboxlength.
value,
CL_HitNetworkBrushModels(move),
CL_HitNetworkPlayers(move), &svent,
true);
356 vec3_t original_avelocity;
369 for (
i = 0;
i < 200;
i++)
378 trace =
CL_TraceBox(start,
mins,
maxs, end,
MOVE_NORMAL, tossent,
CL_GenericHitSuperContentsMask(tossent), 0, 0,
collision_extendmovelength.
value,
true,
true,
NULL,
true);
407 VM_Warning(prog,
"tracetoss: can not use world entity\n");
449 VM_Warning(prog,
"VM_CL_precache_model: no free models\n");
452 VM_Warning(prog,
"VM_CL_precache_model: model \"%s\" not found\n",
name);
459 vec_t radius, radius2;
461 int i, numtouchedicts;
472 prog->
error_cmd(
"VM_CL_findradius: %s doesnt have the specified chain field !", prog->
name);
478 radius2 = radius * radius;
480 mins[0] = org[0] - (radius + 1);
481 mins[1] = org[1] - (radius + 1);
482 mins[2] = org[2] - (radius + 1);
483 maxs[0] = org[0] + (radius + 1);
484 maxs[1] = org[1] + (radius + 1);
485 maxs[2] = org[2] + (radius + 1);
493 for (
i = 0;
i < numtouchedicts;
i++)
495 ent = touchedicts[
i];
527 int i, numtouchedicts;
538 prog->
error_cmd(
"VM_CL_findbox: %s doesnt have the specified chain field !", prog->
name);
549 for (
i = 0;
i < numtouchedicts; ++
i)
573 VM_Warning(prog,
"droptofloor: can not modify world entity\n");
578 VM_Warning(prog,
"droptofloor: can not modify free entity\n");
593 trace =
CL_TraceBox(start,
mins,
maxs, end,
MOVE_NORMAL, ent,
CL_GenericHitSuperContentsMask(ent), 0, 0,
collision_extendmovelength.
value,
true,
true,
NULL,
true);
618 VM_Warning(prog,
"VM_CL_lightstyle >= MAX_LIGHTSTYLES\n");
629 static int cs_yes, cs_no;
646 start[2] =
mins[2] - 1;
647 for (
x=0 ;
x<=1 ;
x++)
648 for (
y=0 ;
y<=1 ;
y++)
668 start[0] = stop[0] = (
mins[0] +
maxs[0])*0.5;
669 start[1] = stop[1] = (
mins[1] +
maxs[1])*0.5;
671 trace =
CL_TraceLine(start, stop,
MOVE_NORMAL, ent,
CL_GenericHitSuperContentsMask(ent), 0, 0,
collision_extendmovelength.
value,
true,
true,
NULL,
true,
false);
676 mid = bottom = trace.
endpos[2];
679 for (
x=0 ;
x<=1 ;
x++)
680 for (
y=0 ;
y<=1 ;
y++)
682 start[0] = stop[0] =
x ?
maxs[0] :
mins[0];
683 start[1] = stop[1] =
y ?
maxs[1] :
mins[1];
685 trace =
CL_TraceLine(start, stop,
MOVE_NORMAL, ent,
CL_GenericHitSuperContentsMask(ent), 0, 0,
collision_extendmovelength.
value,
true,
true,
NULL,
true,
false);
735 vec3_t ambientcolor, diffusecolor, diffusenormal;
874 VM_Warning(prog,
"VM_CL_R_GetView : VF_VIEWPORT can't be retrieved, use VF_MIN/VF_SIZE instead\n");
976 VM_Warning(prog,
"VM_CL_R_GetView : unknown parm %i\n", c);
1147 VM_Warning(prog,
"VM_CL_R_SetView : unknown parm %i\n", c);
1161 const char *cubemapname =
NULL;
1163 float coronaintensity = 1;
1164 float coronasizescale = 0.25;
1165 qbool castshadow =
true;
1166 float ambientscale = 0;
1167 float diffusescale = 1;
1168 float specularscale = 1;
1180 if (prog->
argc >= 4)
1185 Con_DPrintf(
"VM_CL_R_AddDynamicLight: out of bounds lightstyle index %i\n",
style);
1189 if (prog->
argc >= 5)
1191 if (prog->
argc >= 6)
1201 R_RTLight_Update(&
r_refdef.
scene.
templights[
r_refdef.
scene.
numlights],
false, &matrix, col,
style, cubemapname, castshadow, coronaintensity, coronasizescale, ambientscale, diffusescale, specularscale,
LIGHTFLAG_NORMALMODE |
LIGHTFLAG_REALTIMEMODE);
1264 unsigned char flags;
1302#define PRECACHE_PIC_FROMWAD 1
1303#define PRECACHE_PIC_NOTPERSISTENT 2
1305#define PRECACHE_PIC_MIPMAP 8
1393 VM_Warning(prog,
"VM_drawcharacter: null character passed!\n");
1405 VM_Warning(prog,
"VM_drawcharacter: wrong DRAWFLAG %i !\n", flag);
1409 if(pos[2] ||
scale[2])
1410 VM_Warning(prog,
"VM_drawcharacter: z value%c from %s discarded\n",(pos[2] &&
scale[2]) ?
's' : 0,((pos[2] &&
scale[2]) ?
"pos and scale" : (pos[2] ?
"pos" :
"scale")));
1415 VM_Warning(prog,
"VM_drawcharacter: scale %s is null !\n", (
scale[0] == 0) ? ((
scale[1] == 0) ?
"x and y" :
"x") :
"y");
1420 DrawQ_String_Scale(pos[0], pos[1], &character, 1,
scale[0],
scale[1], sx, sy,
rgb[0],
rgb[1],
rgb[2],
PRVM_G_FLOAT(
OFS_PARM4), flag,
NULL,
true,
getdrawfont(prog));
1446 if (prog->
argc >= 6)
1452 VM_Warning(prog,
"VM_drawstring: wrong DRAWFLAG %i !\n", flag);
1459 VM_Warning(prog,
"VM_drawstring: scale %s is null !\n", (
scale[0] == 0) ? ((
scale[1] == 0) ?
"x and y" :
"x") :
"y");
1463 if(pos[2] ||
scale[2])
1464 VM_Warning(prog,
"VM_drawstring: z value%s from %s discarded\n",(pos[2] &&
scale[2]) ?
"s" :
" ",((pos[2] &&
scale[2]) ?
"pos and scale" : (pos[2] ?
"pos" :
"scale")));
1467 DrawQ_String_Scale(pos[0], pos[1],
string, 0,
scale[0],
scale[1], sx, sy,
rgb[0],
rgb[1],
rgb[2],
PRVM_G_FLOAT(
OFS_PARM4), flag,
NULL,
true,
getdrawfont(prog));
1487 float sx, sy,
alpha;
1494 if (prog->
argc == 6)
1518 VM_Warning(prog,
"VM_drawcolorcodedstring: wrong DRAWFLAG %i !\n", flag);
1525 VM_Warning(prog,
"VM_drawcolorcodedstring: scale %s is null !\n", (
scale[0] == 0) ? ((
scale[1] == 0) ?
"x and y" :
"x") :
"y");
1529 if(pos[2] ||
scale[2])
1530 VM_Warning(prog,
"VM_drawcolorcodedstring: z value%s from %s discarded\n",(pos[2] &&
scale[2]) ?
"s" :
" ",((pos[2] &&
scale[2]) ?
"pos and scale" : (pos[2] ?
"pos" :
"scale")));
1533 DrawQ_String_Scale(pos[0], pos[1],
string, 0,
scale[0],
scale[1], sx, sy,
rgb[0],
rgb[1],
rgb[2],
alpha, flag,
NULL,
false,
getdrawfont(prog));
1534 if (prog->
argc == 6)
1568 if(sx >= 0.9 && sx <= 1.1)
1632 const char *fontname, *filelist, *sizes, *c, *cm;
1635 float sz,
scale, voffset;
1642 fontname =
"default";
1646 filelist =
"gfx/conchars";
1654 if (prog->
argc >= 4)
1671 memset(
f->fallbacks, 0,
sizeof(
f->fallbacks));
1672 memset(
f->fallback_faces, 0,
sizeof(
f->fallback_faces));
1675 c = strchr(filelist,
':');
1676 cm = strchr(filelist,
',');
1677 if(c && (!cm || c < cm))
1678 f->req_face = atoi(c+1);
1685 dp_strlcpy(mainfont, filelist,
sizeof(mainfont));
1688 memcpy(mainfont, filelist, c - filelist);
1689 mainfont[c - filelist] = 0;
1695 c = strchr(filelist,
',');
1701 c = strchr(filelist,
':');
1702 cm = strchr(filelist,
',');
1703 if(c && (!cm || c < cm))
1704 f->fallback_faces[
i] = atoi(c+1);
1707 f->fallback_faces[
i] = 0;
1712 dp_strlcpy(
f->fallbacks[
i], filelist,
sizeof(mainfont));
1716 memcpy(
f->fallbacks[
i], filelist, c - filelist);
1717 f->fallbacks[
i][c - filelist] = 0;
1723 f->req_sizes[
i] = -1;
1724 for (numsizes = 0,c = sizes;;)
1730 if (sz < 0.001f || sz > 1000.0f)
1741 f->req_sizes[numsizes] = sz;
1748 if (prog->
argc >= 5)
1754 if (prog->
argc >= 6)
1773 const char *picname;
1789 VM_Warning(prog,
"VM_drawpic: %s not cached !\n", picname);
1796 if (prog->
argc >= 6)
1802 VM_Warning(prog,
"VM_drawpic: wrong DRAWFLAG %i !\n", flag);
1806 if(pos[2] ||
size[2])
1807 VM_Warning(prog,
"VM_drawpic: z value%s from %s discarded\n",(pos[2] &&
size[2]) ?
"s" :
" ",((pos[2] &&
size[2]) ?
"pos and size" : (pos[2] ?
"pos" :
"size")));
1809 DrawQ_Pic(pos[0], pos[1],
Draw_CachePic_Flags (picname,
CACHEPICFLAG_NOTPERSISTENT),
size[0],
size[1],
rgb[0],
rgb[1],
rgb[2],
PRVM_G_FLOAT(
OFS_PARM4), flag);
1821 const char *picname;
1837 VM_Warning(prog,
"VM_drawrotpic: %s not cached !\n", picname);
1850 VM_Warning(prog,
"VM_drawrotpic: wrong DRAWFLAG %i !\n", flag);
1854 if(pos[2] ||
size[2] || org[2])
1855 VM_Warning(prog,
"VM_drawrotpic: z value from pos/size/org discarded\n");
1857 DrawQ_RotPic(pos[0], pos[1],
Draw_CachePic_Flags(picname,
CACHEPICFLAG_NOTPERSISTENT),
size[0],
size[1], org[0], org[1],
PRVM_G_FLOAT(
OFS_PARM4),
rgb[0],
rgb[1],
rgb[2],
PRVM_G_FLOAT(
OFS_PARM6), flag);
1870 const char *picname;
1886 VM_Warning(prog,
"VM_drawsubpic: %s not cached !\n", picname);
1901 VM_Warning(prog,
"VM_drawsubpic: wrong DRAWFLAG %i !\n", flag);
1905 if(pos[2] ||
size[2])
1906 VM_Warning(prog,
"VM_drawsubpic: z value%s from %s discarded\n",(pos[2] &&
size[2]) ?
"s" :
" ",((pos[2] &&
size[2]) ?
"pos and size" : (pos[2] ?
"pos" :
"size")));
1911 srcPos[0] + srcSize[0], srcPos[1],
rgb[0],
rgb[1],
rgb[2],
alpha,
1912 srcPos[0], srcPos[1] + srcSize[1],
rgb[0],
rgb[1],
rgb[2],
alpha,
1913 srcPos[0] + srcSize[0], srcPos[1] + srcSize[1],
rgb[0],
rgb[1],
rgb[2],
alpha,
1943 VM_Warning(prog,
"VM_drawfill: wrong DRAWFLAG %i !\n", flag);
1947 if(pos[2] ||
size[2])
1948 VM_Warning(prog,
"VM_drawfill: z value%s from %s discarded\n",(pos[2] &&
size[2]) ?
"s" :
" ",((pos[2] &&
size[2]) ?
"pos and size" : (pos[2] ?
"pos" :
"size")));
2039 VM_Warning(prog,
"VM_CL_getstatf: index>=MAX_CL_STATS or index<0\n");
2049 int index, firstbit, bitcount;
2092 VM_Warning(prog,
"VM_CL_getstats: index>MAX_CL_STATS-4 or index<0\n");
2104 struct model_s *
model;
2121 VM_Warning(prog,
"VM_CL_setmodelindex: null model\n");
2175 CL_ParticleTrail(
i, 1, start, end,
velocity,
velocity,
NULL, prog->
argc >= 5 ? (
int)
PRVM_G_FLOAT(
OFS_PARM4) : 0,
true,
true,
NULL,
NULL, 1);
2199 vec3_t origin_from, origin_to, dir_from, dir_to;
2203 float tintmins[4], tintmaxs[4], fade;
2245 CL_ParticleTrail(effectnum,
count, origin_from, origin_to, dir_from, dir_to,
NULL, 0,
true,
true, tintmins, tintmaxs, fade);
2247 CL_ParticleBox(effectnum,
count, origin_from, origin_to, dir_from, dir_to,
NULL, 0,
true,
true, tintmins, tintmaxs, fade);
2325#define PMF_JUMP_HELD 1
2328#define PMF_ONGROUND 8
2334 memset(&s, 0,
sizeof(s));
2418 if(!strcasecmp(c,
"name"))
2421 if(!strcasecmp(c,
"frags"))
2424 if(!strcasecmp(c,
"ping"))
2427 if(!strcasecmp(c,
"pl"))
2430 if(!strcasecmp(c,
"movementloss"))
2433 if(!strcasecmp(c,
"entertime"))
2436 if(!strcasecmp(c,
"colors"))
2439 if(!strcasecmp(c,
"topcolor"))
2442 if(!strcasecmp(c,
"bottomcolor"))
2445 if(!strcasecmp(c,
"viewentity"))
2517 size_t cl_readstring_len;
2537 unsigned char *
data;
2539 unsigned short size;
2591 VM_Warning(prog,
"makestatic: can not modify world entity\n");
2596 VM_Warning(prog,
"makestatic: can not modify free entity\n");
2606 memset(staticent, 0,
sizeof(*staticent));
2641 Matrix4x4_CreateFromQuakeEntity(&staticent->
render.
matrix,
PRVM_clientedictvector(ent,
origin)[0],
PRVM_clientedictvector(ent,
origin)[1],
PRVM_clientedictvector(ent,
origin)[2],
PRVM_clientedictvector(ent,
angles)[0],
PRVM_clientedictvector(ent,
angles)[1],
PRVM_clientedictvector(ent,
angles)[2], staticent->
render.
scale);
2687 VM_Warning(prog,
"copyentity: can not read world entity\n");
2692 VM_Warning(prog,
"copyentity: can not read free entity\n");
2698 VM_Warning(prog,
"copyentity: can not modify world entity\n");
2703 VM_Warning(prog,
"copyentity: can not modify free entity\n");
2745 vec3_t mincorner, maxcorner, vel1, vel2;
2772 CL_AllocLightFlash(
NULL, &tempmatrix, 350,
PRVM_G_VECTOR(
OFS_PARM1)[0],
PRVM_G_VECTOR(
OFS_PARM1)[1],
PRVM_G_VECTOR(
OFS_PARM1)[2], 700, 0.5,
NULL, -1,
true, 1, 0.25, 0.25, 1, 1,
LIGHTFLAG_NORMALMODE |
LIGHTFLAG_REALTIMEMODE);
2778 vec3_t mincorner, maxcorner, vel;
2789 vec3_t mincorner, maxcorner, vel;
2800 vec3_t mincorner, maxcorner, vel;
2917 CL_AllocLightFlash(
NULL, &tempmatrix,
PRVM_G_FLOAT(
OFS_PARM1),
PRVM_G_VECTOR(
OFS_PARM3)[0],
PRVM_G_VECTOR(
OFS_PARM3)[1],
PRVM_G_VECTOR(
OFS_PARM3)[2],
PRVM_G_FLOAT(
OFS_PARM1) /
PRVM_G_FLOAT(
OFS_PARM2),
PRVM_G_FLOAT(
OFS_PARM2),
NULL, -1,
true, 1, 0.25, 1, 1, 1,
LIGHTFLAG_NORMALMODE |
LIGHTFLAG_REALTIMEMODE);
3054 int colorStart, colorLength;
3055 unsigned char *tempcolor;
3063 tempcolor =
palette_rgb[(rand()%colorLength) + colorStart];
3064 color[0] = tempcolor[0] * (2.0f / 255.0f);
3065 color[1] = tempcolor[1] * (2.0f / 255.0f);
3066 color[2] = tempcolor[2] * (2.0f / 255.0f);
3068 CL_AllocLightFlash(
NULL, &tempmatrix, 350,
color[0],
color[1],
color[2], 700, 0.5,
NULL, -1,
true, 1, 0.25, 0.25, 1, 1,
LIGHTFLAG_NORMALMODE |
LIGHTFLAG_REALTIMEMODE);
3143 const char *tagname;
3155 VM_Warning(prog,
"setattachment: can not modify world entity\n");
3160 VM_Warning(prog,
"setattachment: can not modify free entity\n");
3164 if (tagentity ==
NULL)
3165 tagentity = prog->
edicts;
3168 if (tagentity !=
NULL && tagentity != prog->
edicts && tagname && tagname[0])
3209 &&
model->animscenes)
3233 float pitchsign = 1;
3256 Matrix4x4_CreateFromQuakeEntity(out,
PRVM_clientedictvector(ent,
origin)[0],
PRVM_clientedictvector(ent,
origin)[1],
PRVM_clientedictvector(ent,
origin)[2], pitchsign *
PRVM_clientedictvector(ent,
angles)[0],
PRVM_clientedictvector(ent,
angles)[1],
PRVM_clientedictvector(ent,
angles)[2],
scale);
3265 &&
model->animscenes)
3290 matrix4x4_t entitymatrix, tagmatrix, attachmatrix;
3309 if(attachloop >= 256)
3314 if(
ret && attachloop == 0)
3369 if (returnshadingorigin)
3370 VectorCopy(shadingorigin, returnshadingorigin);
3378 const char *tag_name;
3417 const char *tagname;
3449 VM_Warning(prog,
"gettagindex: can't affect world entity\n");
3452 VM_Warning(prog,
"gettagindex: can't affect free entity\n");
3474typedef struct vmparticletheme_s
3508typedef struct vmparticlespawner_s
3525 if (maxthemes > 2048)
3547 theme->
color1 = 0x808080;
3548 theme->
color2 = 0xFFFFFF;
3568 theme->
angle = 0.0f;
3656 VM_Warning(prog,
"VM_CL_ResetParticle: particle spawner not initialized\n");
3670 VM_Warning(prog,
"VM_CL_ParticleTheme: particle spawner not initialized\n");
3676 VM_Warning(prog,
"VM_CL_ParticleTheme: bad theme number %i\n", themenum);
3682 VM_Warning(prog,
"VM_CL_ParticleTheme: theme #%i not exists\n", themenum);
3699 VM_Warning(prog,
"VM_CL_ParticleThemeSave: particle spawner not initialized\n");
3711 VM_Warning(prog,
"VM_CL_ParticleThemeSave: no free theme slots\n");
3713 VM_Warning(prog,
"VM_CL_ParticleThemeSave: no free theme slots, try initparticlespawner() with highter max_themes\n");
3726 VM_Warning(prog,
"VM_CL_ParticleThemeSave: bad theme number %i\n", themenum);
3741 VM_Warning(prog,
"VM_CL_ParticleThemeFree: particle spawner not initialized\n");
3748 VM_Warning(prog,
"VM_CL_ParticleThemeFree: bad theme number %i\n", themenum);
3753 VM_Warning(prog,
"VM_CL_ParticleThemeFree: theme #%i already freed\n", themenum);
3774 VM_Warning(prog,
"VM_CL_SpawnParticle: particle spawner not initialized\n");
3832 VM_Warning(prog,
"VM_CL_SpawnParticle: bad theme number %i\n", themenum);
3896 VM_Warning(prog,
"VM_CL_SpawnParticleDelayed: particle spawner not initialized\n");
3942 VM_Warning(prog,
"VM_CL_SpawnParticleDelayed: bad theme number %i\n", themenum);
4133 const char *texname;
4142 if (prog->
argc >= 3)
4157 if (texname ==
NULL || texname[0] == 0)
4158 texname =
"$whiteimage";
4178 VM_Warning(prog,
"VM_CL_R_PolygonVertex: VM_CL_R_PolygonBegin wasn't called\n");
4207 int e0 = 0, e1 = 0, e2 = 0;
4217 VM_Warning(prog,
"VM_CL_R_PolygonEnd: VM_CL_R_PolygonBegin wasn't called\n");
4227 if (o[6] != 1.0f || o[7] != 1.0f || o[8] != 1.0f)
4247 e2 =
Mod_Mesh_IndexForVertex(
mod, surf, o[0], o[1], o[2], 0, 0, 0, o[3], o[4], 0, 0, o[6], o[7], o[8], o[9]);
4287 start[2] =
mins[2] - 1;
4288 for (
x=0 ;
x<=1 ;
x++)
4289 for (
y=0 ;
y<=1 ;
y++)
4306 start[0] = stop[0] = (
mins[0] +
maxs[0])*0.5;
4307 start[1] = stop[1] = (
mins[1] +
maxs[1])*0.5;
4309 trace =
CL_TraceLine(start, stop,
MOVE_NOMONSTERS, ent,
CL_GenericHitSuperContentsMask(ent), 0, 0,
collision_extendmovelength.
value,
true,
false,
NULL,
true,
false);
4313 mid = bottom = trace.
endpos[2];
4316 for (
x=0 ;
x<=1 ;
x++)
4317 for (
y=0 ;
y<=1 ;
y++)
4319 start[0] = stop[0] =
x ?
maxs[0] :
mins[0];
4320 start[1] = stop[1] =
y ?
maxs[1] :
mins[1];
4322 trace =
CL_TraceLine(start, stop,
MOVE_NOMONSTERS, ent,
CL_GenericHitSuperContentsMask(ent), 0, 0,
collision_extendmovelength.
value,
true,
false,
NULL,
true,
false);
4325 bottom = trace.
endpos[2];
4346 vec3_t oldorg, neworg, end, traceendpos;
4362 for (
i=0 ;
i<2 ;
i++)
4375 trace =
CL_TraceBox(start,
mins,
maxs, neworg,
MOVE_NORMAL, ent,
CL_GenericHitSuperContentsMask(ent), 0, 0,
collision_extendmovelength.
value,
true,
true, &svent,
true);
4403 trace =
CL_TraceBox(neworg,
mins,
maxs, end,
MOVE_NORMAL, ent,
CL_GenericHitSuperContentsMask(ent), 0, 0,
collision_extendmovelength.
value,
true,
true, &svent,
true);
4410 trace =
CL_TraceBox(neworg,
mins,
maxs, end,
MOVE_NORMAL, ent,
CL_GenericHitSuperContentsMask(ent), 0, 0,
collision_extendmovelength.
value,
true,
true, &svent,
true);
4482 VM_Warning(prog,
"walkmove: can not modify world entity\n");
4487 VM_Warning(prog,
"walkmove: can not modify free entity\n");
4497 yaw = yaw*
M_PI*2 / 360;
4499 move[0] =
cos(yaw)*dist;
4500 move[1] =
sin(yaw)*dist;
4548 unsigned char *fatpvs =
NULL;
4557 VM_Warning(prog,
"checkpvs: can not check free entity\n");
4619 for (
i = 0;
i < skeleton->
model->num_bones;
i++)
4644 firstbone =
max(0, firstbone);
4645 lastbone =
min(lastbone,
model->num_bones - 1);
4646 lastbone =
min(lastbone, skeleton->
model->num_bones - 1);
4651 for (bonenum = firstbone;bonenum <= lastbone;bonenum++)
4653 memset(&bonematrix, 0,
sizeof(bonematrix));
4654 for (blendindex = 0;blendindex < numblends;blendindex++)
4685 if (bonenum < 0 || bonenum >= skeleton->
model->num_bones)
4699 if (bonenum < 0 || bonenum >= skeleton->
model->num_bones)
4730 if (bonenum < 0 || bonenum >= skeleton->
model->num_bones)
4755 if (bonenum < 0 || bonenum >= skeleton->
model->num_bones)
4759 while ((bonenum = skeleton->
model->data_bones[bonenum].parent) >= 0)
4781 if (bonenum < 0 || bonenum >= skeleton->
model->num_bones)
4802 if (bonenum < 0 || bonenum >= skeleton->
model->num_bones)
4831 firstbone =
max(0, firstbone);
4832 lastbone =
min(lastbone, skeleton->
model->num_bones - 1);
4833 for (bonenum = firstbone;bonenum <= lastbone;bonenum++)
4850 if (skeletonindexdst < 0 || skeletonindexdst >=
MAX_EDICTS || !(skeletondst = prog->
skeletons[skeletonindexdst]))
4852 if (skeletonindexsrc < 0 || skeletonindexsrc >=
MAX_EDICTS || !(skeletonsrc = prog->
skeletons[skeletonindexsrc]))
4854 firstbone =
max(0, firstbone);
4855 lastbone =
min(lastbone, skeletondst->
model->num_bones - 1);
4856 lastbone =
min(lastbone, skeletonsrc->
model->num_bones - 1);
4857 for (bonenum = firstbone;bonenum <= lastbone;bonenum++)
4882 for (
i = 0;
i <
model->numframes;
i++)
4884 if (!strcasecmp(
model->animscenes[
i].name,
name))
4899 if (!
model || !
model->animscenes || framenum < 0 || framenum >=
model->numframes)
4901 if (
model->animscenes[framenum].framerate)
4954#define REFDEFFLAG_TELEPORTED 1
4955#define REFDEFFLAG_JUMPING 2
4956#define REFDEFFLAG_DEAD 4
4957#define REFDEFFLAG_INTERMISSION 8
4967 float clstatsviewheight;
4987 V_CalcRefdefUsing(&entrendermatrix, clviewangles, teleported, clonground, clcmdjump, clstatsviewheight, cldead, clvelocity);
#define SUPERCONTENTS_BODY
#define SUPERCONTENTS_SOLID
#define SUPERCONTENTS_LIQUIDSMASK
int CL_GenericHitSuperContentsMask(const prvm_edict_t *passedict)
trace_t CL_TraceLine(const vec3_t start, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, float extend, qbool hitnetworkbrushmodels, qbool hitnetworkplayers, int *hitnetworkentity, qbool hitcsqcentities, qbool hitsurfaces)
trace_t CL_TraceBox(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, float extend, qbool hitnetworkbrushmodels, qbool hitnetworkplayers, int *hitnetworkentity, qbool hitcsqcentities)
model_t * CL_GetModelFromEdict(prvm_edict_t *ed)
void CL_LinkEdict(prvm_edict_t *ent)
void CL_FindNonSolidLocation(const vec3_t in, vec3_t out, vec_t radius)
model_t * CL_GetModelByIndex(int modelindex)
#define CL_PointSuperContents(point)
void CL_UpdateViewEntities(void)
void CL_MeshEntities_Scene_FinalizeRenderEntity(void)
void CL_UpdateRenderEntity(entity_render_t *ent)
void CSQC_RelinkAllEntities(int drawmask)
void CL_Effect(vec3_t org, model_t *model, int startframe, int framecount, float framerate)
void CL_AllocLightFlash(entity_render_t *ent, matrix4x4_t *matrix, float radius, float red, float green, float blue, float decay, float lifetime, char *cubemapname, int style, int shadowenable, vec_t corona, vec_t coronasizescale, vec_t ambientscale, vec_t diffusescale, vec_t specularscale, int flags)
matrix4x4_t viewmodelmatrix_withbob
matrix4x4_t viewmodelmatrix_nobob
cvar_t csqc_polygons_defaultmaterial_nocullface
void CL_UpdateEntityShading(void)
void CL_MeshEntities_Scene_Clear(void)
void CL_NewBeam(int ent, vec3_t start, vec3_t end, model_t *m, int lightning)
void CL_ParticleTrail(int effectnameindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, entity_t *ent, int palettecolor, qbool spawndlight, qbool spawnparticles, float tintmins[4], float tintmaxs[4], float fade)
void CL_ParticleEffect(int effectnameindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, entity_t *ent, int palettecolor)
particle_t * CL_NewParticle(const vec3_t sortorigin, unsigned short ptypeindex, int pcolor1, int pcolor2, int ptex, float psize, float psizeincrease, float palpha, float palphafade, float pgravity, float pbounce, float px, float py, float pz, float pvx, float pvy, float pvz, float pairfriction, float pliquidfriction, float originjitter, float velocityjitter, qbool pqualityreduction, float lifetime, float stretch, pblend_t blendmode, porientation_t orientation, int staincolor1, int staincolor2, int staintex, float stainalpha, float stainsize, float angle, float spin, float tint[4])
Creates a new particle and returns a pointer to it.
void CL_ParticleRain(const vec3_t mins, const vec3_t maxs, const vec3_t dir, int count, int colorbase, int type)
int CL_ParticleEffectIndexForName(const char *name)
void CL_ParticleExplosion2(const vec3_t org, int colorStart, int colorLength)
void CL_ParticleCube(const vec3_t mins, const vec3_t maxs, const vec3_t dir, int count, int colorbase, vec_t gravity, vec_t randomvel)
void CL_ParticleExplosion(const vec3_t org)
void CL_ParticleBox(int effectnameindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, entity_t *ent, int palettecolor, qbool spawndlight, qbool spawnparticles, float tintmins[4], float tintmaxs[4], float fade)
@ EFFECT_TE_SUPERSPIKEQUAD
@ EFFECT_TE_EXPLOSIONQUAD
#define LIGHTFLAG_NORMALMODE
#define LIGHTFLAG_REALTIMEMODE
static qbool CL_CheckBottom(prvm_edict_t *ent)
static void SetMinMaxSize(prvm_prog_t *prog, prvm_edict_t *e, const vec_t *min, const vec_t *max)
static void VM_CL_ReadChar(prvm_prog_t *prog)
static void VM_CL_getmousepos(prvm_prog_t *prog)
vmparticlespawner_t vmpartspawner
#define CL_HitNetworkPlayers(move)
void VM_stringwidth(prvm_prog_t *prog)
static void VM_CL_ambientsound(prvm_prog_t *prog)
void VM_precache_pic(prvm_prog_t *prog)
static void VM_CL_spawn(prvm_prog_t *prog)
static void VM_CL_setpause(prvm_prog_t *prog)
static void VM_CL_checkbottom(prvm_prog_t *prog)
void VM_drawsetcliparea(prvm_prog_t *prog)
void VM_drawrotpic(prvm_prog_t *prog)
static void VM_CL_ResetParticle(prvm_prog_t *prog)
static void VM_InitParticleSpawner(prvm_prog_t *prog, int maxthemes)
static void VM_CL_getplayerkey(prvm_prog_t *prog)
cvar_t cl_sound_ric_gunshot
static void VM_CL_ReadShort(prvm_prog_t *prog)
static void VM_CL_boxparticles(prvm_prog_t *prog)
static void VM_CL_walkmove(prvm_prog_t *prog)
static void VM_CL_sound(prvm_prog_t *prog)
static void VM_CL_skel_get_bonename(prvm_prog_t *prog)
cvar_t cl_readpicture_force
static void VM_CL_ReadByte(prvm_prog_t *prog)
static void VM_CL_makestatic(prvm_prog_t *prog)
static void VM_CL_lightstyle(prvm_prog_t *prog)
static void VM_ResetParticleTheme(vmparticletheme_t *theme)
static void VM_CL_frameduration(prvm_prog_t *prog)
static void SetMinMaxSizePRVM(prvm_prog_t *prog, prvm_edict_t *e, prvm_vec_t *min, prvm_vec_t *max)
static void CL_VM_SetTraceGlobals(prvm_prog_t *prog, const trace_t *trace, int svent)
static int CL_GetTagIndex(prvm_prog_t *prog, prvm_edict_t *e, const char *tagname)
static void VM_CL_te_bloodshower(prvm_prog_t *prog)
static void VM_CL_ReadFloat(prvm_prog_t *prog)
static void VM_CL_ParticleThemeFromGlobals(vmparticletheme_t *theme, prvm_prog_t *prog)
static void VM_CL_skel_mul_bones(prvm_prog_t *prog)
void CLVM_init_cmd(prvm_prog_t *prog)
void VM_drawcolorcodedstring(prvm_prog_t *prog)
#define REFDEFFLAG_TELEPORTED
static void VM_CL_te_explosion2(prvm_prog_t *prog)
static void VM_CL_skel_find_bone(prvm_prog_t *prog)
static void VM_CL_te_lavasplash(prvm_prog_t *prog)
static void VM_CL_findradius(prvm_prog_t *prog)
static void VM_CL_skel_get_boneparent(prvm_prog_t *prog)
static void VM_CL_tracebox(prvm_prog_t *prog)
void VM_drawline(prvm_prog_t *prog)
static void VM_CL_setsensitivityscale(prvm_prog_t *prog)
void VM_drawfill(prvm_prog_t *prog)
prvm_builtin_t vm_cl_builtins[]
static void VM_CL_te_lightning2(prvm_prog_t *prog)
static void VM_CL_makevectors(prvm_prog_t *prog)
static void VM_CL_skel_get_boneabs(prvm_prog_t *prog)
static void VM_CL_findbox(prvm_prog_t *prog)
static void VM_CL_te_particlesnow(prvm_prog_t *prog)
static void VM_CL_runplayerphysics(prvm_prog_t *prog)
static void VM_CL_project(prvm_prog_t *prog)
static int CL_GetExtendedTagInfo(prvm_prog_t *prog, prvm_edict_t *e, int tagindex, int *parentindex, const char **tagname, matrix4x4_t *tag_localmatrix)
static void VM_CL_pointsound(prvm_prog_t *prog)
static void VM_CL_te_explosionquad(prvm_prog_t *prog)
static void VM_CL_skel_copybones(prvm_prog_t *prog)
void VM_freepic(prvm_prog_t *prog)
static void VM_CL_te_beam(prvm_prog_t *prog)
static void VM_CL_te_superspike(prvm_prog_t *prog)
static void VM_CL_skel_get_bonerel(prvm_prog_t *prog)
static void VM_CL_getlight(prvm_prog_t *prog)
static void VM_CL_frameforname(prvm_prog_t *prog)
static void VM_CL_te_superspikequad(prvm_prog_t *prog)
static void VM_CL_te_plasmaburn(prvm_prog_t *prog)
#define CL_HitNetworkBrushModels(move)
int CL_GetTagMatrix(prvm_prog_t *prog, matrix4x4_t *out, prvm_edict_t *ent, int tagindex, prvm_vec_t *returnshadingorigin)
static void VM_CL_ReadCoord(prvm_prog_t *prog)
static void VM_CL_te_teleport(prvm_prog_t *prog)
static void VM_CL_registercmd(prvm_prog_t *prog)
static void VM_CL_skel_delete(prvm_prog_t *prog)
void CLVM_reset_cmd(prvm_prog_t *prog)
#define PRECACHE_PIC_NOTPERSISTENT
static void VM_CL_te_spark(prvm_prog_t *prog)
static void VM_CL_te_flamejet(prvm_prog_t *prog)
static void VM_CL_droptofloor(prvm_prog_t *prog)
#define REFDEFFLAG_JUMPING
static qbool CL_movestep(prvm_edict_t *ent, vec3_t move, qbool relink, qbool noenemy, qbool settrace)
static void VM_CL_ReadPicture(prvm_prog_t *prog)
static void VM_CL_tracetoss(prvm_prog_t *prog)
static void VM_CL_te_blood(prvm_prog_t *prog)
void VM_drawpic(prvm_prog_t *prog)
static void VM_CL_skel_get_numbones(prvm_prog_t *prog)
static void VM_CL_traceline(prvm_prog_t *prog)
static void VM_CL_te_lightning3(prvm_prog_t *prog)
static void VM_CL_checkpvs(prvm_prog_t *prog)
void VM_iscachedpic(prvm_prog_t *prog)
#define PRECACHE_PIC_MIPMAP
static void VM_CL_te_knightspike(prvm_prog_t *prog)
r_refdef_view_t csqc_main_r_refdef_view
static void VM_CL_ReadLong(prvm_prog_t *prog)
static void VM_CL_particle(prvm_prog_t *prog)
static void VM_CL_setcursormode(prvm_prog_t *prog)
static void VM_CL_ParticleThemeFree(prvm_prog_t *prog)
static trace_t CL_Trace_Toss(prvm_prog_t *prog, prvm_edict_t *tossent, prvm_edict_t *ignore, int *svent)
static void VM_CL_skel_mul_bone(prvm_prog_t *prog)
static void VM_CL_GetEntity(prvm_prog_t *prog)
static void VM_CL_loadcubemap(prvm_prog_t *prog)
static void VM_CL_ReadString(prvm_prog_t *prog)
static void VM_CL_RotateMoves(prvm_prog_t *prog)
static dp_font_t * getdrawfont(prvm_prog_t *prog)
static void VM_CL_setlistener(prvm_prog_t *prog)
static int CL_GetEntityLocalTagMatrix(prvm_prog_t *prog, prvm_edict_t *ent, int tagindex, matrix4x4_t *out)
static void VM_CL_skel_build(prvm_prog_t *prog)
static void getdrawfontscale(prvm_prog_t *prog, float *sx, float *sy)
void VM_drawcharacter(prvm_prog_t *prog)
static void VM_CL_te_spike(prvm_prog_t *prog)
r_refdef_view_t csqc_original_r_refdef_view
static void VM_CL_ParticleThemeSave(prvm_prog_t *prog)
void VM_getimagesize(prvm_prog_t *prog)
static float getdrawfontnum(const char *fontname)
int CL_GetPitchSign(prvm_prog_t *prog, prvm_edict_t *ent)
static void VM_CL_te_customflash(prvm_prog_t *prog)
static void VM_CL_pointcontents(prvm_prog_t *prog)
static void VM_CL_skel_create(prvm_prog_t *prog)
void VM_drawresetcliparea(prvm_prog_t *prog)
static void VM_CL_setmodelindex(prvm_prog_t *prog)
static void VM_CL_getstati(prvm_prog_t *prog)
static void VM_CL_modelnameforindex(prvm_prog_t *prog)
static void VM_CL_te_particlerain(prvm_prog_t *prog)
static void VM_CL_te_explosionrgb(prvm_prog_t *prog)
static void VM_CL_getstats(prvm_prog_t *prog)
static void VM_CL_te_lightning1(prvm_prog_t *prog)
static void VM_CL_InitParticleSpawner(prvm_prog_t *prog)
static void VM_CL_getinputstate(prvm_prog_t *prog)
static void VM_CL_particleeffectnum(prvm_prog_t *prog)
void VM_loadfont(prvm_prog_t *prog)
static void VM_CL_pointparticles(prvm_prog_t *prog)
void CL_GetEntityMatrix(prvm_prog_t *prog, prvm_edict_t *ent, matrix4x4_t *out, qbool viewmatrix)
static void VM_CL_te_wizspike(prvm_prog_t *prog)
static void VM_CL_SpawnParticleDelayed(prvm_prog_t *prog)
static void VM_CL_te_gunshotquad(prvm_prog_t *prog)
static void VM_CL_V_CalcRefdef(prvm_prog_t *prog)
static void VM_CL_ParticleTheme(prvm_prog_t *prog)
static void VM_CL_copyentity(prvm_prog_t *prog)
void CSQC_R_RecalcView(void)
void VM_findfont(prvm_prog_t *prog)
static void VM_CL_te_smallflash(prvm_prog_t *prog)
static void VM_CL_ParticleThemeToGlobals(vmparticletheme_t *theme, prvm_prog_t *prog)
static void VM_CL_te_spikequad(prvm_prog_t *prog)
void VM_drawstring(prvm_prog_t *prog)
void VM_drawsubpic(prvm_prog_t *prog)
static void VM_CL_unproject(prvm_prog_t *prog)
const int vm_cl_numbuiltins
static void VM_CL_te_explosion(prvm_prog_t *prog)
static void VM_CL_te_gunshot(prvm_prog_t *prog)
static void VM_CL_SpawnParticle(prvm_prog_t *prog)
static void VM_CL_trailparticles(prvm_prog_t *prog)
static void VM_CL_getstatf(prvm_prog_t *prog)
static void VM_CL_effect(prvm_prog_t *prog)
static void VM_CL_ReadAngle(prvm_prog_t *prog)
static void VM_CL_te_particlecube(prvm_prog_t *prog)
static void VM_CL_te_tarexplosion(prvm_prog_t *prog)
static void VM_CL_serverkey(prvm_prog_t *prog)
static void VM_CL_skel_set_bone(prvm_prog_t *prog)
static void VM_CL_setsize(prvm_prog_t *prog)
#define REFDEFFLAG_INTERMISSION
void VM_CL_precache_model(void)
void VM_CL_setorigin(void)
void VM_CL_R_SetView(void)
void VM_CL_R_PolygonBegin(void)
void VM_CL_R_AddEntity(void)
void VM_CL_R_ClearScene(void)
void VM_CL_R_RenderScene(void)
void VM_CL_R_PolygonEnd(void)
void VM_CL_gettagindex(void)
void VM_CL_R_PolygonVertex(void)
void VM_CL_gettaginfo(void)
void VM_CL_setattachment(void)
void VM_CL_setmodel(void)
void VM_CL_R_AddDynamicLight(void)
void VM_CL_R_AddEntities(void)
void Cmd_AddCommand(unsigned flags, const char *cmd_name, xcommand_t function, const char *description)
called by the init functions of other parts of the program to register commands and functions to call...
#define CF_CLIENT
cvar/command that only the client can change/execute
cvar_t collision_extendmovelength
cvar_t collision_extendtracelinelength
cvar_t collision_extendtraceboxlength
size_t InfoString_GetValue(const char *buffer, const char *key, char *value, size_t valuesize)
Returns the number of bytes written to *value excluding the \0 terminator.
float MSG_ReadAngle(sizebuf_t *sb, protocolversion_t protocol)
size_t MSG_ReadBytes(sizebuf_t *sb, size_t numbytes, unsigned char *out)
float MSG_ReadCoord(sizebuf_t *sb, protocolversion_t protocol)
size_t MSG_ReadString_len(sizebuf_t *sb, char *string, size_t maxstring)
Same as MSG_ReadString except it returns the number of bytes written to *string excluding the \0 term...
char com_token[MAX_INPUTLINE]
qbool COM_ParseToken_VM_Tokenize(const char **datapointer, qbool returnnewline)
int dpsnprintf(char *buffer, size_t buffersize, const char *format,...)
Returns the number of printed characters, excluding the final '\0' or returns -1 if the buffer isn't ...
#define dp_strlcpy(dst, src, dsize)
void Con_DPrintf(const char *fmt,...)
A Con_Printf that only shows up if the "developer" cvar is set.
void Con_Printf(const char *fmt,...)
Prints to all appropriate console targets.
void CSQC_Think(prvm_edict_t *ed)
qbool CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum)
qbool CL_VM_GetEntitySoundOrigin(int entnum, vec3_t out)
void CSQC_Predraw(prvm_edict_t *ed)
#define VF_DRAWENGINESBAR
#define VF_CL_VIEWANGLES_Y
#define VF_MINFPS_QUALITY
#define VF_CL_VIEWANGLES_Z
#define VF_CL_VIEWANGLES_X
float particle_delaycollision
vector particle_staincolor2
float particle_qualityreduction
void CSQC_UpdateView(float vid_width, float vid_height, float notmenu)
vector particle_staincolor1
float particle_delayspawn
vector particles_colormin
float mod(float dividend, float divisor)
float particle_originjitter
vector gettaginfo_forward
float particle_sizeincrease
float particle_airfriction
float trace_networkentity
float particle_liquidfriction
float particle_velocityjitter
vector particles_colormax
float particle_stainalpha
float particle_orientation
@ CACHEPICFLAG_FAILONMISSING
@ CACHEPICFLAG_NOTPERSISTENT
void DrawQ_Fill(float x, float y, float width, float height, float red, float green, float blue, float alpha, int flags)
void Draw_FreePic(const char *picname)
void DrawQ_Pic(float x, float y, cachepic_t *pic, float width, float height, float red, float green, float blue, float alpha, int flags)
void DrawQ_SuperPic(float x, float y, cachepic_t *pic, float width, float height, float s1, float t1, float r1, float g1, float b1, float a1, float s2, float t2, float r2, float g2, float b2, float a2, float s3, float t3, float r3, float g3, float b3, float a3, float s4, float t4, float r4, float g4, float b4, float a4, int flags)
cachepic_t * Draw_NewPic(const char *picname, int width, int height, unsigned char *pixels, textype_t textype, int texflags)
float DrawQ_String_Scale(float x, float y, const char *text, size_t maxlen, float sizex, float sizey, float scalex, float scaley, float basered, float basegreen, float baseblue, float basealpha, int flags, int *outcolor, qbool ignorecolorcodes, const dp_font_t *fnt)
void DrawQ_RotPic(float x, float y, cachepic_t *pic, float width, float height, float org_x, float org_y, float angle, float red, float green, float blue, float alpha, int flags)
void DrawQ_Line(float width, float x1, float y1, float x2, float y2, float r, float g, float b, float alpha, int flags)
cachepic_t * Draw_CachePic_Flags(const char *path, unsigned int cachepicflags)
int Draw_GetPicWidth(cachepic_t *pic)
void DrawQ_SetClipArea(float x, float y, float width, float height)
void DrawQ_RecalcView(void)
#define MAX_FONT_FALLBACKS
int Draw_GetPicHeight(cachepic_t *pic)
float DrawQ_TextWidth_UntilWidth_TrackColors_Scale(const char *text, size_t *maxlen, float w, float h, float sw, float sh, int *outcolor, qbool ignorecolorcodes, const dp_font_t *fnt, float maxwidth)
qbool Draw_IsPicLoaded(cachepic_t *pic)
void DrawQ_ResetClipArea(void)
static int(ZEXPORT *qz_inflate)(z_stream *strm
void LoadFont(qbool override, const char *name, dp_font_t *fnt, float scale, float voffset)
dp_font_t * FindFont(const char *title, qbool allocate_new)
void R_RenderView(int fbo, rtexture_t *depthtexture, rtexture_t *colortexture, int x, int y, int width, int height)
rtexture_t * R_GetCubemap(const char *basename)
GLubyte GLubyte GLubyte z
GLfloat GLfloat GLfloat v2
GLubyte GLubyte GLubyte GLubyte w
GLsizei const GLchar ** string
GLenum GLenum GLsizei count
GLint GLenum GLint GLint y
GLsizeiptr const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
unsigned char * JPEG_LoadImage_BGRA(const unsigned char *f, int filesize, int *miplevel)
void AngleVectorsFLU(const vec3_t angles, vec3_t forward, vec3_t left, vec3_t up)
LadyHavoc: proper matrix version of AngleVectors.
void AngleVectors(const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
#define Vector2Copy(in, out)
#define VectorNegate(a, b)
#define bound(min, num, max)
#define lhrandom(MIN, MAX)
LadyHavoc: this function never returns exactly MIN or exactly MAX, because of a QuakeC bug in id1 whe...
#define Vector2Set(vec, x, y)
#define VectorMAMAM(scale1, b1, scale2, b2, scale3, b3, out)
#define Vector4Set(vec, r, g, b, a)
#define VectorSet(vec, x, y, z)
#define VectorSubtract(a, b, out)
#define VectorCopy(in, out)
#define VectorScale(in, scale, out)
#define VectorAdd(a, b, out)
#define VectorMA(a, scale, b, out)
void Matrix4x4_Concat(matrix4x4_t *out, const matrix4x4_t *in1, const matrix4x4_t *in2)
void Matrix4x4_CreateIdentity(matrix4x4_t *out)
void Matrix4x4_FromBonePose7s(matrix4x4_t *m, float originscale, const short *pose7s)
void Matrix4x4_Transform(const matrix4x4_t *in, const float v[3], float out[3])
void Matrix4x4_QuakeToDuke3D(const matrix4x4_t *in, matrix4x4_t *out, double maxShearAngle)
void Matrix4x4_CreateTranslate(matrix4x4_t *out, double x, double y, double z)
void Matrix4x4_CreateFromQuakeEntity(matrix4x4_t *out, double x, double y, double z, double pitch, double yaw, double roll, double scale)
int Matrix4x4_Invert_Full(matrix4x4_t *out, const matrix4x4_t *in1)
void Matrix4x4_ConcatScale(matrix4x4_t *out, double x)
void Matrix4x4_Normalize3(matrix4x4_t *out, matrix4x4_t *in1)
void Matrix4x4_Interpolate(matrix4x4_t *out, matrix4x4_t *in1, matrix4x4_t *in2, double frac)
double Matrix4x4_ScaleFromMatrix(const matrix4x4_t *in)
void Matrix4x4_FromVectors(matrix4x4_t *out, const float vx[3], const float vy[3], const float vz[3], const float t[3])
void Matrix4x4_Accumulate(matrix4x4_t *out, matrix4x4_t *in, double weight)
void Matrix4x4_ToVectors(const matrix4x4_t *in, float vx[3], float vy[3], float vz[3], float t[3])
const matrix4x4_t identitymatrix
void Matrix4x4_Copy(matrix4x4_t *out, const matrix4x4_t *in)
void Matrix4x4_Scale(matrix4x4_t *out, double rotatescale, double originscale)
void Matrix4x4_OriginFromMatrix(const matrix4x4_t *in, float *out)
int Mod_Alias_GetExtendedTagInfoForIndex(const model_t *model, unsigned int skin, const frameblend_t *frameblend, const skeleton_t *skeleton, int tagindex, int *parentindex, const char **tagname, matrix4x4_t *tag_localmatrix)
int Mod_Alias_GetTagMatrix(const model_t *model, const frameblend_t *frameblend, const skeleton_t *skeleton, int tagindex, matrix4x4_t *outmatrix)
int Mod_Alias_GetTagIndexForName(const model_t *model, unsigned int skin, const char *tagname)
int Mod_Q1BSP_NativeContentsFromSuperContents(int supercontents)
#define MATERIALFLAG_VERTEXCOLOR
#define MATERIALFLAG_FULLBRIGHT
#define MATERIALFLAG_ALPHA
#define MATERIALFLAG_BLENDED
#define MATERIALFLAG_ALPHAGEN_VERTEX
#define MATERIALFLAG_WALL
#define MATERIALFLAG_NOSHADOW
#define MATERIALFLAG_NOCULLFACE
msurface_t * Mod_Mesh_AddSurface(model_t *mod, texture_t *tex, qbool batchwithprevioussurface)
int Mod_Mesh_IndexForVertex(model_t *mod, msurface_t *surf, float x, float y, float z, float nx, float ny, float nz, float s, float t, float u, float v, float r, float g, float b, float a)
void Mod_BuildNormals(int firstvertex, int numvertices, int numtriangles, const float *vertex3f, const int *elements, float *normal3f, qbool areaweighting)
model_t * Mod_ForName(const char *name, qbool crash, qbool checkdisk, const char *parentname)
texture_t * Mod_Mesh_GetTexture(model_t *mod, const char *name, int defaultdrawflags, int defaulttexflags, int defaultmaterialflags)
void Mod_Mesh_AddTriangle(model_t *mod, msurface_t *surf, int e0, int e1, int e2)
model_t * Mod_FindName(const char *name, const char *parentname)
char cl_readstring[MAX_INPUTLINE]
unsigned char palette_rgb[256][3]
#define PRVM_clientfunction(funcname)
#define PRVM_serveredictvector(ed, fieldname)
int PRVM_SetTempString(prvm_prog_t *prog, const char *s, size_t slen)
Takes an strlen (not a buffer size).
void VM_Cmd_Init(prvm_prog_t *prog)
void VM_Warning(prvm_prog_t *prog, const char *fmt,...) DP_FUNC_PRINTF(2)
#define PRVM_clientedictedict(ed, fieldname)
#define PRVM_clientglobaledict(fieldname)
void VM_UpdateEdictSkeleton(prvm_prog_t *prog, prvm_edict_t *ed, const struct model_s *edmodel, const struct frameblend_s *frameblend)
#define PRVM_EDICT_TO_PROG(e)
int PRVM_SetEngineString(prvm_prog_t *prog, const char *s)
void VM_Cmd_Reset(prvm_prog_t *prog)
#define PRVM_G_EDICTNUM(o)
#define PRVM_EDICT_NUM(n)
void(* prvm_builtin_t)(struct prvm_prog_s *prog)
#define PRVM_clientedictstring(ed, fieldname)
#define PRVM_EDICT_MARK_SETORIGIN_CAUGHT
#define PRVM_EDICTFIELDEDICT(ed, fieldoffset)
void VM_GenerateFrameGroupBlend(prvm_prog_t *prog, struct framegroupblend_s *framegroupblend, const prvm_edict_t *ed)
#define PRVM_clientglobalfloat(fieldname)
#define PRVM_NUM_FOR_EDICT(e)
#define PRVM_PROG_TO_EDICT(n)
#define PRVM_clientedictvector(ed, fieldname)
#define PRVM_clientglobalvector(fieldname)
#define PRVM_drawglobalvector(fieldname)
#define PRVM_clientedictfloat(ed, fieldname)
void VM_FrameBlendFromFrameGroupBlend(struct frameblend_s *frameblend, const struct framegroupblend_s *framegroupblend, const struct model_s *model, double curtime)
#define PRVM_EDICT_MARK_WAIT_FOR_SETORIGIN
#define PRVM_clientglobalstring(fieldname)
void PRVM_ED_Free(prvm_prog_t *prog, prvm_edict_t *ed)
#define PRVM_drawglobalfloat(fieldname)
prvm_edict_t * PRVM_ED_Alloc(prvm_prog_t *prog)
#define MAX_FRAMEGROUPBLENDS
#define PFLAGS_FULLDYNAMIC
#define RENDER_DOUBLESIDED
#define RENDER_NODEPTHTEST
void VM_strunzone(prvm_prog_t *prog)
void VM_vectorvectors(prvm_prog_t *prog)
void VM_substring(prvm_prog_t *prog)
void VM_entityfieldname(prvm_prog_t *prog)
void VM_buf_writefile(prvm_prog_t *prog)
void VM_getsoundtime(prvm_prog_t *prog)
void VM_objerror(prvm_prog_t *prog)
void VM_fabs(prvm_prog_t *prog)
void VM_isserver(prvm_prog_t *prog)
void VM_nudgeoutofsolid(prvm_prog_t *prog)
void VM_dprint(prvm_prog_t *prog)
void VM_uri_get(prvm_prog_t *prog)
void VM_chr2str(prvm_prog_t *prog)
void VM_digest_hex(prvm_prog_t *prog)
void VM_soundlength(prvm_prog_t *prog)
void VM_strncmp(prvm_prog_t *prog)
void VM_strtolower(prvm_prog_t *prog)
void VM_fgets(prvm_prog_t *prog)
void VM_physics_addtorque(prvm_prog_t *prog)
void VM_search_getsize(prvm_prog_t *prog)
void VM_findkeysforcommand(prvm_prog_t *prog)
void VM_tan(prvm_prog_t *prog)
void VM_modulo(prvm_prog_t *prog)
void VM_sqrt(prvm_prog_t *prog)
void VM_stov(prvm_prog_t *prog)
void VM_random(prvm_prog_t *prog)
void VM_gecko_navigate(prvm_prog_t *prog)
void VM_eprint(prvm_prog_t *prog)
void VM_bitshift(prvm_prog_t *prog)
void VM_precache_sound(prvm_prog_t *prog)
void VM_CL_getextresponse(prvm_prog_t *prog)
void VM_buf_getsize(prvm_prog_t *prog)
void VM_getsurfacetexture(prvm_prog_t *prog)
void VM_search_end(prvm_prog_t *prog)
void VM_getentityfieldstring(prvm_prog_t *prog)
void VM_bufstr_get(prvm_prog_t *prog)
void VM_gecko_movemouse(prvm_prog_t *prog)
void VM_cvar_type(prvm_prog_t *prog)
void VM_vlen(prvm_prog_t *prog)
void VM_gecko_destroy(prvm_prog_t *prog)
void VM_CheckEmptyString(prvm_prog_t *prog, const char *s)
void VM_physics_addforce(prvm_prog_t *prog)
void VM_gecko_get_texture_extent(prvm_prog_t *prog)
void VM_search_getfilename(prvm_prog_t *prog)
void VM_centerprint(prvm_prog_t *prog)
void VM_coverage(prvm_prog_t *prog)
void VM_break(prvm_prog_t *prog)
void VM_strlennocol(prvm_prog_t *prog)
void VM_tokenize(prvm_prog_t *prog)
void VM_numentityfields(prvm_prog_t *prog)
void VM_SetTraceGlobals(prvm_prog_t *prog, const trace_t *trace)
void VM_vtos(prvm_prog_t *prog)
void VM_getsurfacenumpoints(prvm_prog_t *prog)
void VM_argv_start_index(prvm_prog_t *prog)
void VM_getsurfacepointattribute(prvm_prog_t *prog)
void VM_setbindmaps(prvm_prog_t *prog)
void VM_CL_videoplaying(prvm_prog_t *prog)
void VM_registercvar(prvm_prog_t *prog)
void VM_uri_unescape(prvm_prog_t *prog)
void VM_infoget(prvm_prog_t *prog)
void VM_randomvec(prvm_prog_t *prog)
void VM_matchpattern(prvm_prog_t *prog)
void VM_setkeybind(prvm_prog_t *prog)
void VM_atan2(prvm_prog_t *prog)
void VM_etos(prvm_prog_t *prog)
void VM_cvar_defstring(prvm_prog_t *prog)
void VM_asin(prvm_prog_t *prog)
void VM_vectoyaw(prvm_prog_t *prog)
void VM_strlen(prvm_prog_t *prog)
void VM_strconv(prvm_prog_t *prog)
void VM_rint(prvm_prog_t *prog)
void VM_bound(prvm_prog_t *prog)
void VM_argv_end_index(prvm_prog_t *prog)
void VM_buf_implode(prvm_prog_t *prog)
void VM_precache_file(prvm_prog_t *prog)
void VM_tokenize_console(prvm_prog_t *prog)
void VM_sprintf(prvm_prog_t *prog)
void VM_localsound(prvm_prog_t *prog)
void VM_buf_cvarlist(prvm_prog_t *prog)
void VM_find(prvm_prog_t *prog)
void VM_stof(prvm_prog_t *prog)
void VM_getsurfacetriangle(prvm_prog_t *prog)
void VM_fputs(prvm_prog_t *prog)
void VM_bufstr_add(prvm_prog_t *prog)
void VM_strdecolorize(prvm_prog_t *prog)
void VM_uri_escape(prvm_prog_t *prog)
void VM_findchainflags(prvm_prog_t *prog)
void VM_writetofile(prvm_prog_t *prog)
void VM_physics_enable(prvm_prog_t *prog)
void VM_putentityfieldstring(prvm_prog_t *prog)
void VM_etof(prvm_prog_t *prog)
void VM_nextent(prvm_prog_t *prog)
void VM_parseentitydata(prvm_prog_t *prog)
void VM_gecko_resize(prvm_prog_t *prog)
void VM_fclose(prvm_prog_t *prog)
void VM_ftoe(prvm_prog_t *prog)
void VM_findfloat(prvm_prog_t *prog)
void VM_strcat(prvm_prog_t *prog)
void VM_atan(prvm_prog_t *prog)
void VM_ceil(prvm_prog_t *prog)
void VM_buf_del(prvm_prog_t *prog)
void VM_strpad(prvm_prog_t *prog)
void VM_strtoupper(prvm_prog_t *prog)
void VM_normalize(prvm_prog_t *prog)
void VM_changeyaw(prvm_prog_t *prog)
void VM_tokenizebyseparator(prvm_prog_t *prog)
void VM_getkeybind(prvm_prog_t *prog)
void VM_getbindmaps(prvm_prog_t *prog)
void VM_strftime(prvm_prog_t *prog)
void VM_floor(prvm_prog_t *prog)
void VM_cos(prvm_prog_t *prog)
void VM_whichpack(prvm_prog_t *prog)
void VM_CL_isdemo(prvm_prog_t *prog)
void VM_buf_sort(prvm_prog_t *prog)
void VM_bufstr_find(prvm_prog_t *prog)
void VM_strzone(prvm_prog_t *prog)
void VM_cvar_set(prvm_prog_t *prog)
void VM_isfunction(prvm_prog_t *prog)
void VM_argv(prvm_prog_t *prog)
void VM_strreplace(prvm_prog_t *prog)
void VM_min(prvm_prog_t *prog)
void VM_changepitch(prvm_prog_t *prog)
void VM_checkextension(prvm_prog_t *prog)
void VM_ftos(prvm_prog_t *prog)
void VM_bufstr_set(prvm_prog_t *prog)
void VM_findflags(prvm_prog_t *prog)
void VM_getsurfacenumtriangles(prvm_prog_t *prog)
void VM_acos(prvm_prog_t *prog)
void VM_loadfromfile(prvm_prog_t *prog)
void VM_gecko_create(prvm_prog_t *prog)
void VM_gettime(prvm_prog_t *prog)
void VM_findchainfloat(prvm_prog_t *prog)
void VM_findchain(prvm_prog_t *prog)
void VM_getsurfaceclippedpoint(prvm_prog_t *prog)
void VM_traceon(prvm_prog_t *prog)
void VM_strstrofs(prvm_prog_t *prog)
void VM_fopen(prvm_prog_t *prog)
void VM_max(prvm_prog_t *prog)
void VM_bufstr_free(prvm_prog_t *prog)
void VM_getsurfacepoint(prvm_prog_t *prog)
void VM_getsurfacenearpoint(prvm_prog_t *prog)
void VM_buf_copy(prvm_prog_t *prog)
void VM_cvar_description(prvm_prog_t *prog)
void VM_search_begin(prvm_prog_t *prog)
void VM_crc16(prvm_prog_t *prog)
void VM_stringtokeynum(prvm_prog_t *prog)
void VM_remove(prvm_prog_t *prog)
void VM_error(prvm_prog_t *prog)
void VM_buf_create(prvm_prog_t *prog)
void VM_str2chr(prvm_prog_t *prog)
void VM_print(prvm_prog_t *prog)
void VM_cvar(prvm_prog_t *prog)
void VM_cvar_string(prvm_prog_t *prog)
void VM_gecko_keyevent(prvm_prog_t *prog)
void VM_traceoff(prvm_prog_t *prog)
void VM_callfunction(prvm_prog_t *prog)
void VM_infoadd(prvm_prog_t *prog)
void VM_wasfreed(prvm_prog_t *prog)
void VM_buf_loadfile(prvm_prog_t *prog)
void VM_localcmd(prvm_prog_t *prog)
void VM_sin(prvm_prog_t *prog)
void VM_getsurfacenormal(prvm_prog_t *prog)
void VM_pow(prvm_prog_t *prog)
void VM_log(prvm_prog_t *prog)
void VM_coredump(prvm_prog_t *prog)
void VM_strireplace(prvm_prog_t *prog)
void VM_keynumtostring(prvm_prog_t *prog)
void VM_strncasecmp(prvm_prog_t *prog)
void VM_loadfromdata(prvm_prog_t *prog)
void VM_vectoangles(prvm_prog_t *prog)
void VM_entityfieldtype(prvm_prog_t *prog)
#define VM_RETURN_EDICT(e)
#define VM_TEMPSTRING_MAXSIZE
#define VM_SAFEPARMCOUNT(p, f)
#define VM_SAFEPARMCOUNTRANGE(p1, p2, f)
#define MAX_STYLESTRING
max length of flicker pattern for light style
#define MAX_EDICTS
max number of objects in game world at once (32768 protocol limit)
#define MAX_LIGHTSTYLES
max flickering light styles in level (note: affects savegame format)
#define MAX_DLIGHTS
max number of dynamic lights (rocket flashes, etc) in scene at once
#define MAX_QPATH
max length of a quake game pathname
#define CL_MAX_USERCMDS
max number of predicted input packets in queue
#define MAX_MODELS
max number of models loaded at once (including during level transitions)
prvm_vec_t prvm_vec3_t[3]
cvar_t cl_viewmodel_scale
void R_RTLight_Update(rtlight_t *rtlight, int isstatic, matrix4x4_t *matrix, vec3_t color, int style, const char *cubemapname, int shadow, vec_t corona, vec_t coronasizescale, vec_t ambientscale, vec_t diffusescale, vec_t specularscale, int flags)
void R_CompleteLightPoint(float *ambient, float *diffuse, float *lightdir, const vec3_t p, const int flags, float lightmapintensity, float ambientintensity)
int Sbar_GetSortedPlayerIndex(int index)
void Sbar_SortFrags(void)
cvar_t sv_gameplayfix_findradiusdistancetobox
#define FL_PARTIALGROUND
not all corners are valid
#define SOLID_NOT
no interaction with other objects
cvar_t sv_gameplayfix_blowupfallenzombies
void S_StaticSound(sfx_t *sfx, vec3_t origin, float fvol, float attenuation)
int S_StartSound(int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation)
S_StartSound returns the channel index, or -1 if an error occurred.
sfx_t * S_FindName(const char *name)
int S_StartSound_StartPosition_Flags(int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation, float startposition, int flags, float fspeed)
#define CHANNELFLAG_FORCELOOP
#define CHANNELFLAG_RELIABLE
#define CHANNELFLAG_FULLVOLUME
#define CHANNELFLAG_PAUSED
struct prvm_edict_s * self
vec3_t csqc_viewanglesfromengine
char qw_serverinfo[MAX_SERVERINFO_STRING]
lightstyle_t * lightstyle
qbool csqc_usecsqclistener
unsigned char * entities_active
vec3_t csqc_vieworiginfromengine
struct model_s * worldmodel
qbool csqc_wantsmousemove
struct model_s * model_precache[MAX_MODELS]
matrix4x4_t csqc_viewmodelmatrixfromengine
char model_name[MAX_MODELS][MAX_QPATH]
usercmd_t movecmd[CL_MAX_USERCMDS]
entity_render_t * csqcrenderentities
struct model_s * csqc_model_precache[MAX_MODELS]
entity_t * static_entities
csqc_vidvars_t csqc_vidvars
matrix4x4_t csqc_listenermatrix
protocolversion_t protocol
vec3_t colormap_shirtcolor
framegroupblend_t framegroupblend[MAX_FRAMEGROUPBLENDS]
float render_modellight_ambient[3]
float render_modellight_diffuse[3]
vec3_t colormap_pantscolor
qbool paused
global paused state, pauses both client and server
char map[MAX_STYLESTRING]
describes the textures to use on a range of triangles in the model, and mins/maxs (AABB) for culling.
int num_triangles
range of triangles and vertices in model->surfmesh
float delayedspawn
time that particle appears and begins moving
int mark
mark for the leak detector
union prvm_edict_t::@30 fields
qbool free
true if this edict is unused
union prvm_edict_t::@29 priv
struct edict_engineprivate_s * server
FIXME: this server pointer really means world, not server (it is used by both server qc and client qc...
prvm_edict_private_t * required
int entityfields
number of vec_t fields in progs (some variables are 3)
const char * name
name of the prog, e.g. "Server", "Client" or "Menu" (used for text output)
void(* error_cmd)(const char *format,...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN
[INIT]
int num_edicts
copies of some vars that were former read from sv
prvm_prog_fieldoffsets_t fieldoffsets
struct model_s * polygonbegin_model
this tracks the last polygonbegin's choice of CL_Mesh_CSQC or CL_Mesh_UI for this polygon
int polygonbegin_drawflags
float * polygonbegin_vertexdata
mempool_t * progs_mempool
all memory allocations related to this vm_prog (code, edicts, strings)
int polygonbegin_maxvertices
int polygonbegin_numvertices
qbool polygonbegin_guess2d
indicates if polygonbegin should be interpreted as 2d (clearscene sets this to false,...
struct skeleton_s * skeletons[MAX_EDICTS]
char polygonbegin_texname[MAX_QPATH]
rtlight_t templights[MAX_DLIGHTS]
rtlight_t * lights[MAX_DLIGHTS]
float quality
render quality (0 to 1) - affects r_drawparticles_drawdistance and others
int useperspective
if turned off it renders an ortho view
qbool isoverlay
if true, don't clear or do any post process effects (bloom, etc)
qbool ismain
if true, this is the MAIN view (which is, after CSQC, copied into the scene for use e....
char name[MAX_SCOREBOARDNAME]
const struct model_s * model
struct matrix4x4_s * relativetransforms
viddef_mode_t mode
currently active video mode
vmparticletheme_t * themes
porientation_t orientation
double Sys_DirtyTime(void)
viddef_t vid
global video state
void V_CalcRefdefUsing(const matrix4x4_t *entrendermatrix, const vec3_t clviewangles, qbool teleported, qbool clonground, qbool clcmdjump, float clstatsviewheight, qbool cldead, const vec3_t clvelocity)
int World_EntitiesInBox(world_t *world, const vec3_t requestmins, const vec3_t requestmaxs, int maxlist, prvm_edict_t **list)
void World_End(world_t *world)
#define Mem_FreePool(pool)
#define Mem_Alloc(pool, size)
#define Mem_AllocPool(name, flags, parent)
#define Mem_Realloc(pool, data, size)