Code: Select all
Index: MissileLauncher.cpp
===================================================================
--- MissileLauncher.cpp (revision 3404)
+++ MissileLauncher.cpp (working copy)
@@ -52,6 +52,11 @@
dir.Normalize();
}
}
+
+ dir+=(gs->randVector()*sprayangle+salvoError)*(1-owner->limExperience*0.5f); //Applies the weapon's
+ //inaccuracy to the projectile
+ dir.Normalize();
+
float3 startSpeed=dir*weaponDef->startvelocity;
if(onlyForward && dynamic_cast<CAirMoveType*>(owner->moveType))
startSpeed+=owner->speed;