FX: Moved particle definitions into the respective FX init functions.
This commit is contained in:
parent
d72fc4d17c
commit
b44ea3320f
13 changed files with 45 additions and 31 deletions
|
@ -52,14 +52,7 @@ var float autocvar_r_viewmodelscale = 1.0f;
|
|||
var float autocvar_cl_hudaspect = 0.0f;
|
||||
|
||||
/* particle descriptors */
|
||||
var float PARTICLE_BLOOD;
|
||||
var float PARTICLE_PIECES_BLACK;
|
||||
var float PARTICLE_SMOKE_BROWN;
|
||||
var float PARTICLE_SMOKE_GREY;
|
||||
var float PARTICLE_SPARK;
|
||||
var float PART_DUSTMOTE;
|
||||
var float DECAL_SHOT;
|
||||
var float DECAL_GLASS;
|
||||
|
||||
/* muzzleflash indices */
|
||||
var int MUZZLE_SMALL;
|
||||
|
|
|
@ -93,13 +93,6 @@ CSQC_RendererRestarted(string rstr)
|
|||
drawfont = FONT_CON;
|
||||
|
||||
/* Particles */
|
||||
PARTICLE_SPARK = particleeffectnum("part_spark");
|
||||
PARTICLE_PIECES_BLACK = particleeffectnum("part_pieces_black");
|
||||
PARTICLE_SMOKE_GREY = particleeffectnum("part_smoke_grey");
|
||||
PARTICLE_SMOKE_BROWN = particleeffectnum("part_smoke_brown");
|
||||
PARTICLE_BLOOD = particleeffectnum("part_blood");
|
||||
DECAL_SHOT = particleeffectnum("decal_shot");
|
||||
DECAL_GLASS = particleeffectnum("decal_glass");
|
||||
PART_DUSTMOTE = particleeffectnum("volume.dustmote");
|
||||
|
||||
/* 2D Pics */
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
../../shared/valve/fx_breakmodel.c
|
||||
../../shared/valve/fx_explosion.c
|
||||
../../shared/valve/fx_gibhuman.c
|
||||
../../shared/valve/fx_impact.c
|
||||
../../shared/valve/fx_spark.c
|
||||
../../shared/valve/fx_impact.c
|
||||
../npc.c
|
||||
init.c
|
||||
../../shared/gearbox/items.h
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
../../shared/valve/fx_breakmodel.c
|
||||
../../shared/valve/fx_explosion.c
|
||||
../../shared/valve/fx_gibhuman.c
|
||||
../../shared/valve/fx_impact.c
|
||||
../../shared/valve/fx_spark.c
|
||||
../../shared/valve/fx_impact.c
|
||||
../npc.c
|
||||
init.c
|
||||
../../shared/hunger/items.h
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
../../shared/valve/fx_breakmodel.c
|
||||
../../shared/valve/fx_explosion.c
|
||||
../../shared/valve/fx_gibhuman.c
|
||||
../../shared/valve/fx_impact.c
|
||||
../../shared/valve/fx_spark.c
|
||||
../../shared/valve/fx_impact.c
|
||||
../npc.c
|
||||
init.c
|
||||
../../shared/poke646/items.h
|
||||
|
|
|
@ -46,8 +46,8 @@ decore.cpp
|
|||
../../shared/valve/fx_breakmodel.c
|
||||
../../shared/valve/fx_explosion.c
|
||||
../../shared/valve/fx_gibhuman.c
|
||||
../../shared/valve/fx_impact.c
|
||||
../../shared/valve/fx_spark.c
|
||||
../../shared/valve/fx_impact.c
|
||||
../npc.c
|
||||
init.c
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
../../shared/valve/fx_breakmodel.c
|
||||
../../shared/valve/fx_explosion.c
|
||||
../../shared/valve/fx_gibhuman.c
|
||||
../../shared/valve/fx_impact.c
|
||||
../../shared/valve/fx_spark.c
|
||||
../../shared/valve/fx_impact.c
|
||||
../npc.c
|
||||
init.c
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@ vgui_chooseteam.cpp
|
|||
../../shared/valve/fx_breakmodel.c
|
||||
../../shared/valve/fx_explosion.c
|
||||
../../shared/valve/fx_gibhuman.c
|
||||
../../shared/valve/fx_impact.c
|
||||
../../shared/valve/fx_spark.c
|
||||
../../shared/valve/fx_impact.c
|
||||
init.c
|
||||
../npc.c
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
../../shared/valve/fx_breakmodel.c
|
||||
../../shared/valve/fx_explosion.c
|
||||
../../shared/valve/fx_gibhuman.c
|
||||
../../shared/valve/fx_impact.c
|
||||
../../shared/valve/fx_spark.c
|
||||
../../shared/valve/fx_impact.c
|
||||
../valve/init.c
|
||||
../npc.c
|
||||
|
||||
|
|
|
@ -14,6 +14,12 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
var float DECAL_SHOT;
|
||||
var float DECAL_GLASS;
|
||||
var float PARTICLE_PIECES_BLACK;
|
||||
var float PARTICLE_SMOKE_BROWN;
|
||||
var float PARTICLE_SMOKE_GREY;
|
||||
|
||||
void
|
||||
FX_Impact_Init(void)
|
||||
{
|
||||
|
@ -27,6 +33,12 @@ FX_Impact_Init(void)
|
|||
precache_sound("weapons/ric3.wav");
|
||||
precache_sound("weapons/ric4.wav");
|
||||
precache_sound("weapons/ric5.wav");
|
||||
|
||||
DECAL_SHOT = particleeffectnum("decal_shot");
|
||||
DECAL_GLASS = particleeffectnum("decal_glass");
|
||||
PARTICLE_PIECES_BLACK = particleeffectnum("part_pieces_black");
|
||||
PARTICLE_SMOKE_GREY = particleeffectnum("part_smoke_grey");
|
||||
PARTICLE_SMOKE_BROWN = particleeffectnum("part_smoke_brown");
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -68,20 +80,19 @@ FX_Impact(int iType, vector vecPos, vector vNormal)
|
|||
pointparticles(PARTICLE_PIECES_BLACK, vecPos, vNormal, 1);
|
||||
break;
|
||||
case IMPACT_WOOD:
|
||||
pointparticles(PARTICLE_SPARK, vecPos, vNormal, 1);
|
||||
FX_Spark(vecPos, vNormal);
|
||||
pointparticles(PARTICLE_PIECES_BLACK, vecPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_SMOKE_BROWN, vecPos, vNormal, 1);
|
||||
break;
|
||||
case IMPACT_METAL:
|
||||
pointparticles(PARTICLE_SPARK, vecPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_SPARK, vecPos, vNormal, 1);
|
||||
FX_Spark(vecPos, vNormal);
|
||||
pointparticles(PARTICLE_PIECES_BLACK, vecPos, vNormal, 1);
|
||||
break;
|
||||
case IMPACT_FLESH:
|
||||
pointparticles(PARTICLE_BLOOD, vecPos, vNormal, 1);
|
||||
FX_Blood(vecPos, vNormal);
|
||||
break;
|
||||
case IMPACT_DEFAULT:
|
||||
pointparticles(PARTICLE_SPARK, vecPos, vNormal, 1);
|
||||
FX_Spark(vecPos, vNormal);
|
||||
pointparticles(PARTICLE_PIECES_BLACK, vecPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_SMOKE_GREY, vecPos, vNormal, 1);
|
||||
break;
|
||||
|
|
|
@ -14,11 +14,14 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
var float PARTICLE_BLOOD;
|
||||
|
||||
void
|
||||
FX_Blood_Init(void)
|
||||
{
|
||||
precache_model("sprites/bloodspray.spr");
|
||||
precache_model("sprites/blood.spr");
|
||||
PARTICLE_BLOOD = particleeffectnum("part_blood");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -14,6 +14,12 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
var float DECAL_SHOT;
|
||||
var float DECAL_GLASS;
|
||||
var float PARTICLE_PIECES_BLACK;
|
||||
var float PARTICLE_SMOKE_BROWN;
|
||||
var float PARTICLE_SMOKE_GREY;
|
||||
|
||||
void
|
||||
FX_Impact_Init(void)
|
||||
{
|
||||
|
@ -22,6 +28,12 @@ FX_Impact_Init(void)
|
|||
precache_sound("weapons/ric3.wav");
|
||||
precache_sound("weapons/ric4.wav");
|
||||
precache_sound("weapons/ric5.wav");
|
||||
|
||||
DECAL_SHOT = particleeffectnum("decal_shot");
|
||||
DECAL_GLASS = particleeffectnum("decal_glass");
|
||||
PARTICLE_PIECES_BLACK = particleeffectnum("part_pieces_black");
|
||||
PARTICLE_SMOKE_GREY = particleeffectnum("part_smoke_grey");
|
||||
PARTICLE_SMOKE_BROWN = particleeffectnum("part_smoke_brown");
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -60,20 +72,19 @@ FX_Impact(int iType, vector vecPos, vector vNormal)
|
|||
pointparticles(PARTICLE_PIECES_BLACK, vecPos, vNormal, 1);
|
||||
break;
|
||||
case IMPACT_WOOD:
|
||||
pointparticles(PARTICLE_SPARK, vecPos, vNormal, 1);
|
||||
FX_Spark(vecPos, vNormal);
|
||||
pointparticles(PARTICLE_PIECES_BLACK, vecPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_SMOKE_BROWN, vecPos, vNormal, 1);
|
||||
break;
|
||||
case IMPACT_METAL:
|
||||
pointparticles(PARTICLE_SPARK, vecPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_SPARK, vecPos, vNormal, 1);
|
||||
FX_Spark(vecPos, vNormal);
|
||||
pointparticles(PARTICLE_PIECES_BLACK, vecPos, vNormal, 1);
|
||||
break;
|
||||
case IMPACT_FLESH:
|
||||
pointparticles(PARTICLE_BLOOD, vecPos, vNormal, 1);
|
||||
FX_Blood(vecPos, vNormal);
|
||||
break;
|
||||
case IMPACT_DEFAULT:
|
||||
pointparticles(PARTICLE_SPARK, vecPos, vNormal, 1);
|
||||
FX_Spark(vecPos, vNormal);
|
||||
pointparticles(PARTICLE_PIECES_BLACK, vecPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_SMOKE_GREY, vecPos, vNormal, 1);
|
||||
break;
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
var float PARTICLE_SPARK;
|
||||
|
||||
void
|
||||
FX_Spark_Init(void)
|
||||
{
|
||||
|
@ -23,6 +25,7 @@ FX_Spark_Init(void)
|
|||
precache_sound("buttons/spark4.wav");
|
||||
precache_sound("buttons/spark5.wav");
|
||||
precache_sound("buttons/spark6.wav");
|
||||
PARTICLE_SPARK = particleeffectnum("part_spark");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue