forked from Mirrors/openclonk
Fix variable_out_of_scope warnings in Defense
parent
1ef6b7a7fc
commit
7fb098c4df
|
@ -107,9 +107,10 @@ public func UpdateIndexedItem(int index)
|
||||||
for (var req in entry.requirements)
|
for (var req in entry.requirements)
|
||||||
if (!techs[req])
|
if (!techs[req])
|
||||||
available = false;
|
available = false;
|
||||||
|
var tier;
|
||||||
if (entry.tiers)
|
if (entry.tiers)
|
||||||
{
|
{
|
||||||
var tier = techs[entry.tech];
|
tier = techs[entry.tech];
|
||||||
entry.graphic = Format(entry.graphics, tier+1);
|
entry.graphic = Format(entry.graphics, tier+1);
|
||||||
entry.cost = entry.costs[tier];
|
entry.cost = entry.costs[tier];
|
||||||
}
|
}
|
||||||
|
@ -385,4 +386,4 @@ private func GainLife(proplist entry, int tier)
|
||||||
clonk->DoEnergy(clonk.MaxEnergy, true);
|
clonk->DoEnergy(clonk.MaxEnergy, true);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue