disable a bit of the extra much logging again

This commit is contained in:
Tim Felgentreff 2022-02-20 14:08:58 +01:00
parent cd611a2f7f
commit 5a978d7bac
2 changed files with 4 additions and 5 deletions

View file

@ -567,17 +567,14 @@ static void UnitActionsEachCycle(UNITP_ITERATOR begin, UNITP_ITERATOR end)
if (EnableUnitDebug) {
DumpUnitInfo(unit);
}
if (EnableDebugPrint) {
fprintf(stderr, "GameCycle: %lud, SyncHash before: %x", GameCycle, SyncHash);
}
// Calculate some hash.
SyncHash = (SyncHash << 5) | (SyncHash >> 27);
SyncHash ^= unit.Orders.empty() == false ? unit.CurrentAction() << 18 : 0;
SyncHash ^= unit.Refs << 3;
if (EnableDebugPrint) {
fprintf(stderr, ", after: %x (unit: %d:%s, order: %d, refs: %d)\n", SyncHash,
if (EnableUnitDebug) {
fprintf(stderr, "GameCycle: %lud, new SyncHash: %x (unit: %d:%s, order: %d, refs: %d)\n", GameCycle, SyncHash,
UnitNumber(unit), unit.Type->Ident.c_str(), unit.Orders.empty() ? -1 : unit.CurrentAction(), unit.Refs);
print_backtrace(8);
fflush(stderr);

View file

@ -226,6 +226,7 @@ void MapMarkTileSight(const CPlayer &player, const unsigned int index)
Assert(*v != 65535);
++*v;
}
#if 0
if (EnableDebugPrint) {
fprintf(stderr, "Mapsight: GameCycle: %lud, SyncHash before: %x", GameCycle, SyncHash);
}
@ -239,6 +240,7 @@ void MapMarkTileSight(const CPlayer &player, const unsigned int index)
print_backtrace(8);
fflush(stderr);
}
#endif
}
void MapMarkTileSight(const CPlayer &player, const Vec2i &pos)