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

Method gravity

source/game/StarWorldClient.cpp:422–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420}
421
422float WorldClient::gravity(Vec2F const& pos) const {
423 if (!inWorld())
424 return 0.0f;
425
426 if (m_overrideGravity)
427 return *m_overrideGravity;
428
429 auto dungeonId = m_tileArray->tile(Vec2I::round(pos)).dungeonId;
430 return m_dungeonIdGravity.maybe(dungeonId).value(currentTemplate()->gravity());
431}
432
433float WorldClient::windLevel(Vec2F const& pos) const {
434 if (!inWorld())

Callers 2

accelerationMethod · 0.45
updateMethod · 0.45

Calls 3

roundFunction · 0.85
valueMethod · 0.45
maybeMethod · 0.45

Tested by

no test coverage detected