Skip to content

Commit 6796bd9

Browse files
committed
Fix RepeatLastX commands to check ActLike instead of house ID
1 parent 3138b8c commit 6796bd9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/extensions/command/commandext.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ bool RepeatLastBuildingCommandClass::Process()
511511
/**
512512
* Do an extra check to make sure we can produce this item.
513513
*/
514-
if (((1 << PlayerPtr->ID) & buildingtype->Ownable) == 0) {
514+
if (((1 << PlayerPtr->ActLike) & buildingtype->Ownable) == 0) {
515515
return false;
516516
}
517517

@@ -588,7 +588,7 @@ bool RepeatLastInfantryCommandClass::Process()
588588
/**
589589
* Do an extra check to make sure we can produce this item.
590590
*/
591-
if (((1 << PlayerPtr->ID) & infantrytype->Ownable) == 0) {
591+
if (((1 << PlayerPtr->ActLike) & infantrytype->Ownable) == 0) {
592592
return false;
593593
}
594594

@@ -665,7 +665,7 @@ bool RepeatLastUnitCommandClass::Process()
665665
/**
666666
* Do an extra check to make sure we can produce this item.
667667
*/
668-
if (((1 << PlayerPtr->ID) & unittype->Ownable) == 0) {
668+
if (((1 << PlayerPtr->ActLike) & unittype->Ownable) == 0) {
669669
return false;
670670
}
671671

@@ -742,7 +742,7 @@ bool RepeatLastAircraftCommandClass::Process()
742742
/**
743743
* Do an extra check to make sure we can produce this item.
744744
*/
745-
if (((1 << PlayerPtr->ID) & aircrafttype->Ownable) == 0) {
745+
if (((1 << PlayerPtr->ActLike) & aircrafttype->Ownable) == 0) {
746746
return false;
747747
}
748748

0 commit comments

Comments
 (0)