fix bogus goal complete with GOAL_NONE
This commit is contained in:
@@ -1867,7 +1867,14 @@ float GameState::GetGoalPercentComplete( PlayerNumber pn )
|
|||||||
fActual = ssAccum.fGameplaySeconds + ssCurrent.fGameplaySeconds;
|
fActual = ssAccum.fGameplaySeconds + ssCurrent.fGameplaySeconds;
|
||||||
fGoal = (float)pProfile->m_iGoalSeconds;
|
fGoal = (float)pProfile->m_iGoalSeconds;
|
||||||
break;
|
break;
|
||||||
|
case GOAL_NONE:
|
||||||
|
return 0; // never complete
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
|
if( fGoal == 0 )
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
return fActual / fGoal;
|
return fActual / fGoal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user