- Replaced the vector math routines with the ones I developed for the FP code.

SVN r454 (trunk)
This commit is contained in:
Randy Heit 2007-01-19 02:00:39 +00:00
commit 47c401f4ec
20 changed files with 2201 additions and 1317 deletions

View file

@ -148,18 +148,18 @@ END_DEFAULTS
int ALoreShot::DoSpecialDamage (AActor *target, int damage)
{
vec3_t thrust;
FVector3 thrust;
thrust[0] = float(this->target->x - target->x);
thrust[1] = float(this->target->y - target->y);
thrust[2] = float(this->target->z - target->z);
thrust.X = float(this->target->x - target->x);
thrust.Y = float(this->target->y - target->y);
thrust.Z = float(this->target->z - target->z);
VectorNormalize (thrust);
VectorScale (thrust, float((255*50*FRACUNIT) / (target->Mass ? target->Mass : 1)), thrust);
thrust.MakeUnit();
thrust *= float((255*50*FRACUNIT) / (target->Mass ? target->Mass : 1));
target->momx += fixed_t(thrust[0]);
target->momy += fixed_t(thrust[1]);
target->momz += fixed_t(thrust[2]);
target->momx += fixed_t(thrust.X);
target->momy += fixed_t(thrust.Y);
target->momz += fixed_t(thrust.Z);
return damage;
}