mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-13 22:33:32 +00:00
Merge branch 'replay-camera-update' into 'next'
Make the replay camera follow the player See merge request STJr/SRB2!1243
This commit is contained in:
commit
bec85c033a
3 changed files with 14 additions and 1 deletions
|
@ -374,6 +374,7 @@ consvar_t cv_sleep = CVAR_INIT ("cpusleep", "1", CV_SAVE, sleeping_cons_t, NULL)
|
||||||
static CV_PossibleValue_t perfstats_cons_t[] = {
|
static CV_PossibleValue_t perfstats_cons_t[] = {
|
||||||
{0, "Off"}, {1, "Rendering"}, {2, "Logic"}, {3, "ThinkFrame"}, {0, NULL}};
|
{0, "Off"}, {1, "Rendering"}, {2, "Logic"}, {3, "ThinkFrame"}, {0, NULL}};
|
||||||
consvar_t cv_perfstats = CVAR_INIT ("perfstats", "Off", 0, perfstats_cons_t, NULL);
|
consvar_t cv_perfstats = CVAR_INIT ("perfstats", "Off", 0, perfstats_cons_t, NULL);
|
||||||
|
consvar_t cv_freedemocamera = CVAR_INIT("freedemocamera", "Off", CV_SAVE, CV_OnOff, NULL);
|
||||||
|
|
||||||
char timedemo_name[256];
|
char timedemo_name[256];
|
||||||
boolean timedemo_csv;
|
boolean timedemo_csv;
|
||||||
|
@ -876,6 +877,8 @@ void D_RegisterClientCommands(void)
|
||||||
// CV_RegisterVar(&cv_grid);
|
// CV_RegisterVar(&cv_grid);
|
||||||
// CV_RegisterVar(&cv_snapto);
|
// CV_RegisterVar(&cv_snapto);
|
||||||
|
|
||||||
|
CV_RegisterVar(&cv_freedemocamera);
|
||||||
|
|
||||||
// add cheat commands
|
// add cheat commands
|
||||||
COM_AddCommand("noclip", Command_CheatNoClip_f);
|
COM_AddCommand("noclip", Command_CheatNoClip_f);
|
||||||
COM_AddCommand("god", Command_CheatGod_f);
|
COM_AddCommand("god", Command_CheatGod_f);
|
||||||
|
|
|
@ -118,6 +118,8 @@ extern boolean timedemo_csv;
|
||||||
extern char timedemo_csv_id[256];
|
extern char timedemo_csv_id[256];
|
||||||
extern boolean timedemo_quit;
|
extern boolean timedemo_quit;
|
||||||
|
|
||||||
|
extern consvar_t cv_freedemocamera;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
XD_NAMEANDCOLOR = 1,
|
XD_NAMEANDCOLOR = 1,
|
||||||
|
|
10
src/p_tick.c
10
src/p_tick.c
|
@ -643,7 +643,15 @@ void P_Ticker(boolean run)
|
||||||
if (demorecording)
|
if (demorecording)
|
||||||
G_WriteDemoTiccmd(&players[consoleplayer].cmd, 0);
|
G_WriteDemoTiccmd(&players[consoleplayer].cmd, 0);
|
||||||
if (demoplayback)
|
if (demoplayback)
|
||||||
G_ReadDemoTiccmd(&players[consoleplayer].cmd, 0);
|
{
|
||||||
|
player_t* p = &players[consoleplayer];
|
||||||
|
G_ReadDemoTiccmd(&p->cmd, 0);
|
||||||
|
if (!cv_freedemocamera.value)
|
||||||
|
{
|
||||||
|
P_ForceLocalAngle(p, p->cmd.angleturn << 16);
|
||||||
|
localaiming = p->aiming;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ps_lua_mobjhooks = 0;
|
ps_lua_mobjhooks = 0;
|
||||||
ps_checkposition_calls = 0;
|
ps_checkposition_calls = 0;
|
||||||
|
|
Loading…
Reference in a new issue