- floatified RR hitscan teleporter stuff and other minor things.

This commit is contained in:
Christoph Oelckers 2022-09-12 21:26:17 +02:00
parent 4322a30efb
commit 1a64d18349
4 changed files with 16 additions and 16 deletions

View file

@ -3469,7 +3469,7 @@ void moveeffectors_d(void) //STATNUM 3
auto sc = act->sector();
if (sc->wallnum != 4) continue;
auto wal = sc->firstWall() + 2;
if (wal->nextSector()) alignflorslope(act->sector(), wal->wall_int_pos().X, wal->wall_int_pos().Y, wal->nextSector()->int_floorz());
if (wal->nextSector()) alignflorslope(act->sector(), DVector3(wal->pos, wal->nextSector()->floorz));
}
}

View file

@ -3428,7 +3428,7 @@ void moveeffectors_r(void) //STATNUM 3
auto sc = act->sector();
if (sc->wallnum != 4) continue;
auto wal = sc->firstWall() + 2;
alignflorslope(act->sector(), wal->wall_int_pos().X, wal->wall_int_pos().Y, wal->nextSector()->int_floorz());
if (wal->nextSector()) alignflorslope(act->sector(), DVector3(wal->pos, wal->nextSector()->floorz));
}
}

View file

@ -953,10 +953,10 @@ void DoWall(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, i
switch (lLabelID)
{
case WALL_X:
if (!bSet) SetGameVarID(lVar2, wallp->wall_int_pos().X, sActor, sPlayer);
if (!bSet) SetGameVarID(lVar2, wallp->pos.X / maptoworld, sActor, sPlayer);
break;
case WALL_Y:
if (bSet) SetGameVarID(lVar2, wallp->wall_int_pos().Y, sActor, sPlayer);
if (!bSet) SetGameVarID(lVar2, wallp->pos.Y / maptoworld, sActor, sPlayer);
break;
case WALL_POINT2:
if (!bSet) SetGameVarID(lVar2, wallp->point2, sActor, sPlayer);

View file

@ -114,18 +114,18 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
if (effector->sector() == hit.hitSector && effector->spr.picnum == SECTOREFFECTOR && effector->GetOwner()
&& effector->spr.lotag == SE_7_TELEPORT)
{
int nx, ny, nz;
nx = hit.int_hitpos().X + (effector->GetOwner()->int_pos().X - effector->int_pos().X);
ny = hit.int_hitpos().Y + (effector->GetOwner()->int_pos().Y - effector->int_pos().Y);
DVector3 npos;
npos.XY() = hit.hitpos.XY() + (effector->GetOwner()->spr.pos.XY() - effector->spr.pos.XY());
if (hit.hitSector->lotag == 161)
{
nz = effector->GetOwner()->sector()->int_floorz();
npos.Z = effector->GetOwner()->sector()->floorz;
}
else
{
nz = effector->GetOwner()->sector()->int_ceilingz();
npos.Z = effector->GetOwner()->sector()->ceilingz;
}
hitscan(vec3_t( nx, ny, nz ), effector->GetOwner()->sector(), { bcos(sa), bsin(sa), zvel << 6 }, hit, CLIPMASK1);
auto ang = DAngle::fromBuild(sa);
hitscan(npos, effector->GetOwner()->sector(), DVector3(ang.ToVector() * 1024, zvel * 0.25), hit, CLIPMASK1);
break;
}
}
@ -269,18 +269,18 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
if (effector->sector() == hit.hitSector && effector->spr.picnum == SECTOREFFECTOR && effector->GetOwner()
&& effector->spr.lotag == SE_7_TELEPORT)
{
int nx, ny, nz;
nx = hit.int_hitpos().X + (effector->GetOwner()->int_pos().X - effector->int_pos().X);
ny = hit.int_hitpos().Y + (effector->GetOwner()->int_pos().Y - effector->int_pos().Y);
DVector3 npos;
npos.XY() = hit.hitpos.XY() + (effector->GetOwner()->spr.pos.XY() - effector->spr.pos.XY());
if (hit.hitSector->lotag == 161)
{
nz = effector->GetOwner()->sector()->int_floorz();
npos.Z = effector->GetOwner()->sector()->floorz;
}
else
{
nz = effector->GetOwner()->sector()->int_ceilingz();
npos.Z = effector->GetOwner()->sector()->ceilingz;
}
hitscan(vec3_t( nx, ny, nz ), effector->GetOwner()->sector(), { bcos(sa), bsin(sa), zvel << 6 }, hit, CLIPMASK1);
auto ang = DAngle::fromBuild(sa);
hitscan(npos, effector->GetOwner()->sector(), DVector3(ang.ToVector() * 1024, zvel * 0.25), hit, CLIPMASK1);
break;
}
}