Author: mordante
Date: Wed Apr 18 17:33:16 2007
New Revision: 16902

URL: http://svn.gna.org/viewcvs/wesnoth?rev=16902&view=rev
Log:
allow negative hitpoints to be unstored the check has been moved and that seems 
to work
so this is no longer required and it gave trouble for UMC creators

Modified:
    trunk/changelog
    trunk/src/game_events.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=16902&r1=16901&r2=16902&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Wed Apr 18 17:33:16 2007
@@ -425,8 +425,6 @@
    * max level advancements now raise the advance and post_advance events
    * [effect] can now remove attacks with the remove_attacks key
    * [unstore_unit] can now try to level a unit and does so by default (bug 
#7426)
-   * [unstore_unit] can no longer unstore a unit with a negative amount of
-     hitpoints. The hitpoints will be set to 1.
  * sound
    * new or revised sounds: morning star, holy magic.
    * add advanced sound tab to pref allowing you to play with sample_rate and

Modified: trunk/src/game_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=16902&r1=16901&r2=16902&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Wed Apr 18 17:33:16 2007
@@ -1883,11 +1883,7 @@
                        wassert(units != NULL);
                        wassert(game_map != NULL);
                        wassert(status_ptr != NULL);
-                       unit 
u(game_data_ptr,units,game_map,status_ptr,teams,var);
-                       if(u.hitpoints() < 0) {
-                               u.heal(-u.hitpoints());
-                               ERR_NG << "Unstoring a unit with a negative 
number of hitpoints isn't supported.\n";
-                       }
+                       const unit 
u(game_data_ptr,units,game_map,status_ptr,teams,var);
 
                        preferences::encountered_units().insert(u.id());
                        gamemap::location loc(var);


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to