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)
|
public ProductionItem(string item, int time, int cost, Action onComplete)
|
||||||
{
|
{
|
||||||
|
if( time <= 0 )
|
||||||
|
time = 1;
|
||||||
Item = item;
|
Item = item;
|
||||||
RemainingTime = TotalTime = time;
|
RemainingTime = TotalTime = time;
|
||||||
RemainingCost = TotalCost = cost;
|
RemainingCost = TotalCost = cost;
|
||||||
|
|||||||
Reference in New Issue
Block a user