diff --git a/src/game/national.cpp b/src/game/national.cpp index 77cf4f8..cdc356d 100644 --- a/src/game/national.cpp +++ b/src/game/national.cpp @@ -74,6 +74,9 @@ void new_board_entry(GameState& g, int manager, int index, int slot, WatcomRando uint8_t* e = &g.tactics.at(size_t(manager) * kBoard + size_t(index) * kBoardSlot); std::memset(e + 7, 0, 3); std::memset(e + 0x19, 0, 0x24); + // Deviates from the original: a new arrival does not inherit the previous occupant's + // retirement, refusal and month-processing flags. + e[0xb] = 0; e[10] = 2; for (int k = 0; k < 4; k++) e[2 + k] = index < 2 ? 1 : uint8_t(rand.range(2, 0x27)); e[0x3f] = 0xff; diff --git a/src/modern/game/desk_actions.cpp b/src/modern/game/desk_actions.cpp index a90efcd..7891e0c 100644 --- a/src/modern/game/desk_actions.cpp +++ b/src/modern/game/desk_actions.cpp @@ -558,6 +558,15 @@ TransferActionResult list_manager_player(ModernState& g, int manager, int squad_ out.status = TransferActionStatus::invalid_player; return out; } + // Deviates from the original: a player who is already listed is not listed a second time, + // and a full list refuses before any random number is drawn. + bool free_entry = false; + for (size_t entry = 0; entry < 40; ++entry) { + const int listed = g.squad_slots.at(modern::transfer_list_slot() + entry) & 0xfff; + if (listed == player) { out.status = TransferActionStatus::pending; out.player = player; out.list_entry = int(entry); return out; } + free_entry = free_entry || listed == 0xfff; + } + if (!free_entry) { out.status = TransferActionStatus::blocked_by_board; return out; } if (!modern::list_transfer_player(g, slot, rand, report)) { out.status = report.unsupported ? TransferActionStatus::invalid_request : TransferActionStatus::blocked_by_board; return out; diff --git a/src/modern/game/national.cpp b/src/modern/game/national.cpp index 7cca045..e8832cd 100644 --- a/src/modern/game/national.cpp +++ b/src/modern/game/national.cpp @@ -77,6 +77,9 @@ void new_board_entry(ModernState& g, int manager, int index, int slot, WatcomRan uint8_t* e = &g.tactics.at(size_t(manager) * kBoard + size_t(index) * kBoardSlot); std::memset(e + 7, 0, 3); std::memset(e + 0x19, 0, 0x24); + // Deviates from the original: a new arrival does not inherit the previous occupant's + // retirement, refusal and month-processing flags. + e[0xb] = 0; e[10] = 2; for (int k = 0; k < 4; k++) e[2 + k] = index < 2 ? 1 : uint8_t(rand.range(2, 0x27)); e[0x3f] = 0xff;