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;
|
||||
}
|
||||
|
||||
Vec2F Projectile::velocity() const {
|
||||
return m_movementController->velocity();
|
||||
}
|
||||
|
||||
pair<ByteArray, uint64_t> Projectile::writeNetState(uint64_t fromVersion) {
|
||||
return m_netGroup.writeNetState(fromVersion);
|
||||
}
|
||||
|
@ -37,6 +37,8 @@ public:
|
||||
Vec2F position() const override;
|
||||
RectF metaBoundBox() const override;
|
||||
|
||||
Vec2F velocity() const;
|
||||
|
||||
bool ephemeral() const override;
|
||||
ClientEntityMode clientEntityMode() const override;
|
||||
bool masterOnly() const override;
|
||||
|
@ -1361,6 +1361,8 @@ namespace LuaBindings {
|
||||
return playerEntity->velocity();
|
||||
else if (auto vehicleEntity = as<Vehicle>(entity))
|
||||
return vehicleEntity->velocity();
|
||||
else if (auto projectileEntity = as<Projectile>(entity))
|
||||
return projectileEntity->velocity();
|
||||
|
||||
return {};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user