mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
exec permission demote
fix to r_explosionlight few sound fixes to csqc standard effects (not done yet) git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1246 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
bc6d871f37
commit
3a0181d5ca
3 changed files with 91 additions and 31 deletions
|
@ -828,9 +828,10 @@ void CL_ParseTEnt (void)
|
||||||
P_ParticleExplosion (pos);
|
P_ParticleExplosion (pos);
|
||||||
|
|
||||||
// light
|
// light
|
||||||
|
if (r_explosionlight.value) {
|
||||||
dl = CL_AllocDlight (0);
|
dl = CL_AllocDlight (0);
|
||||||
VectorCopy (pos, dl->origin);
|
VectorCopy (pos, dl->origin);
|
||||||
dl->radius = 350;
|
dl->radius = 150 + bound(0, r_explosionlight.value, 1)*200;
|
||||||
dl->die = cl.time + 1;
|
dl->die = cl.time + 1;
|
||||||
dl->decay = 300;
|
dl->decay = 300;
|
||||||
|
|
||||||
|
@ -840,7 +841,7 @@ void CL_ParseTEnt (void)
|
||||||
dl->channelfade[0] = 0.196;
|
dl->channelfade[0] = 0.196;
|
||||||
dl->channelfade[1] = 0.23;
|
dl->channelfade[1] = 0.23;
|
||||||
dl->channelfade[2] = 0.12;
|
dl->channelfade[2] = 0.12;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// sound
|
// sound
|
||||||
|
@ -885,12 +886,15 @@ void CL_ParseTEnt (void)
|
||||||
pos[0] = MSG_ReadCoord ();
|
pos[0] = MSG_ReadCoord ();
|
||||||
pos[1] = MSG_ReadCoord ();
|
pos[1] = MSG_ReadCoord ();
|
||||||
pos[2] = MSG_ReadCoord ();
|
pos[2] = MSG_ReadCoord ();
|
||||||
|
if (P_RunParticleEffectTypeString(pos, NULL, 1, "te_bigexplosion"))
|
||||||
P_ParticleExplosion (pos);
|
P_ParticleExplosion (pos);
|
||||||
|
|
||||||
// light
|
// light
|
||||||
|
if (r_explosionlight.value) {
|
||||||
dl = CL_AllocDlight (0);
|
dl = CL_AllocDlight (0);
|
||||||
VectorCopy (pos, dl->origin);
|
VectorCopy (pos, dl->origin);
|
||||||
dl->radius = 500;
|
// no point in doing this the fuh/ez way
|
||||||
|
dl->radius = 500*bound(0, r_explosionlight.value, 1);
|
||||||
dl->die = cl.time + 1;
|
dl->die = cl.time + 1;
|
||||||
dl->decay = 500;
|
dl->decay = 500;
|
||||||
|
|
||||||
|
@ -900,6 +904,7 @@ void CL_ParseTEnt (void)
|
||||||
dl->channelfade[0] = 0;
|
dl->channelfade[0] = 0;
|
||||||
dl->channelfade[1] = 0;
|
dl->channelfade[1] = 0;
|
||||||
dl->channelfade[2] = 0;
|
dl->channelfade[2] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
S_StartSound (-2, 0, cl_sfx_r_exp3, pos, 1, 1);
|
S_StartSound (-2, 0, cl_sfx_r_exp3, pos, 1, 1);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -30,6 +30,16 @@ cvar_t cl_csqcdebug = {"cl_csqcdebug", "0"}; //prints entity numbers which arriv
|
||||||
cvar_t cl_nocsqc = {"cl_nocsqc", "0"};
|
cvar_t cl_nocsqc = {"cl_nocsqc", "0"};
|
||||||
cvar_t pr_csqc_coreonerror = {"pr_csqc_coreonerror", "1"};
|
cvar_t pr_csqc_coreonerror = {"pr_csqc_coreonerror", "1"};
|
||||||
|
|
||||||
|
// standard effect cvars/sounds
|
||||||
|
extern cvar_t r_explosionlight;
|
||||||
|
extern sfx_t *cl_sfx_wizhit;
|
||||||
|
extern sfx_t *cl_sfx_knighthit;
|
||||||
|
extern sfx_t *cl_sfx_tink1;
|
||||||
|
extern sfx_t *cl_sfx_ric1;
|
||||||
|
extern sfx_t *cl_sfx_ric2;
|
||||||
|
extern sfx_t *cl_sfx_ric3;
|
||||||
|
extern sfx_t *cl_sfx_r_exp3;
|
||||||
|
|
||||||
//If I do it like this, I'll never forget to register something...
|
//If I do it like this, I'll never forget to register something...
|
||||||
#define csqcglobals \
|
#define csqcglobals \
|
||||||
globalfunction(init_function, "CSQC_Init"); \
|
globalfunction(init_function, "CSQC_Init"); \
|
||||||
|
@ -2204,24 +2214,51 @@ static void PF_cl_te_superspike (progfuncs_t *prinst, struct globalvars_s *pr_gl
|
||||||
static void PF_cl_te_explosion (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
static void PF_cl_te_explosion (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
float *pos = G_VECTOR(OFS_PARM0);
|
float *pos = G_VECTOR(OFS_PARM0);
|
||||||
|
|
||||||
|
// light
|
||||||
|
if (r_explosionlight.value) {
|
||||||
|
dlight_t *dl;
|
||||||
|
|
||||||
|
dl = CL_AllocDlight (0);
|
||||||
|
VectorCopy (pos, dl->origin);
|
||||||
|
dl->radius = 150 + bound(0, r_explosionlight.value, 1)*200;
|
||||||
|
dl->die = cl.time + 1;
|
||||||
|
dl->decay = 300;
|
||||||
|
|
||||||
|
dl->color[0] = 0.2;
|
||||||
|
dl->color[1] = 0.155;
|
||||||
|
dl->color[2] = 0.05;
|
||||||
|
dl->channelfade[0] = 0.196;
|
||||||
|
dl->channelfade[1] = 0.23;
|
||||||
|
dl->channelfade[2] = 0.12;
|
||||||
|
}
|
||||||
|
|
||||||
P_ParticleExplosion(pos);
|
P_ParticleExplosion(pos);
|
||||||
|
|
||||||
|
S_StartSound (-2, 0, cl_sfx_r_exp3, pos, 1, 1);
|
||||||
}
|
}
|
||||||
static void PF_cl_te_tarexplosion (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
static void PF_cl_te_tarexplosion (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
float *pos = G_VECTOR(OFS_PARM0);
|
float *pos = G_VECTOR(OFS_PARM0);
|
||||||
P_BlobExplosion (pos);
|
P_BlobExplosion (pos);
|
||||||
|
|
||||||
|
S_StartSound (-2, 0, cl_sfx_r_exp3, pos, 1, 1);
|
||||||
}
|
}
|
||||||
static void PF_cl_te_wizspike (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
static void PF_cl_te_wizspike (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
float *pos = G_VECTOR(OFS_PARM0);
|
float *pos = G_VECTOR(OFS_PARM0);
|
||||||
if (P_RunParticleEffectType(pos, NULL, 1, pt_wizspike))
|
if (P_RunParticleEffectType(pos, NULL, 1, pt_wizspike))
|
||||||
P_RunParticleEffect (pos, vec3_origin, 20, 30);
|
P_RunParticleEffect (pos, vec3_origin, 20, 30);
|
||||||
|
|
||||||
|
S_StartSound (-2, 0, cl_sfx_knighthit, pos, 1, 1);
|
||||||
}
|
}
|
||||||
static void PF_cl_te_knightspike (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
static void PF_cl_te_knightspike (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
float *pos = G_VECTOR(OFS_PARM0);
|
float *pos = G_VECTOR(OFS_PARM0);
|
||||||
if (P_RunParticleEffectType(pos, NULL, 1, pt_knightspike))
|
if (P_RunParticleEffectType(pos, NULL, 1, pt_knightspike))
|
||||||
P_RunParticleEffect (pos, vec3_origin, 226, 20);
|
P_RunParticleEffect (pos, vec3_origin, 226, 20);
|
||||||
|
|
||||||
|
S_StartSound (-2, 0, cl_sfx_knighthit, pos, 1, 1);
|
||||||
}
|
}
|
||||||
static void PF_cl_te_lavasplash (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
static void PF_cl_te_lavasplash (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
|
@ -2263,8 +2300,27 @@ static void PF_cl_te_explosionquad (progfuncs_t *prinst, struct globalvars_s *pr
|
||||||
if (P_RunParticleEffectTypeString(pos, vec3_origin, 1, "te_explosionquad"))
|
if (P_RunParticleEffectTypeString(pos, vec3_origin, 1, "te_explosionquad"))
|
||||||
{
|
{
|
||||||
P_ParticleExplosion(pos);
|
P_ParticleExplosion(pos);
|
||||||
P_ParticleExplosion(pos);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// light
|
||||||
|
if (r_explosionlight.value) {
|
||||||
|
dlight_t *dl;
|
||||||
|
|
||||||
|
dl = CL_AllocDlight (0);
|
||||||
|
VectorCopy (pos, dl->origin);
|
||||||
|
dl->radius = 150 + bound(0, r_explosionlight.value, 1)*200;
|
||||||
|
dl->die = cl.time + 1;
|
||||||
|
dl->decay = 300;
|
||||||
|
|
||||||
|
dl->color[0] = 0.2;
|
||||||
|
dl->color[1] = 0.155;
|
||||||
|
dl->color[2] = 0.05;
|
||||||
|
dl->channelfade[0] = 0.196;
|
||||||
|
dl->channelfade[1] = 0.23;
|
||||||
|
dl->channelfade[2] = 0.12;
|
||||||
|
}
|
||||||
|
|
||||||
|
S_StartSound (-2, 0, cl_sfx_r_exp3, pos, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//void(vector org, float radius, float lifetime, vector color) te_customflash
|
//void(vector org, float radius, float lifetime, vector color) te_customflash
|
||||||
|
@ -2352,8 +2408,6 @@ static void PF_cl_te_explosionrgb (progfuncs_t *prinst, struct globalvars_s *pr_
|
||||||
float *colour = G_VECTOR(OFS_PARM1);
|
float *colour = G_VECTOR(OFS_PARM1);
|
||||||
|
|
||||||
dlight_t *dl;
|
dlight_t *dl;
|
||||||
extern cvar_t r_explosionlight;
|
|
||||||
extern sfx_t *cl_sfx_r_exp3;
|
|
||||||
|
|
||||||
P_ParticleExplosion (org);
|
P_ParticleExplosion (org);
|
||||||
|
|
||||||
|
|
|
@ -502,8 +502,9 @@ void Cmd_Exec_f (void)
|
||||||
if (cl_warncmd.value || developer.value)
|
if (cl_warncmd.value || developer.value)
|
||||||
Con_TPrintf (TL_EXECING,name);
|
Con_TPrintf (TL_EXECING,name);
|
||||||
|
|
||||||
Cbuf_InsertText ("\n", Cmd_ExecLevel); //well this is inefficient...
|
// don't execute anything as if it was from server
|
||||||
Cbuf_InsertText (f, Cmd_ExecLevel);
|
Cbuf_InsertText ("\n", Cmd_FromGamecode() ? RESTRICT_INSECURE : Cmd_ExecLevel);
|
||||||
|
Cbuf_InsertText (f, Cmd_FromGamecode() ? RESTRICT_INSECURE : Cmd_ExecLevel);
|
||||||
BZ_Free(f);
|
BZ_Free(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue