const float ALPHA_SOLID = 0.7f;
const float ALPHA_NONSOLID = 0.3f;
const float MIN_SOLIDTIME = 1.0f;
-const float SWITCH_DELAY = 0.1f; /**< seconds to wait for stable conditions until switching solidity */
+const float SWITCH_DELAY = 0.06f; /**< seconds to wait for stable conditions until switching solidity */
}
MagicBlock::MagicBlock(const Reader& lisp) :
MovingSprite(lisp, "images/objects/magicblock/magicblock.sprite"),
- is_solid(false),
+ is_solid(false),
trigger_red(),
trigger_green(),
trigger_blue(),
- solid_time(0),
+ solid_time(0),
switch_delay(0),
color(),
light(1.0f,1.0f,1.0f),
solid_time+=elapsed_time;
color.alpha = ALPHA_SOLID;
sprite->set_action("solid");
+ set_group(COLGROUP_STATIC);
} else {
color.alpha = ALPHA_NONSOLID;
sprite->set_action("normal");
+ set_group(COLGROUP_DISABLED);
}
}
return FORCE_MOVE;
}
-IMPLEMENT_FACTORY(MagicBlock, "magicblock");
-
/* EOF */