mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Merged from revision: 7676
Features (by anv) - new Ja2_Options.ini setting - HIDE_EXPLORED_ROOM_ROOF_STRUCTURES (e.g. sandbags) at ground level view - Hold CTRL hotkey in mapeditor to place any object on roof git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7677 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -121,7 +121,12 @@ void SetGridNoRevealedFlag( INT32 sGridNo )
|
||||
STRUCTURE *pStructure, *pBase;
|
||||
|
||||
// Set hidden flag, for any roofs
|
||||
SetRoofIndexFlagsFromTypeRange( sGridNo, FIRSTROOF, FOURTHROOF, LEVELNODE_HIDDEN );
|
||||
//SetRoofIndexFlagsFromTypeRange( sGridNo, FIRSTROOF, FOURTHROOF, LEVELNODE_HIDDEN );
|
||||
// anv: we possibly can put other things on roof
|
||||
SetRoofIndexFlagsFromTypeRange( sGridNo, FIRSTTEXTURE, FIRSTSWITCHES, LEVELNODE_HIDDEN );
|
||||
// anv: hide stuff on roof in explored rooms at ground level view (sandbags and other crap)
|
||||
if( gGameExternalOptions.fHideExploredRoomRoofStructures )
|
||||
SetOnRoofIndexFlagsFromTypeRange( sGridNo, FIRSTTEXTURE, FIRSTSWITCHES, LEVELNODE_HIDDEN );
|
||||
|
||||
// ATE: Do this only if we are in a room...
|
||||
if ( gusWorldRoomInfo[ sGridNo ] != NO_ROOM )
|
||||
@@ -280,7 +285,13 @@ void RemoveRoomRoof( INT32 sGridNo, UINT16 usRoomNum, SOLDIERTYPE *pSoldier )
|
||||
|
||||
SetGridNoRevealedFlag( cnt );//dnl ch56 141009
|
||||
|
||||
RemoveRoofIndexFlagsFromTypeRange( cnt, FIRSTROOF, SECONDSLANTROOF, LEVELNODE_REVEAL );
|
||||
//RemoveRoofIndexFlagsFromTypeRange( cnt, FIRSTROOF, SECONDSLANTROOF, LEVELNODE_REVEAL );
|
||||
// anv: we possibly can put other things on roof
|
||||
RemoveRoofIndexFlagsFromTypeRange( cnt, FIRSTTEXTURE, FIRSTSWITCHES, LEVELNODE_REVEAL );
|
||||
// anv: hide stuff on roof in explored rooms at ground level view (sandbags and other crap)
|
||||
if( gGameExternalOptions.fHideExploredRoomRoofStructures )
|
||||
RemoveOnRoofIndexFlagsFromTypeRange( cnt, FIRSTTEXTURE, FIRSTSWITCHES, LEVELNODE_REVEAL );
|
||||
//RemoveAllOnRoofsOfTypeRange( cnt, FIRSTTEXTURE, FIRSTSWITCHES );
|
||||
|
||||
// Reveal any items if here!
|
||||
if ( GetItemPoolFromGround( cnt, &pItemPool ) )
|
||||
|
||||
@@ -1844,7 +1844,11 @@ void RenderTiles(UINT32 uiFlags, INT32 iStartPointX_M, INT32 iStartPointY_M, INT
|
||||
if ( TileElem != NULL )
|
||||
{
|
||||
// If we are a roof and have SHOW_ALL_ROOFS on, turn off hidden tile check!
|
||||
if ( ( TileElem->uiFlags & ROOF_TILE ) && ( gTacticalStatus.uiFlags&SHOW_ALL_ROOFS ) )
|
||||
//if ( ( TileElem->uiFlags & ROOF_TILE ) && ( gTacticalStatus.uiFlags&SHOW_ALL_ROOFS ) )
|
||||
// anv: commented out TileElem->uiFlags & ROOF_TILE because:
|
||||
// 1. only roof tiles get hidden in this manner anyway
|
||||
// 2. we might want to his and reveal again other stuff (most importantly - on roof structures)
|
||||
if ( ( gTacticalStatus.uiFlags&SHOW_ALL_ROOFS ) )
|
||||
{
|
||||
// Turn off
|
||||
fHiddenTile = FALSE;
|
||||
|
||||
+16
-1
@@ -2022,20 +2022,35 @@ BOOLEAN HideStructOfGivenType(INT32 iMapIndex, UINT32 fType, BOOLEAN fHide)//dnl
|
||||
{
|
||||
if(fHide)
|
||||
{
|
||||
/*
|
||||
if(fType >= FIRSTONROOF && fType <= LASTONROOF)
|
||||
SetOnRoofIndexFlagsFromTypeRange(iMapIndex, fType, fType, LEVELNODE_HIDDEN);
|
||||
else
|
||||
SetRoofIndexFlagsFromTypeRange(iMapIndex, fType, fType, LEVELNODE_HIDDEN);
|
||||
*/
|
||||
|
||||
// Buggler: set all tiles to their proper roof index flags
|
||||
if(fType >= FIRSTROOF && fType <= SECONDSLANTROOF)
|
||||
SetRoofIndexFlagsFromTypeRange(iMapIndex, fType, fType, LEVELNODE_HIDDEN);
|
||||
else
|
||||
SetOnRoofIndexFlagsFromTypeRange(iMapIndex, fType, fType, LEVELNODE_HIDDEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ONLY UNHIDE IF NOT REAVEALED ALREADY
|
||||
// ONLY UNHIDE IF NOT REVEALED ALREADY
|
||||
if(!(gpWorldLevelData[iMapIndex].uiFlags & MAPELEMENT_REVEALED))
|
||||
{
|
||||
/*
|
||||
if(fType >= FIRSTONROOF && fType <= LASTONROOF)
|
||||
RemoveOnRoofIndexFlagsFromTypeRange(iMapIndex, fType, fType, LEVELNODE_HIDDEN);
|
||||
else
|
||||
RemoveRoofIndexFlagsFromTypeRange(iMapIndex, fType, fType, LEVELNODE_HIDDEN);
|
||||
*/
|
||||
|
||||
if(fType >= FIRSTROOF && fType <= SECONDSLANTROOF)
|
||||
RemoveRoofIndexFlagsFromTypeRange(iMapIndex, fType, fType, LEVELNODE_HIDDEN);
|
||||
else
|
||||
RemoveOnRoofIndexFlagsFromTypeRange(iMapIndex, fType, fType, LEVELNODE_HIDDEN);
|
||||
}
|
||||
}
|
||||
return(TRUE);
|
||||
|
||||
Reference in New Issue
Block a user