Ensure that lander explosion element gets allocated; bug #584
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3192 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
Changes towards version 0.7:
|
Changes towards version 0.7:
|
||||||
|
- Lander will no longer hang when killed on planets with a lot of
|
||||||
|
natural disasters (bug #584) - Alex
|
||||||
- Canceling load from the main menu returns to main menu (bug #679) - Alex
|
- Canceling load from the main menu returns to main menu (bug #679) - Alex
|
||||||
- Fixed inputting numbers with the numpad, except directx (bug #934) - Alex
|
- Fixed inputting numbers with the numpad, except directx (bug #934) - Alex
|
||||||
- Better location description in savegame summaries (bug #844) - Alex
|
- Better location description in savegame summaries (bug #844) - Alex
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
#include "element.h"
|
#include "element.h"
|
||||||
#include "libs/graphics/gfx_common.h"
|
#include "libs/graphics/gfx_common.h"
|
||||||
#include "libs/mathlib.h"
|
#include "libs/mathlib.h"
|
||||||
|
#include "libs/log.h"
|
||||||
|
|
||||||
|
|
||||||
//define SPIN_ON_LAUNCH to let the planet spin while
|
//define SPIN_ON_LAUNCH to let the planet spin while
|
||||||
@@ -1660,12 +1661,14 @@ SetVelocityComponents (
|
|||||||
{
|
{
|
||||||
HELEMENT hExplosionElement;
|
HELEMENT hExplosionElement;
|
||||||
|
|
||||||
++pMS->CurState;
|
|
||||||
hExplosionElement = AllocElement ();
|
hExplosionElement = AllocElement ();
|
||||||
if (hExplosionElement)
|
if (hExplosionElement)
|
||||||
{
|
{
|
||||||
ELEMENT *ExplosionElementPtr;
|
ELEMENT *ExplosionElementPtr;
|
||||||
|
|
||||||
|
// Advance the state only once we've got the element
|
||||||
|
++pMS->CurState;
|
||||||
|
|
||||||
LockElement (hExplosionElement, &ExplosionElementPtr);
|
LockElement (hExplosionElement, &ExplosionElementPtr);
|
||||||
|
|
||||||
ExplosionElementPtr->mass_points = DEATH_EXPLOSION;
|
ExplosionElementPtr->mass_points = DEATH_EXPLOSION;
|
||||||
@@ -1692,6 +1695,12 @@ SetVelocityComponents (
|
|||||||
LanderSounds, LANDER_DESTROYED
|
LanderSounds, LANDER_DESTROYED
|
||||||
), NotPositional (), NULL, GAME_SOUND_PRIORITY + 1);
|
), NotPositional (), NULL, GAME_SOUND_PRIORITY + 1);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{ // We could not allocate because the queue was full, but
|
||||||
|
// we will get another chance on the next iteration
|
||||||
|
log_add (log_Warning, "DoPlanetSide(): could not"
|
||||||
|
" allocate explosion element!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollPlanetSide (0, 0, -1);
|
ScrollPlanetSide (0, 0, -1);
|
||||||
|
|||||||
Reference in New Issue
Block a user