diff options
author | aap <aap@papnet.eu> | 2019-05-30 21:24:47 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-05-30 21:24:47 +0200 |
commit | 188aab4196c1d9de0c1bf33be1114e7a0e11fd19 (patch) | |
tree | ff0c0a98ced0ba0bbabf34f5f6b1c0e152dcb194 /src/entities | |
parent | fixed ped states (diff) | |
download | re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.gz re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.bz2 re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.lz re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.xz re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.zst re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.zip |
Diffstat (limited to 'src/entities')
-rw-r--r-- | src/entities/Entity.cpp | 28 | ||||
-rw-r--r-- | src/entities/Physical.cpp | 12 |
2 files changed, 20 insertions, 20 deletions
diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index 11fa9ab2..439d1462 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -45,28 +45,28 @@ CEntity::GetIsOnScreenComplex(void) float minz = z + colmodel->boundingBox.min.z; float maxz = z + colmodel->boundingBox.max.z; boundBox[0].x = rect.left; - boundBox[0].y = rect.top; + boundBox[0].y = rect.bottom; boundBox[0].z = minz; boundBox[1].x = rect.left; - boundBox[1].y = rect.bottom; + boundBox[1].y = rect.top; boundBox[1].z = minz; boundBox[2].x = rect.right; - boundBox[2].y = rect.top; + boundBox[2].y = rect.bottom; boundBox[2].z = minz; boundBox[3].x = rect.right; - boundBox[3].y = rect.bottom; + boundBox[3].y = rect.top; boundBox[3].z = minz; boundBox[4].x = rect.left; - boundBox[4].y = rect.top; + boundBox[4].y = rect.bottom; boundBox[4].z = maxz; boundBox[5].x = rect.left; - boundBox[5].y = rect.bottom; + boundBox[5].y = rect.top; boundBox[5].z = maxz; boundBox[6].x = rect.right; - boundBox[6].y = rect.top; + boundBox[6].y = rect.bottom; boundBox[6].z = maxz; boundBox[7].x = rect.right; - boundBox[7].y = rect.bottom; + boundBox[7].y = rect.top; boundBox[7].z = maxz; return TheCamera.IsBoxVisible(boundBox, &TheCamera.GetCameraMatrix()); @@ -84,9 +84,9 @@ CEntity::Add(void) xstart = CWorld::GetSectorIndexX(bounds.left); xend = CWorld::GetSectorIndexX(bounds.right); xmid = CWorld::GetSectorIndexX((bounds.left + bounds.right)/2.0f); - ystart = CWorld::GetSectorIndexY(bounds.bottom); - yend = CWorld::GetSectorIndexY(bounds.top); - ymid = CWorld::GetSectorIndexY((bounds.bottom + bounds.top)/2.0f); + ystart = CWorld::GetSectorIndexY(bounds.top); + yend = CWorld::GetSectorIndexY(bounds.bottom); + ymid = CWorld::GetSectorIndexY((bounds.top + bounds.bottom)/2.0f); assert(xstart >= 0); assert(xend < NUMSECTORS_X); assert(ystart >= 0); @@ -144,9 +144,9 @@ CEntity::Remove(void) xstart = CWorld::GetSectorIndexX(bounds.left); xend = CWorld::GetSectorIndexX(bounds.right); xmid = CWorld::GetSectorIndexX((bounds.left + bounds.right)/2.0f); - ystart = CWorld::GetSectorIndexY(bounds.bottom); - yend = CWorld::GetSectorIndexY(bounds.top); - ymid = CWorld::GetSectorIndexY((bounds.bottom + bounds.top)/2.0f); + ystart = CWorld::GetSectorIndexY(bounds.top); + yend = CWorld::GetSectorIndexY(bounds.bottom); + ymid = CWorld::GetSectorIndexY((bounds.top + bounds.bottom)/2.0f); assert(xstart >= 0); assert(xend < NUMSECTORS_X); assert(ystart >= 0); diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index dada5072..55eab951 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -27,9 +27,9 @@ CPhysical::Add(void) xstart = CWorld::GetSectorIndexX(bounds.left); xend = CWorld::GetSectorIndexX(bounds.right); xmid = CWorld::GetSectorIndexX((bounds.left + bounds.right)/2.0f); - ystart = CWorld::GetSectorIndexY(bounds.bottom); - yend = CWorld::GetSectorIndexY(bounds.top); - ymid = CWorld::GetSectorIndexY((bounds.bottom + bounds.top)/2.0f); + ystart = CWorld::GetSectorIndexY(bounds.top); + yend = CWorld::GetSectorIndexY(bounds.bottom); + ymid = CWorld::GetSectorIndexY((bounds.top + bounds.bottom)/2.0f); assert(xstart >= 0); assert(xend < NUMSECTORS_X); assert(ystart >= 0); @@ -92,9 +92,9 @@ CPhysical::RemoveAndAdd(void) xstart = CWorld::GetSectorIndexX(bounds.left); xend = CWorld::GetSectorIndexX(bounds.right); xmid = CWorld::GetSectorIndexX((bounds.left + bounds.right)/2.0f); - ystart = CWorld::GetSectorIndexY(bounds.bottom); - yend = CWorld::GetSectorIndexY(bounds.top); - ymid = CWorld::GetSectorIndexY((bounds.bottom + bounds.top)/2.0f); + ystart = CWorld::GetSectorIndexY(bounds.top); + yend = CWorld::GetSectorIndexY(bounds.bottom); + ymid = CWorld::GetSectorIndexY((bounds.top + bounds.bottom)/2.0f); assert(xstart >= 0); assert(xend < NUMSECTORS_X); assert(ystart >= 0); |