mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 15:11:04 +00:00
- Exhumed: Make overridesect
global local to movespritez()
.
* Fixes #933.
This commit is contained in:
parent
93e84ec49d
commit
e82981929d
1 changed files with 7 additions and 10 deletions
|
@ -32,9 +32,6 @@ BEGIN_PS_NS
|
||||||
|
|
||||||
int nPushBlocks;
|
int nPushBlocks;
|
||||||
|
|
||||||
// TODO - moveme?
|
|
||||||
sectortype* overridesect;
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
kMaxPushBlocks = 100,
|
kMaxPushBlocks = 100,
|
||||||
|
@ -88,7 +85,6 @@ void SerializeMove(FSerializer& arc)
|
||||||
.Array("blocks", sBlockInfo, nPushBlocks)
|
.Array("blocks", sBlockInfo, nPushBlocks)
|
||||||
("chunkcount", nCurChunkNum)
|
("chunkcount", nCurChunkNum)
|
||||||
.Array("chunks", nChunkSprite, kMaxMoveChunks)
|
.Array("chunks", nChunkSprite, kMaxMoveChunks)
|
||||||
("overridesect", overridesect)
|
|
||||||
.Array("bodysprite", nBodySprite, countof(nBodySprite))
|
.Array("bodysprite", nBodySprite, countof(nBodySprite))
|
||||||
("curbodygun", nCurBodyGunNum)
|
("curbodygun", nCurBodyGunNum)
|
||||||
.Array("bodygunsprite", nBodyGunSprite, countof(nBodyGunSprite))
|
.Array("bodygunsprite", nBodyGunSprite, countof(nBodyGunSprite))
|
||||||
|
@ -151,7 +147,7 @@ void MoveThings()
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
int BelowNear(DExhumedActor* pActor, double walldist)
|
static int BelowNear(DExhumedActor* pActor, double walldist, sectortype** overridesect)
|
||||||
{
|
{
|
||||||
auto pSector = pActor->sector();
|
auto pSector = pActor->sector();
|
||||||
double z = pActor->spr.pos.Z;
|
double z = pActor->spr.pos.Z;
|
||||||
|
@ -208,7 +204,7 @@ int BelowNear(DExhumedActor* pActor, double walldist)
|
||||||
if (z2 < pActor->spr.pos.Z)
|
if (z2 < pActor->spr.pos.Z)
|
||||||
{
|
{
|
||||||
pActor->spr.pos.Z = z2;
|
pActor->spr.pos.Z = z2;
|
||||||
overridesect = pSector;
|
*overridesect = pSector;
|
||||||
pActor->vel.Z = 0;
|
pActor->vel.Z = 0;
|
||||||
|
|
||||||
bTouchFloor = true;
|
bTouchFloor = true;
|
||||||
|
@ -227,12 +223,12 @@ int BelowNear(DExhumedActor* pActor, double walldist)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
Collision movespritez(DExhumedActor* pActor, double z, double height, double clipdist)
|
Collision movespritez(DExhumedActor* pActor, double z, double height, double clipdist, sectortype** overridesect)
|
||||||
{
|
{
|
||||||
auto pSector = pActor->sector();
|
auto pSector = pActor->sector();
|
||||||
assert(pSector);
|
assert(pSector);
|
||||||
|
|
||||||
overridesect = pSector;
|
*overridesect = pSector;
|
||||||
auto pSect2 = pSector;
|
auto pSect2 = pSector;
|
||||||
|
|
||||||
// backup cstat
|
// backup cstat
|
||||||
|
@ -390,7 +386,7 @@ Collision movespritez(DExhumedActor* pActor, double z, double height, double cli
|
||||||
|
|
||||||
if (pActor->spr.statnum == 100)
|
if (pActor->spr.statnum == 100)
|
||||||
{
|
{
|
||||||
nRet.exbits |= BelowNear(pActor, clipdist * 1.5);
|
nRet.exbits |= BelowNear(pActor, clipdist * 1.5, overridesect);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nRet;
|
return nRet;
|
||||||
|
@ -436,7 +432,8 @@ Collision movesprite(DExhumedActor* pActor, DVector2 vect, double dz, double flo
|
||||||
vect *= 0.5;
|
vect *= 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
Collision nRet = movespritez(pActor, dz, nSpriteHeight, pActor->clipdist);
|
sectortype* overridesect;
|
||||||
|
Collision nRet = movespritez(pActor, dz, nSpriteHeight, pActor->clipdist, &overridesect);
|
||||||
|
|
||||||
pSector = pActor->sector(); // modified in movespritez so re-grab this variable
|
pSector = pActor->sector(); // modified in movespritez so re-grab this variable
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue