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

Method damageShake

source/game/StarObject.cpp:1372–1376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1370}
1371
1372Vec2F Object::damageShake() const {
1373 if (m_tileDamageStatus->damaged() && !m_tileDamageStatus->damageProtected())
1374 return Vec2F(Random::randf(-1, 1), Random::randf(-1, 1)) * m_tileDamageStatus->damageEffectPercentage() * m_config->damageShakeMagnitude;
1375 return Vec2F();
1376}
1377
1378void Object::checkLiquidBroken() {
1379 if (m_config->minimumLiquidLevel || m_config->maximumLiquidLevel) {

Callers

nothing calls this directly

Calls 4

randfFunction · 0.85
damagedMethod · 0.80
damageProtectedMethod · 0.80

Tested by

no test coverage detected