- floatifx position in checkhitswitch_d.

This commit is contained in:
Christoph Oelckers 2022-09-13 20:41:10 +02:00
parent 2081e270cd
commit 4f5dce81f6

View file

@ -229,7 +229,7 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
{ {
uint8_t switchpal; uint8_t switchpal;
int lotag, hitag, picnum, correctdips, numdips; int lotag, hitag, picnum, correctdips, numdips;
int sx, sy; DVector2 spos;
if (wwal == nullptr && act == nullptr) return 0; if (wwal == nullptr && act == nullptr) return 0;
correctdips = 1; correctdips = 1;
@ -240,8 +240,7 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
lotag = act->spr.lotag; lotag = act->spr.lotag;
if (lotag == 0) return 0; if (lotag == 0) return 0;
hitag = act->spr.hitag; hitag = act->spr.hitag;
sx = act->int_pos().X; spos = act->spr.pos.XY();
sy = act->int_pos().Y;
picnum = act->spr.picnum; picnum = act->spr.picnum;
switchpal = act->spr.pal; switchpal = act->spr.pal;
} }
@ -250,8 +249,7 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
lotag = wwal->lotag; lotag = wwal->lotag;
if (lotag == 0) return 0; if (lotag == 0) return 0;
hitag = wwal->hitag; hitag = wwal->hitag;
sx = wwal->wall_int_pos().X; spos = wwal->pos;
sy = wwal->wall_int_pos().Y;
picnum = wwal->picnum; picnum = wwal->picnum;
switchpal = wwal->pal; switchpal = wwal->pal;
} }
@ -482,7 +480,7 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
return 1; return 1;
} }
vec3_t v = { sx, sy, ps[snum].player_int_pos().Z }; DVector3 v(spos, ps[snum].pos.Z);
switch (picnum) switch (picnum)
{ {
default: default: