From 2e24e8d8be268f9dc84b6c3c0dd98ef54db70caf Mon Sep 17 00:00:00 2001 From: Qucheng Gong Date: Tue, 23 Jan 2018 11:04:33 -0800 Subject: [PATCH] fix --- rts/engine/game_action.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rts/engine/game_action.h b/rts/engine/game_action.h index 37dfc09a..c8340e07 100644 --- a/rts/engine/game_action.h +++ b/rts/engine/game_action.h @@ -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);