Fix training/researching with zero time.
(Re)introduced in 0c4f59d0a7
.
Reported by: @wowgetoffyourcellphone
Differential revision: https://code.wildfiregames.com/D4378
Reviewed by: @Silier
Refs. #2334
This was SVN commit r26089.
This commit is contained in:
parent
a8c6d7a82b
commit
84399ba248
@ -143,7 +143,7 @@ Researcher.prototype.Item.prototype.GetBasicInfo = function()
|
||||
{
|
||||
return {
|
||||
"technologyTemplate": this.templateName,
|
||||
"progress": 1 - (this.timeRemaining / this.timeTotal),
|
||||
"progress": 1 - (this.timeRemaining / (this.timeTotal || 1)),
|
||||
"timeRemaining": this.timeRemaining,
|
||||
"paused": this.paused,
|
||||
"metadata": this.metadata
|
||||
|
@ -365,7 +365,7 @@ Trainer.prototype.Item.prototype.GetBasicInfo = function()
|
||||
"unitTemplate": this.templateName,
|
||||
"count": this.count,
|
||||
"neededSlots": this.missingPopSpace,
|
||||
"progress": 1 - (this.timeRemaining / this.timeTotal),
|
||||
"progress": 1 - (this.timeRemaining / (this.timeTotal || 1)),
|
||||
"timeRemaining": this.timeRemaining,
|
||||
"paused": this.paused,
|
||||
"metadata": this.metadata
|
||||
|
Loading…
Reference in New Issue
Block a user