Skip to content

Commit 716f94a

Browse files
committed
Update object.cpp
1 parent 2386925 commit 716f94a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/game/logic/object/object.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4203,11 +4203,13 @@ void Object::Do_Command_Button(const CommandButton *button, CommandSourceType ty
42034203
const UpgradeTemplate *upgrade = button->Get_Upgrade_Template();
42044204
captainslog_dbgassert(upgrade != nullptr, "Undefined upgrade '%s' in player upgrade command", "UNKNOWN");
42054205

4206-
if (upgrade != nullptr
4207-
&& upgrade->Get_Type() == UPGRADE_TYPE_OBJECT
4208-
&& (Has_Upgrade(upgrade) || !Affected_By_Upgrade(upgrade))) {
4206+
if (upgrade == nullptr) {
42094207
break;
4208+
}
42104209

4210+
if (upgrade->Get_Type() == UPGRADE_TYPE_OBJECT
4211+
&& (Has_Upgrade(upgrade) || !Affected_By_Upgrade(upgrade))) {
4212+
break;
42114213
}
42124214

42134215
ProductionUpdateInterface *production = Get_Production_Update_Interface();

0 commit comments

Comments
 (0)