Skip to content

Commit

Permalink
tweak "hybrid" spawn order
Browse files Browse the repository at this point in the history
Start the useCount from 1 on "hybrid" so that distance is actually used on all Incarnators from the start.
  • Loading branch information
tra committed Apr 17, 2024
1 parent d440448 commit 22bff2c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions src/game/CAbstractPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/game/CAvaraGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 22bff2c

Please sign in to comment.