mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-24 09:42:13 +00:00
- Exhumed: Restore more accurate pitch adjustment for Ramses.
* Use `maphoriz(-11)` instead of some voodoo degree amount so it's clear when comparing sources. * Don't stop interpolating while doing Ramses. * Apply Ramses pitch amount to `nVertDestPan`, just like the original. * Don't reset all angles when initialising Ramses, just set the yaw angle. * Don't return player's view to center when doing Ramses, use the delta between `nDestVertPan` and the player's pitch, using same formula as original. * Comment in how normal/non-ramses `nDestVertPan` setting should be 8x the sprite Z move delta, not 2x. I know it's not correct, but its been this way for a long time and we probably should CVAR it. * When doing the player's death pitch, it's 40.156 degrees (horizon of 108), not 38 degrees (horizon of 100). This was a misread of mine way back when.
This commit is contained in:
parent
b6da4ecddf
commit
b5a9085aed
4 changed files with 11 additions and 8 deletions
|
@ -149,7 +149,7 @@ struct MapRecord
|
|||
// game specific stuff
|
||||
int rr_startsound = 0;
|
||||
int rr_mamaspawn = 15;
|
||||
DAngle ex_ramses_horiz = DAngle::fromDeg(-4.912);
|
||||
DAngle ex_ramses_horiz = maphoriz(-11);
|
||||
int ex_ramses_cdtrack = -1; // this is not music, it is the actual dialogue!
|
||||
FString ex_ramses_pup;
|
||||
FString ex_ramses_text;
|
||||
|
|
|
@ -74,7 +74,7 @@ void GameInterface::Render()
|
|||
DrawClock();
|
||||
}
|
||||
|
||||
const double interpfrac = bRecord || bPlayback || nFreeze != 0 || paused || cl_capfps || !cl_interpolate || EndLevel ? 1. : I_GetTimeFrac();
|
||||
const double interpfrac = bRecord || bPlayback || paused || cl_capfps || !cl_interpolate || EndLevel ? 1. : I_GetTimeFrac();
|
||||
DrawView(interpfrac);
|
||||
|
||||
if (nFreeze != 2) // Hide when Ramses is talking.
|
||||
|
|
|
@ -1420,7 +1420,8 @@ static void doPlayerRamses(Player* const pPlayer)
|
|||
if (nTotalPlayers <= 1)
|
||||
{
|
||||
const auto pPlayerActor = pPlayer->pActor;
|
||||
pPlayerActor->spr.Angles = DRotator(nullAngle, (pSpiritSprite->spr.pos.XY() - pPlayerActor->spr.pos.XY()).Angle(), nullAngle);
|
||||
pPlayerActor->spr.Angles.Yaw = (pSpiritSprite->spr.pos.XY() - pPlayerActor->spr.pos.XY()).Angle();
|
||||
pPlayerActor->spr.Angles.Pitch = pPlayerActor->PrevAngles.Pitch;
|
||||
pPlayerActor->backupang();
|
||||
pPlayerActor->vel.Zero();
|
||||
pPlayer->vel.Zero();
|
||||
|
@ -1428,8 +1429,7 @@ static void doPlayerRamses(Player* const pPlayer)
|
|||
if (nFreeze < 1)
|
||||
{
|
||||
nFreeze = 1;
|
||||
pPlayerActor->spr.Angles.Pitch = currentLevel->ex_ramses_horiz;
|
||||
pPlayer->nDestVertPan = nullAngle;
|
||||
pPlayer->nDestVertPan = currentLevel->ex_ramses_horiz;
|
||||
StopAllSounds();
|
||||
StopLocalSound();
|
||||
InitSpiritHead();
|
||||
|
@ -1708,6 +1708,7 @@ static bool doPlayerMovement(Player* const pPlayer)
|
|||
doPlayerMovingBlocks(pPlayer, nMove, spr_pos, spr_vel, spr_sect);
|
||||
}
|
||||
|
||||
// This should amplified 8x, not 2x, but it feels very heavy. Add a CVAR?
|
||||
pPlayer->nDestVertPan = maphoriz((pPlayerActor->spr.pos.Z - spr_pos.Z) * 2.);
|
||||
pPlayer->ototalvel = pPlayer->totalvel;
|
||||
pPlayer->totalvel = int((spr_pos.XY() - pPlayerActor->spr.pos.XY()).Length() * worldtoint);
|
||||
|
@ -2006,9 +2007,9 @@ static void doPlayerDeathPitch(Player* const pPlayer)
|
|||
{
|
||||
pPlayerActor->spr.Angles.Pitch -= maphoriz(pPlayer->dVertPan);
|
||||
|
||||
if (pPlayerActor->spr.Angles.Pitch.Degrees() <= -38)
|
||||
if (pPlayerActor->spr.Angles.Pitch.Degrees() <= -40.156)
|
||||
{
|
||||
pPlayerActor->spr.Angles.Pitch = DAngle::fromDeg(-38);
|
||||
pPlayerActor->spr.Angles.Pitch = DAngle::fromDeg(-40.156);
|
||||
}
|
||||
else if (pPlayerActor->spr.Angles.Pitch.Sgn() >= 0 && !(pPlayerActor->sector()->Flag & kSectUnderwater))
|
||||
{
|
||||
|
|
|
@ -195,7 +195,9 @@ void DoSpiritHead()
|
|||
auto pSpiritSpr = pSpiritSprite;
|
||||
auto Worktile = GetWritablePixels(tileGetTextureID(kTileRamsesWorkTile));
|
||||
|
||||
PlayerList[0].input.actions |= SB_CENTERVIEW;
|
||||
const auto pPlayer = &PlayerList[0];
|
||||
const auto pPlayerActor = pPlayer->pActor;
|
||||
pPlayerActor->spr.Angles.Pitch += deltaangle(pPlayerActor->spr.Angles.Pitch, pPlayer->nDestVertPan) * 0.25;
|
||||
|
||||
switch (nHeadStage)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue