- floatified DoBloodSpray

This commit is contained in:
Christoph Oelckers 2022-09-04 23:39:22 +02:00
parent 7c2fc9efea
commit 5653793bdc
3 changed files with 10 additions and 10 deletions

View file

@ -406,7 +406,7 @@ int DoBloodSpray(DSWActor* actor)
if ((hitActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_WALL))
{
SpawnMidSplash(actor);
QueueWallBlood(actor, hitActor->int_ang());
QueueWallBlood(actor, hitActor->spr.angle);
WallBounce(actor, hitActor->spr.angle);
ScaleSpriteVector(actor, 32000);
}
@ -414,7 +414,7 @@ int DoBloodSpray(DSWActor* actor)
{
actor->user.change.X = actor->user.change.Y = 0;
SpawnMidSplash(actor);
QueueWallBlood(actor, hitActor->int_ang());
QueueWallBlood(actor, hitActor->spr.angle);
KillActor(actor);
return true;
}
@ -425,9 +425,9 @@ int DoBloodSpray(DSWActor* actor)
case kHitWall:
{
short hit_wall, nw, wall_ang;
int hit_wall, nw;
walltype* wph;
short wb;
int wb;
wph = actor->user.coll.hitWall;
@ -438,10 +438,10 @@ int DoBloodSpray(DSWActor* actor)
break;
}
wall_ang = NORM_ANGLE(getangle(wph->delta()) + 512);
auto wall_ang = VecToAngle(wph->delta()) + DAngle90;
SpawnMidSplash(actor);
auto bldActor = QueueWallBlood(actor, NORM_ANGLE(wall_ang+1024));
auto bldActor = QueueWallBlood(actor, wall_ang + DAngle180);
if (bldActor== nullptr)
{

View file

@ -14617,7 +14617,7 @@ int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, const DVector3& hit_pos
if (!hitActor->user.PlayerP)
SpawnBlood(hitActor, nullptr, actor->spr.angle + DAngle180, &hit_pos);
if (hitActor->user.ID != TRASHCAN && hitActor->user.ID != ZILLA_RUN_R0)
QueueWallBlood(hitActor, actor->int_ang()); //QueueWallBlood needs bullet angle.
QueueWallBlood(hitActor, actor->spr.angle); //QueueWallBlood needs bullet angle.
}
}
@ -17108,7 +17108,7 @@ STATE s_WallBlood4[] =
};
DSWActor* QueueWallBlood(DSWActor* actor, short ang)
DSWActor* QueueWallBlood(DSWActor* actor, DAngle bang)
{
short w,nw,wall_ang,dang;
DSWActor* spawnedActor;
@ -17116,7 +17116,7 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
short rndnum;
int daz;
HitInfo hit{};
DAngle bang = DAngle::fromBuild(ang);
int ang = bang.Buildang();
if (actor->user.Flags & (SPR_UNDERWATER) || SpriteInUnderwaterArea(actor) || SpriteInDiveArea(actor))
return nullptr; // No blood underwater!

View file

@ -85,7 +85,7 @@ SECTOR_OBJECT* DetectSectorObject(sectortype*);
SECTOR_OBJECT* DetectSectorObjectByWall(walltype*);
void ScaleSpriteVector(DSWActor* actor, int scale);
void QueueHole(sectortype* hit_sect, walltype* hit_wall, const DVector3& pos);
DSWActor* QueueWallBlood(DSWActor* hit, short ang);
DSWActor* QueueWallBlood(DSWActor* hit, DAngle ang);
bool SlopeBounce(DSWActor*, bool *hit_wall);
int SpawnSwordSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang);
DSWActor* SpawnBubble(DSWActor*);