mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-08-03 04:37:39 -04:00
instant feedback when disabling "free look" in the menu
This commit is contained in:
parent
40d413183c
commit
740943f1b6
@ -52,6 +52,7 @@
|
||||
#include "mn_internal.h"
|
||||
#include "mn_snapshot.h"
|
||||
#include "p_saveg.h"
|
||||
#include "p_user.h"
|
||||
#include "r_defs.h"
|
||||
#include "r_draw.h"
|
||||
#include "r_main.h"
|
||||
@ -2354,6 +2355,8 @@ void M_Ticker(void)
|
||||
whichSkull ^= 1;
|
||||
skullAnimCounter = 8;
|
||||
}
|
||||
|
||||
P_CenterView(&players[consoleplayer]);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
39
src/p_user.c
39
src/p_user.c
@ -343,6 +343,27 @@ void P_DeathThink (player_t* player)
|
||||
// P_PlayerThink
|
||||
//
|
||||
|
||||
void P_CenterView (player_t* player)
|
||||
{
|
||||
// [crispy] center view
|
||||
if (player->centering)
|
||||
{
|
||||
player->pitch /= 2;
|
||||
|
||||
if (abs(player->pitch) < ANG1)
|
||||
{
|
||||
player->pitch = 0;
|
||||
|
||||
if (player->oldpitch == 0)
|
||||
{
|
||||
player->centering = false;
|
||||
}
|
||||
}
|
||||
|
||||
player->slope = PlayerSlope(player);
|
||||
}
|
||||
}
|
||||
|
||||
void P_PlayerThink (player_t* player)
|
||||
{
|
||||
ticcmd_t* cmd;
|
||||
@ -382,23 +403,7 @@ void P_PlayerThink (player_t* player)
|
||||
player->mo->flags &= ~MF_JUSTATTACKED;
|
||||
}
|
||||
|
||||
// [crispy] center view
|
||||
if (player->centering)
|
||||
{
|
||||
player->pitch /= 2;
|
||||
|
||||
if (abs(player->pitch) < ANG1)
|
||||
{
|
||||
player->pitch = 0;
|
||||
|
||||
if (player->oldpitch == 0)
|
||||
{
|
||||
player->centering = false;
|
||||
}
|
||||
}
|
||||
|
||||
player->slope = PlayerSlope(player);
|
||||
}
|
||||
P_CenterView(player);
|
||||
|
||||
// [crispy] weapon recoil pitch
|
||||
if (player->recoilpitch)
|
||||
|
@ -33,6 +33,7 @@ void P_CalcHeight(struct player_s *player);
|
||||
void P_DeathThink(struct player_s *player);
|
||||
void P_MovePlayer(struct player_s *player);
|
||||
void P_Thrust(struct player_s *player, angle_t angle, fixed_t move);
|
||||
void P_CenterView (player_t* player);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user