mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 17:55:45 +08:00
Should fix random crashes...
http://forum.ivao.aero/index.php?topic=133477.msg1105814#msg1105814
This commit is contained in:
@@ -104,6 +104,7 @@ public:
|
|||||||
void NormalizeNormals(void);
|
void NormalizeNormals(void);
|
||||||
void DebugDrawNormals();
|
void DebugDrawNormals();
|
||||||
void Purge() { mPointPool.clear(); }
|
void Purge() { mPointPool.clear(); }
|
||||||
|
int Size() { return mPointPool.size(); }
|
||||||
private:
|
private:
|
||||||
vector<float> mPointPool;
|
vector<float> mPointPool;
|
||||||
};
|
};
|
||||||
@@ -512,6 +513,9 @@ void OBJ_PlotModel(int model, int texID, int litTexID, float inDistance, double
|
|||||||
if(lodIdx == -1)
|
if(lodIdx == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// pointPool is and always was empty! returning early
|
||||||
|
if(sObjects[model].lods[lodIdx].pointPool.Size()==0 && sObjects[model].lods[lodIdx].dl == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
static XPLMDataRef night_lighting_ref = XPLMFindDataRef("sim/graphics/scenery/percent_lights_on");
|
static XPLMDataRef night_lighting_ref = XPLMFindDataRef("sim/graphics/scenery/percent_lights_on");
|
||||||
bool use_night = XPLMGetDataf(night_lighting_ref) > 0.25;
|
bool use_night = XPLMGetDataf(night_lighting_ref) > 0.25;
|
||||||
|
|||||||
Reference in New Issue
Block a user