Author: boucman
Date: Wed Feb 27 20:28:43 2008
New Revision: 24125

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24125&view=rev
Log:
disable directional anim in select anim... I thought I had already commited 
that one

Modified:
    trunk/changelog
    trunk/src/unit.cpp
    trunk/src/unit_animation.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=24125&r1=24124&r2=24125&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Wed Feb 27 20:28:43 2008
@@ -22,6 +22,8 @@
  * miscellaneous and bug fixes:
    * units with a death sound but no death animation now play their death
      sound correctly
+   * selection animations are not directional when standing animations are
+   disabled (bug #11151)
    * Fixed parser problems with \r\r in files
    * cleanups and a compiler fix based on patch #911
    * the detection of the savegame version was done after parsing the savegame

Modified: trunk/src/unit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.cpp?rev=24125&r1=24124&r2=24125&view=diff
==============================================================================
--- trunk/src/unit.cpp (original)
+++ trunk/src/unit.cpp Wed Feb 27 20:28:43 2008
@@ -1593,7 +1593,11 @@
 
 void unit::set_selecting(const game_display &disp,const gamemap::location& loc)
 {
-       
start_animation(INT_MAX,loc,choose_animation(disp,loc,"selected"),true,false,"",0,STATE_FORGET);
+       if (preferences::show_standing_animations()) {
+               
start_animation(INT_MAX,loc,choose_animation(disp,loc,"selected"),true,false,"",0,STATE_FORGET);
+       } else {
+               
start_animation(INT_MAX,loc,choose_animation(disp,loc,"_disabled_selected_"),true,false,"",0,STATE_STANDING);
+       }
 }
 
 void unit::start_animation(const int start_time, const gamemap::location 
&loc,const unit_animation * animation,bool with_bars,bool cycles,const 
std::string text, const Uint32 text_color,STATE state)

Modified: trunk/src/unit_animation.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_animation.cpp?rev=24125&r1=24124&r2=24125&view=diff
==============================================================================
--- trunk/src/unit_animation.cpp (original)
+++ trunk/src/unit_animation.cpp Wed Feb 27 20:28:43 2008
@@ -301,6 +301,7 @@
                
animation_base.push_back(unit_animation(0,unit_frame(default_image,600),"",unit_animation::DEFAULT_ANIM));
 
        
animations.push_back(unit_animation(0,unit_frame(default_image,1),"_disabled_",0));
+       
animations.push_back(unit_animation(0,unit_frame(default_image,1,"","",display::rgb(255,255,255),"0.0~0.3:100,0.3~0.0:200"),"_disabled_selected_",0));
        for(itor = animation_base.begin() ; itor != animation_base.end() ; 
itor++ ) {
                unit_animation tmp_anim = *itor;
                // provide all default anims


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

Reply via email to