mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
fix s18 + teams with restarting + push before ability rewrite
This commit is contained in:
@@ -616,13 +616,23 @@ int AFortGameModeAthena::Athena_PickTeamHook(AFortGameModeAthena* GameMode, uint
|
||||
auto Playlist = GameState->GetCurrentPlaylist();
|
||||
|
||||
static int CurrentTeamMembers = 0; // bad
|
||||
static int Current = 3;
|
||||
|
||||
static int LastNum = 1;
|
||||
|
||||
if (AmountOfRestarts != LastNum)
|
||||
{
|
||||
LastNum = AmountOfRestarts;
|
||||
|
||||
Current = 3;
|
||||
CurrentTeamMembers = 0;
|
||||
}
|
||||
|
||||
// std::cout << "Dru!\n";
|
||||
|
||||
if (!Playlist)
|
||||
{
|
||||
CurrentTeamMembers = 0;
|
||||
static int Current = 3;
|
||||
LOG_INFO(LogTeams, "Player is going on team {} with {} members (No Playlist).", Current, CurrentTeamMembers);
|
||||
CurrentTeamMembers++;
|
||||
return Current++;
|
||||
@@ -630,6 +640,15 @@ int AFortGameModeAthena::Athena_PickTeamHook(AFortGameModeAthena* GameMode, uint
|
||||
|
||||
static int NextTeamIndex = Playlist->Get<uint8>("DefaultFirstTeam"); // + 1?
|
||||
|
||||
static int LastNum1 = 1;
|
||||
|
||||
if (AmountOfRestarts != LastNum1)
|
||||
{
|
||||
LastNum1 = AmountOfRestarts;
|
||||
|
||||
NextTeamIndex = Playlist->Get<uint8>("DefaultFirstTeam");
|
||||
}
|
||||
|
||||
// std::cout << "CurrentTeamMembers: " << CurrentTeamMembers << '\n';
|
||||
|
||||
static auto MaxSquadSizeOffset = Playlist->GetOffset("MaxSquadSize");
|
||||
@@ -766,8 +785,6 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
||||
|
||||
auto PlayerStateAthena = NewPlayer->GetPlayerStateAthena();
|
||||
|
||||
LOG_INFO(LogDev, "PlayerStateAthena: {}", __int64(PlayerStateAthena));
|
||||
|
||||
if (!PlayerStateAthena)
|
||||
return Athena_HandleStartingNewPlayerOriginal(GameMode, NewPlayerActor);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user