- final cleanup before replacement

This commit is contained in:
Christoph Oelckers 2021-11-21 08:53:53 +01:00
parent fcbf861ad4
commit 69a7b4d0bc
6 changed files with 5 additions and 6 deletions

View file

@ -863,7 +863,7 @@ int32_t cansee(int32_t x1, int32_t y1, int32_t z1, int16_t sect1, int32_t x2, in
BFSSearch search(numsectors, sect1);
for (int dasectnum; (dasectnum = search.GetNext()) != BFSSearch::EOL;)
for (unsigned dasectnum; (dasectnum = search.GetNext()) != BFSSearch::EOL;)
{
auto const sec = (usectorptr_t)&sector[dasectnum];
uwallptr_t wal;

View file

@ -5133,7 +5133,7 @@ int furthestcanseepoint(DDukeActor *actor, DDukeActor* tosee, int* dax, int* day
da = abs(hx - s->x) + abs(hy - s->y);
if (d < da && hitsect)
if (cansee(hx, hy, hz, sectnum(hitsect), s->x, s->y, s->z - (16 << 8), s->sectnum))
if (cansee(hx, hy, hz, hitsect, s->x, s->y, s->z - (16 << 8), s->sector()))
{
*dax = hx;
*day = hy;

View file

@ -3473,7 +3473,7 @@ void handle_se06_d(DDukeActor* actor)
DukeStatIterator it(STAT_EFFECTOR);
while (auto act2 = it.Next())
{
if ((act2->s->lotag == 14) && (sh == act2->s->hitag) && (act2->temp_data[0] == t[0])) // sectnum()
if ((act2->s->lotag == 14) && (sh == act2->s->hitag) && (act2->temp_data[0] == t[0]))
{
act2->s->xvel = s->xvel;
//if( t[4] == 1 )

View file

@ -3439,7 +3439,7 @@ void handle_se06_r(DDukeActor *actor)
DukeStatIterator it(STAT_EFFECTOR);
while (auto act2 = it.Next())
{
if ((act2->s->lotag == 14) && (sh == act2->s->hitag) && (act2->temp_data[0] == t[0])) // sectnum()
if ((act2->s->lotag == 14) && (sh == act2->s->hitag) && (act2->temp_data[0] == t[0]))
{
act2->s->xvel = s->xvel;
// if( t[4] == 1 )

View file

@ -965,7 +965,6 @@ bool movementBlocked(player_struct *p)
int haskey(sectortype* sectp, int snum)
{
int sect = sectnum(sectp);
auto p = &ps[snum];
if (!sectp->keyinfo)
return 1;

View file

@ -997,7 +997,7 @@ static void shootgrowspark(DDukeActor* actor, int p, int sx, int sy, int sz, int
//RESHOOTGROW:
s->cstat &= ~257;
hitscan(sx, sy, sz, sectnum(sect), bcos(sa), bsin(sa),
hitscan(sx, sy, sz, sect, bcos(sa), bsin(sa),
zvel << 6, &hitsectp, &wal, &hitsprt, &hitx, &hity, &hitz, CLIPMASK1);
s->cstat |= 257;