Tinkerton55 / SourceFOQ

Source engine modified for FOQ
1 stars 0 forks source link

Fix game crashing because of grenades #8

Closed Tinkerton55 closed 8 years ago

Tinkerton55 commented 8 years ago

When a grenade kills a player, sometimes the game will crash to desktop on impact for unknown reasons. Also when more than one grenadier is present, the game is much more prone to crashing (probably due to all the grenades being tossed around)

Set a max amount of grenades that can be out in the open per each grenadier, in order to reduce both gameplay chaos and crashes. Check weapon_frag and dependent files to see if any entity kills or removes were accidentally commented out. It's a mile-wide stretch, but the issue might be tied to detonation time being set to gpGlobals->curtime + 0.

Tinkerton55 commented 8 years ago

The game always crashes when the player is already dead. This most likely means that there is a GetEnemy() being used somewhere without the if ( GetEnemy() != NULL ) check.

Tinkerton55 commented 8 years ago

Reimplemented the grenadier enemy type in a cleaner way this time. Seems to have fixed the crashes.

Tinkerton55 commented 8 years ago

Tested with multiple other enemy types. The game doesn't crash upon death anymore.