Thanks for your advice.
I currently have this, but I am getting a number in the thousands.
PHP Code:
float GetDamageVelocityModifier(int attacker, int victim)
{
float attackerPos[3], victimPos[3], unitVec[3], attackerVel[3], attackerNextPos[3], attackerVelVec[3];
GetClientAbsOrigin(attacker, attackerPos);
GetClientAbsOrigin(victim, victimPos);
MakeVectorFromPoints(attackerPos, victimPos, unitVec);
GetEntPropVector(attacker, Prop_Data, "m_vecVelocity", attackerVel);
AddVectors(attackerPos, attackerVel, attackerNextPos);
MakeVectorFromPoints(attackerPos, attackerNextPos, attackerVelVec);
return 1 + 0.5 * GetVectorDotProduct(unitVec, attackerVelVec);
}
I am guessing what I forgot to do is use NormalizeVector somewhere?