mail[Wesnoth-commits] r13881 - /branches/1.2/src/actions.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by queen . killer on October 10, 2006 - 14:27:
Author: queenkiller
Date: Tue Oct 10 14:27:13 2006
New Revision: 13881

URL: http://svn.gna.org/viewcvs/wesnoth?rev=13881&view=rev
Log:
fix malfunctioned sighed event during shroud (bug #4398)

Modified:
    branches/1.2/src/actions.cpp

Modified: branches/1.2/src/actions.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.2/src/actions.cpp?rev=13881&r1=13880&r2=13881&view=diff
==============================================================================
--- branches/1.2/src/actions.cpp (original)
+++ branches/1.2/src/actions.cpp Tue Oct 10 14:27:13 2006
@@ -1749,11 +1749,16 @@
                if(sighted != units.end() &&
                  (sighted->second.invisible(*it,units,teams) == false
                  || teams[team].is_enemy(sighted->second.side()) == false)) {
-                       if(seen_units == NULL || known_units == NULL) {
-                               static const std::string sighted("sighted");
-                               game_events::raise(sighted,*it,loc);
-                       } else if(known_units->count(*it) == 0 && 
!utils::string_bool(sighted->second.get_state("stoned"))) {
-                               seen_units->insert(*it);
+                       if(!(seen_units == NULL || known_units == NULL) && 
known_units->count(*it) == 0) {
+                               if 
(!utils::string_bool(sighted->second.get_state("stoned")))
+                               {
+                                       seen_units->insert(*it);
+                               }
+                               if ( teams[team].uses_shroud() || 
teams[team].uses_fog())
+                               {
+                                       static const std::string 
sighted("sighted");
+                                       game_events::raise(sighted,*it,loc);
+                               }
                        }
                }
        }




Related Messages


Powered by MHonArc, Updated Tue Oct 10 16:20:14 2006