Remove late spawn because not needed anymore (thanks for the Barrier check)
This commit is contained in:
parent
f384157680
commit
a97575666a
@ -169,7 +169,6 @@ CarRank::Reset();
|
|||||||
***Match_InitMap***
|
***Match_InitMap***
|
||||||
***
|
***
|
||||||
declare Integer Map_ValidRoundsNb;
|
declare Integer Map_ValidRoundsNb;
|
||||||
declare Boolean RankInitialized = False;
|
|
||||||
|
|
||||||
declare Integer Map_TimeBeforeMalus;
|
declare Integer Map_TimeBeforeMalus;
|
||||||
declare Integer Map_TimeBeforeNightmare;
|
declare Integer Map_TimeBeforeNightmare;
|
||||||
@ -290,6 +289,9 @@ foreach (Player in Players) {
|
|||||||
|
|
||||||
ShuffledPlayers = ShuffledPlayers.sortkey();
|
ShuffledPlayers = ShuffledPlayers.sortkey();
|
||||||
|
|
||||||
|
Net_NBPlayers = ShuffledPlayers.count;
|
||||||
|
Net_PlayersNbAlive = Net_NBPlayers;
|
||||||
|
|
||||||
foreach (Player in ShuffledPlayers) {
|
foreach (Player in ShuffledPlayers) {
|
||||||
if (Player == Null) continue;
|
if (Player == Null) continue;
|
||||||
PlayerLM = Null;
|
PlayerLM = Null;
|
||||||
@ -303,18 +305,16 @@ foreach (Player in ShuffledPlayers) {
|
|||||||
LandmarkIndex = LandmarkIndex + 1 ;
|
LandmarkIndex = LandmarkIndex + 1 ;
|
||||||
}
|
}
|
||||||
Race::Start(Player, PlayerLM , StartTime);
|
Race::Start(Player, PlayerLM , StartTime);
|
||||||
|
CarRank::SetRank(Player, Net_NBPlayers);
|
||||||
AccountIdsOfPlayers.add(Player.User.WebServicesUserId);
|
AccountIdsOfPlayers.add(Player.User.WebServicesUserId);
|
||||||
MalusQueue[Player.User.Login] = GetNewMalus(C_Malus_Reset, 1500);
|
MalusQueue[Player.User.Login] = GetNewMalus(C_Malus_Reset, 1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
Net_NBPlayers = AccountIdsOfPlayers.count;
|
Net_NBPlayers = AccountIdsOfPlayers.count;
|
||||||
|
|
||||||
UpdateCustomRanking(Null, -1);
|
|
||||||
StateMgr::ForcePlayersStates([StateMgr::C_State_Playing]);
|
StateMgr::ForcePlayersStates([StateMgr::C_State_Playing]);
|
||||||
CarRank::Update(CarRank::C_SortCriteria_BestRace);
|
|
||||||
Race::EnableIntroDuringMatch(False);
|
Race::EnableIntroDuringMatch(False);
|
||||||
UIManager.UIAll.SendChat("$<$ff3$> Stay the most time on the structure. $<$ff9GL HF!$>");
|
UIManager.UIAll.SendChat("$<$ff3$> Stay the most time on the structure. $<$ff9GL HF!$>");
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
/***Match_InitPlayLoop***
|
/***Match_InitPlayLoop***
|
||||||
@ -324,53 +324,6 @@ MalusQueue = [];
|
|||||||
|
|
||||||
***Match_PlayLoop***
|
***Match_PlayLoop***
|
||||||
***
|
***
|
||||||
// Update CarRank & UI Interface
|
|
||||||
if (!RankInitialized) {
|
|
||||||
RankInitialized = True;
|
|
||||||
Net_PlayersNbAlive = PlayersNbAlive;
|
|
||||||
Net_NBPlayers = AccountIdsOfPlayers.count;
|
|
||||||
foreach (Player in Players) {
|
|
||||||
CarRank::SetRank(Player, PlayersNbAlive);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Spawn players who have longloading
|
|
||||||
if (Now < StartTime + 3000) {
|
|
||||||
declare Boolean PlayerSpawned = False;
|
|
||||||
declare CMapLandmark[] Landmarks = Map::GetFinishesAndMultilaps();
|
|
||||||
declare CMapLandmark PlayerLM = Null;
|
|
||||||
if (PlayersNbDead >= 1) {
|
|
||||||
foreach (Player in Players) {
|
|
||||||
if (Player.SpawnStatus == CSmPlayer::ESpawnStatus::NotSpawned && !AccountIdsOfPlayers.exists(Player.User.WebServicesUserId)) {
|
|
||||||
PlayerSpawned = True;
|
|
||||||
PlayerLM = Null;
|
|
||||||
while (PlayerLM == Null) {
|
|
||||||
if (LandmarkIndex > Landmarks.count - 1 ) {
|
|
||||||
LandmarkIndex = 0;
|
|
||||||
}
|
|
||||||
if (Map::IsMultilap(Landmarks[LandmarkIndex])) {
|
|
||||||
PlayerLM = Landmarks[LandmarkIndex];
|
|
||||||
}
|
|
||||||
LandmarkIndex = LandmarkIndex + 1 ;
|
|
||||||
}
|
|
||||||
Race::Start(Player, PlayerLM , StartTime);
|
|
||||||
AccountIdsOfPlayers.add(Player.User.WebServicesUserId);
|
|
||||||
|
|
||||||
MalusQueue[Player.User.Login] = GetNewMalus(C_Malus_Reset);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (PlayerSpawned) {
|
|
||||||
PlayerSpawned = False;
|
|
||||||
Net_NBPlayers = AccountIdsOfPlayers.count;
|
|
||||||
Net_PlayersNbAlive = PlayersNbAlive;
|
|
||||||
UpdateCustomRanking(Null, -1);
|
|
||||||
foreach (Player in Players) {
|
|
||||||
CarRank::SetRank(Player, PlayersNbAlive);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Manage race events
|
// Manage race events
|
||||||
declare RacePendingEvents = Race::GetPendingEvents();
|
declare RacePendingEvents = Race::GetPendingEvents();
|
||||||
foreach (Event in RacePendingEvents) {
|
foreach (Event in RacePendingEvents) {
|
||||||
|
Loading…
Reference in New Issue
Block a user