- Duke: Fix some badly negated angle setups.

This commit is contained in:
Mitchell Richters 2022-10-08 23:23:11 +11:00 committed by Christoph Oelckers
parent 1e7cce28af
commit e7dff22095
4 changed files with 4 additions and 4 deletions

View file

@ -1050,7 +1050,7 @@ void shootbloodsplat(DDukeActor* actor, int p, const DVector3& pos, DAngle ang,
if (spawned)
{
spawned->vel.X = -0.75;
spawned->spr.angle = -hit.hitWall->delta().Angle() + DAngle90; // note the '-' sign here!
spawned->spr.angle = hit.hitWall->delta().Angle() - DAngle90;
spawned->spr.pos = hit.hitpos;
spawned->spr.cstat |= randomXFlip();
ssp(spawned, CLIPMASK0);

View file

@ -521,7 +521,7 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
if (hole)
{
hole->vel.X = -1 / 16.;
hole->spr.angle = -hit.hitWall->delta().Angle() + DAngle90;
hole->spr.angle = hit.hitWall->delta().Angle() - DAngle90;
ssp(hole, CLIPMASK0);
hole->spr.cstat2 |= CSTAT2_SPRITE_DECAL;
}

View file

@ -410,7 +410,7 @@ static void shootweapon(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int
if (hole)
{
hole->vel.X = -1 / 16;
hole->spr.angle = -hit.hitWall->delta().Angle() + DAngle90;
hole->spr.angle = hit.hitWall->delta().Angle() - DAngle90;
ssp(hole, CLIPMASK0);
hole->spr.cstat2 |= CSTAT2_SPRITE_DECAL;
}

View file

@ -679,7 +679,7 @@ void checkhitwall_d(DDukeActor* spr, walltype* wal, const DVector3& pos, int atw
if (spawned)
{
spawned->spr.cstat |= CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_YCENTER;
spawned->spr.angle = -wal->delta().Angle() - DAngle90;
spawned->spr.angle = wal->delta().Angle() + DAngle90;
S_PlayActorSound(SOMETHINGHITFORCE, spawned);
}