mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- New feature: sector fortification allows to construct structures in sectors in a much easier way than by using amerc to build 'by hand'. Fortification nodes are in a subfolder in Profiles and can easily be altered and exchanged, even in an ongoing game.
Fully savegame compatible. GameDir >= r2296 is recommended, but not required. - Cleaned up cover display functions. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8094 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -5851,7 +5851,7 @@ gridnoarmourvector GetArmourSharedRoofNetwork( gridnoarmourvector& arNetwork )
|
||||
|
||||
|
||||
// handle destroying if a single roof tile
|
||||
void RoofDestruction( INT32 sGridNo )
|
||||
void RoofDestruction( INT32 sGridNo, BOOLEAN fWithExplosion )
|
||||
{
|
||||
SOLDIERTYPE* pSoldier = NULL;
|
||||
|
||||
@@ -5953,11 +5953,14 @@ void RoofDestruction( INT32 sGridNo )
|
||||
ApplyMapChangesToMapTempFile( TRUE );
|
||||
|
||||
// play an animation of falling roof tiles
|
||||
// if we merely collected the tiles that collapse and then call them all together, it would be possible to have animations for multi-tile collapses
|
||||
static UINT16 usRoofCollapseExplosionIndex = 1727;
|
||||
if ( HasItemFlag( usRoofCollapseExplosionIndex, ROOF_COLLAPSE_ITEM ) || GetFirstItemWithFlag( &usRoofCollapseExplosionIndex, ROOF_COLLAPSE_ITEM ) )
|
||||
if ( fWithExplosion )
|
||||
{
|
||||
InternalIgniteExplosion( NOBODY, CenterX( sGridNo ), CenterY( sGridNo ), 0, sGridNo, usRoofCollapseExplosionIndex, FALSE, 0 );
|
||||
// if we merely collected the tiles that collapse and then call them all together, it would be possible to have animations for multi-tile collapses
|
||||
static UINT16 usRoofCollapseExplosionIndex = 1727;
|
||||
if ( HasItemFlag( usRoofCollapseExplosionIndex, ROOF_COLLAPSE_ITEM ) || GetFirstItemWithFlag( &usRoofCollapseExplosionIndex, ROOF_COLLAPSE_ITEM ) )
|
||||
{
|
||||
InternalIgniteExplosion( NOBODY, CenterX( sGridNo ), CenterY( sGridNo ), 0, sGridNo, usRoofCollapseExplosionIndex, FALSE, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
RemoveAllRoofsOfTypeRangeAdjustSaveFile( sGridNo, FIRSTTEXTURE, WIREFRAMES );
|
||||
|
||||
@@ -177,6 +177,7 @@ BOOLEAN FindBinderAttachment (OBJECTTYPE * pObj);
|
||||
BOOLEAN CheckExplosiveTypeAsDetonator(UINT16 ubType);
|
||||
|
||||
// Flugente: destroy rooftops
|
||||
void RoofDestruction( INT32 sGridNo, BOOLEAN fWithExplosion = TRUE );
|
||||
void HandleRoofDestruction( INT32 sGridNo, INT16 sDamage );
|
||||
|
||||
#endif
|
||||
|
||||
+15
-21
@@ -842,18 +842,15 @@ void DeallocateTileDatabase( )
|
||||
|
||||
BOOLEAN GetLandHeadType( INT32 iMapIndex, UINT32 *puiType )
|
||||
{
|
||||
UINT16 usIndex;
|
||||
Assert( puiType != NULL );
|
||||
|
||||
Assert( puiType != NULL );
|
||||
CHECKF( gpWorldLevelData[ iMapIndex ].pLandHead != NULL );
|
||||
|
||||
CHECKF( gpWorldLevelData[ iMapIndex ].pLandHead != NULL );
|
||||
UINT16 usIndex = gpWorldLevelData[iMapIndex].pLandHead->usIndex;
|
||||
|
||||
usIndex = gpWorldLevelData[ iMapIndex ].pLandHead->usIndex;
|
||||
|
||||
GetTileType( usIndex, puiType );
|
||||
|
||||
return( TRUE );
|
||||
GetTileType( usIndex, puiType );
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
BOOLEAN SetLandIndex( INT32 iMapIndex, UINT16 usIndex, UINT32 uiNewType, BOOLEAN fDelete )
|
||||
@@ -869,21 +866,19 @@ BOOLEAN SetLandIndex( INT32 iMapIndex, UINT16 usIndex, UINT32 uiNewType, BOOLEAN
|
||||
|
||||
if ( AnyHeigherLand( iMapIndex, uiNewType, &ubLastHighLevel ) )
|
||||
{
|
||||
// Check if type exists and get it's index if so
|
||||
if ( TypeExistsInLandLayer( iMapIndex, uiNewType, &usTempIndex ) )
|
||||
{
|
||||
// Replace with new index
|
||||
return( ReplaceLandIndex( iMapIndex, usTempIndex, usIndex ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( InsertLandIndexAtLevel( iMapIndex, usIndex, (UINT8)(ubLastHighLevel+1) ) );
|
||||
}
|
||||
|
||||
// Check if type exists and get it's index if so
|
||||
if ( TypeExistsInLandLayer( iMapIndex, uiNewType, &usTempIndex ) )
|
||||
{
|
||||
// Replace with new index
|
||||
return( ReplaceLandIndex( iMapIndex, usTempIndex, usIndex ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( InsertLandIndexAtLevel( iMapIndex, usIndex, (UINT8)(ubLastHighLevel+1) ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// Check if type exists and get it's index if so
|
||||
if ( TypeExistsInLandLayer( iMapIndex, uiNewType, &usTempIndex ) )
|
||||
{
|
||||
@@ -896,7 +891,6 @@ BOOLEAN SetLandIndex( INT32 iMapIndex, UINT16 usIndex, UINT32 uiNewType, BOOLEAN
|
||||
return( AddLandToHead( iMapIndex, usIndex ) );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user