Segs / Segs

:muscle: SEGS - Super Entity Game Server

Home Page:https://segs.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

world_update_ticks_per_sec needs a default value

broxen opened this issue · comments

Summary

Great find by @cyanpill. Looks like world_update_ticks_per_sec needs a default fallback value when loading from settings. Without it, the server assumes 0 and crazy things happen.

int ticks = config.value(QStringLiteral("world_update_ticks_per_sec"), "").toInt();

And

ui->ticksPerSecond->setValue(config_file.value("world_update_ticks_per_sec", "").toInt());

config_file_write.setValue("world_update_ticks_per_sec", settings_template.value("world_update_ticks_per_sec").toInt());

Default should be 30

Might want to iterate the settings cfg version since we've added this to the settings template