------------------------------
THEORY PART
------------------------------
Every time you or NPC fire a weapon it creates new entity. Due to 32bit engine limitations there can be only X(idk exact number) amount of projectiles on the screen .
If there is X+n entities on the screen game will crash !
G_spawn no free entities
How to fix this ?
One way is to Increase the projectile speed (so entities can be destroyed faster)
Reduce the burst size or burst spacing ( keep it less then 9000 ? )
Reduce weapon range ( if missiles are slow aka matrix mode , ignore this ? )
Write 64bit engine port ?
Where do i change projectile speed ?
Look in file g_weapon.cpp for your weapon projectile velocity
Example for BLASTER
#define BLASTER_VELOCITY 7000
------------------------------
PRACTICAL PART
------------------------------
In file NPC_combat.cpp find and edit these lines
Example 1.
Increasing the number of bolts per burst from 3 to 5
NPC->burstMin = bigger the value , longer the burst
case WP_BLASTER:
if ( ent->NPC->scriptFlags & SCF_ALT_FIRE )
{
ent->NPC->aiFlags |= NPCAI_BURST_WEAPON;
ent->NPC->burstMin = 5;
ent->NPC->burstMean = 5;
ent->NPC->burstMax = 5;
if ( g_spskill->integer == 0 )
ent->NPC->burstSpacing = 250;//attack debounce
else if ( g_spskill->integer == 1 )
ent->NPC->burstSpacing = 250;//attack debounce
else
ent->NPC->burstSpacing = 250;//attack debounce
}
Example 2.
And another example is pistol:
NPC->burstSpacing = some low value
case WP_BLASTER_PISTOL:
ent->NPC->aiFlags &= ~NPCAI_BURST_WEAPON;
// ent->NPC->burstSpacing = 1000;//attackdebounce
if ( g_spskill->integer == 0 )
ent->NPC->burstSpacing = 70;//attack debounce
else if ( g_spskill->integer == 1 )
ent->NPC->burstSpacing = 55;//attack debounce
else
ent->NPC->burstSpacing = 50;//attack debounce
break;