Block::draw(context);
// then Draw the light if on.
if(sprite->get_action() == "on") {
- Vector pos = get_pos() + (Vector(bbox.get_size().as_vector()) - lightsprite->get_size()) / 2;
+ Vector pos = get_pos() + (bbox.get_size().as_vector() - lightsprite->get_size()) / 2;
context.push_target();
context.set_target(DrawingContext::LIGHTMAP);
context.draw_surface(lightsprite, pos, 10);
Vector old_size = bbox.get_size().as_vector();
sprite->set_action(action, loops);
set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
- set_pos(get_pos() - (Vector(bbox.get_size().as_vector()) - old_size) / 2);
+ set_pos(get_pos() - (bbox.get_size().as_vector() - old_size) / 2);
}
void