diff options
| author | leak <leak@bitmx.net> | 2014-06-01 20:55:31 +0200 |
|---|---|---|
| committer | leak <leak@bitmx.net> | 2014-06-01 20:55:31 +0200 |
| commit | 68e22ad311ed19d3ad4460f2d178a46eda19ed65 (patch) | |
| tree | 65aa11a1e296c38e6bcbba67dbaf2640a495c38f /src/server/collision | |
| parent | 35aa142f6aa748db1febe901b2446fe53b9abbe0 (diff) | |
Replaced ACE based typedefs for fixed width ints with C++11 versions
Diffstat (limited to 'src/server/collision')
| -rw-r--r-- | src/server/collision/BoundingIntervalHierarchy.h | 4 | ||||
| -rw-r--r-- | src/server/collision/Models/ModelInstance.cpp | 4 | ||||
| -rw-r--r-- | src/server/collision/VMapDefinitions.h | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/server/collision/BoundingIntervalHierarchy.h b/src/server/collision/BoundingIntervalHierarchy.h index 4d38bfc18c4..491a299ca68 100644 --- a/src/server/collision/BoundingIntervalHierarchy.h +++ b/src/server/collision/BoundingIntervalHierarchy.h @@ -177,7 +177,7 @@ class BIH { uint32 tn = tree[node]; uint32 axis = (tn & (3 << 30)) >> 30; - bool BVH2 = tn & (1 << 29); + bool BVH2 = (tn & (1 << 29)) != 0; int offset = tn & ~(7 << 29); if (!BVH2) { @@ -271,7 +271,7 @@ class BIH { uint32 tn = tree[node]; uint32 axis = (tn & (3 << 30)) >> 30; - bool BVH2 = tn & (1 << 29); + bool BVH2 = (tn & (1 << 29)) != 0; int offset = tn & ~(7 << 29); if (!BVH2) { diff --git a/src/server/collision/Models/ModelInstance.cpp b/src/server/collision/Models/ModelInstance.cpp index 3262c154965..475984c4fd3 100644 --- a/src/server/collision/Models/ModelInstance.cpp +++ b/src/server/collision/Models/ModelInstance.cpp @@ -167,7 +167,7 @@ namespace VMAP check += fread(&spawn.iPos, sizeof(float), 3, rf); check += fread(&spawn.iRot, sizeof(float), 3, rf); check += fread(&spawn.iScale, sizeof(float), 1, rf); - bool has_bound = (spawn.flags & MOD_HAS_BOUND); + bool has_bound = (spawn.flags & MOD_HAS_BOUND) != 0; if (has_bound) // only WMOs have bound in MPQ, only available after computation { Vector3 bLow, bHigh; @@ -206,7 +206,7 @@ namespace VMAP check += fwrite(&spawn.iPos, sizeof(float), 3, wf); check += fwrite(&spawn.iRot, sizeof(float), 3, wf); check += fwrite(&spawn.iScale, sizeof(float), 1, wf); - bool has_bound = (spawn.flags & MOD_HAS_BOUND); + bool has_bound = (spawn.flags & MOD_HAS_BOUND) != 0; if (has_bound) // only WMOs have bound in MPQ, only available after computation { check += fwrite(&spawn.iBound.low(), sizeof(float), 3, wf); diff --git a/src/server/collision/VMapDefinitions.h b/src/server/collision/VMapDefinitions.h index 0bc74df51ec..8cd965ddffd 100644 --- a/src/server/collision/VMapDefinitions.h +++ b/src/server/collision/VMapDefinitions.h @@ -19,6 +19,7 @@ #ifndef _VMAPDEFINITIONS_H #define _VMAPDEFINITIONS_H #include <cstring> +#include <cstdio> #define LIQUID_TILE_SIZE (533.333f / 128.f) |
