Code: Select all
if(unitDef->activateWhenBuilt)
{
Activate();
}
gs->Team(team)->metalStorage+=unitDef->metalStorage;
gs->Team(team)->energyStorage+=unitDef->energyStorage;Moderator: Moderators
Code: Select all
if(unitDef->activateWhenBuilt)
{
Activate();
}
gs->Team(team)->metalStorage+=unitDef->metalStorage;
gs->Team(team)->energyStorage+=unitDef->energyStorage;Code: Select all
bool CUnit::UseEnergy(float energy)
{
if(energy<0){
AddEnergy(-energy);
return true;
}
gs->Team(team)->energyPull += energy;
bool canUse=gs->Team(team)->UseEnergy(energy);
if(canUse)
energyUseI += energy;
return canUse;
}Code: Select all
bool CUnit::UseMetal(float metal)
{
if(metal<0){
AddMetal(-metal);
return true;
}
gs->Team(team)->metalPull += metal;
bool canUse=gs->Team(team)->UseMetal(metal);
if(canUse)
metalUseI += metal;
return canUse;
}Code: Select all
bool CUnit::UseEnergy(float energy)
{
gs->Team(team)->energyPull += energy;
bool canUse=gs->Team(team)->UseEnergy(energy);
if(canUse)
energyUseI += energy;
return canUse;
}That's to prevent an old TA trick when you gave a Moho Metal Maker (or just a lot of normal ones) to the opponent right before attacking his base. What happened was his energy use increased dramatically and more often than not his base went into e-stall, meaning Annihilators and such (and probably even HLTs) could not fire and so your attack went unopposed. As I understand it, this bit of code will turn OFF energy-using units given to somebody else.Argh wrote:And here's yet more hard-coded stuff:Code: Select all
if(type==ChangeGiven && unitDef->energyUpkeep>25){//deactivate to prevent the old give metal maker trick Command c; c.id=CMD_ONOFF; c.params.push_back(0); commandAI->GiveCommand(c);

Just out of curiosity, how would you rate yourself as a Spring player? I haven't ever played you or even seen you play a (non-NTai-testing) game.AF wrote:Ideally you want to be continuosly overproducing so that you can continuosly expand to keep up with economic expansion in a runaway growth.
http://en.wikipedia.org/wiki/Ad_hominemJust out of curiosity, how would you rate yourself as a Spring player? I haven't ever played you or even seen you play a (non-NTai-testing) game.
Whoa! Who let the attack dogs out?Fanger wrote:Felix, how much about coding do or dont you know out of curiosity.. This thread is not about l33t skill, its about how the engine is handling resources.. skill is not what is up for debate, so dont come in here questioning peoples ability to play spring..
The economy does wonky things as you approach 0 and this means that you cannot set up mods to make more use of draining units/weapons.. because of what argh is talking about.. IF you want to attempt to use that stuff you have to use negative storage in order to force 0, because the engine doesnt allow it to actually happen..
The Ad-Hominem link is getting old. And anyway felix wasn't attacking you, just asking a perfectly honest question.AF wrote:felix obviously didnt understand. You overproduce so that you can expand your offensive infrastructure. When you've expanded to fit this overspending you thenr ealize that while you where doing it your ecnomy expanded.
http://en.wikipedia.org/wiki/Ad_hominemJust out of curiosity, how would you rate yourself as a Spring player? I haven't ever played you or even seen you play a (non-NTai-testing) game.
And I have a lot of experience, however I am not an avid AA player, instead I try as many mods as I can, and tend not to play AA against pros, but rather I play AA for fun when there are no other options.