cat_load crash prevent

This commit is contained in:
LightCat 2018-08-24 23:20:08 +02:00
parent 8460b06876
commit 766eefec29
3 changed files with 9 additions and 7 deletions

View File

@ -233,9 +233,13 @@ void CreateMove()
} }
#if ENABLE_VISUALS #if ENABLE_VISUALS
//Timer ussr{};
void DrawText() void DrawText()
{ {
/*if (ussr.test_and_set(207000))
{
g_ISurface->PlaySound()
}*/
if (god_mode) if (god_mode)
for (int i = 0; i < 40000; i++) for (int i = 0; i < 40000; i++)
{ {
@ -255,7 +259,7 @@ void DrawText()
{ {
// Get Color and set opacity to %50 // Get Color and set opacity to %50
colors::rgba_t gaybow = colors::FromHSL( colors::rgba_t gaybow = colors::FromHSL(
fabs(sin((g_GlobalVars->curtime / 2.0f) + (i / 1.41241))) * fabs(sin((g_GlobalVars->curtime / 2.0f) + (i / 1.41241f))) *
360.0f, 360.0f,
0.85f, 0.9f); 0.85f, 0.9f);
gaybow.a = .5; gaybow.a = .5;

View File

@ -33,11 +33,9 @@ bool settings::SettingsWriter::saveTo(std::string path, bool only_changed)
[](const pair_type &a, const pair_type &b) -> bool { [](const pair_type &a, const pair_type &b) -> bool {
return a.first.compare(b.first) < 0; return a.first.compare(b.first) < 0;
}); });
for (auto &v : all_registered) for (auto &v : all_registered)
{ if (!v.first.empty())
write(v.first, v.second); write(v.first, v.second);
}
stream.close(); stream.close();
return true; return true;
} }

View File

@ -40,7 +40,7 @@ zerokernel::Checkbox::Checkbox(settings::Variable<bool> &option)
void zerokernel::Checkbox::render() void zerokernel::Checkbox::render()
{ {
if (option) if (option && *option)
{ {
renderBorder(*color_border); renderBorder(*color_border);
auto cb = bb.getContentBox(); auto cb = bb.getContentBox();