1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-25 11:52:40 +01:00

Pickups speed adjusted. Closes #694 (#701)

* Pickups speed adjusted

* requested changes

* Variable name adjusted
This commit is contained in:
Artem Popov 2019-02-15 17:49:44 -05:00 committed by Filip Gawin
parent 9b4ebc105c
commit 342e3c8f83

View File

@ -308,9 +308,10 @@ void ObjectRenderer::renderVehicle(VehicleObject* vehicle,
void ObjectRenderer::renderPickup(PickupObject* pickup, RenderList& outList) {
if (!pickup->isEnabled()) return;
static constexpr float kRotationSpeedCoeff = 3.0f;
glm::mat4 modelMatrix =
glm::translate(glm::mat4(1.0f), pickup->getPosition());
modelMatrix = glm::rotate(modelMatrix, m_world->getGameTime(),
modelMatrix = glm::rotate(modelMatrix, m_world->getGameTime() * kRotationSpeedCoeff,
glm::vec3(0.f, 0.f, 1.f));
auto odata = pickup->getModelInfo<SimpleModelInfo>();