Don't use GetPopulationCount() in Player.js, but use the value it returns directly
refs: 74f08a5083
Proposed By: Freagarach
This was SVN commit r24067.
This commit is contained in:
parent
446b71e71e
commit
44b8e87f43
@ -168,8 +168,8 @@ Player.prototype.GetDisplayedColor = function()
|
||||
// Try reserving num population slots. Returns 0 on success or number of missing slots otherwise.
|
||||
Player.prototype.TryReservePopulationSlots = function(num)
|
||||
{
|
||||
if (num != 0 && num > (this.GetPopulationLimit() - this.GetPopulationCount()))
|
||||
return num - (this.GetPopulationLimit() - this.GetPopulationCount());
|
||||
if (num != 0 && num > (this.GetPopulationLimit() - this.popUsed))
|
||||
return num - (this.GetPopulationLimit() - this.popUsed);
|
||||
|
||||
this.popUsed += num;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user