Author: anonymissimus
Date: Mon Oct 17 19:21:55 2011
New Revision: 51521
URL: http://svn.gna.org/viewcvs/wesnoth?rev=51521&view=rev
Log:
remove unit::set_game_context
since it's no longer the only place where game context is set
Modified:
trunk/src/unit.cpp
trunk/src/unit.hpp
Modified: trunk/src/unit.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.cpp?rev=51521&r1=51520&r2=51521&view=diff
==============================================================================
--- trunk/src/unit.cpp (original)
+++ trunk/src/unit.cpp Mon Oct 17 19:21:55 2011
@@ -660,13 +660,6 @@
}
-void unit::set_game_context()
-{
- // In case the unit carries EventWML, apply it now
- game_events::add_events(cfg_.child_range("event"), type_);
- cfg_.clear_children("event");
-}
-
void unit::generate_name(rand_rng::simple_rng* rng)
{
if (!name_.empty() || !cfg_["generate_name"].to_bool(true)) return;
@@ -882,7 +875,9 @@
heal_all();
}
- set_game_context();
+ // In case the unit carries EventWML, apply it now
+ game_events::add_events(cfg_.child_range("event"), type_);
+ cfg_.clear_children("event");
refreshing_ = false;
delete anim_;
Modified: trunk/src/unit.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.hpp?rev=51521&r1=51520&r2=51521&view=diff
==============================================================================
--- trunk/src/unit.hpp (original)
+++ trunk/src/unit.hpp Mon Oct 17 19:21:55 2011
@@ -69,8 +69,6 @@
virtual ~unit();
unit& operator=(const unit&);
- /** In case the unit carries EventWML, apply it */
- void set_game_context();
/** Advances this unit to another type */
void advance_to(const unit_type *t, bool use_traits = false,
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits