1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-07 03:12:36 +01:00

Resolve cases found by gcc-5

This commit is contained in:
Filip Gawin 2017-10-26 17:47:25 +02:00 committed by Daniel Evans
parent 512ac6f5ee
commit 9aa01b69e1
4 changed files with 5 additions and 5 deletions

View File

@ -132,7 +132,7 @@ bool Activities::GoTo::update(CharacterObject *character,
}
float hdg =
atan2(targetDirection.y, targetDirection.x) - glm::half_pi<float>();
std::atan2(targetDirection.y, targetDirection.x) - glm::half_pi<float>();
character->setHeading(glm::degrees(hdg));
controller->setMoveDirection({1.f, 0.f, 0.f});
@ -263,7 +263,7 @@ bool Activities::EnterVehicle::update(CharacterObject *character,
character->controller->setRunning(true);
}
character->setHeading(
glm::degrees(atan2(targetDirection.y, targetDirection.x) -
glm::degrees(std::atan2(targetDirection.y, targetDirection.x) -
glm::half_pi<float>()));
character->controller->setMoveDirection({1.f, 0.f, 0.f});
}

View File

@ -692,7 +692,7 @@ int GameData::getWaterIndexAt(const glm::vec3& ws) const {
}
float GameData::getWaveHeightAt(const glm::vec3& ws) const {
return (1 + sin(engine->getGameTime() + (ws.x + ws.y) * WATER_SCALE)) *
return (1 + std::sin(engine->getGameTime() + (ws.x + ws.y) * WATER_SCALE)) *
WATER_HEIGHT;
}

View File

@ -161,7 +161,7 @@ void PickupObject::tick(float dt) {
}
float time = engine->getGameTime();
float colourValue = 0.5f * (sin(time * 3.0664064f) * 0.3f + 0.3f);
float colourValue = 0.5f * (std::sin(time * 3.0664064f) * 0.3f + 0.3f);
uint32_t *colour = &colours[m_colourId];
float red = (*colour >> 16) & 0xFF;
float green = (*colour >> 8) & 0xFF;

View File

@ -235,7 +235,7 @@ void VehicleObject::tickPhysics(float dt) {
// todo: a real engine function
float velFac = info->handling.maxVelocity;
float engineForce = info->handling.acceleration * throttle * velFac;
if (fabs(engineForce) >= 0.001f) {
if (std::fabs(engineForce) >= 0.001f) {
collision->getBulletBody()->activate(true);
}