Jump to content

Expanding FX buffer SP game


Recommended Posts

Posted

I have a little question. There is some way for expand the FX (special effect ) buffer of the number of visual effect played by NPCs and by clients? 

because after i added the new force power i get some trouble to displaying effect of weapons if i put command "give all"

it's also true that with force lightning power i added a large amount of custom force lightning effect for each classes of the game.

 

the problem is this:

i load a map. i get the give all command to player.

weapons are shooting and they display their effect and sound and all is fine.

but if i add to player more of seven shooting weapons, the new weapons projectiles are invisibiles. Damage is okay however. so is a problem of overflow of buffer effect. there is some way to expand it?

on q_shared i found there are the lines MAX_FX and MAX_WORLD_FX.

 

#define    MAX_MODELS            256
#define    MAX_SOUNDS            380

#define MAX_SUB_BSP            32

#define    MAX_SUBMODELS        512        // nine bits

#define MAX_FX                128//128
#define MAX_WORLD_FX        66//66        // was 16 // was 4

 

 

 

 

 


on cg_main.cpp i found also this:

 

 

static void CG_RegisterEffects( void )
{
    char    *effectName;
    int        i, numFailed=0;

    // Register external effects
    for ( i = 1 ; i < MAX_FX ; i++ )
    {
        effectName = ( char *)CG_ConfigString( CS_EFFECTS + i );

        if ( !effectName[0] )
        {
            break;
        }

        if (!theFxScheduler.RegisterEffect( (const char*)effectName ))
        {
            //assert(0);
            numFailed++;
        }
    }
    if (numFailed && g_delayedShutdown->integer)
    {
        //assert(0);
        //CG_Error( "CG_RegisterEffects: %i Effects failed to load.  Please fix, or ask Aurelio.", numFailed );
    }

    // Start world effects
    for ( i = 1 ; i < MAX_WORLD_FX ; i++ )
    {
        effectName = ( char *)CG_ConfigString( CS_WORLD_FX + i );

        if ( !effectName[0] )
        {
            break;
        }

        cgi_R_WorldEffectCommand( effectName );
    }

    // Set up the glass effects mini-system.
    CG_InitGlass();

    //footstep effects
    cgs.effects.footstepMud = theFxScheduler.RegisterEffect( "materials/mud" );
    cgs.effects.footstepSand = theFxScheduler.RegisterEffect( "materials/sand" );
    cgs.effects.footstepSnow = theFxScheduler.RegisterEffect( "materials/snow" );
    cgs.effects.footstepGravel = theFxScheduler.RegisterEffect( "materials/gravel" );
    //landing effects
    cgs.effects.landingMud = theFxScheduler.RegisterEffect( "materials/mud_large" );
    cgs.effects.landingSand = theFxScheduler.RegisterEffect( "materials/sand_large" );
    cgs.effects.landingDirt = theFxScheduler.RegisterEffect( "materials/dirt_large" );
    cgs.effects.landingSnow = theFxScheduler.RegisterEffect( "materials/snow_large" );
    cgs.effects.landingGravel = theFxScheduler.RegisterEffect( "materials/gravel_large" );
    //splashes
    if ( (gi.totalMapContents()&CONTENTS_WATER) )
    {
        theFxScheduler.RegisterEffect( "env/water_impact" );
        theFxScheduler.RegisterEffect( "misc/waterbreath" );
    }
    if ( (gi.totalMapContents()&CONTENTS_LAVA) )
    {
        theFxScheduler.RegisterEffect( "env/lava_splash" );
    }
    if ( (gi.totalMapContents()&CONTENTS_SLIME) )
    {
        theFxScheduler.RegisterEffect( "env/acid_splash" );
    }
    theFxScheduler.RegisterEffect( "misc/breath" );
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...