Try to add cvars for old camera

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

View File

@ -884,6 +884,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

@ -37,6 +37,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)
{
@ -642,8 +643,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;
}
}
LUAh_PreThinkFrame();

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);