mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
Blood: Remove constexpr on player horizon values.
This commit is contained in:
parent
e6420e1eb4
commit
68bf97462a
4 changed files with 17 additions and 17 deletions
|
@ -387,10 +387,10 @@ void ctrlGetInput(void)
|
||||||
gInput.q16mlook = fix16_clamp(fix16_sadd(gInput.q16mlook, input.q16mlook), fix16_from_int(-127)>>2, fix16_from_int(127)>>2);
|
gInput.q16mlook = fix16_clamp(fix16_sadd(gInput.q16mlook, input.q16mlook), fix16_from_int(-127)>>2, fix16_from_int(127)>>2);
|
||||||
if (gMe && gMe->pXSprite->health != 0 && !gPaused)
|
if (gMe && gMe->pXSprite->health != 0 && !gPaused)
|
||||||
{
|
{
|
||||||
constexpr int upAngle = 289;
|
int upAngle = 289;
|
||||||
constexpr int downAngle = -347;
|
int downAngle = -347;
|
||||||
constexpr double lookStepUp = 4.0*upAngle/60.0;
|
double lookStepUp = 4.0*upAngle/60.0;
|
||||||
constexpr double lookStepDown = -4.0*downAngle/60.0;
|
double lookStepDown = -4.0*downAngle/60.0;
|
||||||
gViewAngle = (gViewAngle + input.q16turn + fix16_from_float(scaleAdjustmentToInterval(gViewAngleAdjust))) & 0x7ffffff;
|
gViewAngle = (gViewAngle + input.q16turn + fix16_from_float(scaleAdjustmentToInterval(gViewAngleAdjust))) & 0x7ffffff;
|
||||||
if (gViewLookRecenter)
|
if (gViewLookRecenter)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1204,9 +1204,9 @@ void trPlayerCtrlSetScreenEffect(XSPRITE* pXSource, PLAYER* pPlayer) {
|
||||||
|
|
||||||
void trPlayerCtrlSetLookAngle(XSPRITE* pXSource, PLAYER* pPlayer) {
|
void trPlayerCtrlSetLookAngle(XSPRITE* pXSource, PLAYER* pPlayer) {
|
||||||
|
|
||||||
constexpr int upAngle = 289; constexpr int downAngle = -347;
|
int upAngle = 289; int downAngle = -347;
|
||||||
constexpr double lookStepUp = 4.0 * upAngle / 60.0;
|
double lookStepUp = 4.0 * upAngle / 60.0;
|
||||||
constexpr double lookStepDown = -4.0 * downAngle / 60.0;
|
double lookStepDown = -4.0 * downAngle / 60.0;
|
||||||
|
|
||||||
int look = pXSource->data2 << 5;
|
int look = pXSource->data2 << 5;
|
||||||
if (look > 0) pPlayer->q16look = fix16_min(mulscale8(fix16_from_dbl(lookStepUp), look), fix16_from_int(upAngle));
|
if (look > 0) pPlayer->q16look = fix16_min(mulscale8(fix16_from_dbl(lookStepUp), look), fix16_from_int(upAngle));
|
||||||
|
|
|
@ -1574,10 +1574,10 @@ void ProcessInput(PLAYER *pPlayer)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
constexpr int upAngle = 289;
|
int upAngle = 289;
|
||||||
constexpr int downAngle = -347;
|
int downAngle = -347;
|
||||||
constexpr double lookStepUp = 4.0*upAngle/60.0;
|
double lookStepUp = 4.0*upAngle/60.0;
|
||||||
constexpr double lookStepDown = -4.0*downAngle/60.0;
|
double lookStepDown = -4.0*downAngle/60.0;
|
||||||
if (pInput->keyFlags.lookCenter && !pInput->buttonFlags.lookUp && !pInput->buttonFlags.lookDown)
|
if (pInput->keyFlags.lookCenter && !pInput->buttonFlags.lookUp && !pInput->buttonFlags.lookDown)
|
||||||
{
|
{
|
||||||
if (pPlayer->q16look < 0)
|
if (pPlayer->q16look < 0)
|
||||||
|
|
|
@ -456,10 +456,10 @@ void fakeProcessInput(PLAYER *pPlayer, GINPUT *pInput)
|
||||||
else
|
else
|
||||||
predict.at24 = 0;
|
predict.at24 = 0;
|
||||||
#endif
|
#endif
|
||||||
constexpr int upAngle = 289;
|
int upAngle = 289;
|
||||||
constexpr int downAngle = -347;
|
int downAngle = -347;
|
||||||
constexpr double lookStepUp = 4.0*upAngle/60.0;
|
double lookStepUp = 4.0*upAngle/60.0;
|
||||||
constexpr double lookStepDown = -4.0*downAngle/60.0;
|
double lookStepDown = -4.0*downAngle/60.0;
|
||||||
if (predict.at6e && !pInput->buttonFlags.lookUp && !pInput->buttonFlags.lookDown)
|
if (predict.at6e && !pInput->buttonFlags.lookUp && !pInput->buttonFlags.lookDown)
|
||||||
{
|
{
|
||||||
if (predict.at20 < 0)
|
if (predict.at20 < 0)
|
||||||
|
@ -3189,8 +3189,8 @@ void viewDrawScreen(bool sceneonly)
|
||||||
}
|
}
|
||||||
if (gView == gMe && (numplayers <= 1 || gPrediction) && gView->pXSprite->health != 0 && !VanillaMode())
|
if (gView == gMe && (numplayers <= 1 || gPrediction) && gView->pXSprite->health != 0 && !VanillaMode())
|
||||||
{
|
{
|
||||||
constexpr int upAngle = 289;
|
int upAngle = 289;
|
||||||
constexpr int downAngle = -347;
|
int downAngle = -347;
|
||||||
fix16_t q16look;
|
fix16_t q16look;
|
||||||
cA = gViewAngle;
|
cA = gViewAngle;
|
||||||
q16look = gViewLook;
|
q16look = gViewLook;
|
||||||
|
|
Loading…
Reference in a new issue