fix: checkCommand + TODO
This commit is contained in:
parent
0b1dcc70f5
commit
37b6fbb12e
|
@ -972,7 +972,7 @@ void Gui::computeDisplay(){
|
|||
auto mct = u->getCurrMorphCt();
|
||||
if(mct && isKeyDown(queueCommandKey)) {//Morph Queue
|
||||
ut=mct->getMorphUnit();
|
||||
}
|
||||
}//TODO subscribe on queueCommandKey presed => resetState() and may remove stop cmd
|
||||
|
||||
int morphPos= 8;
|
||||
for(int i= 0; i < ut->getCommandTypeCount(); ++i){
|
||||
|
|
|
@ -3829,13 +3829,14 @@ std::pair<CommandResult,string> Unit::checkCommand(Command *command) const {
|
|||
(ignoreCheckCommand == false && this->getFaction()->reqsOk(command->getCommandType()) == false)) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugLUA).enabled) SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d] isOperative() = %d, command->getUnit() = %p, getType()->hasCommandType(command->getCommandType()) = %d, this->getFaction()->reqsOk(command->getCommandType()) = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__, __LINE__,isOperative(),command->getUnit(),getType()->hasCommandType(command->getCommandType()),this->getFaction()->reqsOk(command->getCommandType()));
|
||||
|
||||
auto mct = getCurrMorphCt();
|
||||
// Allow self healing if able to heal own unit type
|
||||
if( command->getUnit() == this &&
|
||||
command->getCommandType()->getClass() == ccRepair &&
|
||||
this->getType()->getFirstRepairCommand(this->getType()) != NULL) {
|
||||
|
||||
}
|
||||
else if(getCurrMorphCt()->getMorphUnit()->hasCommandType(command->getCommandType())) {
|
||||
else if(mct && mct->getMorphUnit()->hasCommandType(command->getCommandType())) {
|
||||
// Allow Current Morph Commands
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue