int pflags = PFLAGS_CORONA | PFLAGS_FULLDYNAMIC;
float coronaintensity = 1;
float coronasizescale = 0.25;
- qboolean castshadow = true;
+ qbool castshadow = true;
float ambientscale = 0;
float diffusescale = 1;
float specularscale = 1;
vec3_t origin_from, origin_to, dir_from, dir_to;
float count;
int flags;
- qboolean istrail;
+ qbool istrail;
float tintmins[4], tintmaxs[4], fade;
VM_SAFEPARMCOUNTRANGE(7, 8, VM_CL_boxparticles);
static void VM_CL_setpause(prvm_prog_t *prog)
{
VM_SAFEPARMCOUNT(1, VM_CL_setpause);
- if ((int)PRVM_G_FLOAT(OFS_PARM0) != 0)
- cl.csqc_paused = true;
- else
- cl.csqc_paused = false;
+ if(cl.islocalgame)
+ {
+ if ((int)PRVM_G_FLOAT(OFS_PARM0) != 0)
+ host.paused = true;
+ else
+ host.paused = false;
+ }
}
//#343 void(float usecursor) setcursormode (DP_CSQC)
{
VM_SAFEPARMCOUNT(1, VM_CL_registercmd);
if(!Cmd_Exists(&cmd_client, PRVM_G_STRING(OFS_PARM0)))
- Cmd_AddCommand(CMD_CLIENT, PRVM_G_STRING(OFS_PARM0), NULL, "console command created by QuakeC");
+ Cmd_AddCommand(CF_CLIENT, PRVM_G_STRING(OFS_PARM0), NULL, "console command created by QuakeC");
}
//#360 float() readbyte (EXT_CSQC)
// #404 void(vector org, string modelname, float startframe, float endframe, float framerate) effect (DP_SV_EFFECT)
static void VM_CL_effect (prvm_prog_t *prog)
{
-#if 1
- Con_Printf(CON_WARN "WARNING: VM_CL_effect not implemented\n"); // FIXME: this needs to take modelname not modelindex, the csqc defs has it as string and so it shall be
-#else
+ dp_model_t *model;
vec3_t org;
VM_SAFEPARMCOUNT(5, VM_CL_effect);
VectorCopy(PRVM_G_VECTOR(OFS_PARM0), org);
- CL_Effect(org, (int)PRVM_G_FLOAT(OFS_PARM1), (int)PRVM_G_FLOAT(OFS_PARM2), (int)PRVM_G_FLOAT(OFS_PARM3), PRVM_G_FLOAT(OFS_PARM4));
-#endif
+
+ model = Mod_FindName(PRVM_G_STRING(OFS_PARM1), NULL);
+ if(model->loaded)
+ CL_Effect(org, model, (int)PRVM_G_FLOAT(OFS_PARM2), (int)PRVM_G_FLOAT(OFS_PARM3), PRVM_G_FLOAT(OFS_PARM4));
+ else
+ Con_Printf(CON_ERROR "VM_CL_effect: Could not load model '%s'\n", PRVM_G_STRING(OFS_PARM1));
}
// #405 void(vector org, vector velocity, float howmany) te_blood (DP_TE_BLOOD)
return 1;
}
-void CL_GetEntityMatrix (prvm_prog_t *prog, prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatrix)
+void CL_GetEntityMatrix (prvm_prog_t *prog, prvm_edict_t *ent, matrix4x4_t *out, qbool viewmatrix)
{
float scale;
float pitchsign = 1;
typedef struct vmparticletheme_s
{
unsigned short typeindex;
- qboolean initialized;
+ qbool initialized;
pblend_t blendmode;
porientation_t orientation;
int color1;
float liquidfriction;
float originjitter;
float velocityjitter;
- qboolean qualityreduction;
+ qbool qualityreduction;
float lifetime;
float stretch;
int staincolor1;
typedef struct vmparticlespawner_s
{
mempool_t *pool;
- qboolean initialized;
- qboolean verified;
+ qbool initialized;
+ qbool verified;
vmparticletheme_t *themes;
int max_themes;
}vmparticlespawner_t;
// --blub
static void VM_CL_R_RenderScene (prvm_prog_t *prog)
{
- qboolean ismain = r_refdef.view.ismain;
+ qbool ismain = r_refdef.view.ismain;
double t = Sys_DirtyTime();
VM_SAFEPARMCOUNT(0, VM_CL_R_RenderScene);
{
const char *texname;
int drawflags;
- qboolean draw2d;
+ qbool draw2d;
dp_model_t *mod;
VM_SAFEPARMCOUNTRANGE(2, 3, VM_CL_R_PolygonBegin);
static void VM_CL_R_PolygonEnd (prvm_prog_t *prog)
{
int i;
- qboolean hascolor;
- qboolean hasalpha;
+ qbool hascolor;
+ qbool hasalpha;
int e0 = 0, e1 = 0, e2 = 0;
float *o;
dp_model_t *mod = prog->polygonbegin_model;
=============
*/
-static qboolean CL_CheckBottom (prvm_edict_t *ent)
+static qbool CL_CheckBottom (prvm_edict_t *ent)
{
prvm_prog_t *prog = CLVM_prog;
vec3_t mins, maxs, start, stop;
possible, no move is done and false is returned
=============
*/
-static qboolean CL_movestep (prvm_edict_t *ent, vec3_t move, qboolean relink, qboolean noenemy, qboolean settrace)
+static qbool CL_movestep (prvm_edict_t *ent, vec3_t move, qbool relink, qbool noenemy, qbool settrace)
{
prvm_prog_t *prog = CLVM_prog;
float dz;
vec3_t move;
mfunction_t *oldf;
int oldself;
- qboolean settrace;
+ qbool settrace;
VM_SAFEPARMCOUNTRANGE(2, 3, VM_CL_walkmove);
matrix4x4_t entrendermatrix;
vec3_t clviewangles;
vec3_t clvelocity;
- qboolean teleported;
- qboolean clonground;
- qboolean clcmdjump;
- qboolean cldead;
- qboolean clintermission;
+ qbool teleported;
+ qbool clonground;
+ qbool clcmdjump;
+ qbool cldead;
float clstatsviewheight;
prvm_edict_t *ent;
int flags;
clcmdjump = (flags & REFDEFFLAG_JUMPING) != 0;
clstatsviewheight = PRVM_clientedictvector(ent, view_ofs)[2];
cldead = (flags & REFDEFFLAG_DEAD) != 0;
- clintermission = (flags & REFDEFFLAG_INTERMISSION) != 0;
+ cl.intermission = (flags & REFDEFFLAG_INTERMISSION) != 0;
VectorCopy(PRVM_clientedictvector(ent, velocity), clvelocity);
- V_CalcRefdefUsing(&entrendermatrix, clviewangles, teleported, clonground, clcmdjump, clstatsviewheight, cldead, clintermission, clvelocity);
+ V_CalcRefdefUsing(&entrendermatrix, clviewangles, teleported, clonground, clcmdjump, clstatsviewheight, cldead, clvelocity);
VectorCopy(cl.csqc_vieworiginfromengine, cl.csqc_vieworigin);
VectorCopy(cl.csqc_viewanglesfromengine, cl.csqc_viewangles);
NULL, // #5 void(entity e, vector min, vector max) setabssize (QUAKE)
VM_break, // #6 void() break (QUAKE)
VM_random, // #7 float() random (QUAKE)
-VM_CL_sound, // #8 void(entity e, float chan, string samp) sound (QUAKE)
+VM_CL_sound, // #8 void(entity e, float chan, string samp, float volume, float atten[, float pitchchange[, float flags]]) sound (QUAKE)
VM_normalize, // #9 vector(vector v) normalize (QUAKE)
VM_error, // #10 void(string e) error (QUAKE)
VM_objerror, // #11 void(string e) objerror (QUAKE)