mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Bumps max client fps from 120 (125) to 1000 (#29467)
* 300 > 120 * ooooh i don't need sql change * same but descending + fix issue about DB * well, i should update bd * default is 100, keep only divisors of 1000 * fuck you byon d!!!! * cleanup
This commit is contained in:
@@ -289,7 +289,7 @@ CREATE TABLE `player` (
|
||||
`volume_mixer` LONGTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`lastchangelog` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
|
||||
`exp` LONGTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`clientfps` smallint(4) DEFAULT '63',
|
||||
`clientfps` smallint(4) DEFAULT '100',
|
||||
`atklog` smallint(4) DEFAULT '0',
|
||||
`fuid` bigint(20) DEFAULT NULL,
|
||||
`fupdate` smallint(4) DEFAULT '0',
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Updates DB from 68 to 69
|
||||
# Changes DB default for clientFPS to 100
|
||||
|
||||
ALTER TABLE `player` CHANGE COLUMN `clientfps` `clientfps` smallint(4) DEFAULT '100' AFTER `exp`;
|
||||
@@ -438,7 +438,7 @@
|
||||
#define INVESTIGATE_DEATHS "deaths"
|
||||
|
||||
// The SQL version required by this version of the code
|
||||
#define SQL_VERSION 68
|
||||
#define SQL_VERSION 69
|
||||
|
||||
// Vending machine stuff
|
||||
#define CAT_NORMAL (1<<0)
|
||||
|
||||
@@ -183,3 +183,17 @@
|
||||
#define COLOURBLIND_MODE_DEUTER "Red-green (green weak, deuteranopia)"
|
||||
#define COLOURBLIND_MODE_PROT "Red-green (red weak, protanopia)"
|
||||
#define COLOURBLIND_MODE_TRIT "Blue-yellow (tritanopia)"
|
||||
|
||||
/// Best FPS options for clients. A regular list that has only divisors of 1000
|
||||
GLOBAL_LIST_INIT(client_fps_options, list_fps_options())
|
||||
|
||||
/proc/list_fps_options()
|
||||
var/list/options = list()
|
||||
|
||||
for(var/option in 1 to 1000 / world.fps)
|
||||
if(1000 % option) // Lummox said it works better with divisors of 1000
|
||||
continue
|
||||
|
||||
options += 1000 / option
|
||||
|
||||
return options
|
||||
|
||||
@@ -865,16 +865,16 @@
|
||||
return
|
||||
active_character.pda_ringtone = ringtone
|
||||
if("clientfps")
|
||||
var/version_message
|
||||
if(user.client && user.client.byond_version < 511)
|
||||
version_message = "\nYou need to be using byond version 511 or later to take advantage of this feature, your version of [user.client.byond_version] is too low"
|
||||
if(world.byond_version < 511)
|
||||
version_message += "\nThis server does not currently support client side fps. You can set now for when it does."
|
||||
var/desiredfps = tgui_input_number(user, "Choose your desired fps.[version_message]\n(Min = synced with server tick rate)", "Character Preference", clientfps, 120, world.fps)
|
||||
var/desiredfps = tgui_input_list(user, "Choose your desired fps. Listed variants work better than custom", "Character Preference", list("\[CUSTOM\]") + GLOB.client_fps_options, clientfps)
|
||||
if(!isnull(desiredfps))
|
||||
if(desiredfps == "\[CUSTOM\]")
|
||||
desiredfps = tgui_input_number(user, "Set your desired fps. Remember that this value will be converted to one that server can actually work with!", "Character Preference", parent.fps, 1000, world.fps)
|
||||
if(isnull(desiredfps)) // we closed the window
|
||||
return
|
||||
if(round(1000 / floor(1000 / desiredfps), 1) != desiredfps) // don't ask
|
||||
desiredfps = floor(1000 / round(1000 / desiredfps, 1))
|
||||
clientfps = desiredfps
|
||||
if(world.byond_version >= 511 && user.client && user.client.byond_version >= 511)
|
||||
parent.fps = clientfps
|
||||
parent.fps = clientfps
|
||||
|
||||
else
|
||||
switch(href_list["preference"])
|
||||
|
||||
@@ -70,7 +70,8 @@ GLOBAL_LIST_INIT(special_role_times, list(
|
||||
var/glowlevel = GLOW_MED
|
||||
var/UI_style_color = "#ffffff"
|
||||
var/UI_style_alpha = 255
|
||||
var/clientfps = 63
|
||||
/// This value will be converted by BYOND, don't set already converted values there, otherwise it will set client's fps 1 step higher than it should've
|
||||
var/clientfps = 100
|
||||
var/atklog = ATKLOG_ALL
|
||||
/// Forum userid
|
||||
var/fuid
|
||||
@@ -420,7 +421,7 @@ GLOBAL_LIST_INIT(special_role_times, list(
|
||||
dat += "<b>Colourblind Mode:</b> <a href='byond://?_src_=prefs;preference=cbmode'>[colourblind_mode]</a><br>"
|
||||
if(user.client.donator_level > 0)
|
||||
dat += "<b>Donator Publicity:</b> <a href='byond://?_src_=prefs;preference=donor_public'><b>[(toggles & PREFTOGGLE_DONATOR_PUBLIC) ? "Public" : "Hidden"]</b></a><br>"
|
||||
dat += "<b>FPS:</b> <a href='byond://?_src_=prefs;preference=clientfps;task=input'>[clientfps]</a><br>"
|
||||
dat += "<b>FPS:</b> <a href='byond://?_src_=prefs;preference=clientfps;task=input'>[user.client.fps]</a><br>"
|
||||
dat += "<b>Ghost Ears:</b> <a href='byond://?_src_=prefs;preference=ghost_ears'><b>[(toggles & PREFTOGGLE_CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]</b></a><br>"
|
||||
dat += "<b>Ghost Radio:</b> <a href='byond://?_src_=prefs;preference=ghost_radio'><b>[(toggles & PREFTOGGLE_CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]</b></a><br>"
|
||||
dat += "<b>Ghost Sight:</b> <a href='byond://?_src_=prefs;preference=ghost_sight'><b>[(toggles & PREFTOGGLE_CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]</b></a><br>"
|
||||
|
||||
@@ -173,7 +173,7 @@ ipc_screens = [
|
||||
# Enable/disable the database on a whole
|
||||
sql_enabled = false
|
||||
# SQL version. If this is a mismatch, round start will be delayed
|
||||
sql_version = 68
|
||||
sql_version = 69
|
||||
# SQL server address. Can be an IP or DNS name
|
||||
sql_address = "127.0.0.1"
|
||||
# SQL server port
|
||||
|
||||
Reference in New Issue
Block a user