mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-20 16:10:52 +00:00
- Exhumed: nCamera
-> nCamerapos
.
This commit is contained in:
parent
48c2b5d89a
commit
dea34609cd
4 changed files with 16 additions and 16 deletions
|
@ -809,7 +809,7 @@ void LoadObjects(TArray<DExhumedActor*>& actors)
|
|||
runlist_ReadyChannel(nChannel);
|
||||
}
|
||||
|
||||
nCamera = initpos;
|
||||
nCamerapos = initpos;
|
||||
}
|
||||
|
||||
void SerializeInit(FSerializer& arc)
|
||||
|
|
|
@ -479,7 +479,7 @@ int seq_GetSeqPicnum(int16_t nSeq, int16_t edx, int16_t ebx)
|
|||
int seq_PlotArrowSequence(int nSprite, int16_t nSeq, int nVal)
|
||||
{
|
||||
tspritetype* pTSprite = mytspriteArray->get(nSprite);
|
||||
int nAngle = getangle(nCamera.XY() - pTSprite->pos.XY());
|
||||
int nAngle = getangle(nCamerapos.XY() - pTSprite->pos.XY());
|
||||
|
||||
int nSeqOffset = ((((pTSprite->int_ang() + 512) - nAngle) + 128) & kAngleMask) >> 8;
|
||||
|
||||
|
@ -527,7 +527,7 @@ int seq_PlotArrowSequence(int nSprite, int16_t nSeq, int nVal)
|
|||
int seq_PlotSequence(int nSprite, int16_t edx, int16_t nFrame, int16_t ecx)
|
||||
{
|
||||
tspritetype* pTSprite = mytspriteArray->get(nSprite);
|
||||
int nAngle = getangle(nCamera.XY() - pTSprite->pos.XY());
|
||||
int nAngle = getangle(nCamerapos.XY() - pTSprite->pos.XY());
|
||||
|
||||
|
||||
int val;
|
||||
|
|
|
@ -37,7 +37,7 @@ BEGIN_PS_NS
|
|||
bool bSubTitles = true;
|
||||
|
||||
int16_t dVertPan[kMaxPlayers];
|
||||
DVector3 nCamera;
|
||||
DVector3 nCamerapos;
|
||||
bool bTouchFloor;
|
||||
|
||||
int16_t nQuake[kMaxPlayers] = { 0 };
|
||||
|
@ -193,7 +193,7 @@ void DrawView(double interpfrac, bool sceneonly)
|
|||
{
|
||||
DExhumedActor* pActor = SnakeList[nSnakeCam].pSprites[0];
|
||||
|
||||
nCamera = pActor->spr.pos;
|
||||
nCamerapos = pActor->spr.pos;
|
||||
pSector = pActor->sector();
|
||||
nCameraang = pActor->spr.angle;
|
||||
rotscrnang = nullAngle;
|
||||
|
@ -214,10 +214,10 @@ void DrawView(double interpfrac, bool sceneonly)
|
|||
}
|
||||
else
|
||||
{
|
||||
nCamera = pPlayerActor->interpolatedvec3(interpfrac).plusZ(interpolatedvaluef(PlayerList[nLocalPlayer].oeyelevel, PlayerList[nLocalPlayer].eyelevel, interpfrac * MaxSmoothRatio) * zinttoworld);
|
||||
nCamerapos = pPlayerActor->interpolatedvec3(interpfrac).plusZ(interpolatedvaluef(PlayerList[nLocalPlayer].oeyelevel, PlayerList[nLocalPlayer].eyelevel, interpfrac * MaxSmoothRatio) * zinttoworld);
|
||||
|
||||
pSector = PlayerList[nLocalPlayer].pPlayerViewSect;
|
||||
updatesector(nCamera, &pSector);
|
||||
updatesector(nCamerapos, &pSector);
|
||||
if (pSector == nullptr) pSector = PlayerList[nLocalPlayer].pPlayerViewSect;
|
||||
|
||||
if (!SyncInput())
|
||||
|
@ -252,23 +252,23 @@ void DrawView(double interpfrac, bool sceneonly)
|
|||
}
|
||||
else
|
||||
{
|
||||
nCamera.Z = min(nCamera.Z + nQuake[nLocalPlayer] * zinttoworld, pPlayerActor->sector()->floorz);
|
||||
nCamerapos.Z = min(nCamerapos.Z + nQuake[nLocalPlayer] * zinttoworld, pPlayerActor->sector()->floorz);
|
||||
nCameraang += DAngle::fromBam((nQuake[nLocalPlayer] % 4095) << 14);
|
||||
|
||||
if (bCamera)
|
||||
{
|
||||
nCamera.Z -= 10;
|
||||
if (!calcChaseCamPos(nCamera, pPlayerActor, &pSector, nCameraang, nCamerapan, interpfrac * MaxSmoothRatio))
|
||||
nCamerapos.Z -= 10;
|
||||
if (!calcChaseCamPos(nCamerapos, pPlayerActor, &pSector, nCameraang, nCamerapan, interpfrac * MaxSmoothRatio))
|
||||
{
|
||||
nCamera.Z += 10;
|
||||
calcChaseCamPos(nCamera, pPlayerActor, &pSector, nCameraang, nCamerapan, interpfrac * MaxSmoothRatio);
|
||||
nCamerapos.Z += 10;
|
||||
calcChaseCamPos(nCamerapos, pPlayerActor, &pSector, nCameraang, nCamerapan, interpfrac * MaxSmoothRatio);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pSector != nullptr)
|
||||
{
|
||||
nCamera.Z = min(max(nCamera.Z, pSector->ceilingz + 1), pSector->floorz - 1); // std::clamp may fail on this one if sectors are closed.
|
||||
nCamerapos.Z = min(max(nCamerapos.Z, pSector->ceilingz + 1), pSector->floorz - 1);
|
||||
}
|
||||
|
||||
if (nFreeze == 2 || nFreeze == 1)
|
||||
|
@ -304,7 +304,7 @@ void DrawView(double interpfrac, bool sceneonly)
|
|||
|
||||
if (!nFreeze && !sceneonly)
|
||||
DrawWeapons(interpfrac * MaxSmoothRatio);
|
||||
render_drawrooms(nullptr, nCamera, sectnum(pSector), nCameraang, nCamerapan, rotscrnang, interpfrac * MaxSmoothRatio);
|
||||
render_drawrooms(nullptr, nCamerapos, sectnum(pSector), nCameraang, nCamerapan, rotscrnang, interpfrac * MaxSmoothRatio);
|
||||
|
||||
if (HavePLURemap())
|
||||
{
|
||||
|
@ -418,7 +418,7 @@ void SerializeView(FSerializer& arc)
|
|||
{
|
||||
if (arc.BeginObject("view"))
|
||||
{
|
||||
arc("camera", nCamera)
|
||||
arc("camera", nCamerapos)
|
||||
("touchfloor", bTouchFloor)
|
||||
("chunktotal", nChunkTotal)
|
||||
("camera", bCamera)
|
||||
|
|
|
@ -33,7 +33,7 @@ void Clip();
|
|||
|
||||
extern int16_t dVertPan[];
|
||||
extern int16_t nQuake[];
|
||||
extern DVector3 nCamera;
|
||||
extern DVector3 nCamerapos;
|
||||
extern bool bTouchFloor;
|
||||
extern int nChunkTotal;
|
||||
extern int gFov;
|
||||
|
|
Loading…
Reference in a new issue