Try to add cvars for old camera

This commit is contained in:
Riku Salminen 2020-11-10 13:06:47 +02:00
parent 33725a58b4
commit 3dff612f3c
3 changed files with 9 additions and 2 deletions

View File

@ -880,6 +880,8 @@ void D_RegisterClientCommands(void)
// CV_RegisterVar(&cv_grid);
// CV_RegisterVar(&cv_snapto);
CV_RegisterVar(&cv_freedemocamera);
// add cheat commands
COM_AddCommand("noclip", Command_CheatNoClip_f);
COM_AddCommand("god", Command_CheatGod_f);

View File

@ -39,6 +39,7 @@ tic_t leveltime;
// The entries will behave like both the head and tail of the lists.
thinker_t thlist[NUM_THINKERLISTS];
consvar_t cv_freedemocamera = {"freedemocamera", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
void Command_Numthinkers_f(void)
{
@ -646,8 +647,11 @@ void P_Ticker(boolean run)
{
player_t* p = &players[consoleplayer];
G_ReadDemoTiccmd(&p->cmd, 0);
P_ForceLocalAngle(p, p->cmd.angleturn << 16);
localaiming = p->aiming;
if (!cv_freedemocamera.value)
{
P_ForceLocalAngle(p, p->cmd.angleturn << 16);
localaiming = p->aiming;
}
}
ps_lua_mobjhooks = 0;

View File

@ -19,6 +19,7 @@
#endif
extern tic_t leveltime;
extern consvar_t cv_freedemocamera;
// Called by G_Ticker. Carries out all thinking of enemies and players.
void Command_Numthinkers_f(void);