diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-14 17:43:20 -0400 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-14 17:43:20 -0400 |
| commit | 2ca593c5f09ee59a39733856cdb1f7191dc87216 (patch) | |
| tree | df7c51c2b707d1838b492f739b554230bba1c4be /src/game.cpp | |
| parent | 25855f327a0b2b1386a3fd8c568817bb7782cac2 (diff) | |
| download | therapy-2ca593c5f09ee59a39733856cdb1f7191dc87216.tar.gz therapy-2ca593c5f09ee59a39733856cdb1f7191dc87216.tar.bz2 therapy-2ca593c5f09ee59a39733856cdb1f7191dc87216.zip | |
Fixed how movement while dying works
Also removed some unnecessary Message objects
Diffstat (limited to 'src/game.cpp')
| -rw-r--r-- | src/game.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
| diff --git a/src/game.cpp b/src/game.cpp index edde71e..dd8f956 100644 --- a/src/game.cpp +++ b/src/game.cpp | |||
| @@ -145,8 +145,7 @@ void Game::schedule(double time, std::function<void ()> callback) | |||
| 145 | 145 | ||
| 146 | void Game::playerDie(Entity& player, const Map& curMap) | 146 | void Game::playerDie(Entity& player, const Map& curMap) |
| 147 | { | 147 | { |
| 148 | Message msg(Message::Type::die); | 148 | player.send(*this, Message::Type::die); |
| 149 | player.send(*this, msg); | ||
| 150 | 149 | ||
| 151 | playSound("../res/Hit_Hurt5.wav", 0.25); | 150 | playSound("../res/Hit_Hurt5.wav", 0.25); |
| 152 | 151 | ||
| @@ -157,8 +156,6 @@ void Game::playerDie(Entity& player, const Map& curMap) | |||
| 157 | } | 156 | } |
| 158 | 157 | ||
| 159 | player.position = save.position; | 158 | player.position = save.position; |
| 160 | 159 | player.send(*this, Message::Type::stopDying); | |
| 161 | Message msg2(Message::Type::stopDying); | ||
| 162 | player.send(*this, msg2); | ||
| 163 | }); | 160 | }); |
| 164 | } | 161 | } |
