mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 20:31:30 +00:00
Fix invalid numlaps value being written when set to map default
This commit is contained in:
parent
3a467889ae
commit
314b2769a9
1 changed files with 13 additions and 1 deletions
|
@ -1372,7 +1372,19 @@ void CV_SaveNetVars(UINT8 **p, boolean demorecording)
|
|||
// UGLY HACK: Save proper lap count in net replays
|
||||
if (demorecording && cvar->netid == cv_numlaps.netid)
|
||||
{
|
||||
WRITESTRING(*p, cv_basenumlaps.string);
|
||||
if (cv_basenumlaps.value &&
|
||||
(!(mapheaderinfo[gamemap - 1]->levelflags & LF_SECTIONRACE)
|
||||
|| (mapheaderinfo[gamemap - 1]->numlaps > cv_basenumlaps.value))
|
||||
)
|
||||
{
|
||||
WRITESTRING(*p, cv_basenumlaps.string);
|
||||
}
|
||||
else
|
||||
{
|
||||
char buf[9];
|
||||
sprintf(buf, "%d", mapheaderinfo[gamemap - 1]->numlaps);
|
||||
WRITESTRING(*p, buf);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue