FTE_TE_STANDARDEFFECTBUILTINS added

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1229 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2005-08-13 06:01:18 +00:00
parent 8a57ab9bc6
commit ac678cc0be
2 changed files with 34 additions and 8 deletions

View file

@ -2159,7 +2159,7 @@ static void PF_cl_te_gunshot (progfuncs_t *prinst, struct globalvars_s *pr_globa
if (P_RunParticleEffectType(pos, NULL, scaler, pt_gunshot))
P_RunParticleEffect (pos, vec3_origin, 0, 20*scaler);
}
static void PF_cl_te_blood (progfuncs_t *prinst, struct globalvars_s *pr_globals)
static void PF_cl_te_bloodqw (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{
float *pos = G_VECTOR(OFS_PARM0);
float scaler = 1;
@ -2168,6 +2168,15 @@ static void PF_cl_te_blood (progfuncs_t *prinst, struct globalvars_s *pr_globals
if (P_RunParticleEffectType(pos, NULL, scaler, pt_blood))
P_RunParticleEffect (pos, vec3_origin, 73, 20*scaler);
}
static void PF_cl_te_blooddp (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{
float *pos = G_VECTOR(OFS_PARM0);
float *dir = G_VECTOR(OFS_PARM1);
float scaler = G_FLOAT(OFS_PARM2);
if (P_RunParticleEffectType(pos, dir, scaler, pt_blood))
P_RunParticleEffect (pos, dir, 73, 20*scaler);
}
static void PF_cl_te_lightningblood (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{
float *pos = G_VECTOR(OFS_PARM0);
@ -3105,8 +3114,7 @@ PF_instr,
//EXT_DIMENSION_PLANES
PF_bitshift, //#218 bitshift (EXT_DIMENSION_PLANES)
//I guess this should go under DP_TE_STANDARDEFFECTBUILTINS...
PF_cl_te_lightningblood,// #219 te_lightningblood
PF_cl_te_lightningblood,// #219 te_lightningblood void(vector org) (FTE_TE_STANDARDEFFECTBUILTINS)
//220
PF_Fixme, //{"map_builtin", PF_builtinsupported,0, 0, 0, 220}, //like #100 - takes 2 args. arg0 is builtinname, 1 is number to map to.
@ -3132,7 +3140,7 @@ PF_rotatevectorsbyangles, // #235
PF_rotatevectorsbymatrix, // #236
PF_skinforname, // #237
PF_shaderforname, // #238
PF_Fixme, // #239
PF_cl_te_bloodqw, // #239 void te_bloodqw(vector org[, float count]) (FTE_TE_STANDARDEFFECTBUILTINS)
//240
PF_FixTen,
@ -3270,7 +3278,7 @@ PF_findchain, // #402 entity(string field, string match) findchain (DP_QC_FIND
PF_findchainfloat, // #403 entity(float fld, float match) findchainfloat (DP_QC_FINDCHAINFLOAT)
PF_cl_effect, // #404 void(vector org, string modelname, float startframe, float endframe, float framerate) effect (DP_SV_EFFECT)
PF_cl_te_blood, // #405 void(vector org, vector velocity, float howmany) te_blood (DP_TE_BLOOD)
PF_cl_te_blooddp, // #405 void(vector org, vector velocity, float howmany) te_blood (DP_TE_BLOOD)
PF_cl_te_bloodshower, // #406 void(vector mincorner, vector maxcorner, float explosionspeed, float howmany) te_bloodshower (DP_TE_BLOODSHOWER)
PF_cl_te_explosionrgb, // #407 void(vector org, vector color) te_explosionrgb (DP_TE_EXPLOSIONRGB)
PF_cl_te_particlecube, // #408 void(vector mincorner, vector maxcorner, vector vel, float howmany, float color, float gravityflag, float randomveljitter) te_particlecube (DP_TE_PARTICLECUBE)

View file

@ -2325,7 +2325,7 @@ static void PF_particle (progfuncs_t *prinst, globalvars_t *pr_globals) //I said
SV_MulticastProtExt(org, MULTICAST_PVS, pr_global_struct->dimension_send, PEXT_HEXEN2, 0);
}
void PF_te_blood (progfuncs_t *prinst, globalvars_t *pr_globals)
void PF_te_blooddp (progfuncs_t *prinst, globalvars_t *pr_globals)
{
float count;
float *org, *dir;
@ -4851,10 +4851,12 @@ void SV_beam_tempentity (int ownerent, vec3_t start, vec3_t end, int type)
SV_MulticastProtExt (start, MULTICAST_PHS, pr_global_struct->dimension_send, 0, 0);
}
/*
void PF_tempentity (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{
SV_point_tempentity(G_VECTOR(OFS_PARM0), G_FLOAT(OFS_PARM1), 1);
}
*/
//=============================================================================
@ -6105,7 +6107,7 @@ lh_extension_t QSG_Extensions[] = {
{"DP_TE_PLASMABURN", 1, NULL, {"te_plasmaburn"}},
{"DP_TE_SMALLFLASH", 1, NULL, {"te_smallflash"}},
{"DP_TE_SPARK", 1, NULL, {"te_spark"}},
{"DP_TE_STANDARDEFFECTBUILTINS", 14, NULL, {"te_gunshot", "te_spike", "te_superspike", "te_explosion", "te_tarexplosion", "te_wizspike", "te_knightspike", "te_lavasplash", "te_teleport", "te_explosion2", "te_lightning1", "te_lightning2", "te_lightning3", "te_beam"}}, //should we include QW ones?...
{"DP_TE_STANDARDEFFECTBUILTINS", 14, NULL, {"te_gunshot", "te_spike", "te_superspike", "te_explosion", "te_tarexplosion", "te_wizspike", "te_knightspike", "te_lavasplash", "te_teleport", "te_explosion2", "te_lightning1", "te_lightning2", "te_lightning3", "te_beam"}},
{"EXT_DIMENSION_VISIBILITY"},
{"EXT_DIMENSION_PHYSICS"},
{"EXT_DIMENSION_GHOST"},
@ -6133,6 +6135,9 @@ lh_extension_t QSG_Extensions[] = {
{"FTE_STRINGS", 18, NULL, {"stof", "strlen","strcat","substring","stov","strzone","strunzone",
"strstrofs", "str2chr", "chr2str", "strconv", "infoadd", "infoget", "strncmp", "strcasecmp", "strncasecmp"}},
{"FTE_TE_STANDARDEFFECTBUILTINS", 16, NULL, {"te_gunshot", "te_spike", "te_superspike", "te_explosion", "te_tarexplosion", "te_wizspike", "te_knightspike", "te_lavasplash",
"te_teleport", "te_explosion2", "te_lightning1", "te_lightning2", "te_lightning3", "te_beam", "te_lightningblood", "te_bloodqw"}},
{"HYDR_WRITESTRING2", 1, NULL, {"writestring2"}},
{"KRIMZON_SV_PARSECLIENTCOMMAND", 3, NULL, {"clientcommand", "tokenize", "argv"}}, //very very similar to the mvdsv system.
@ -7742,11 +7747,23 @@ void PF_te_spikequad(progfuncs_t *prinst, struct globalvars_s *pr_globals)
SV_point_tempentity(G_VECTOR(OFS_PARM0), DPTE_SPIKEQUAD, 1);
}
// FTE_TE_STANDARDEFFECTBUILTINS
void PF_te_lightningblood(progfuncs_t *prinst, struct globalvars_s *pr_globals)
{
SV_point_tempentity(G_VECTOR(OFS_PARM0), TE_LIGHTNINGBLOOD, 1);
}
// FTE_TE_STANDARDEFFECTBUILTINS
void PF_te_bloodqw(progfuncs_t *prinst, struct globalvars_s *pr_globals)
{
int count;
if (*svprogfuncs->callargc >= 2)
count = G_FLOAT(OFS_PARM1);
else
count = 1;
SV_point_tempentity(G_VECTOR(OFS_PARM0), TE_BLOOD, count);
}
//DP_TE_STANDARDEFFECTBUILTINS
//void(vector org) te_superspike = #420;
void PF_te_superspike(progfuncs_t *prinst, struct globalvars_s *pr_globals)
@ -9066,6 +9083,7 @@ BuiltinList_t BuiltinList[] = { //nq qw h2 ebfs
{"runclientphys", PF_runclientphys, 0, 0, 0, 233},
//END EXT_CSQC
{"isbackbuffered", PF_isbackbuffered, 0, 0, 0, 234},
{"te_bloodqw", PF_te_bloodqw, 0, 0, 0, 239},
//end fte extras
@ -9081,7 +9099,7 @@ BuiltinList_t BuiltinList[] = { //nq qw h2 ebfs
//DP_SV_EFFECT
{"effect", PF_effect, 0, 0, 0, 404},// #404 void(vector org, string modelname, float startframe, float endframe, float framerate) effect (DP_SV_EFFECT)
//DP_TE_BLOOD
{"te_blood", PF_te_blood, 0, 0, 0, 405},// #405 te_blood
{"te_blood", PF_te_blooddp, 0, 0, 0, 405},// #405 te_blood
//DP_TE_BLOODSHOWER
{"te_bloodshower", PF_te_bloodshower, 0, 0, 0, 406},// #406 void(vector mincorner, vector maxcorner, float explosionspeed, float howmany) te_bloodshower (DP_TE_BLOODSHOWER)
//DP_TE_EXPLOSIONRGB