summaryrefslogtreecommitdiff
path: root/src/game/g_main.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-09-21 18:23:47 +0000
committerTim Angus <tim@ngus.net>2003-09-21 18:23:47 +0000
commit51f8195fe9846eaf3482da7ccce44064a7c2900a (patch)
tree62fa42690362537f3419753bf738765a12aaac80 /src/game/g_main.c
parent84e75ec07a5027e76726bc28073438d8c9a8d04a (diff)
* Fully generalised scriptable paricle system
* Changes to Makefile and depend file for above * Tweaks to entities.def * Apparently a bunch of other stuff I've forgotten about
Diffstat (limited to 'src/game/g_main.c')
-rw-r--r--src/game/g_main.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 4283b8eb..f74f7e7d 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -402,6 +402,34 @@ void G_UpdateCvars( void )
/*
+===============
+G_GenerateParticleFileList
+
+Make a list of particle files for each client to parse since fsr
+the client does not have trap_FS_GetFileList
+===============
+*/
+static void G_GenerateParticleFileList( void )
+{
+ int i, numFiles, fileLen;
+ char fileList[ MAX_PARTICLE_FILES ];
+ char fileName[ MAX_QPATH ];
+ char *filePtr;
+
+ numFiles = trap_FS_GetFileList( "scripts", ".particle", fileList, 1024 );
+ filePtr = fileList;
+
+ for( i = 0; i < numFiles; i++, filePtr += fileLen + 1 )
+ {
+ fileLen = strlen( filePtr );
+ strcpy( fileName, "scripts/" );
+ strcat( fileName, filePtr );
+ trap_SetConfigstring( CS_PARTICLE_FILES + i, fileName );
+ }
+}
+
+
+/*
============
G_InitGame
@@ -482,6 +510,7 @@ void G_InitGame( int levelTime, int randomSeed, int restart )
//TA:
G_InitDamageLocations( );
+ G_GenerateParticleFileList( );
//reset stages
trap_Cvar_Set( "g_alienStage", va( "%d", S1 ) );