cam sector fix

This commit is contained in:
aap 2021-01-09 12:11:20 +01:00
parent 6b78bab99a
commit e473d234fd

View file

@ -3947,11 +3947,11 @@ CCam::Process_Debug(const CVector&, float, float, float)
} }
// stay inside sectors // stay inside sectors
while(CWorld::GetSectorX(Source.x) > 75.0f) while(CWorld::GetSectorX(Source.x) > NUMSECTORS_X-5.0f)
Source.x -= 1.0f; Source.x -= 1.0f;
while(CWorld::GetSectorX(Source.x) < 5.0f) while(CWorld::GetSectorX(Source.x) < 5.0f)
Source.x += 1.0f; Source.x += 1.0f;
while(CWorld::GetSectorY(Source.y) > 75.0f) while(CWorld::GetSectorY(Source.y) > NUMSECTORS_X-5.0f)
Source.y -= 1.0f; Source.y -= 1.0f;
while(CWorld::GetSectorY(Source.y) < 5.0f) while(CWorld::GetSectorY(Source.y) < 5.0f)
Source.y += 1.0f; Source.y += 1.0f;
@ -4018,11 +4018,11 @@ CCam::Process_Debug(const CVector&, float, float, float)
} }
// stay inside sectors // stay inside sectors
while(CWorld::GetSectorX(Source.x) > 75.0f) while(CWorld::GetSectorX(Source.x) > NUMSECTORS_X-5.0f)
Source.x -= 1.0f; Source.x -= 1.0f;
while(CWorld::GetSectorX(Source.x) < 5.0f) while(CWorld::GetSectorX(Source.x) < 5.0f)
Source.x += 1.0f; Source.x += 1.0f;
while(CWorld::GetSectorY(Source.y) > 75.0f) while(CWorld::GetSectorY(Source.y) > NUMSECTORS_X-5.0f)
Source.y -= 1.0f; Source.y -= 1.0f;
while(CWorld::GetSectorY(Source.y) < 5.0f) while(CWorld::GetSectorY(Source.y) < 5.0f)
Source.y += 1.0f; Source.y += 1.0f;
@ -4099,11 +4099,11 @@ CCam::Process_Editor(const CVector&, float, float, float)
} }
// stay inside sectors // stay inside sectors
while(CWorld::GetSectorX(Source.x) > 75.0f) while(CWorld::GetSectorX(Source.x) > NUMSECTORS_X-5.0f)
Source.x -= 1.0f; Source.x -= 1.0f;
while(CWorld::GetSectorX(Source.x) < 5.0f) while(CWorld::GetSectorX(Source.x) < 5.0f)
Source.x += 1.0f; Source.x += 1.0f;
while(CWorld::GetSectorY(Source.y) > 75.0f) while(CWorld::GetSectorY(Source.y) > NUMSECTORS_X-5.0f)
Source.y -= 1.0f; Source.y -= 1.0f;
while(CWorld::GetSectorY(Source.y) < 5.0f) while(CWorld::GetSectorY(Source.y) < 5.0f)
Source.y += 1.0f; Source.y += 1.0f;