mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
setviews command: let outside of replays
This commit is contained in:
parent
0b7a6ed7f5
commit
ff11166f30
1 changed files with 15 additions and 8 deletions
|
|
@ -1710,13 +1710,6 @@ static void Command_SetViews_f(void)
|
||||||
UINT8 splits;
|
UINT8 splits;
|
||||||
UINT8 newsplits;
|
UINT8 newsplits;
|
||||||
|
|
||||||
if (!( demo.playback && multiplayer ))
|
|
||||||
{
|
|
||||||
CONS_Alert(CONS_NOTICE,
|
|
||||||
"You must be viewing a multiplayer replay to use this.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (COM_Argc() != 2)
|
if (COM_Argc() != 2)
|
||||||
{
|
{
|
||||||
CONS_Printf("setviews <views>: set the number of split screens\n");
|
CONS_Printf("setviews <views>: set the number of split screens\n");
|
||||||
|
|
@ -1727,12 +1720,26 @@ static void Command_SetViews_f(void)
|
||||||
|
|
||||||
newsplits = atoi(COM_Argv(1));
|
newsplits = atoi(COM_Argv(1));
|
||||||
newsplits = min(max(newsplits, 1), 4);
|
newsplits = min(max(newsplits, 1), 4);
|
||||||
if (newsplits > splits)
|
|
||||||
|
if (newsplits > splits && demo.playback && multiplayer)
|
||||||
|
{
|
||||||
G_AdjustView(newsplits, 0, true);
|
G_AdjustView(newsplits, 0, true);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Even if the splits go beyond the real number of
|
||||||
|
// splitscreen players, displayplayers was filled
|
||||||
|
// with duplicates of P1 (see Got_AddPlayer).
|
||||||
r_splitscreen = newsplits-1;
|
r_splitscreen = newsplits-1;
|
||||||
R_ExecuteSetViewSize();
|
R_ExecuteSetViewSize();
|
||||||
|
|
||||||
|
// If promoting (outside of replays), make sure the
|
||||||
|
// camera is in the correct position.
|
||||||
|
UINT8 i;
|
||||||
|
for (i = splits + 1; i <= newsplits; ++i)
|
||||||
|
{
|
||||||
|
G_FixCamera(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue