add Projectile::velocity
thanks to Bott for suggesting
This commit is contained in:
parent
5a99d7b245
commit
fc50600303
@ -137,6 +137,10 @@ RectF Projectile::metaBoundBox() const {
|
|||||||
return m_config->boundBox;
|
return m_config->boundBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vec2F Projectile::velocity() const {
|
||||||
|
return m_movementController->velocity();
|
||||||
|
}
|
||||||
|
|
||||||
pair<ByteArray, uint64_t> Projectile::writeNetState(uint64_t fromVersion) {
|
pair<ByteArray, uint64_t> Projectile::writeNetState(uint64_t fromVersion) {
|
||||||
return m_netGroup.writeNetState(fromVersion);
|
return m_netGroup.writeNetState(fromVersion);
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,8 @@ public:
|
|||||||
Vec2F position() const override;
|
Vec2F position() const override;
|
||||||
RectF metaBoundBox() const override;
|
RectF metaBoundBox() const override;
|
||||||
|
|
||||||
|
Vec2F velocity() const;
|
||||||
|
|
||||||
bool ephemeral() const override;
|
bool ephemeral() const override;
|
||||||
ClientEntityMode clientEntityMode() const override;
|
ClientEntityMode clientEntityMode() const override;
|
||||||
bool masterOnly() const override;
|
bool masterOnly() const override;
|
||||||
|
@ -1361,6 +1361,8 @@ namespace LuaBindings {
|
|||||||
return playerEntity->velocity();
|
return playerEntity->velocity();
|
||||||
else if (auto vehicleEntity = as<Vehicle>(entity))
|
else if (auto vehicleEntity = as<Vehicle>(entity))
|
||||||
return vehicleEntity->velocity();
|
return vehicleEntity->velocity();
|
||||||
|
else if (auto projectileEntity = as<Projectile>(entity))
|
||||||
|
return projectileEntity->velocity();
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user