moved over some changes from cvs
[supertux.git] / src / trigger / door.cpp
index f493712..282c476 100644 (file)
@@ -21,6 +21,7 @@
 #include "door.h"
 #include "gameloop.h"
 #include "resources.h"
+#include "object_factory.h"
 #include "special/sprite.h"
 #include "special/sprite_manager.h"
 #include "video/drawing_context.h"
@@ -78,6 +79,7 @@ Door::action(float )
 {
   //Check if door animation is complete
   if(sprite->check_animation()) {
+    sprite->set_action("normal");
     GameSession::current()->respawn(target_sector, target_spawnpoint);
   }
 }
@@ -96,3 +98,4 @@ Door::event(Player& , EventType type)
   }
 }
 
+IMPLEMENT_FACTORY(Door, "door");