Remove max value of 10 for StaticDetailLevel
Posted: 10 Mar 2021, 14:37
Dave Nelson and I are looking to remove the constraint of 10 on the static detail level parameter.
We've already validated that ORTS can support values higher than 10 for this field, however TSRE reformats any SDL greater than 10 to the value of 10.
This is in WorldObj.cpp:
If you change it to this, that would help support a change to the W file standard that Dave and I are looking to make.
We've already validated that ORTS can support values higher than 10 for this field, however TSRE reformats any SDL greater than 10 to the value of 10.
This is in WorldObj.cpp:
Code: Select all
int WorldObj::getCurrentDetailLevel(){
if(staticDetailLevel >= 10)
return 10;
if(staticDetailLevel >= 0)
return staticDetailLevel;
else
return getDefaultDetailLevel();
}
void WorldObj::setCustomDetailLevel(int val){
if(val < 0) val = -1;
if(val > 10) val = 10;
staticDetailLevel = val;
setModified();
}
Code: Select all
int WorldObj::getCurrentDetailLevel(){
if(staticDetailLevel >= 0)
return staticDetailLevel;
else
return getDefaultDetailLevel();
}
void WorldObj::setCustomDetailLevel(int val){
if(val < 0) val = -1;
staticDetailLevel = val;
setModified();
}