From 22bff2cd01892ec403153588c77e01329bd51ff4 Mon Sep 17 00:00:00 2001 From: Tom Anderson Date: Tue, 16 Apr 2024 22:58:19 -0600 Subject: [PATCH] tweak "hybrid" spawn order Start the useCount from 1 on "hybrid" so that distance is actually used on all Incarnators from the start. --- src/game/CAbstractPlayer.cpp | 15 ++++++++++++--- src/game/CAvaraGame.cpp | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/game/CAbstractPlayer.cpp b/src/game/CAbstractPlayer.cpp index ce1ac94b..ff86473b 100644 --- a/src/game/CAbstractPlayer.cpp +++ b/src/game/CAbstractPlayer.cpp @@ -1880,9 +1880,18 @@ void CAbstractPlayer::Reincarnate() { incarnator->distance = FIX1; } - if (itsGame->spawnOrder == ksDistance || itsGame->spawnOrder == ksRandom) { - // ignore usage for these order types - incarnator->useCount = 1; + switch (itsGame->spawnOrder) { + case ksDistance: + case ksRandom: + // ignore usage for these order types + incarnator->useCount = 1; + break; + case ksHybrid: + // start useCount = 1 so that distance is respected from the beginning + incarnator->useCount = std::max(incarnator->useCount, 1L); + break; + default: + break; } // to be sorted below diff --git a/src/game/CAvaraGame.cpp b/src/game/CAvaraGame.cpp index ed3461cc..6deb0d1e 100755 --- a/src/game/CAvaraGame.cpp +++ b/src/game/CAvaraGame.cpp @@ -1143,7 +1143,7 @@ void CAvaraGame::SetSpawnOrder(SpawnOrder order) { spawnOrder = SpawnOrder(order % ksNumSpawnOrders); // guard bad inputs std::ostringstream oss; oss << kSpawnOrder << " = " << spawnOrder << " [" << types[spawnOrder] << "]"; - itsApp->AddMessageLine(oss.str(), MsgAlignment::Left, MsgCategory::Level); + itsApp->AddMessageLine(oss.str(), MsgAlignment::Left, MsgCategory::System); if (gApplication) { gApplication->Set(kSpawnOrder, spawnOrder); }