static void CSQC_R_RecalcView (void)
{
extern matrix4x4_t viewmodelmatrix;
- Matrix4x4_CreateIdentity(&viewmodelmatrix);
- Matrix4x4_CreateIdentity(&r_refdef.viewentitymatrix);
+ viewmodelmatrix = identitymatrix;
+ r_refdef.viewentitymatrix = identitymatrix;
Matrix4x4_CreateFromQuakeEntity(&r_refdef.viewentitymatrix, csqc_origin[0], csqc_origin[1], csqc_origin[2], csqc_angles[0], csqc_angles[1], csqc_angles[2], 1);
Matrix4x4_CreateFromQuakeEntity(&viewmodelmatrix, csqc_origin[0], csqc_origin[1], csqc_origin[2], csqc_angles[0], csqc_angles[1], csqc_angles[2], 0.3);
}
case TE_SPIKEQUAD:
case TE_GUNSHOT:
case TE_GUNSHOTQUAD:
- CL_SparkShower(f, v, 15, 1);
- CL_Smoke(f, v, 15);
+ CL_SparkShower(f, v, 15, 1, 0);
+ CL_Smoke(f, v, 15, 0);
if (cl_particles_bulletimpacts.integer)
CL_BulletMark(f);
break;
case TE_SUPERSPIKE:
case TE_SUPERSPIKEQUAD:
- CL_SparkShower(f, v, 30, 1);
- CL_Smoke(f, v, 30);
+ CL_SparkShower(f, v, 30, 1, 0);
+ CL_Smoke(f, v, 30, 0);
if (cl_particles_bulletimpacts.integer)
CL_BulletMark(f);
break;
CL_BloodPuff(f, v, n);
break;
case TE_SPARK:
- CL_SparkShower(f, v, n, 1);
+ CL_SparkShower(f, v, n, 1, 0);
break;
case TE_FLAMEJET:
CL_Flames(f, v, n);
return;
pos = PRVM_G_VECTOR(OFS_PARM0);
CL_FindNonSolidLocation(pos, pos2, 4);
- CL_SparkShower(pos2, PRVM_G_VECTOR(OFS_PARM1), PRVM_G_FLOAT(OFS_PARM2), 1);
+ CL_SparkShower(pos2, PRVM_G_VECTOR(OFS_PARM1), PRVM_G_FLOAT(OFS_PARM2), 1, 0);
}
// #412 void(vector org) te_gunshotquad (DP_QUADEFFECTS1)
pos = PRVM_G_VECTOR(OFS_PARM0);
CL_FindNonSolidLocation(pos, pos2, 4);
- CL_SparkShower(pos2, vec3_origin, 15, 1);
- CL_Smoke(pos2, vec3_origin, 15);
+ CL_SparkShower(pos2, vec3_origin, 15, 1, 0);
+ CL_Smoke(pos2, vec3_origin, 15, 0);
CL_BulletMark(pos2);
Matrix4x4_CreateTranslate(&tempmatrix, pos2[0], pos2[1], pos2[2]);
CL_AllocDlight(NULL, &tempmatrix, 100, 0.15f, 0.15f, 1.5f, 500, 0.2, 0, -1, true, 1, 0.25, 1, 0, 0, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
CL_FindNonSolidLocation(pos, pos2, 4);
if (cl_particles_bulletimpacts.integer)
{
- CL_SparkShower(pos2, vec3_origin, 15, 1);
- CL_Smoke(pos2, vec3_origin, 15);
+ CL_SparkShower(pos2, vec3_origin, 15, 1, 0);
+ CL_Smoke(pos2, vec3_origin, 15, 0);
CL_BulletMark(pos2);
}
Matrix4x4_CreateTranslate(&tempmatrix, pos2[0], pos2[1], pos2[2]);
CL_FindNonSolidLocation(pos, pos2, 4);
if (cl_particles_bulletimpacts.integer)
{
- CL_SparkShower(pos2, vec3_origin, 30, 1);
- CL_Smoke(pos2, vec3_origin, 30);
+ CL_SparkShower(pos2, vec3_origin, 30, 1, 0);
+ CL_Smoke(pos2, vec3_origin, 30, 0);
CL_BulletMark(pos2);
}
Matrix4x4_CreateTranslate(&tempmatrix, pos2[0], pos2[1], pos2[2]);
CL_ParticleExplosion(pos2);
Matrix4x4_CreateTranslate(&tempmatrix, pos2[0], pos2[1], pos2[2]);
CL_AllocDlight(NULL, &tempmatrix, 350, 2.5f, 2.0f, 4.0f, 700, 0.5, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
- if (gamemode != GAME_NEXUIZ)
- S_StartSound(-1, 0, cl.sfx_r_exp3, pos2, 1, 1);
+ S_StartSound(-1, 0, cl.sfx_r_exp3, pos2, 1, 1);
}
// #416 void(vector org) te_smallflash (DP_TE_SMALLFLASH)
pos = PRVM_G_VECTOR(OFS_PARM0);
CL_FindNonSolidLocation(pos, pos2, 4);
- CL_SparkShower(pos2, vec3_origin, 15, 1);
- CL_Smoke(pos2, vec3_origin, 15);
+ CL_SparkShower(pos2, vec3_origin, 15, 1, 0);
+ CL_Smoke(pos2, vec3_origin, 15, 0);
CL_BulletMark(pos2);
}
CL_FindNonSolidLocation(pos, pos2, 4);
if (cl_particles_bulletimpacts.integer)
{
- CL_SparkShower(pos2, vec3_origin, 15, 1);
- CL_Smoke(pos2, vec3_origin, 15);
+ CL_SparkShower(pos2, vec3_origin, 15, 1, 0);
+ CL_Smoke(pos2, vec3_origin, 15, 0);
CL_BulletMark(pos2);
}
if (rand() % 5) S_StartSound(-1, 0, cl.sfx_tink1, pos2, 1, 1);
CL_FindNonSolidLocation(pos, pos2, 4);
if (cl_particles_bulletimpacts.integer)
{
- CL_SparkShower(pos2, vec3_origin, 30, 1);
- CL_Smoke(pos2, vec3_origin, 30);
+ CL_SparkShower(pos2, vec3_origin, 30, 1, 0);
+ CL_Smoke(pos2, vec3_origin, 30, 0);
CL_BulletMark(pos2);
}
if (rand() % 5) S_StartSound(-1, 0, cl.sfx_tink1, pos2, 1, 1);
CL_ParticleExplosion(pos2);
Matrix4x4_CreateTranslate(&tempmatrix, pos2[0], pos2[1], pos2[2]);
CL_AllocDlight(NULL, &tempmatrix, 350, 4.0f, 2.0f, 0.50f, 700, 0.5, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
- if (gamemode != GAME_NEXUIZ)
- S_StartSound(-1, 0, cl.sfx_r_exp3, pos2, 1, 1);
+ S_StartSound(-1, 0, cl.sfx_r_exp3, pos2, 1, 1);
}
// #422 void(vector org) te_tarexplosion (DP_TE_STANDARDEFFECTBUILTINS)
CL_BlobExplosion(pos2);
Matrix4x4_CreateTranslate(&tempmatrix, pos2[0], pos2[1], pos2[2]);
CL_AllocDlight(NULL, &tempmatrix, 600, 1.6f, 0.8f, 2.0f, 1200, 0.5, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
- if (gamemode != GAME_NEXUIZ)
- S_StartSound(-1, 0, cl.sfx_r_exp3, pos2, 1, 1);
+ S_StartSound(-1, 0, cl.sfx_r_exp3, pos2, 1, 1);
}
// #423 void(vector org) te_wizspike (DP_TE_STANDARDEFFECTBUILTINS)
color[2] = tempcolor[2] * (2.0f / 255.0f);
Matrix4x4_CreateTranslate(&tempmatrix, pos2[0], pos2[1], pos2[2]);
CL_AllocDlight(NULL, &tempmatrix, 350, color[0], color[1], color[2], 700, 0.5, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
- if (gamemode != GAME_NEXUIZ)
- S_StartSound(-1, 0, cl.sfx_r_exp3, pos2, 1, 1);
+ S_StartSound(-1, 0, cl.sfx_r_exp3, pos2, 1, 1);
}
prvm_edict_t *attachent;
model_t *model;
- Matrix4x4_CreateIdentity(out); // warnings and errors return identical matrix
+ *out = identitymatrix; // warnings and errors return identical matrix
if (ent == prog->edicts)
return 1;
return ret;
}
else
- Matrix4x4_CreateIdentity(&tagmatrix);
+ tagmatrix = identitymatrix;
if ((val = PRVM_GETEDICTFIELDVALUE(ent, csqc_fieldoff_tag_entity)) && val->edict)
{ // DP_GFX_QUAKE3MODELTAGS, scan all chain and stop on unattached entity
if (model && val->_float >= 1 && model->animscenes && attachent->fields.client->frame >= 0 && attachent->fields.client->frame < model->numframes)
Mod_Alias_GetTagMatrix(model, model->animscenes[(int)attachent->fields.client->frame].firstframe, val->_float - 1, &attachmatrix);
else
- Matrix4x4_CreateIdentity(&attachmatrix);
+ attachmatrix = identitymatrix;
// apply transformation by child entity matrix
val = PRVM_GETEDICTFIELDVALUE(ent, csqc_fieldoff_scale);