mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 06:01:17 +02:00
- fixed fog of war bug in map preview for connected client
- in headless mode keep three caches in case its related to out of synch - comment out spurious irc console text
This commit is contained in:
@@ -2776,6 +2776,7 @@ void MenuStateConnectedGame::update() {
|
|||||||
listBoxFogOfWar.setSelectedItemIndex(1);
|
listBoxFogOfWar.setSelectedItemIndex(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cleanupMapPreviewTexture();
|
||||||
|
|
||||||
// Allow Observers
|
// Allow Observers
|
||||||
if(gameSettings->getAllowObservers()) {
|
if(gameSettings->getAllowObservers()) {
|
||||||
|
@@ -416,9 +416,6 @@ private:
|
|||||||
CauseOfDeathType causeOfDeath;
|
CauseOfDeathType causeOfDeath;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Unit() : id(-1) {
|
|
||||||
assert(false);
|
|
||||||
}
|
|
||||||
Unit(int id, UnitPathInterface *path, const Vec2i &pos, const UnitType *type, Faction *faction, Map *map, CardinalDir placeFacing);
|
Unit(int id, UnitPathInterface *path, const Vec2i &pos, const UnitType *type, Faction *faction, Map *map, CardinalDir placeFacing);
|
||||||
~Unit();
|
~Unit();
|
||||||
|
|
||||||
|
@@ -2178,7 +2178,8 @@ bool UnitUpdater::findCachedCellsEnemies(Vec2i center, int range, int size, vect
|
|||||||
bool result = false;
|
bool result = false;
|
||||||
//return result;
|
//return result;
|
||||||
|
|
||||||
if(game->isMasterserverMode() == false) {
|
//if(game->isMasterserverMode() == false) {
|
||||||
|
{
|
||||||
MutexSafeWrapper safeMutex(&mutexUnitRangeCellsLookupItemCache,string(__FILE__) + "_" + intToStr(__LINE__));
|
MutexSafeWrapper safeMutex(&mutexUnitRangeCellsLookupItemCache,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||||
std::map<Vec2i, std::map<int, std::map<int, UnitRangeCellsLookupItem > > >::iterator iterFind = UnitRangeCellsLookupItemCache.find(center);
|
std::map<Vec2i, std::map<int, std::map<int, UnitRangeCellsLookupItem > > >::iterator iterFind = UnitRangeCellsLookupItemCache.find(center);
|
||||||
|
|
||||||
|
@@ -1436,8 +1436,8 @@ void World::exploreCells(const Vec2i &newPos, int sightRange, int teamIndex) {
|
|||||||
//bool cacheLookupSightResult = false;
|
//bool cacheLookupSightResult = false;
|
||||||
|
|
||||||
// cache lookup of previously calculated cells + sight range
|
// cache lookup of previously calculated cells + sight range
|
||||||
if(MaxExploredCellsLookupItemCache > 0 && game->isMasterserverMode() == false) {
|
//if(MaxExploredCellsLookupItemCache > 0 && game->isMasterserverMode() == false) {
|
||||||
//if(MaxExploredCellsLookupItemCache > 0) {
|
if(MaxExploredCellsLookupItemCache > 0) {
|
||||||
if(difftime(time(NULL),ExploredCellsLookupItem::lastDebug) >= 10) {
|
if(difftime(time(NULL),ExploredCellsLookupItem::lastDebug) >= 10) {
|
||||||
ExploredCellsLookupItem::lastDebug = time(NULL);
|
ExploredCellsLookupItem::lastDebug = time(NULL);
|
||||||
//printf("In [%s::%s Line: %d] ExploredCellsLookupItemCache.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,ExploredCellsLookupItemCache.size());
|
//printf("In [%s::%s Line: %d] ExploredCellsLookupItemCache.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,ExploredCellsLookupItemCache.size());
|
||||||
@@ -1704,7 +1704,8 @@ void World::computeFow(int factionIdxToTick) {
|
|||||||
//compute texture
|
//compute texture
|
||||||
//printf("Masterserver = %d\n",game->isMasterserverMode());
|
//printf("Masterserver = %d\n",game->isMasterserverMode());
|
||||||
|
|
||||||
if(fogOfWar == true && game->isMasterserverMode() == false) {
|
//if(fogOfWar == true && game->isMasterserverMode() == false) {
|
||||||
|
if(fogOfWar == true) {
|
||||||
for(int i=0; i<getFactionCount(); ++i) {
|
for(int i=0; i<getFactionCount(); ++i) {
|
||||||
Faction *faction= getFaction(i);
|
Faction *faction= getFaction(i);
|
||||||
if(faction->getTeam() == thisTeamIndex) {
|
if(faction->getTeam() == thisTeamIndex) {
|
||||||
|
@@ -235,7 +235,7 @@ void dcc_file_recv_callback (irc_session_t * session, irc_dcc_t id, int status,
|
|||||||
|
|
||||||
void event_channel(irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) {
|
void event_channel(irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) {
|
||||||
//IRC: Event "433", origin: "leguin.freenode.net", params: 3 [*|softcoder|Nickname is already in use.]
|
//IRC: Event "433", origin: "leguin.freenode.net", params: 3 [*|softcoder|Nickname is already in use.]
|
||||||
printf("In [%s::%s] Line: %d\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s] Line: %d\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
if ( count != 2 )
|
if ( count != 2 )
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user