Skip to content

Commit 9afdb04

Browse files
committed
tweak(client): Increase opacity of build preview objects from 0.45 to 0.60
1 parent 0ae1563 commit 9afdb04

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,17 @@
9191

9292

9393
// ------------------------------------------------------------------------------------------------
94-
static const Real placementOpacity = 0.45f;
95-
static const RGBColor illegalBuildColor = { 1.0, 0.0, 0.0 };
94+
95+
// TheSuperHackers @info Note that the placement objects no longer draw shadows after a bug was
96+
// fixed in the drawable. If you want shadows, add it here, but beware that shadows on translucent
97+
// models may look a bit odd.
98+
static const UnsignedInt PlacementDrawableStatus = DRAWABLE_STATUS_NO_STATE_PARTICLES;
99+
100+
// TheSuperHackers @tweak Changes the placement object opacity from 0.45 to increase its visibility
101+
// because they no longer cast dark shadows and are less visible that way.
102+
static const Real PlacementOpacity = 0.60f;
103+
104+
static const RGBColor IllegalBuildColor = { 1.0, 0.0, 0.0 };
96105

97106
//-------------------------------------------------------------------------------------------------
98107
/// The InGameUI singleton instance.
@@ -1523,8 +1532,9 @@ void InGameUI::handleBuildPlacements( void )
15231532
BuildAssistant::IGNORE_STEALTHED,
15241533
builderObject,
15251534
NULL );
1535+
15261536
if( lbc != LBC_OK )
1527-
m_placeIcon[ 0 ]->colorTint( &illegalBuildColor );
1537+
m_placeIcon[ 0 ]->colorTint( &IllegalBuildColor );
15281538
else
15291539
m_placeIcon[ 0 ]->colorTint( NULL );
15301540

@@ -1585,7 +1595,7 @@ void InGameUI::handleBuildPlacements( void )
15851595

15861596
if( m_placeIcon[ i ] == NULL )
15871597
m_placeIcon[ i ] = TheThingFactory->newDrawable( m_pendingPlaceType,
1588-
DRAWABLE_STATUS_NO_STATE_PARTICLES );
1598+
PlacementDrawableStatus );
15891599

15901600
}
15911601

@@ -1613,7 +1623,7 @@ void InGameUI::handleBuildPlacements( void )
16131623
m_placeIcon[ i ]->setPosition( &tileBuildInfo->positions[ i ] );
16141624

16151625
// set opacity for the drawble
1616-
m_placeIcon[ i ]->setDrawableOpacity( placementOpacity );
1626+
m_placeIcon[ i ]->setDrawableOpacity( PlacementOpacity );
16171627

16181628
// set the drawable angle
16191629
m_placeIcon[ i ]->setOrientation( angle );
@@ -3111,7 +3121,7 @@ void InGameUI::placeBuildAvailable( const ThingTemplate *build, Drawable *buildD
31113121
// TheInGameUI->deselectAllDrawables();
31123122

31133123
// create a drawble of what we are building to be "attached" at the cursor
3114-
draw = TheThingFactory->newDrawable( build, DRAWABLE_STATUS_NO_STATE_PARTICLES );
3124+
draw = TheThingFactory->newDrawable( build, PlacementDrawableStatus );
31153125
if (sourceObject)
31163126
{
31173127
if (TheGlobalData->m_timeOfDay == TIME_OF_DAY_NIGHT)
@@ -3136,7 +3146,7 @@ void InGameUI::placeBuildAvailable( const ThingTemplate *build, Drawable *buildD
31363146
draw->setOrientation( angle );
31373147

31383148
// set the build icon attached to the cursor to be "see-thru"
3139-
draw->setDrawableOpacity( placementOpacity );
3149+
draw->setDrawableOpacity( PlacementOpacity );
31403150

31413151
// set the "icon" in the icon array at the first index
31423152
DEBUG_ASSERTCRASH( m_placeIcon[ 0 ] == NULL, ("placeBuildAvailable, build icon array is not empty!") );

0 commit comments

Comments
 (0)