fixed potential div-by-zero for items that build quickly
This commit is contained in:
@@ -18,6 +18,8 @@ namespace OpenRa
|
||||
|
||||
public ProductionItem(string item, int time, int cost, Action onComplete)
|
||||
{
|
||||
if( time <= 0 )
|
||||
time = 1;
|
||||
Item = item;
|
||||
RemainingTime = TotalTime = time;
|
||||
RemainingCost = TotalCost = cost;
|
||||
|
||||
Reference in New Issue
Block a user