mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 15:40:58 +00:00
- minor code cleanup
This commit is contained in:
parent
5653793bdc
commit
9651a7f694
2 changed files with 33 additions and 8 deletions
|
@ -438,10 +438,10 @@ int DoBloodSpray(DSWActor* actor)
|
|||
break;
|
||||
}
|
||||
|
||||
auto wall_ang = VecToAngle(wph->delta()) + DAngle90;
|
||||
auto wall_ang = VecToAngle(wph->delta()) - DAngle90;
|
||||
|
||||
SpawnMidSplash(actor);
|
||||
auto bldActor = QueueWallBlood(actor, wall_ang + DAngle180);
|
||||
auto bldActor = QueueWallBlood(actor, wall_ang);
|
||||
|
||||
if (bldActor== nullptr)
|
||||
{
|
||||
|
@ -555,6 +555,11 @@ int DoBloodSpray(DSWActor* actor)
|
|||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int DoPhosphorus(DSWActor* actor)
|
||||
{
|
||||
|
@ -617,10 +622,7 @@ int DoPhosphorus(DSWActor* actor)
|
|||
|
||||
case kHitWall:
|
||||
{
|
||||
short hit_wall, nw, wall_ang;
|
||||
walltype* wph;
|
||||
|
||||
wph = actor->user.coll.hitWall;
|
||||
walltype* wph = actor->user.coll.hitWall;
|
||||
|
||||
if (wph->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
|
@ -753,6 +755,12 @@ int DoPhosphorus(DSWActor* actor)
|
|||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int DoChemBomb(DSWActor* actor)
|
||||
{
|
||||
if (actor->user.Flags & (SPR_UNDERWATER))
|
||||
|
@ -965,6 +973,12 @@ int DoChemBomb(DSWActor* actor)
|
|||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int DoCaltropsStick(DSWActor* actor)
|
||||
{
|
||||
actor->user.Counter = !actor->user.Counter;
|
||||
|
@ -975,6 +989,12 @@ int DoCaltropsStick(DSWActor* actor)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int DoCaltrops(DSWActor* actor)
|
||||
{
|
||||
if (actor->user.Flags & (SPR_UNDERWATER))
|
||||
|
@ -1204,6 +1224,12 @@ int SpawnRadiationCloud(DSWActor* actor)
|
|||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int DoRadiationCloud(DSWActor* actor)
|
||||
{
|
||||
actor->spr.pos.XY() += actor->user.change;
|
||||
|
|
|
@ -17116,14 +17116,13 @@ DSWActor* QueueWallBlood(DSWActor* actor, DAngle bang)
|
|||
short rndnum;
|
||||
int daz;
|
||||
HitInfo hit{};
|
||||
int ang = bang.Buildang();
|
||||
|
||||
if (actor->user.Flags & (SPR_UNDERWATER) || SpriteInUnderwaterArea(actor) || SpriteInDiveArea(actor))
|
||||
return nullptr; // No blood underwater!
|
||||
|
||||
daz = Z(RANDOM_P2(128))<<3;
|
||||
daz -= (Z(128)<<2);
|
||||
dang = (ang+(RANDOM_P2(128<<5) >> 5)) - (64);
|
||||
dang = (bang.Buildang() + (RANDOM_P2(128 << 5) >> 5)) - (64);
|
||||
|
||||
FAFhitscan(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - Z(30), actor->sector(), // Start position
|
||||
bcos(dang), // X vector of 3D ang
|
||||
|
|
Loading…
Reference in a new issue