mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
- floatified RR hitscan teleporter stuff and other minor things.
This commit is contained in:
parent
4322a30efb
commit
1a64d18349
4 changed files with 16 additions and 16 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue