fixed potential div-by-zero for items that build quickly

This commit is contained in:
Bob
2010-01-25 22:36:08 +13:00
parent 71c819a8c3
commit d9281d7a13

View File

@@ -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;