From 5a978d7bacabc5c046494f476038f67f9422399e Mon Sep 17 00:00:00 2001 From: Tim Felgentreff <timfelgentreff@gmail.com> Date: Sun, 20 Feb 2022 14:08:58 +0100 Subject: [PATCH] disable a bit of the extra much logging again --- src/action/actions.cpp | 7 ++----- src/map/map_fog.cpp | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/action/actions.cpp b/src/action/actions.cpp index bef476612..7d97e94a6 100644 --- a/src/action/actions.cpp +++ b/src/action/actions.cpp @@ -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); diff --git a/src/map/map_fog.cpp b/src/map/map_fog.cpp index 2b2784f72..8c30e2ce2 100644 --- a/src/map/map_fog.cpp +++ b/src/map/map_fog.cpp @@ -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)