Skip to content
Snippets Groups Projects
Commit fe75150f authored by Erik Ahlroth's avatar Erik Ahlroth :bug:
Browse files

Updated Unit.cpp.

*Removed ensuring there is a target in getTarget(), which solves a crash when debugging during runtime
parent 3c0d963b
No related branches found
No related tags found
No related merge requests found
Pipeline #4635 passed
...@@ -328,9 +328,6 @@ void Unit::ability(sc2::AbilityID ability, const Unit& target) const ...@@ -328,9 +328,6 @@ void Unit::ability(sc2::AbilityID ability, const Unit& target) const
Unit Unit::getTarget() const Unit Unit::getTarget() const
{ {
BOT_ASSERT(isValid(), "Unit is not valid"); BOT_ASSERT(isValid(), "Unit is not valid");
if (!hasTarget()){
return NULL
}
// if unit has order, check tag of target of first order // if unit has order, check tag of target of first order
if(getUnitPtr()->orders.size() > 0){ if(getUnitPtr()->orders.size() > 0){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment