From 886ededb3c790f292769351370ade7b1ccc4ffbf Mon Sep 17 00:00:00 2001 From: mathusummut Date: Sun, 2 Sep 2018 01:50:23 +0200 Subject: [PATCH] [Test] Incorrect build command is now a warning instead of an error --- source/glest_game/world/unit_updater.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/glest_game/world/unit_updater.cpp b/source/glest_game/world/unit_updater.cpp index cf4c814f2..5b13d13f2 100644 --- a/source/glest_game/world/unit_updater.cpp +++ b/source/glest_game/world/unit_updater.cpp @@ -1161,7 +1161,9 @@ namespace Glest { builtUnit->create(); if (builtUnitType->hasSkillClass(scBeBuilt) == false) { - throw megaglest_runtime_error("Unit [" + builtUnitType->getName(false) + "] has no be_built skill, producer was [" + intToStr(unit->getId()) + " - " + unit->getType()->getName(false) + "]."); + printf((string("Unit [") + builtUnitType->getName(false) + "] has no be_built skill, producer was [" + intToStr(unit->getId()) + " - " + unit->getType()->getName(false) + "].").c_str()); + //throw megaglest_runtime_error("Unit [" + builtUnitType->getName(false) + "] has no be_built skill, producer was [" + intToStr(unit->getId()) + " - " + unit->getType()->getName(false) + "]."); + return; } builtUnit->setCurrSkill(scBeBuilt);