mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 18:42:26 +00:00
- Duke: added missing z-offset in hits.
Among other things, this made throwing pipebombs on slopes misbehave.
This commit is contained in:
parent
a50430bf68
commit
694f44774f
1 changed files with 3 additions and 3 deletions
|
@ -174,7 +174,7 @@ int hits(DDukeActor* actor)
|
|||
if (actor->isPlayer()) zoff = isRR() ? PHEIGHT_RR : PHEIGHT_DUKE;
|
||||
else zoff = 0;
|
||||
|
||||
hitscan(actor->spr.pos, actor->sector(), { bcos(actor->spr.ang), bsin(actor->spr.ang), 0 }, hit, CLIPMASK1);
|
||||
hitscan(actor->spr.pos.withZOffset(-zoff), actor->sector(), { bcos(actor->spr.ang), bsin(actor->spr.ang), 0 }, hit, CLIPMASK1);
|
||||
return (FindDistance2D(hit.hitpos.vec2 - actor->spr.pos.vec2));
|
||||
}
|
||||
|
||||
|
@ -191,10 +191,10 @@ int hitasprite(DDukeActor* actor, DDukeActor** hitsp)
|
|||
|
||||
if (badguy(actor))
|
||||
zoff = (42 << 8);
|
||||
else if (actor->isPlayer()) zoff = (39 << 8);
|
||||
else if (actor->spr.picnum == TILE_APLAYER) zoff = isRR() ? PHEIGHT_RR : PHEIGHT_DUKE;
|
||||
else zoff = 0;
|
||||
|
||||
hitscan({ actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - zoff }, actor->sector(), { bcos(actor->spr.ang), bsin(actor->spr.ang), 0 }, hit, CLIPMASK1);
|
||||
hitscan(actor->spr.pos.withZOffset(-zoff), actor->sector(), { bcos(actor->spr.ang), bsin(actor->spr.ang), 0 }, hit, CLIPMASK1);
|
||||
if (hitsp) *hitsp = hit.actor();
|
||||
|
||||
if (hit.hitWall != nullptr && (hit.hitWall->cstat & CSTAT_WALL_MASKED) && badguy(actor))
|
||||
|
|
Loading…
Reference in a new issue