NSD Login
Forums
Statistics
- Users
- 3512
- Articles
- 156
- Articles View Hits
- 1567142
bool ProcessMouseRightButtonPressOnSelectedUnit(int x, int y, bool bReleased)
{
if (theUnits.selectedUnit < 0) { return false; }
const auto selectedUnit = theUnits.unitList[theUnits.selectedUnit];
if (selectedUnit == nullptr) { return false; }
if (PRTerrain == nullptr) { return false; }
bool ret = false;
if (selectedUnit != nullptr) {
ret = true;
std::uint64_t o = UINT64_C(0);
if (selectedUnit->flagHitTest(x, y, &o)) {
if (bReleased) {
if (localPlayerOOBLink.side != 0 && selectedUnit->OOBLink.side == localPlayerOOBLink.side) {
SComm comm;
if (bCampaignMode) {
comm.Type = eComLoadLayout;
strcpy_s(comm.Param1, "SBCOob");
}
else {
// BUG...
if (selectedUnit->MyGuys()) {
if (optHideMenus.Value == false) {
comm.Type = eComLoadMenu;
comm.Val = selectedUnit->Marching() ? MENU_MARCH : (selectedUnit->HasTarget() ? MENU_TARGETS : MENU_STAND);
}
}
return true;
// ...BUG
}
theApp.AddComm(&comm, 1);
}
}
}
}
return ret;
}
...
else { // !bCampaignMode
if (selectedUnit->MyGuys() && optHideMenus.Value == false) {
comm.Type = eComLoadMenu;
comm.Val = selectedUnit->Marching() ? MENU_MARCH : (selectedUnit->HasTarget() ? MENU_TARGETS : MENU_STAND);
}
else { return false; }
}
theApp.AddComm(&comm, 1);
...
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.