Skip to content

Commit 981a528

Browse files
committed
chore: Remove unnecessary retail-unfriendly implementation
1 parent 5639eff commit 981a528

File tree

3 files changed

+0
-44
lines changed

3 files changed

+0
-44
lines changed

GeneralsMD/Code/GameEngine/Include/Common/Player.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -643,15 +643,9 @@ class Player : public Snapshot
643643
// sets the currently selected group to be the given AIGroup
644644
void setCurrentlySelectedAIGroup(AIGroup *group);
645645

646-
// is object selected
647-
Bool isCurrentlySelected(Object* obj);
648-
649646
// adds the given AIGroup to the current selection of this player.
650647
void addAIGroupToCurrentSelection(AIGroup *group);
651648

652-
// adds an object to the player's specified hotkey team.
653-
void addObjectToSquad(Object* obj, Int squadNumber, Bool newSquad = false);
654-
655649
// return the requested hotkey squad
656650
Squad *getHotkeySquad(Int squadNumber);
657651

GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3768,14 +3768,6 @@ void Player::getCurrentSelectionAsAIGroup(AIGroup *group) {
37683768
}
37693769
}
37703770

3771-
Bool Player::isCurrentlySelected(Object* obj)
3772-
{
3773-
if (m_currentSelection == NULL || obj == NULL)
3774-
return false;
3775-
3776-
return m_currentSelection->isOnSquad(obj);
3777-
}
3778-
37793771
//-------------------------------------------------------------------------------------------------
37803772
/** Select a hotkey team based on this GameMessage */
37813773
//-------------------------------------------------------------------------------------------------
@@ -3791,24 +3783,6 @@ void Player::setCurrentlySelectedAIGroup(AIGroup *group) {
37913783
}
37923784
}
37933785

3794-
//-------------------------------------------------------------------------------------------------
3795-
/** Add an object to a squad */
3796-
//-------------------------------------------------------------------------------------------------
3797-
void Player::addObjectToSquad(Object* obj, Int squadNumber, Bool newSquad)
3798-
{
3799-
if (m_squads[squadNumber] == NULL)
3800-
return;
3801-
3802-
if (obj == NULL)
3803-
return;
3804-
3805-
if (newSquad)
3806-
m_squads[squadNumber]->clearSquad();
3807-
3808-
removeObjectFromHotkeySquad(obj);
3809-
m_squads[squadNumber]->addObject(obj);
3810-
}
3811-
38123786
//-------------------------------------------------------------------------------------------------
38133787
/** Select a hotkey team based on this GameMessage */
38143788
//-------------------------------------------------------------------------------------------------

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Upgrade/ReplaceObjectUpgrade.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,8 @@ void ReplaceObjectUpgrade::upgradeImplementation( )
8484
return;
8585
}
8686

87-
#if RETAIL_COMPATIBLE_CRC
8887
Drawable* selectedDrawable = TheInGameUI->getFirstSelectedDrawable();
8988
Bool oldObjectSelected = selectedDrawable && selectedDrawable->getID() == me->getDrawable()->getID();
90-
#else
91-
Bool oldObjectSelected = me->getControllingPlayer()->isCurrentlySelected(me);
92-
#endif
9389
Int oldObjectSquadNumber = me->getControllingPlayer()->getSquadNumberForObject(me);
9490

9591
// Remove us first since occupation of cells is apparently not a refcount, but a flag. If I don't remove, then the new
@@ -117,30 +113,22 @@ void ReplaceObjectUpgrade::upgradeImplementation( )
117113

118114
if (oldObjectSelected)
119115
{
120-
#if RETAIL_COMPATIBLE_CRC
121116
if (replacementObject->isLocallyControlled())
122117
{
123118
GameMessage* msg = TheMessageStream->appendMessage(GameMessage::MSG_CREATE_SELECTED_GROUP_NO_SOUND);
124119
msg->appendBooleanArgument(TRUE);
125120
msg->appendObjectIDArgument(replacementObject->getID());
126121
TheInGameUI->selectDrawable(replacementObject->getDrawable());
127122
}
128-
#else
129-
TheGameLogic->selectObject(replacementObject, TRUE, replacementObject->getControllingPlayer()->getPlayerMask(), replacementObject->isLocallyControlled());
130-
#endif
131123
}
132124

133125
if (oldObjectSquadNumber != NO_HOTKEY_SQUAD)
134126
{
135-
#if RETAIL_COMPATIBLE_CRC
136127
if (replacementObject->isLocallyControlled())
137128
{
138129
GameMessage* msg = TheMessageStream->appendMessage((GameMessage::Type)(GameMessage::MSG_CREATE_TEAM0 + oldObjectSquadNumber));
139130
msg->appendObjectIDArgument(replacementObject->getID());
140131
}
141-
#else
142-
replacementObject->getControllingPlayer()->addObjectToSquad(replacementObject, oldObjectSquadNumber, true);
143-
#endif
144132
}
145133
}
146134
}

0 commit comments

Comments
 (0)