- movesprite cleanup.

This commit is contained in:
Christoph Oelckers 2020-11-04 19:09:38 +01:00
parent 7a95c1661e
commit aac5ab55a3
3 changed files with 9 additions and 9 deletions

View file

@ -603,10 +603,10 @@ int movesprite_ex_d(DDukeActor* actor, int xchange, int ychange, int zchange, un
{
if (spri->statnum == STAT_PROJECTILE)
retval =
clipmove(&spri->x, &spri->y, &daz, &dasectnum, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), 8L, (4 << 8), (4 << 8), cliptype);
clipmove_ex(&spri->x, &spri->y, &daz, &dasectnum, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), 8L, (4 << 8), (4 << 8), cliptype, result);
else
retval =
clipmove(&spri->x, &spri->y, &daz, &dasectnum, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), (int)(spri->clipdist << 2), (4 << 8), (4 << 8), cliptype);
clipmove_ex(&spri->x, &spri->y, &daz, &dasectnum, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), (int)(spri->clipdist << 2), (4 << 8), (4 << 8), cliptype, result);
}
if (dasectnum >= 0)
@ -615,10 +615,10 @@ int movesprite_ex_d(DDukeActor* actor, int xchange, int ychange, int zchange, un
daz = spri->z + ((zchange * TICSPERFRAME) >> 3);
if ((daz > actor->ceilingz) && (daz <= actor->floorz))
spri->z = daz;
else if (retval == 0)
else if (retval == kHitNone)
return result.setSector(dasectnum);
return result.setFromEngine(retval);
return retval;
}
//---------------------------------------------------------------------------
//

View file

@ -433,10 +433,10 @@ int movesprite_ex_r(DDukeActor* actor, int xchange, int ychange, int zchange, un
{
if (spri->statnum == STAT_PROJECTILE)
retval =
clipmove(&spri->x, &spri->y, &daz, &dasectnum, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), 8L, (4 << 8), (4 << 8), cliptype);
clipmove_ex(&spri->x, &spri->y, &daz, &dasectnum, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), 8L, (4 << 8), (4 << 8), cliptype, result);
else
retval =
clipmove(&spri->x, &spri->y, &daz, &dasectnum, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), 128, (4 << 8), (4 << 8), cliptype);
clipmove_ex(&spri->x, &spri->y, &daz, &dasectnum, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), 128, (4 << 8), (4 << 8), cliptype, result);
}
if (dasectnum >= 0)
@ -448,7 +448,7 @@ int movesprite_ex_r(DDukeActor* actor, int xchange, int ychange, int zchange, un
else if (retval == 0)
return result.setSector(dasectnum);
return result.setFromEngine(retval);
return retval;
}
//---------------------------------------------------------------------------

View file

@ -3066,8 +3066,8 @@ HORIZONLY:
psect = s->sectnum;
if (ud.clipping == 0 && sector[psect].lotag == 31)
{
auto secact = &hittype[sector[psect].hitag];
if (secact->s.xvel && secact->temp_data[0] == 0)
auto secact = ScriptIndexToActor(sector[psect].hitag);
if (secact && secact->s.xvel && secact->temp_data[0] == 0)
{
quickkill(p);
return;