diff options
author | aap <aap@papnet.eu> | 2021-01-24 23:24:41 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-01-24 23:24:41 +0100 |
commit | 4564f7aeea447226137ad72e0f0d1ea26cf159ba (patch) | |
tree | 72d41086c93394f5c8017cc7d0142cab803c4b2e /src/modelinfo | |
parent | Add cmake option for sanitizers (diff) | |
download | re3-4564f7aeea447226137ad72e0f0d1ea26cf159ba.tar re3-4564f7aeea447226137ad72e0f0d1ea26cf159ba.tar.gz re3-4564f7aeea447226137ad72e0f0d1ea26cf159ba.tar.bz2 re3-4564f7aeea447226137ad72e0f0d1ea26cf159ba.tar.lz re3-4564f7aeea447226137ad72e0f0d1ea26cf159ba.tar.xz re3-4564f7aeea447226137ad72e0f0d1ea26cf159ba.tar.zst re3-4564f7aeea447226137ad72e0f0d1ea26cf159ba.zip |
Diffstat (limited to 'src/modelinfo')
-rw-r--r-- | src/modelinfo/BaseModelInfo.cpp | 2 | ||||
-rw-r--r-- | src/modelinfo/SimpleModelInfo.cpp | 3 | ||||
-rw-r--r-- | src/modelinfo/VehicleModelInfo.cpp | 6 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/modelinfo/BaseModelInfo.cpp b/src/modelinfo/BaseModelInfo.cpp index f1c7d050..7137c604 100644 --- a/src/modelinfo/BaseModelInfo.cpp +++ b/src/modelinfo/BaseModelInfo.cpp @@ -56,7 +56,7 @@ void CBaseModelInfo::SetTexDictionary(const char *name) { int slot = CTxdStore::FindTxdSlot(name); - if(slot < 0) + if(slot == -1) slot = CTxdStore::AddTxdSlot(name); m_txdSlot = slot; } diff --git a/src/modelinfo/SimpleModelInfo.cpp b/src/modelinfo/SimpleModelInfo.cpp index 55828b31..9fc0dd6e 100644 --- a/src/modelinfo/SimpleModelInfo.cpp +++ b/src/modelinfo/SimpleModelInfo.cpp @@ -2,11 +2,10 @@ #include "General.h" #include "Camera.h" +#include "Renderer.h" #include "ModelInfo.h" #include "custompipes.h" -#define LOD_DISTANCE (300.0f) - void CSimpleModelInfo::DeleteRwObject(void) { diff --git a/src/modelinfo/VehicleModelInfo.cpp b/src/modelinfo/VehicleModelInfo.cpp index c0daaead..685b6ef6 100644 --- a/src/modelinfo/VehicleModelInfo.cpp +++ b/src/modelinfo/VehicleModelInfo.cpp @@ -553,9 +553,9 @@ CVehicleModelInfo::SetVehicleComponentFlags(RwFrame *frame, uint32 flags) SETFLAGS(ATOMIC_FLAG_FRONT); else if(flags & VEHICLE_FLAG_REAR && (handling->Flags & HANDLING_IS_VAN || (flags & (VEHICLE_FLAG_LEFT|VEHICLE_FLAG_RIGHT)) == 0)) SETFLAGS(ATOMIC_FLAG_REAR); - if(flags & VEHICLE_FLAG_LEFT) + else if(flags & VEHICLE_FLAG_LEFT) SETFLAGS(ATOMIC_FLAG_LEFT); - if(flags & VEHICLE_FLAG_RIGHT) + else if(flags & VEHICLE_FLAG_RIGHT) SETFLAGS(ATOMIC_FLAG_RIGHT); if(flags & VEHICLE_FLAG_REARDOOR) @@ -709,7 +709,7 @@ struct editableMatCBData RpMaterial* CVehicleModelInfo::GetEditableMaterialListCB(RpMaterial *material, void *data) { - static RwRGBA white = { 255, 255, 255, 255 }; + RwRGBA white = { 255, 255, 255, 255 }; const RwRGBA *col; editableMatCBData *cbdata; |