MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / atWorldLimit

Method atWorldLimit

source/game/StarMovementController.cpp:330–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330bool MovementController::atWorldLimit(bool bottomOnly) const {
331 if (m_world) {
332 if (!collisionPoly().isNull()) {
333 auto bounds = collisionBoundBox();
334 return bounds.yMin() <= 0 || (!bottomOnly && bounds.yMax() >= m_world->geometry().height());
335 } else {
336 return yPosition() <= 0 || (!bottomOnly && yPosition() >= m_world->geometry().height());
337 }
338 }
339 return false;
340}
341
342void MovementController::setPosition(Vec2F position) {
343 if (m_world)

Callers 3

updateMethod · 0.80
updateMethod · 0.80

Calls 5

yMinMethod · 0.80
yMaxMethod · 0.80
isNullMethod · 0.45
heightMethod · 0.45
geometryMethod · 0.45

Tested by

no test coverage detected