Skip to content

Commit

Permalink
further fix #4926: remove missile's always-exact targeting as a whole
Browse files Browse the repository at this point in the history
-> doesn't make sense for unit targets only for projectile targets it would make sense, but those don't got an error pos at all
  • Loading branch information
jK committed Aug 19, 2015
1 parent 30b0658 commit 8750d2d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions rts/Sim/Projectiles/WeaponProjectiles/MissileProjectile.cpp
Expand Up @@ -156,16 +156,14 @@ void CMissileProjectile::Update()

if (weaponDef->tracks && target != NULL) {
const CSolidObject* so = dynamic_cast<const CSolidObject*>(target);
const CWeaponProjectile* po = dynamic_cast<const CWeaponProjectile*>(target);

targetPos = target->pos;
targetVel = target->speed;

if (so != NULL) {
targetPos = so->aimPos;
targetVel = so->speed;
const bool exactTarget = weaponDef->interceptor && (pos.SqDistance(so->aimPos) < Square(150.0f));

if (allyteamID != -1 && !exactTarget) {
if (allyteamID != -1) {
// if we have an owner and our target is a unit,
// set target-position to its error-position for
// our owner's allyteam
Expand All @@ -176,9 +174,6 @@ void CMissileProjectile::Update()
}
}
}
if (po != NULL) {
targetVel = po->speed;
}
}


Expand Down

0 comments on commit 8750d2d

Please sign in to comment.