projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
044b44e
)
Fix endsequence walking direction
author
Tim Goya
<tuxdev103@gmail.com>
Mon, 19 Feb 2007 00:22:37 +0000
(
00:22
+0000)
committer
Tim Goya
<tuxdev103@gmail.com>
Mon, 19 Feb 2007 00:22:37 +0000
(
00:22
+0000)
SVN-Revision: 4865
src/game_session.cpp
patch
|
blob
|
history
diff --git
a/src/game_session.cpp
b/src/game_session.cpp
index
852d8f0
..
2abb68c
100644
(file)
--- a/
src/game_session.cpp
+++ b/
src/game_session.cpp
@@
-34,6
+34,7
@@
#include "game_session.hpp"
#include "log.hpp"
#include "game_session.hpp"
#include "log.hpp"
+#include "console.hpp"
#include "worldmap/worldmap.hpp"
#include "mainloop.hpp"
#include "audio/sound_manager.hpp"
#include "worldmap/worldmap.hpp"
#include "mainloop.hpp"
#include "audio/sound_manager.hpp"
@@
-586,7
+587,7
@@
GameSession::start_sequence(const std::string& sequencename)
if (sequencename == "endsequence") {
// Determine walking direction for Tux
if (sequencename == "endsequence") {
// Determine walking direction for Tux
- float xst = 1.f, xend = 2.f;
+
/*
float xst = 1.f, xend = 2.f;
for(std::vector<GameObject*>::iterator i = currentsector->gameobjects.begin(); i != currentsector->gameobjects.end(); i++) {
SequenceTrigger* st = dynamic_cast<SequenceTrigger*>(*i);
if(!st)
for(std::vector<GameObject*>::iterator i = currentsector->gameobjects.begin(); i != currentsector->gameobjects.end(); i++) {
SequenceTrigger* st = dynamic_cast<SequenceTrigger*>(*i);
if(!st)
@@
-601,6
+602,11
@@
GameSession::start_sequence(const std::string& sequencename)
end_sequence = new EndSequenceWalkLeft();
} else {
end_sequence = new EndSequenceWalkRight();
end_sequence = new EndSequenceWalkLeft();
} else {
end_sequence = new EndSequenceWalkRight();
+ }*/
+ if (currentsector->get_players()[0]->physic.get_velocity_x() < 0) {
+ end_sequence = new EndSequenceWalkLeft();
+ } else {
+ end_sequence = new EndSequenceWalkRight();
}
}
else if (sequencename == "fireworks") end_sequence = new EndSequenceFireworks();
}
}
else if (sequencename == "fireworks") end_sequence = new EndSequenceFireworks();