small cleanup from cppcheck
This commit is contained in:
parent
445e39ab2d
commit
9080ade759
|
@ -953,19 +953,6 @@ bool World::canTickWorld() const {
|
||||||
return needToTick;
|
return needToTick;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool World::canTickFaction(int factionIdx) {
|
|
||||||
int factionUpdateInterval = (GameConstants::updateFps / GameConstants::maxPlayers);
|
|
||||||
int expectedFactionIdx = (frameCount / factionUpdateInterval) -1;
|
|
||||||
if(expectedFactionIdx >= GameConstants::maxPlayers) {
|
|
||||||
expectedFactionIdx = expectedFactionIdx % GameConstants::maxPlayers;
|
|
||||||
}
|
|
||||||
bool result = (expectedFactionIdx == factionIdx);
|
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugUnitCommands).enabled) SystemFlags::OutputDebug(SystemFlags::debugUnitCommands,"In [%s::%s Line: %d] factionIdx = %d, frameCount = %d, GameConstants::updateFps = %d, expectedFactionIdx = %d, factionUpdateInterval = %d, result = %d\n",__FILE__,__FUNCTION__,__LINE__,factionIdx,frameCount,GameConstants::updateFps,expectedFactionIdx,factionUpdateInterval,result);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void World::tick() {
|
void World::tick() {
|
||||||
bool showPerfStats = Config::getInstance().getBool("ShowPerfStats","false");
|
bool showPerfStats = Config::getInstance().getBool("ShowPerfStats","false");
|
||||||
Chrono chronoPerf;
|
Chrono chronoPerf;
|
||||||
|
|
|
@ -324,7 +324,6 @@ private:
|
||||||
|
|
||||||
//misc
|
//misc
|
||||||
void tick();
|
void tick();
|
||||||
bool canTickFaction(int factionIdx);
|
|
||||||
void computeFow();
|
void computeFow();
|
||||||
|
|
||||||
void updateAllTilesetObjects();
|
void updateAllTilesetObjects();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user