Skip to content

Commit

Permalink
fix #4926: limit missile's always-exact targeting to interceptors
Browse files Browse the repository at this point in the history
  • Loading branch information
jK committed Aug 19, 2015
1 parent 82d6a8c commit 4bb06e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rts/Sim/Projectiles/WeaponProjectiles/MissileProjectile.cpp
Expand Up @@ -163,8 +163,9 @@ void CMissileProjectile::Update()
if (so != NULL) {
targetPos = so->aimPos;
targetVel = so->speed;
const bool exactTarget = weaponDef->interceptor && (pos.SqDistance(so->aimPos) < Square(150.0f));

if (allyteamID != -1 && pos.SqDistance(so->aimPos) > Square(150.0f)) {
if (allyteamID != -1 && !exactTarget) {
// if we have an owner and our target is a unit,
// set target-position to its error-position for
// our owner's allyteam
Expand Down

0 comments on commit 4bb06e2

Please sign in to comment.