Opened 10 years ago

Closed 4 years ago

#332 closed bug (fixed (in master))

Target no longer clears when targeted monster dies

Reported by: ekolis Owned by:
Milestone: 3.5.0 Keywords: close-jan
Cc:

Description

I like to play with the "remember old targets" option on, and I noticed that as of the current svn revision, if I target one monster and then kill it, my target is still aimed at the square that the monster was on even after the monster dies - at least when I press "n" to recast the spell I used to kill the monster; I haven't tried using "m" and finding the spell in the book again.

Attachments (3)

332-1.png (20.0 KB) - added by PowerWyrm 4 years ago.
First step: aim a wand
332-2.png (18.3 KB) - added by PowerWyrm 4 years ago.
Second step: target the monster, but not directly (note the highlighted square)
332-3.png (18.6 KB) - added by PowerWyrm 4 years ago.
Third step: aim a wand at another monster, note the bolt going the wrong way

Download all attachments as: .zip

Change History (11)

comment:1 Changed 10 years ago by takkaria

  • Milestone changed from 3.2.0 to 3.1.0

comment:2 Changed 9 years ago by takkaria

  • Keywords close-jan added

I can't reproduce this now.

comment:3 Changed 9 years ago by takkaria

  • Resolution set to worksforme
  • Status changed from new to closed

comment:4 Changed 4 years ago by PowerWyrm

  • Milestone changed from 3.1.0 to 3.4.1
  • Resolution worksforme deleted
  • Status changed from closed to reopened

Reopening this ticket, as this still happens in 3.4.1, and here's how you reproduce the problem:

  • set "use_old_target" to "yes"
  • aim a wand (bolt) at a monster, BUT not directly
  • kill the monster
  • aim a wand (bolt) at another monster
  • witness the bolt being aimed at the square you selected for the previous monster

Changed 4 years ago by PowerWyrm

First step: aim a wand

Changed 4 years ago by PowerWyrm

Second step: target the monster, but not directly (note the highlighted square)

Changed 4 years ago by PowerWyrm

Third step: aim a wand at another monster, note the bolt going the wrong way

comment:5 Changed 4 years ago by PowerWyrm

  • Milestone changed from 3.4.1 to 3.5.0

comment:6 Changed 4 years ago by takkaria

I can't reproduce this anymore, checking with PowerWyrm? to see if they can.

comment:7 Changed 4 years ago by PowerWyrm

Still happens in v3.5-dev-428-gb3d4e06. Don't forget to set "use_old_target" to "yes" (it's not set by default). Now it's even worse: once the first monster dies, aiming a wand doesn't even select a target, but aims at the direction of the now deceased monster; to make things work again, you have to manually re-target with '*'.

I imagine that in delete_monster_idx(), the check (target_get_monster() == m_ptr) fails because the targeting was indirect (using x/y coordinates), and the target is not cleared. But I could be wrong...

comment:8 Changed 4 years ago by takkaria

  • Resolution set to fixed (in master)
  • Status changed from reopened to closed

Fixed in 41c7461.

Note: See TracTickets for help on using tickets.