Skip to content

Commit

Permalink
Merge pull request #71 from AmyrAhmady/master
Browse files Browse the repository at this point in the history
fix custom model refs initialization loop
  • Loading branch information
Crayder committed Sep 12, 2019
2 parents bf10c85 + b4a9120 commit b2d5f09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ColAndreasDatabaseReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ bool ReadColandreasDatabaseFile(std::string FileLocation)
ModelRef[i] = 65535;
}

for (int i = -1000; i < -30000; i++)
for (int i = -1000; i > -30000; i--)
{
ModelRef[i] = 65535;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Natives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ cell AMX_NATIVE_CALL ColAndreasNatives::CA_GetModelBoundingSphere(AMX *amx, cell
{
int32_t modelid = static_cast<int32_t>(params[1]);

if ((modelid >= 0 && modelid < 20000) || (modelid >= -1000 && modelid < -30000))
if ((modelid >= 0 && modelid < 20000) || (modelid <= -1000 && modelid > -30000))
{
btScalar Radius;
btVector3 Center;
Expand Down Expand Up @@ -487,7 +487,7 @@ cell AMX_NATIVE_CALL ColAndreasNatives::CA_GetModelBoundingBox(AMX *amx, cell *p
{
int32_t modelid = static_cast<int32_t>(params[1]);

if ((modelid >= 0 && modelid < 20000) || (modelid >= -1000 && modelid < -30000))
if ((modelid >= 0 && modelid < 20000) || (modelid <= -1000 && modelid > -30000))
{
btVector3 Min;
btVector3 Max;
Expand Down

0 comments on commit b2d5f09

Please sign in to comment.