mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 03:12:36 +01:00
More fixes double promotion
This commit is contained in:
parent
6f50fa4ab7
commit
240b44af8b
@ -31,7 +31,7 @@ struct WeaponData {
|
|||||||
int modelID;
|
int modelID;
|
||||||
std::uint32_t flags;
|
std::uint32_t flags;
|
||||||
|
|
||||||
int inventorySlot;
|
std::uint32_t inventorySlot;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "engine/Animator.hpp"
|
#include "engine/Animator.hpp"
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
#include <glm/gtc/quaternion.hpp>
|
#include <glm/gtc/quaternion.hpp>
|
||||||
|
|
||||||
@ -47,7 +48,7 @@ void Animator::tick(float dt) {
|
|||||||
if (!state.repeat) {
|
if (!state.repeat) {
|
||||||
animTime = std::min(animTime, state.animation->duration);
|
animTime = std::min(animTime, state.animation->duration);
|
||||||
} else {
|
} else {
|
||||||
animTime = fmod(animTime, state.animation->duration);
|
animTime = std::fmod(animTime, state.animation->duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& b : state.boneInstances) {
|
for (auto& b : state.boneInstances) {
|
||||||
|
@ -1210,11 +1210,11 @@ bool SaveGame::loadGame(GameState& state, const std::string& file) {
|
|||||||
#if RW_DEBUG
|
#if RW_DEBUG
|
||||||
for (const auto &type : pedTypeData.types) {
|
for (const auto &type : pedTypeData.types) {
|
||||||
printf("%08x: %f %f %f %f %f threat %08x avoid %08x\n", type.bitstring_,
|
printf("%08x: %f %f %f %f %f threat %08x avoid %08x\n", type.bitstring_,
|
||||||
type.unknown2,
|
static_cast<double>(type.unknown2),
|
||||||
type.unknown3,
|
static_cast<double>(type.unknown3),
|
||||||
type.unknown4,
|
static_cast<double>(type.unknown4),
|
||||||
type.fleedistance,
|
static_cast<double>(type.fleedistance),
|
||||||
type.headingchangerate,
|
static_cast<double>(type.headingchangerate),
|
||||||
type.threatflags_,
|
type.threatflags_,
|
||||||
type.avoidflags_);
|
type.avoidflags_);
|
||||||
}
|
}
|
||||||
|
@ -185,8 +185,8 @@ public:
|
|||||||
|
|
||||||
glm::vec3 getLookDirection() const {
|
glm::vec3 getLookDirection() const {
|
||||||
float theta = m_look.y - glm::half_pi<float>();
|
float theta = m_look.y - glm::half_pi<float>();
|
||||||
return glm::vec3(sin(-m_look.x) * cos(theta),
|
return glm::vec3(std::sin(-m_look.x) * std::cos(theta),
|
||||||
cos(-m_look.x) * cos(theta), sin(theta));
|
std::cos(-m_look.x) * std::cos(theta), std::sin(theta));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user