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

Method setReferenceVelocity

source/game/StarProjectile.cpp:406–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406void Projectile::setReferenceVelocity(Maybe<Vec2F> const& velocity) {
407 m_movementController->setVelocity(m_movementController->velocity() - m_referenceVelocity.value());
408 m_referenceVelocity = velocity;
409 m_movementController->setVelocity(m_movementController->velocity() + velocity.value());
410 m_effectEmitter->setBaseVelocity(velocity.value());
411}
412
413float Projectile::initialSpeed() const {
414 return m_initialSpeed;

Callers 1

processActionMethod · 0.80

Calls 4

setBaseVelocityMethod · 0.80
setVelocityMethod · 0.45
velocityMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected