Fixed crash wheree empty prefab exists
This commit is contained in:
@@ -496,6 +496,11 @@ namespace Nuake
|
||||
|
||||
void DynamicWorld::StepSimulation(Timestep ts)
|
||||
{
|
||||
if (ts > 0.1f)
|
||||
{
|
||||
ts = 0.08f;
|
||||
}
|
||||
|
||||
// Next step
|
||||
++_stepCount;
|
||||
|
||||
|
||||
@@ -20,7 +20,9 @@ namespace Nuake
|
||||
if (FileSystem::FileExists(path, false))
|
||||
{
|
||||
std::string prefabTextContent = FileSystem::ReadFile(path);
|
||||
newPrefab->Deserialize(json::parse(prefabTextContent));
|
||||
|
||||
if(!prefabTextContent.empty())
|
||||
newPrefab->Deserialize(json::parse(prefabTextContent));
|
||||
}
|
||||
|
||||
return newPrefab;
|
||||
|
||||
@@ -35,14 +35,14 @@ namespace Nuake
|
||||
float Exposure = 3.5f;
|
||||
float Gamma = 1.1f;
|
||||
|
||||
bool BloomEnabled = false;
|
||||
bool BloomEnabled = true;
|
||||
Scope<Bloom> mBloom;
|
||||
Scope<Volumetric> mVolumetric;
|
||||
|
||||
bool SSAOEnabled = true;
|
||||
Scope<SSAO> mSSAO;
|
||||
|
||||
bool SSREnabled = false;
|
||||
bool SSREnabled = true;
|
||||
|
||||
bool DOFEnabled = false;
|
||||
|
||||
|
||||
@@ -316,7 +316,9 @@ namespace Nuake
|
||||
unsigned char pix = pixels[y * width + x];
|
||||
|
||||
if (pix >= 256 - 32)
|
||||
{
|
||||
fullbright = true;
|
||||
}
|
||||
|
||||
textureData[y * width + x] = COL_ReadPalette(pix);
|
||||
}
|
||||
|
||||
@@ -80,11 +80,6 @@ int ApplicationMain(int argc, char* argv[])
|
||||
|
||||
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cdmline, int cmdshow)
|
||||
{
|
||||
BOOL USE_DARK_MODE = true;
|
||||
BOOL SET_IMMERSIVE_DARK_MODE_SUCCESS = SUCCEEDED(DwmSetWindowAttribute(
|
||||
WINhWnd, DWMWINDOWATTRIBUTE::DWMWA_USE_IMMERSIVE_DARK_MODE,
|
||||
&USE_DARK_MODE, sizeof(USE_DARK_MODE)));
|
||||
|
||||
return ApplicationMain(__argc, __argv);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user