summaryrefslogtreecommitdiffstats
path: root/src/core/ZoneCull.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2019-10-16 23:53:25 +0200
committerSergeanur <s.anureev@yandex.ua>2019-10-16 23:53:25 +0200
commit5b1ffb09124c7427b7efb421091179ddecc725c4 (patch)
treeac2d216a9aa6b79359371fe73b400c44fc5bca6e /src/core/ZoneCull.cpp
parentMerge pull request #244 from Nick007J/master (diff)
downloadre3-5b1ffb09124c7427b7efb421091179ddecc725c4.tar
re3-5b1ffb09124c7427b7efb421091179ddecc725c4.tar.gz
re3-5b1ffb09124c7427b7efb421091179ddecc725c4.tar.bz2
re3-5b1ffb09124c7427b7efb421091179ddecc725c4.tar.lz
re3-5b1ffb09124c7427b7efb421091179ddecc725c4.tar.xz
re3-5b1ffb09124c7427b7efb421091179ddecc725c4.tar.zst
re3-5b1ffb09124c7427b7efb421091179ddecc725c4.zip
Diffstat (limited to 'src/core/ZoneCull.cpp')
-rw-r--r--src/core/ZoneCull.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/ZoneCull.cpp b/src/core/ZoneCull.cpp
index dc162147..6d33a1cf 100644
--- a/src/core/ZoneCull.cpp
+++ b/src/core/ZoneCull.cpp
@@ -169,22 +169,22 @@ CCullZones::MarkSubwayAsInvisible(bool visible)
CEntity *e;
CVehicle *v;
- n = CPools::GetBuildingPool()->GetSize();
- for(i = 0; i < n; i++){
+ n = CPools::GetBuildingPool()->GetSize()-1;
+ for(i = n; i >= 0; i--){
e = CPools::GetBuildingPool()->GetSlot(i);
if(e && e->bIsSubway)
e->bIsVisible = visible;
}
- n = CPools::GetTreadablePool()->GetSize();
- for(i = 0; i < n; i++){
+ n = CPools::GetTreadablePool()->GetSize()-1;
+ for(i = n; i >= 0; i--){
e = CPools::GetTreadablePool()->GetSlot(i);
if(e && e->bIsSubway)
e->bIsVisible = visible;
}
- n = CPools::GetVehiclePool()->GetSize();
- for(i = 0; i < n; i++){
+ n = CPools::GetVehiclePool()->GetSize()-1;
+ for(i = n; i >= 0; i--){
v = CPools::GetVehiclePool()->GetSlot(i);
if(v && v->IsTrain() && ((CTrain*)v)->m_nTrackId != TRACK_ELTRAIN)
v->bIsVisible = visible;