Fix crash in pie_Draw3DShape2() when starting skirmish twice without quitting.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2096 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
2bb8afe647
commit
175b7cf4d6
|
@ -111,6 +111,10 @@
|
|||
|
||||
#include "cmddroid.h"
|
||||
|
||||
// HACK to be able to use static shadows for walls
|
||||
// We just store a separate IMD for each direction
|
||||
static iIMDShape otherDirections[3];
|
||||
static BOOL directionSet[3] = {FALSE, FALSE, FALSE};
|
||||
|
||||
// Extremely magic!
|
||||
#define WATER_TILE 17 // ID of water tile.
|
||||
|
@ -966,6 +970,8 @@ BOOL init3DView(void)
|
|||
|
||||
targetInitialise();
|
||||
|
||||
memset(directionSet, FALSE, sizeof(directionSet));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -2419,13 +2425,8 @@ static BOOL renderWallSection(STRUCTURE *psStructure)
|
|||
UDWORD i;
|
||||
Vector3f *temp;
|
||||
UDWORD buildingBrightness, specular;
|
||||
// HACK to be able to use static shadows for walls
|
||||
// We just store a separate IMD for each direction
|
||||
static iIMDShape otherDirections[3];
|
||||
static BOOL directionSet[3] = {FALSE, FALSE, FALSE};
|
||||
iIMDShape *originalDirection = NULL;
|
||||
|
||||
|
||||
if(psStructure->visible[selectedPlayer] || godMode || demoGetStatus())
|
||||
{
|
||||
psStructure->sDisplay.frameNumber = currentGameFrame;
|
||||
|
|
Loading…
Reference in New Issue