- the really final ones.

This commit is contained in:
Christoph Oelckers 2021-11-25 19:41:01 +01:00
parent 7dd2f79676
commit e526686d1e
4 changed files with 7 additions and 8 deletions

View file

@ -2363,7 +2363,7 @@ void PlayerOperateEnv(PLAYERp pp)
DoSlidorOperate(pp, pp->cursector());
break;
case TAG_SPRING_BOARD:
DoSpringBoard(pp/*, pp->cursectnum*/);
DoSpringBoard(pp);
pp->KeyPressBits &= ~SB_OPEN;
break;
case TAG_DOOR_ROTATE:
@ -2386,7 +2386,7 @@ void PlayerOperateEnv(PLAYERp pp)
// ////////////////////////////
SECTORp sectp = pp->cursector();
if (pp->cursectnum >= 0 && sectp->hasU() && sectp->damage)
if (pp->insector() && sectp->hasU() && sectp->damage)
{
if (TEST(sectp->flags, SECTFU_DAMAGE_ABOVE_SECTOR))
{
@ -2413,11 +2413,11 @@ void PlayerOperateEnv(PLAYERp pp)
OperateContinuousTrigger(pp);
// just changed sectors
if (pp->lastcursectnum != pp->cursectnum)
if (pp->lastcursector() != pp->cursector())
{
OperateTripTrigger(pp);
if (pp->cursectnum >= 0 && TEST(pp->cursector()->extra, SECTFX_WARP_SECTOR))
if (pp->insector() && TEST(pp->cursector()->extra, SECTFX_WARP_SECTOR))
{
if (!TEST(pp->Flags2, PF2_TELEPORTED))
{

View file

@ -1635,7 +1635,6 @@ void MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny)
// THIS WAS CAUSING PROLEMS!!!!
// Sectors are still being manipulated so you can end up in a void (-1) sector
//updatesector(pp->posx, pp->posy, &pp->cursectnum);
// New angle is formed by taking last known angle and
// adjusting by the delta angle

View file

@ -2760,9 +2760,9 @@ int DoLavaErupt(DSWActor* actor)
TRAVERSE_CONNECT(pnum)
{
pp = Player + pnum;
if (pp->cursectnum >= 0 && TEST(pp->cursector()->extra, SECTFX_TRIGGER))
if (pp->insector() && TEST(pp->cursector()->extra, SECTFX_TRIGGER))
{
SWSectIterator it(pp->cursectnum);
SWSectIterator it(pp->cursector());
while (auto itActor = it.Next())
{
tsp = &itActor->s();

View file

@ -784,7 +784,7 @@ void SpawnZombie(PLAYERp pp, DSWActor* weaponActor)
auto actorNew = SpawnActor(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursector(), pp->posx, pp->posy, pp->posz, pp->angle.ang.asbuild(), 0);
np = &actorNew->s();
nu = actorNew->u();
np->sectnum = pp->cursectnum;
np->setsector(pp->cursector());
SetOwner(actorNew, ownerActor);
np->pal = nu->spal = ownerActor->u()->spal;
np->ang = RANDOM_P2(2048);