Fix bug that would prevent IMDs with more than 256 points from being
properly flattened. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1549 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
e9cfca5bb2
commit
03c620620b
|
@ -255,9 +255,8 @@ static SDWORD tileZ = 8000;
|
||||||
static QUAD dragQuad;
|
static QUAD dragQuad;
|
||||||
//UDWORD averageHeight;
|
//UDWORD averageHeight;
|
||||||
|
|
||||||
// The maximum number of points for flattenImd
|
/* temporary buffer used for flattening IMDs */
|
||||||
#define MAX_FLATTEN_POINTS 255
|
static Vector3i alteredPoints[iV_IMD_MAX_POINTS];
|
||||||
static Vector3i alteredPoints[MAX_FLATTEN_POINTS];
|
|
||||||
|
|
||||||
//number of tiles visible
|
//number of tiles visible
|
||||||
UDWORD visibleXTiles;
|
UDWORD visibleXTiles;
|
||||||
|
@ -1996,7 +1995,6 @@ void renderStructure(STRUCTURE *psStructure)
|
||||||
iIMDShape *pRepImd;
|
iIMDShape *pRepImd;
|
||||||
REPAIR_FACILITY *psRepairFac = NULL;
|
REPAIR_FACILITY *psRepairFac = NULL;
|
||||||
BOOL defensive = FALSE;
|
BOOL defensive = FALSE;
|
||||||
SDWORD pointHeight,strHeight,shift;
|
|
||||||
|
|
||||||
if(psStructure->pStructureType->type == REF_WALL ||
|
if(psStructure->pStructureType->type == REF_WALL ||
|
||||||
psStructure->pStructureType->type == REF_WALLCORNER)
|
psStructure->pStructureType->type == REF_WALLCORNER)
|
||||||
|
@ -2054,6 +2052,8 @@ void renderStructure(STRUCTURE *psStructure)
|
||||||
imd = psStructure->sDisplay.imd;
|
imd = psStructure->sDisplay.imd;
|
||||||
if ( imd != NULL )
|
if ( imd != NULL )
|
||||||
{
|
{
|
||||||
|
SDWORD pointHeight, strHeight, shift;
|
||||||
|
|
||||||
// Get a copy of the points
|
// Get a copy of the points
|
||||||
memcpy( alteredPoints, imd->points, imd->npoints * sizeof(Vector3i) );
|
memcpy( alteredPoints, imd->points, imd->npoints * sizeof(Vector3i) );
|
||||||
|
|
||||||
|
@ -4227,9 +4227,7 @@ UDWORD i;
|
||||||
UDWORD pointHeight,centreHeight;
|
UDWORD pointHeight,centreHeight;
|
||||||
SDWORD shift;
|
SDWORD shift;
|
||||||
|
|
||||||
// CHECK WHETHER THE NUMBER OF POINTS IN THE IMD WILL FIT IN THE ARRAY
|
ASSERT( imd->npoints < iV_IMD_MAX_POINTS,
|
||||||
|
|
||||||
ASSERT( imd->npoints < MAX_FLATTEN_POINTS,
|
|
||||||
"flattenImd: too many points in the PIE to flatten it" );
|
"flattenImd: too many points in the PIE to flatten it" );
|
||||||
|
|
||||||
/* Get a copy of the points */
|
/* Get a copy of the points */
|
||||||
|
@ -4917,7 +4915,7 @@ UDWORD getRubbleTileNum( void )
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------
|
||||||
|
|
||||||
UDWORD lastSpinVal;
|
static UDWORD lastSpinVal;
|
||||||
|
|
||||||
static void testEffect2( UDWORD player )
|
static void testEffect2( UDWORD player )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue