diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index de3eee557..0b619fdd0 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -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)§or[dasectnum]; uwallptr_t wal; diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index ab9e81c57..21a9c6fdf 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -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; diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index bb69b7398..7a8183d2d 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -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 ) diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index 171c49530..3e07190d0 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -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 ) diff --git a/source/games/duke/src/player.cpp b/source/games/duke/src/player.cpp index 721dc8cab..12b4163a3 100644 --- a/source/games/duke/src/player.cpp +++ b/source/games/duke/src/player.cpp @@ -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; diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 06c5f0449..3ff526dbd 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -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;