Skip to content

Commit

Permalink
- Blood: use a 3D unit vector to set Blood's projectile velocity.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Jan 8, 2023
1 parent 532f994 commit d7d4bfe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions source/games/blood/src/actor.cpp
Expand Up @@ -6424,8 +6424,6 @@ void actBuildMissile(DBloodActor* spawned, DBloodActor* actor)

DBloodActor* actFireMissile(DBloodActor* actor, double xyoff, double zoff, DVector3 dv, int nType)
{
// this function expects a vector with unit length in XY. Let's not depend on all callers doing it.
dv /= dv.XY().Length();
assert(nType >= kMissileBase && nType < kMissileMax);
bool impact = false;
const MissileType* pMissileInfo = &missileInfo[nType - kMissileBase];
Expand Down Expand Up @@ -6460,7 +6458,7 @@ DBloodActor* actFireMissile(DBloodActor* actor, double xyoff, double zoff, DVect
spawned->spr.scale = DVector2(pMissileInfo->xrepeat * REPEAT_SCALE, pMissileInfo->yrepeat * REPEAT_SCALE);
spawned->spr.picnum = pMissileInfo->picnum;
spawned->spr.Angles.Yaw = actor->spr.Angles.Yaw + mapangle(pMissileInfo->angleOfs);
spawned->vel = dv * pMissileInfo->fVelocity();
spawned->vel = dv.Unit() * pMissileInfo->fVelocity();
spawned->SetOwner(actor);
spawned->spr.cstat |= CSTAT_SPRITE_BLOCK;
spawned->SetTarget(nullptr);
Expand Down
2 changes: 1 addition & 1 deletion wadsrc/static/menudef.txt
Expand Up @@ -1020,7 +1020,7 @@ OptionMenu GameplayOptions protected
Option "$ENEMY_BEHAVIOR", "cl_bloodvanillaenemies", "EnemyBehavior"
}
StaticText ""
ifgame(Duke, Nam, WW2GI, Redneck, RedneckRides)
ifgame(Duke, Nam, WW2GI, Redneck, RedneckRides, Blood, ShadowWarrior)
{
Option "$PLRMNU_FULLVIEWPITCH", "cl_clampedpitch", "OffOn"
}
Expand Down

0 comments on commit d7d4bfe

Please sign in to comment.