Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qucheng committed Jan 23, 2018
1 parent bb3cd73 commit 2e24e8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rts/engine/game_action.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class RTSAction {
// Cannot give command to other units.
if (u->GetPlayerId() != _player_id) continue;
if (! env.GetGameDef().unit(u->GetUnitType()).CmdAllowed(it->second->type())) continue;
if (receiver.GetUnitDurativeCmd(u->GetId()) != nullptr) {
if (env.GetGameDef().IsUnitTypeBuilding(u->GetUnitType()) && receiver.GetUnitDurativeCmd(u->GetId()) != nullptr) {
std::cout << u->GetUnitType() << std::endl;
continue;
}
it->second->set_id(it->first);
Expand Down

0 comments on commit 2e24e8d

Please sign in to comment.