summaryrefslogtreecommitdiff
path: root/src/cgame
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-12-11 01:29:18 +0000
committerTim Angus <tim@ngus.net>2003-12-11 01:29:18 +0000
commit111e880bee11be3687bf4a06ed5c768c98bbc1a6 (patch)
treece0551e9f436b333055b1e78ff9f2c898aa81ea6 /src/cgame
parentbd34e944e5c9835cc96c1b877dc0b30cfd19f32f (diff)
* Upped *.particle file size limit to 32kb
(never thought that would be an issue :) * Added "bounce cull" to particle syntax
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_local.h1
-rw-r--r--src/cgame/cg_particles.c20
-rw-r--r--src/cgame/cg_weapons.c2
3 files changed, 18 insertions, 5 deletions
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index 45b802f2..72ed253f 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -211,6 +211,7 @@ typedef struct baseParticle_s
float bounceFrac;
float bounceFracRandFrac;
+ qboolean bounceCull;
pLerpValues_t radius;
pLerpValues_t alpha;
diff --git a/src/cgame/cg_particles.c b/src/cgame/cg_particles.c
index 1e9ac1fe..a96ec8db 100644
--- a/src/cgame/cg_particles.c
+++ b/src/cgame/cg_particles.c
@@ -562,10 +562,20 @@ static qboolean CG_ParseParticle( baseParticle_t *bp, char **text_p )
if( !token )
break;
- CG_ParseValueAndVariance( token, &number, &randFrac );
+ if( !Q_stricmp( token, "cull" ) )
+ {
+ bp->bounceCull = qtrue;
+
+ bp->bounceFrac = -1.0f;
+ bp->bounceFracRandFrac = 0.0f;
+ }
+ else
+ {
+ CG_ParseValueAndVariance( token, &number, &randFrac );
- bp->bounceFrac = number;
- bp->bounceFracRandFrac = randFrac;
+ bp->bounceFrac = number;
+ bp->bounceFracRandFrac = randFrac;
+ }
continue;
}
@@ -1183,7 +1193,7 @@ static qboolean CG_ParseParticleFile( const char *fileName )
int i;
int len;
char *token;
- char text[ 20000 ];
+ char text[ 32000 ];
char psName[ MAX_QPATH ];
qboolean psNameSet = qfalse;
fileHandle_t f;
@@ -1704,7 +1714,7 @@ static void CG_EvaluateParticlePhysics( particle_t *p )
//remove particles that get into a CONTENTS_NODROP brush
if( ( trap_CM_PointContents( trace.endpos, 0 ) & CONTENTS_NODROP ) ||
- ( bp->cullOnStartSolid && trace.startsolid ) )
+ ( bp->cullOnStartSolid && trace.startsolid ) || bp->bounceCull )
{
if( cg_debugParticles.integer >= 1 )
CG_Printf( "Particle in CONTENTS_NODROP or trace.startsolid\n" );
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c
index 2b1edc06..4f5235b2 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -529,6 +529,8 @@ static qboolean CG_ParseWeaponModeSection( weaponInfoMode_t *wim, char **text_p
return qfalse;
}
+
+
/*
======================
CG_ParseWeaponFile