mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-01 05:20:43 +00:00
- like actFireVector, the direction vector needs to have unit length in 2D for actFireMissile as well.
May later be turned into a 3D unit vector for pitch correct missile movement.
This commit is contained in:
parent
5e4d45f6b8
commit
a655b3835f
2 changed files with 4 additions and 2 deletions
|
@ -6444,8 +6444,10 @@ void actBuildMissile(DBloodActor* spawned, DBloodActor* actor)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DBloodActor* actFireMissile(DBloodActor* actor, double xyoff, double zoff, const DVector3& dv, int nType)
|
||||
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];
|
||||
|
|
|
@ -250,7 +250,7 @@ inline DBloodActor* actFireThing(DBloodActor* actor, int xyoff_, int zoff_, int
|
|||
return actFireThing(actor, xyoff, zoff, zvel, thingType, nSpeed);
|
||||
}
|
||||
|
||||
DBloodActor* actFireMissile(DBloodActor* actor, double xyoff, double zoff, const DVector3& dc, int nType);
|
||||
DBloodActor* actFireMissile(DBloodActor* actor, double xyoff, double zoff, DVector3 dc, int nType);
|
||||
|
||||
inline DBloodActor* actFireMissile(DBloodActor* actor, int xyoff_, int zoff_, int dx, int dy, int dz, int nType)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue