Vector get_offset() const
{ return offset; }
- const Vector& get_movement() const
+ /** Get the movement of this tilemap. The collision detection code may need a
+ * non-negative y-movement. Passing `false' as the `actual' argument will
+ * provide that. Used exclusively in src/supertux/sector.cpp. */
+ Vector get_movement(bool actual) const
{
- return movement;
+ if(actual) {
+ return movement;
+ } else {
+ return Vector(movement.x, std::max(0.0f,movement.y));
+ }
}
Path *get_path()