mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
New ingame option: Smart tree tops.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8936 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -526,6 +526,8 @@ void PreventFromTheFreezingBug(SOLDIERTYPE* pSoldier)
|
||||
UIHandleLUIEndLock( NULL );
|
||||
}
|
||||
|
||||
INT32 gOldMapSpot = NOWHERE;
|
||||
|
||||
// MAIN TACTICAL UI HANDLER
|
||||
UINT32 HandleTacticalUI( void )
|
||||
{
|
||||
@@ -661,6 +663,13 @@ UINT32 HandleTacticalUI( void )
|
||||
|
||||
if ( GetMouseMapPos( &usMapPos ) )
|
||||
{
|
||||
// sevenfm: update trees
|
||||
if (usMapPos != gOldMapSpot)
|
||||
{
|
||||
gOldMapSpot = usMapPos;
|
||||
UpdateTreeVisibility();
|
||||
}
|
||||
|
||||
// Look for soldier full
|
||||
if ( FindSoldier( usMapPos, &gusUIFullTargetID, &guiUIFullTargetFlags, ( FINDSOLDIERSAMELEVEL( gsInterfaceLevel ) ) ) )
|
||||
{
|
||||
|
||||
@@ -2854,12 +2854,18 @@ BOOLEAN HandleAtNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving )
|
||||
// trversing...
|
||||
if ( gubWaitingForAllMercsToExitCode == WAIT_FOR_MERCS_TO_WALKOFF_SCREEN || gubWaitingForAllMercsToExitCode == WAIT_FOR_MERCS_TO_WALK_TO_GRIDNO )
|
||||
{
|
||||
// sevenfm: update tree visibility
|
||||
UpdateTreeVisibility();
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
// Check if they are out of breath
|
||||
if ( pSoldier->CheckForBreathCollapse( ) )
|
||||
{
|
||||
// sevenfm: update tree visibility
|
||||
UpdateTreeVisibility();
|
||||
|
||||
(*pfKeepMoving ) = TRUE;
|
||||
return( FALSE );
|
||||
}
|
||||
@@ -2867,6 +2873,9 @@ BOOLEAN HandleAtNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving )
|
||||
// see if a mine gets set off...
|
||||
if (SetOffBombsInGridNo( pSoldier->ubID, pSoldier->sGridNo, FALSE, pSoldier->pathing.bLevel ) )
|
||||
{
|
||||
// sevenfm: update tree visibility
|
||||
UpdateTreeVisibility();
|
||||
|
||||
(*pfKeepMoving) = FALSE;
|
||||
pSoldier->EVENT_StopMerc( pSoldier->sGridNo, pSoldier->ubDirection );
|
||||
return( FALSE );
|
||||
@@ -2897,6 +2906,9 @@ BOOLEAN HandleAtNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving )
|
||||
HandleSight(pSoldier,SIGHT_LOOK | SIGHT_RADIO | SIGHT_INTERRUPT);
|
||||
}
|
||||
|
||||
// sevenfm: update tree visibility
|
||||
UpdateTreeVisibility();
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - if pending interrupt flag was set for movement type of interupt, resolve it here
|
||||
if ( UsingImprovedInterruptSystem() )
|
||||
|
||||
@@ -7571,7 +7571,7 @@ void SOLDIERTYPE::ChangeSoldierStance( UINT8 ubDesiredStance )
|
||||
// Set desired stance
|
||||
this->ubDesiredHeight = ubDesiredStance;
|
||||
|
||||
this->EVENT_InitNewSoldierAnim(usNewState, 0, FALSE);
|
||||
this->EVENT_InitNewSoldierAnim(usNewState, 0, FALSE);
|
||||
}
|
||||
|
||||
this->usSoldierFlagMask |= SOLDIER_REDOFLASHLIGHT;
|
||||
|
||||
@@ -5091,6 +5091,7 @@ void ToggleTreeTops()
|
||||
if ( gGameSettings.fOptions[ TOPTION_TOGGLE_TREE_TOPS ] )
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, TacticalStr[ REMOVING_TREETOPS_STR ] );
|
||||
gGameSettings.fOptions[TOPTION_TOGGLE_TREE_TOPS] = FALSE;
|
||||
WorldHideTrees( );
|
||||
gTacticalStatus.uiFlags |= NOHIDE_REDUNDENCY;
|
||||
}
|
||||
@@ -5098,9 +5099,9 @@ void ToggleTreeTops()
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, TacticalStr[ SHOWING_TREETOPS_STR ]);
|
||||
WorldShowTrees( );
|
||||
gGameSettings.fOptions[TOPTION_TOGGLE_TREE_TOPS] = TRUE;
|
||||
gTacticalStatus.uiFlags &= (~NOHIDE_REDUNDENCY);
|
||||
}
|
||||
gGameSettings.fOptions[ TOPTION_TOGGLE_TREE_TOPS ] = !gGameSettings.fOptions[ TOPTION_TOGGLE_TREE_TOPS ];
|
||||
|
||||
// FOR THE NEXT RENDER LOOP, RE-EVALUATE REDUNDENT TILES
|
||||
InvalidateWorldRedundency( );
|
||||
|
||||
Reference in New Issue
Block a user