-fix worldmap scrolling bug from last commit
-fix stalactites being drawn when not activated
SVN-Revision: 2312
(sprite (name "hatch")
(action
- (name "default")
+ (name "normal")
(x-offset 0)
(y-offset 0)
(images "shared/hatch-1.png"))
void
Stalactite::draw(DrawingContext& context)
{
+ if(get_state() != STATE_ACTIVE)
+ return;
+
if(state == STALACTITE_SHAKING) {
sprite->draw(context, get_pos() + Vector((rand() % 6)-3, 0), LAYER_OBJECTS);
} else {
{
//Check if hatch animation is complete
if(sprite->check_animation()) {
+ sprite->set_action("normal");
GameSession::current()->respawn(target_sector, target_spawnpoint);
}
}
if (offset.y < screen->h - height*32) offset.y = screen->h - height*32;
context.push_transform();
- context.set_translation(offset);
+ context.set_translation(-offset);
draw(context);
context.pop_transform();
get_input();