mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix SPB Attack and Class R attack replays
This commit is contained in:
parent
15390c97d0
commit
d67bba9255
4 changed files with 55 additions and 5 deletions
|
|
@ -588,10 +588,9 @@ static void G_UpdateRecordReplays(void)
|
|||
{
|
||||
modeprefix = "spb-";
|
||||
}
|
||||
|
||||
if (K_LegacyRingboost(&players[consoleplayer]))
|
||||
else if (K_LegacyRingboost(&players[consoleplayer]))
|
||||
{
|
||||
modeprefix = "classr-";
|
||||
modeprefix = "hivolt-";
|
||||
}
|
||||
|
||||
if (players[consoleplayer].pflags & PF_NOCONTEST)
|
||||
|
|
|
|||
|
|
@ -9490,7 +9490,7 @@ boolean K_LegacyRingboost(player_t *player)
|
|||
return false;
|
||||
if (modeattacking == ATTACKING_SPB)
|
||||
return false;
|
||||
if (!modeattacking)
|
||||
if (!modeattacking || (modeattacking & ATTACKING_SPB))
|
||||
return false;
|
||||
if (!(skins[player->skin]->flags & SF_HIVOLT))
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -461,7 +461,17 @@ void M_ReplayTimeAttack(INT32 choice)
|
|||
const char *modeprefix = "";
|
||||
|
||||
if (cv_dummyspbattack.value)
|
||||
{
|
||||
modeprefix = "spb-";
|
||||
}
|
||||
else
|
||||
{
|
||||
const INT32 skinid = R_SkinAvailableEx(cv_skin[0].string, false);
|
||||
if (skinid >= 0 && (skins[skinid]->flags & SF_HIVOLT))
|
||||
{
|
||||
modeprefix = "hivolt-";
|
||||
}
|
||||
}
|
||||
|
||||
switch (choice)
|
||||
{
|
||||
|
|
@ -521,7 +531,17 @@ static void M_WriteGuestReplay(INT32 ch)
|
|||
const char *modeprefix = "";
|
||||
|
||||
if (cv_dummyspbattack.value)
|
||||
{
|
||||
modeprefix = "spb-";
|
||||
}
|
||||
else
|
||||
{
|
||||
const INT32 skinid = R_SkinAvailableEx(cv_skin[0].string, false);
|
||||
if (skinid >= 0 && (skins[skinid]->flags & SF_HIVOLT))
|
||||
{
|
||||
modeprefix = "hivolt-";
|
||||
}
|
||||
}
|
||||
|
||||
if (TA_GuestReplay_Str != NULL)
|
||||
{
|
||||
|
|
@ -580,7 +600,17 @@ void M_SetGuestReplay(INT32 choice)
|
|||
const char *modeprefix = "";
|
||||
|
||||
if (cv_dummyspbattack.value)
|
||||
{
|
||||
modeprefix = "spb-";
|
||||
}
|
||||
else
|
||||
{
|
||||
const INT32 skinid = R_SkinAvailableEx(cv_skin[0].string, false);
|
||||
if (skinid >= 0 && (skins[skinid]->flags & SF_HIVOLT))
|
||||
{
|
||||
modeprefix = "hivolt-";
|
||||
}
|
||||
}
|
||||
|
||||
if (FIL_FileExists(va("%s"PATHSEP"media"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s-%sguest.lmp", srb2home, timeattackfolder, G_BuildMapName(levellist.choosemap+1), modeprefix)))
|
||||
{
|
||||
|
|
@ -622,6 +652,14 @@ void M_StartTimeAttack(INT32 choice)
|
|||
|
||||
modeprefix = "spb-";
|
||||
}
|
||||
else
|
||||
{
|
||||
const INT32 skinid = R_SkinAvailableEx(cv_skin[0].string, false);
|
||||
if (skinid >= 0 && (skins[skinid]->flags & SF_HIVOLT))
|
||||
{
|
||||
modeprefix = "hivolt-";
|
||||
}
|
||||
}
|
||||
|
||||
// DON'T SOFTLOCK
|
||||
CON_ToggleOff();
|
||||
|
|
|
|||
|
|
@ -7816,6 +7816,7 @@ static void P_ResetSpawnpoints(void)
|
|||
|
||||
static void P_TryAddExternalGhost(const char *defdemoname)
|
||||
{
|
||||
CONS_Printf("trying %s\n", defdemoname);
|
||||
if (FIL_FileExists(defdemoname))
|
||||
{
|
||||
savebuffer_t buf = {0};
|
||||
|
|
@ -7839,10 +7840,22 @@ static void P_LoadRecordGhosts(void)
|
|||
const char *modeprefix = "";
|
||||
INT32 i;
|
||||
|
||||
CONS_Printf("trying load ghosts\n");
|
||||
|
||||
gpath = Z_StrDup(va("%s" PATHSEP "media" PATHSEP "replay" PATHSEP "%s" PATHSEP "%s", srb2home, timeattackfolder, G_BuildMapName(gamemap)));
|
||||
|
||||
if (encoremode)
|
||||
modeprefix = "spb-";
|
||||
{
|
||||
modeprefix = "-spb";
|
||||
}
|
||||
else
|
||||
{
|
||||
const INT32 skinid = R_SkinAvailableEx(cv_skin[0].string, false);
|
||||
if (skinid >= 0 && (skins[skinid]->flags & SF_HIVOLT))
|
||||
{
|
||||
modeprefix = "-hivolt";
|
||||
}
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue