mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
add the steamid to cpcache so segmented checkpoints don't keep starting in practice mode
This commit is contained in:
parent
a186e25b4e
commit
41f62f0a8f
@ -251,6 +251,7 @@ enum struct cp_cache_t
|
||||
int iSerial;
|
||||
bool bPractice;
|
||||
int iGroundEntity;
|
||||
int iSteamID;
|
||||
}
|
||||
|
||||
#if defined USES_CHAT_COLORS
|
||||
|
||||
@ -2439,6 +2439,7 @@ bool SaveCheckpoint(int client, int index, bool overflow = false)
|
||||
cpcache.bSegmented = false;
|
||||
}
|
||||
|
||||
cpcache.iSteamID = GetSteamAccountID(target);
|
||||
cpcache.iSerial = GetClientSerial(target);
|
||||
cpcache.bPractice = Shavit_IsPracticeMode(target);
|
||||
|
||||
@ -2597,7 +2598,7 @@ void TeleportToCheckpoint(int client, int index, bool suppressMessage)
|
||||
((gI_CheckpointsSettings[client] & CP_ANGLES) > 0 || cpcache.bSegmented)? cpcache.fAngles:NULL_VECTOR,
|
||||
vel);
|
||||
|
||||
if(cpcache.bPractice || !cpcache.bSegmented || GetClientSerial(client) != cpcache.iSerial)
|
||||
if(cpcache.bPractice || !cpcache.bSegmented || (GetClientSerial(client) != cpcache.iSerial && GetSteamAccountID(client) != cpcache.iSteamID))
|
||||
{
|
||||
Shavit_SetPracticeMode(client, true, true);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user