mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- eliminated all set_int_z calls in Duke.
This commit is contained in:
parent
933e42eca6
commit
977131eb8c
4 changed files with 14 additions and 17 deletions
|
@ -1043,7 +1043,7 @@ void movewaterdrip(DDukeActor *actor, int drip)
|
|||
}
|
||||
else
|
||||
{
|
||||
actor->set_int_z(actor->temp_data[0]);
|
||||
actor->spr.pos.Z = actor->temp_pos.Z;
|
||||
actor->backupz();
|
||||
actor->temp_data[1] = 48 + (krand() & 31);
|
||||
}
|
||||
|
|
|
@ -378,7 +378,7 @@ void initfootprint(DDukeActor* actj, DDukeActor* act)
|
|||
act->spr.angle = actj->spr.angle;
|
||||
}
|
||||
|
||||
act->set_int_z(sect->int_floorz());
|
||||
act->spr.pos.Z = sect->floorz;
|
||||
if (sect->lotag != 1 && sect->lotag != 2)
|
||||
act->spr.xrepeat = act->spr.yrepeat = 32;
|
||||
|
||||
|
@ -506,7 +506,7 @@ void initwaterdrip(DDukeActor* actj, DDukeActor* actor)
|
|||
else if (!actj)
|
||||
{
|
||||
actor->spr.pos.Z += 4;
|
||||
actor->temp_data[0] = actor->int_pos().Z;
|
||||
actor->temp_pos.Z = actor->spr.pos.Z;
|
||||
if (!isRR()) actor->temp_data[1] = krand() & 127;
|
||||
}
|
||||
actor->spr.xrepeat = 24;
|
||||
|
|
|
@ -157,11 +157,11 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
{
|
||||
if (actj->sector()->lotag == 2)
|
||||
{
|
||||
act->set_int_z(getceilzofslopeptr(act->sector(), act->int_pos().X, act->int_pos().Y) + (16 << 8));
|
||||
act->spr.pos.Z = getceilzofslopeptrf(act->sector(), act->spr.pos) + 16;
|
||||
act->spr.cstat |= CSTAT_SPRITE_YFLIP;
|
||||
}
|
||||
else if (actj->sector()->lotag == 1)
|
||||
act->set_int_z(getflorzofslopeptr(act->sector(), act->int_pos().X, act->int_pos().Y));
|
||||
act->spr.pos.Z = getflorzofslopeptrf(act->sector(), act->spr.pos);
|
||||
}
|
||||
|
||||
if (sectp->floorpicnum == FLOORSLIME ||
|
||||
|
@ -294,10 +294,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
act->spr.cstat |= CSTAT_SPRITE_ALIGNMENT_FLOOR;
|
||||
if (act->spr.picnum == LAVAPOOL) // Twentieth Anniversary World Tour
|
||||
{
|
||||
int fz = getflorzofslopeptr(act->sector(), act->int_pos().X, act->int_pos().Y);
|
||||
if (fz != act->int_pos().Z)
|
||||
act->set_int_z(fz);
|
||||
act->spr.pos.Z -= 0.78125;
|
||||
act->spr.pos.Z = getflorzofslopeptrf(act->sector(), act->spr.pos) - 0.78125;
|
||||
}
|
||||
[[fallthrough]];
|
||||
|
||||
|
@ -637,9 +634,9 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
|
||||
if (actj)
|
||||
{
|
||||
int x = getflorzofslopeptr(act->sector(), act->int_pos().X, act->int_pos().Y);
|
||||
if (act->int_pos().Z > x - (12 << 8))
|
||||
act->set_int_z(x - (12 << 8));
|
||||
double x = getflorzofslopeptrf(act->sector(), act->spr.pos);
|
||||
if (act->spr.pos.Z > x - 12)
|
||||
act->spr.pos.Z = x - 12;
|
||||
}
|
||||
|
||||
if (act->spr.picnum == ONFIRE)
|
||||
|
|
|
@ -212,11 +212,11 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
{
|
||||
if (actj->sector()->lotag == 2)
|
||||
{
|
||||
act->set_int_z(getceilzofslopeptr(act->sector(), act->int_pos().X, act->int_pos().Y) + (16 << 8));
|
||||
act->spr.pos.Z = getceilzofslopeptrf(act->sector(), act->spr.pos) + 16;
|
||||
act->spr.cstat |= CSTAT_SPRITE_YFLIP;
|
||||
}
|
||||
else if (actj->sector()->lotag == 1)
|
||||
act->set_int_z(getflorzofslopeptr(act->sector(), act->int_pos().X, act->int_pos().Y));
|
||||
act->spr.pos.Z = getceilzofslopeptrf(act->sector(), act->spr.pos);
|
||||
}
|
||||
|
||||
if (sectp->floorpicnum == FLOORSLIME ||
|
||||
|
@ -649,9 +649,9 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
|
||||
if (actj)
|
||||
{
|
||||
int x = getflorzofslopeptr(act->sector(), act->int_pos().X, act->int_pos().Y);
|
||||
if (act->int_pos().Z > x - (12 << 8))
|
||||
act->set_int_z(x - (12 << 8));
|
||||
double x = getflorzofslopeptrf(act->sector(), act->spr.pos);
|
||||
if (act->spr.pos.Z > x - 12)
|
||||
act->spr.pos.Z = x - 12;
|
||||
}
|
||||
|
||||
ChangeActorStat(act, STAT_MISC);
|
||||
|
|
Loading…
Reference in a new issue