Author: suokko
Date: Wed Jul 30 22:41:20 2008
New Revision: 28274

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28274&view=rev
Log:
Removed accidetaly commited code from wrong place

Modified:
    trunk/src/actions.cpp

Modified: trunk/src/actions.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/actions.cpp?rev=28274&r1=28273&r2=28274&view=diff
==============================================================================
--- trunk/src/actions.cpp (original)
+++ trunk/src/actions.cpp Wed Jul 30 22:41:20 2008
@@ -769,12 +769,7 @@
                        config *tempcfg = dat.child("second");
                        t_string d_weap = "none";
                        if(d_stats_->weapon != NULL) {
-                               if(a_ != units_.end()) {
-                                       d_weap = d_stats_->weapon->id();
-                               } else {
-                                       // The weapon choice will be invalid 
since the attacker was removed
-                                       d_weap = "invalid";
-                               }
+                               d_weap = d_stats_->weapon->id();
                        }
                        std::pair<std::string,t_string> to_insert("weapon", 
d_weap);
                        tempcfg->values.insert(to_insert);
@@ -894,11 +889,6 @@
        const events::command_disabler disable_commands;
 
        if(a_ == units_.end() || d_ == units_.end()) {
-               // Fix pointers to weapons
-               if (a_ != units_.end())
-                       
const_cast<battle_context::unit_stats*>(a_stats_)->weapon = 
&a_->second.attacks()[attack_with_];        
-               if (d_ != units_.end())
-                       
const_cast<battle_context::unit_stats*>(d_stats_)->weapon = 
&d_->second.attacks()[defend_with_];        
                return;
        }
 


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

Reply via email to