forked from 0ad/0ad
Fix giving foundations a population bonus after a tech research. Reported by bouke
This was SVN commit r15391.
This commit is contained in:
parent
a76364f825
commit
c9f2ac4b12
@ -1515,8 +1515,8 @@ function performCommand(entity, commandName)
|
||||
if (!entState.player == playerID && !g_DevSettings.controlAll)
|
||||
return;
|
||||
|
||||
if (entityCommands[commandName])
|
||||
entityCommands[commandName].execute(entState);
|
||||
if (g_EntityCommands[commandName])
|
||||
g_EntityCommands[commandName].execute(entState);
|
||||
}
|
||||
|
||||
// Performs the specified formation
|
||||
|
@ -87,6 +87,11 @@ Cost.prototype.OnValueModification = function(msg)
|
||||
if (msg.component != "Cost")
|
||||
return;
|
||||
|
||||
// foundations shouldn't give a pop bonus
|
||||
var cmpFoundation = Engine.QueryInterface(this.entity, IID_Foundation)
|
||||
if (cmpFoundation)
|
||||
return;
|
||||
|
||||
// update the population bonuses
|
||||
var newPopBonus = ApplyValueModificationsToEntity("Cost/PopulationBonus", +this.template.PopulationBonus, this.entity);
|
||||
var popDifference = newPopBonus - this.populationBonus;
|
||||
|
Loading…
Reference in New Issue
Block a user