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

Method updateOrientation

source/game/StarObject.cpp:339–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339void Object::updateOrientation() {
340 setOrientationIndex(m_config->findValidOrientation(world(), tilePosition(), m_direction.get()));
341 if (auto orientation = currentOrientation()) {
342 if (orientation->directionAffinity)
343 m_direction.set(*orientation->directionAffinity);
344 m_materialSpaces.set(orientation->materialSpaces);
345 }
346 resetEmissionTimers();
347}
348
349List<Vec2I> Object::anchorPositions() const {
350 if (auto orientation = currentOrientation()) {

Callers

nothing calls this directly

Calls 3

findValidOrientationMethod · 0.80
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected