- fixed check on wrong actor in DoChemBomb.

This commit is contained in:
Christoph Oelckers 2021-12-24 13:03:42 +01:00
parent 514c3ffb10
commit 42a525692d

View file

@ -824,16 +824,15 @@ int DoChemBomb(DSWActor* actor)
case kHitSprite:
{
short wall_ang;
SPRITEp hsp;
if (!TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
PlaySound(DIGI_CHEMBOUNCE, actor, v3df_dontpan);
hsp = &actor->s();
auto hitActor = u->coll.actor();
if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL))
if (TEST(hitActor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_WALL))
{
wall_ang = NORM_ANGLE(hsp->ang);
wall_ang = NORM_ANGLE(hitActor->spr.ang);
WallBounce(actor, wall_ang);
ScaleSpriteVector(actor, 32000);
}