new default settings for ultra/easy/mega ; dansk.lng up to date ; code cleanup
This commit is contained in:
parent
fabf42c807
commit
d09d29f520
|
@ -33,9 +33,9 @@ int GameConstants::updateFps = 40;
|
||||||
int GameConstants::cameraFps = 100;
|
int GameConstants::cameraFps = 100;
|
||||||
|
|
||||||
const float GameConstants::normalMultiplier = 1.0f;
|
const float GameConstants::normalMultiplier = 1.0f;
|
||||||
const float GameConstants::easyMultiplier = 0.8f;
|
const float GameConstants::easyMultiplier = 0.5f;
|
||||||
const float GameConstants::ultraMultiplier = 3.0f;
|
const float GameConstants::ultraMultiplier = 2.0f;
|
||||||
const float GameConstants::megaMultiplier = 4.0f;
|
const float GameConstants::megaMultiplier = 3.0f;
|
||||||
|
|
||||||
const char *GameConstants::folder_path_maps = "maps";
|
const char *GameConstants::folder_path_maps = "maps";
|
||||||
const char *GameConstants::folder_path_scenarios = "scenarios";
|
const char *GameConstants::folder_path_scenarios = "scenarios";
|
||||||
|
|
|
@ -188,11 +188,6 @@ void UnitUpdater::updateUnitCommand(Unit *unit) {
|
||||||
//if unit has command process it
|
//if unit has command process it
|
||||||
if(unit->anyCommand()) {
|
if(unit->anyCommand()) {
|
||||||
CommandClass cc=unit->getCurrCommand()->getCommandType()->commandTypeClass;
|
CommandClass cc=unit->getCurrCommand()->getCommandType()->commandTypeClass;
|
||||||
// if(unit->isOperative() && (!(cc==ccStop || cc==ccAttack)) )
|
|
||||||
// {//stop and attack already check for themselves
|
|
||||||
// Unit *sighted;
|
|
||||||
// attackerOnSight(unit, &sighted);
|
|
||||||
// }
|
|
||||||
unit->getCurrCommand()->getCommandType()->update(this, unit);
|
unit->getCurrCommand()->getCommandType()->update(this, unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,12 +202,6 @@ void UnitUpdater::updateUnitCommand(Unit *unit) {
|
||||||
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
unit->giveCommand(new Command(unit->getType()->getFirstCtOfClass(ccStop)));
|
unit->giveCommand(new Command(unit->getType()->getFirstCtOfClass(ccStop)));
|
||||||
}
|
}
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// // buidings have no stop skill but have to check for attackers too.
|
|
||||||
// Unit *sighted;
|
|
||||||
// attackerOnSight(unit, &sighted);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s] Line: %d took msecs: %lld --------------------------- [END OF METHOD] ---------------------------\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis());
|
if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s] Line: %d took msecs: %lld --------------------------- [END OF METHOD] ---------------------------\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis());
|
||||||
|
@ -1864,64 +1853,6 @@ bool UnitUpdater::unitOnRange(const Unit *unit, int range, Unit **rangedPtr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if( result &&
|
|
||||||
// unit->getTeam()==world->getThisTeamIndex() && //must be in local players team.
|
|
||||||
// !(unit->isAlly(enemySeen)))
|
|
||||||
// {
|
|
||||||
// // find nearest Attack and cleanup old dates
|
|
||||||
// AttackWarningData *nearest=NULL;
|
|
||||||
// float currentDistance;
|
|
||||||
// float nearestDistance;
|
|
||||||
// for(int i = attackWarnings.size()-1; i>-1; --i) {
|
|
||||||
// if(world->getFrameCount()-attackWarnings[i]->lastFrameCount>200) { //after 200 frames attack break we warn again
|
|
||||||
// AttackWarningData *toDelete=attackWarnings[i];
|
|
||||||
// attackWarnings.erase(attackWarnings.begin()+i);
|
|
||||||
// delete toDelete; // old one
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// currentDistance=floor(floatCenter.dist(attackWarnings[i]->attackPosition)); // no need for streflops here!
|
|
||||||
// if( nearest==NULL ){
|
|
||||||
// nearest=attackWarnings[i];
|
|
||||||
// nearestDistance=currentDistance;
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
//
|
|
||||||
// if( currentDistance< nearestDistance ){
|
|
||||||
// nearest=attackWarnings[i];
|
|
||||||
// nearestDistance=currentDistance;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if(nearest!=NULL)
|
|
||||||
// { // does it fit?
|
|
||||||
// if(nearestDistance<attackWarnRange)
|
|
||||||
// {// update entry with current values
|
|
||||||
// nearest->lastFrameCount=world->getFrameCount();
|
|
||||||
// nearest->attackPosition.x=enemySeen->getFloatCenteredPos().x;
|
|
||||||
// nearest->attackPosition.y=enemySeen->getFloatCenteredPos().y;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {//Must be a different Attack!
|
|
||||||
// nearest=NULL; //set to null to force a new entry in next step
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// // add new attack
|
|
||||||
// if(nearest==NULL) // no else!
|
|
||||||
// {
|
|
||||||
// AttackWarningData* awd= new AttackWarningData();
|
|
||||||
// awd->lastFrameCount=world->getFrameCount();
|
|
||||||
// awd->attackPosition.x=enemySeen->getFloatCenteredPos().x;
|
|
||||||
// awd->attackPosition.y=enemySeen->getFloatCenteredPos().y;
|
|
||||||
// attackWarnings.push_back(awd);
|
|
||||||
// SoundRenderer::getInstance().playFx(CoreData::getInstance().getAttentionSound());
|
|
||||||
// world->addAttackEffects(enemySeen);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ using namespace std;
|
||||||
|
|
||||||
//including this header in any file of a project will cause all
|
//including this header in any file of a project will cause all
|
||||||
//leaks to be dumped into leak_dump.txt, but only allocations that
|
//leaks to be dumped into leak_dump.txt, but only allocations that
|
||||||
//ocurred in a file where this header is included will have
|
//occurred in a file where this header is included will have
|
||||||
//file and line number
|
//file and line number
|
||||||
|
|
||||||
struct AllocInfo{
|
struct AllocInfo{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user