Author: mordante
Date: Sun Apr 8 19:22:47 2007
New Revision: 16695
URL: http://svn.gna.org/viewcvs/wesnoth?rev=16695&view=rev
Log:
ported r16694 fixes part 1 of bug #8882. Not sure how to write this in a
avarage
player understandable way so didn't add it to the player_changelog (the bug is
very hard to run into anyway)
Modified:
trunk/changelog
trunk/src/mouse_events.cpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=16695&r1=16694&r2=16695&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sun Apr 8 19:22:47 2007
@@ -122,6 +122,8 @@
-1 hitpoints will still cause a crash.
* fix skirmisher filtered by terrain not working properly.
* fixed Ethiliel not showing up in the scenario "Vengeance" of TSG
+ * with a move attack action if the moveto event moves the defender Wesnoth
+ would crash (part 1 of bug #8882)
Version 1.3.1:
* Campaignd
Modified: trunk/src/mouse_events.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/mouse_events.cpp?rev=16695&r1=16694&r2=16695&view=diff
==============================================================================
--- trunk/src/mouse_events.cpp (original)
+++ trunk/src/mouse_events.cpp Sun Apr 8 19:22:47 2007
@@ -1068,8 +1068,10 @@
const gamemap::location& attack_from =
current_unit_attacks_from(hex, nearest_hex, second_nearest_hex);
if(attack_from.valid()) {
if(move_unit_along_current_route(false)) { //move the
unit without updating shroud
+ // a WML event could have invalidated both
attacker and defender
+ // so make sure they're valid before attacking
u = find_unit(attack_from);
- // enemy = find_unit(hex);
+ enemy = find_unit(hex);
if(u != units_.end() && u->second.side() ==
team_num_ &&
enemy != units_.end() &&
current_team().is_enemy(enemy->second.side()) &&
!enemy->second.incapacitated()) {
//if shroud or fog is active,
rememember nits a and after attack check if someone isn`t seen
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits