[General] Fix compiler warnings
This commit is contained in:
parent
82cb8aa0a5
commit
deaf269808
@ -4,6 +4,7 @@ namespace Components
|
||||
{
|
||||
bool Loader::Pregame = true;
|
||||
bool Loader::Postgame = false;
|
||||
bool Loader::ComInitialized = false;
|
||||
std::vector<Component*> Loader::Components;
|
||||
Utils::Memory::Allocator Loader::MemAllocator;
|
||||
|
||||
@ -23,7 +24,7 @@ namespace Components
|
||||
Loader::Postgame = false;
|
||||
Loader::MemAllocator.clear();
|
||||
|
||||
if(!Loader::PerformingUnitTests()) CoInitialize(nullptr);
|
||||
if (!Loader::PerformingUnitTests()) Loader::ComInitialized = (CoInitialize(nullptr) == S_OK);
|
||||
|
||||
Loader::Register(new Flags());
|
||||
Loader::Register(new Singleton());
|
||||
@ -113,7 +114,7 @@ namespace Components
|
||||
Loader::Components.clear();
|
||||
Loader::MemAllocator.clear();
|
||||
|
||||
if (!Loader::PerformingUnitTests()) CoUninitialize();
|
||||
if (!Loader::PerformingUnitTests() && Loader::ComInitialized) CoUninitialize();
|
||||
}
|
||||
|
||||
void Loader::PreDestroy()
|
||||
|
@ -38,6 +38,7 @@ namespace Components
|
||||
private:
|
||||
static bool Pregame;
|
||||
static bool Postgame;
|
||||
static bool ComInitialized;
|
||||
static std::vector<Component*> Components;
|
||||
static Utils::Memory::Allocator MemAllocator;
|
||||
};
|
||||
|
@ -156,7 +156,6 @@ namespace Components
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (type == Game::XAssetType::ASSET_TYPE_MATERIAL && (name == "wc/codo_ui_viewer_black_decal3" || name == "wc/codo_ui_viewer_black_decal2" || name == "wc/hint_arrows01" || name == "wc/hint_arrows02"))
|
||||
{
|
||||
asset.material->sortKey = 0xE;
|
||||
|
@ -1,7 +1,5 @@
|
||||
#include "STDInclude.hpp"
|
||||
#include <glm/glm.hpp>
|
||||
#define GLM_ENABLE_EXPERIMENTAL
|
||||
#include <glm/gtx/vector_angle.hpp>
|
||||
|
||||
namespace Components
|
||||
{
|
||||
@ -585,12 +583,10 @@ namespace Components
|
||||
glm::mat2x2 invMatrix = glm::inverse(matrix);
|
||||
glm::vec2 solve = modelOrigin - selfOrigin;
|
||||
glm::vec2 result = invMatrix * solve;
|
||||
glm::vec2 path = modelOrigin - (selfOrigin + (result[0] * right));
|
||||
|
||||
glm::vec2 point = selfOrigin + (result[0] * right);
|
||||
glm::vec2 path = glm::normalize(modelOrigin - point);
|
||||
|
||||
// If the angle is bigger than 1, skip (can either be 0° (0) or 180° (PI))
|
||||
if(glm::angle(path, forward) > 1) continue;
|
||||
// Compare signs and skip to the next model if they don't equal
|
||||
if ((path[0] < 0) == (forward[0] >= 0) && (path[1] < 0) == (forward[1] >= 0)) continue;
|
||||
}
|
||||
|
||||
gameWorld->dpvs.smodelVisData[0][i] = 1;
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "STDInclude.hpp"
|
||||
#undef getch
|
||||
#undef ungetch
|
||||
#include <conio.h>
|
||||
|
||||
namespace Components
|
||||
|
@ -3047,7 +3047,7 @@ namespace Game
|
||||
char lightmapIndex;
|
||||
char reflectionProbeIndex;
|
||||
char primaryLightIndex;
|
||||
char castsSunShadow;
|
||||
char flag;
|
||||
};
|
||||
|
||||
struct GfxSurfaceBounds
|
||||
|
Loading…
Reference in New Issue
Block a user