Update of /cvsroot/super-tux/supertux/lib/special
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8154/lib/special
Modified Files:
sprite.cpp
Log Message:
Added message when no action is found.
Index: sprite.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/lib/special/sprite.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- sprite.cpp 18 Aug 2004 18:26:40 -0000 1.16
+++ sprite.cpp 19 Aug 2004 11:00:53 -0000 1.17
@@ -104,6 +104,11 @@
return;
}
Actions::iterator i = actions.find(act);
+if(i == actions.end())
+ {
+ std::cerr << "Warning: Action '" << act << "' not found on Sprite '" << name << "'\n";
+ return;
+ }
action = i->second;
}
|