From b4b13ec918982c402b5a11c1b13929e0dcd14f64 Mon Sep 17 00:00:00 2001 From: mathusummut Date: Sun, 17 Jun 2018 15:50:14 +0200 Subject: [PATCH] Attack mode no longer becomes disabled on selection --- source/glest_game/types/unit_type.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/glest_game/types/unit_type.cpp b/source/glest_game/types/unit_type.cpp index f13b21210..5173c40ea 100644 --- a/source/glest_game/types/unit_type.cpp +++ b/source/glest_game/types/unit_type.cpp @@ -1170,6 +1170,8 @@ namespace Glest { const CommandType *UnitType::getFirstCtOfClass(CommandClass commandClass) const { if (firstCommandTypeOfClass[commandClass] == NULL) { + if (commandClass == CommandClass::ccAttack) + return firstCommandTypeOfClass[CommandClass::ccMove]; //if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] commandClass = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,commandClass); /* @@ -1189,6 +1191,8 @@ namespace Glest { const SkillType *UnitType::getFirstStOfClass(SkillClass skillClass) const { if (firstSkillTypeOfClass[skillClass] == NULL) { + if (skillClass == SkillClass::scAttack) + return firstSkillTypeOfClass[SkillClass::scMove]; /* for(int j= 0; j