Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ Bool InGameUI::removeSuperweapon(Int playerIndex, const AsciiString& powerName,
SuperweaponInfo *info = *listIt;
swList.erase(listIt);
deleteInstance(info);
if (swList.empty())
if (swList.empty())
{
m_superweapons[playerIndex].erase(mapIt);
}
Expand Down Expand Up @@ -1562,6 +1562,14 @@ void InGameUI::handleBuildPlacements( void )
v.y = worldEnd.y - worldStart.y;
angle = v.toAngle();

// Use force attack mode to control snapping for convenience
if (isInForceAttackMode())
{
// TheSuperHackers @tweak Stubbjax 04/08/2025 Snap angle to nearest 45 degrees (pi/4 radians)
const Real snapRadians = PI / 4.0f;
angle = floor((angle / snapRadians) + 0.5f) * snapRadians;
}

}

}
Expand Down Expand Up @@ -4746,7 +4754,7 @@ Bool InGameUI::canSelectedObjectsDoSpecialPower( const CommandButton *command, c
if (ignoreSelDraw)
tmpList.push_back(ignoreSelDraw);

const DrawableList* selected = (!tmpList.empty()) ? &tmpList : TheInGameUI->getAllSelectedDrawables();
const DrawableList* selected = (!tmpList.empty()) ? &tmpList : TheInGameUI->getAllSelectedDrawables();

// set up counters for rule checking
Int count = 0;
Expand Down Expand Up @@ -5009,7 +5017,7 @@ Int InGameUI::selectMatchingAcrossRegion( IRegion2D *region )
}
}

if (drawableList.empty())
if (drawableList.empty())
return -1; // nothing useful selected to begin with - don't bother iterating

std::set<const ThingTemplate*>::iterator iter;
Expand Down Expand Up @@ -6337,3 +6345,4 @@ void InGameUI::drawGameTime()
m_gameTimeFrameString->draw(horizontalFrameOffset, m_gameTimePosition.y, GameMakeColor(180,180,180,255), m_gameTimeDropColor);
}


Loading