wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src team.cpp


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth/src team.cpp
Date: Mon, 20 Sep 2004 21:00:08 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    04/09/21 00:50:47

Modified files:
        src            : team.cpp 

Log message:
        fixed bug where [modify_side] couldn't change a side's team name 
properly

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/team.cpp.diff?tr1=1.71&tr2=1.72&r1=text&r2=text

Patches:
Index: wesnoth/src/team.cpp
diff -u wesnoth/src/team.cpp:1.71 wesnoth/src/team.cpp:1.72
--- wesnoth/src/team.cpp:1.71   Mon Sep 13 03:16:19 2004
+++ wesnoth/src/team.cpp        Tue Sep 21 00:50:47 2004
@@ -1,4 +1,4 @@
-/* $Id: team.cpp,v 1.71 2004/09/13 03:16:19 Sirp Exp $ */
+/* $Id: team.cpp,v 1.72 2004/09/21 00:50:47 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -491,6 +491,13 @@
 void team::change_team(const std::string& name)
 {
        info_.team_name = name;
+
+       //reset the cache of allies for all teams
+       if(teams != NULL) {
+               for(std::vector<team>::const_iterator i = teams->begin(); i != 
teams->end(); ++i) {
+                       i->enemies_.clear();
+               }       
+       }
 }
 
 const std::string& team::save_id() const




reply via email to

[Prev in Thread] Current Thread [Next in Thread]