reading tickrate 66 from mapchooser cfg now

This commit is contained in:
jenz
2026-08-18 12:47:56 +02:00
parent a7b05d776c
commit 6cca898c7a
@@ -4,6 +4,7 @@
#include <sourcemod> #include <sourcemod>
#include <dhooks> #include <dhooks>
#include <mapchooser_extended>
//https://github.com/Mikusch/SM-TickrateChanger/tree/main //https://github.com/Mikusch/SM-TickrateChanger/tree/main
@@ -70,19 +71,7 @@ public MRESReturn ChangeLevel(DHookReturn hReturn, DHookParam hParams)
public void check_map(const char []map) public void check_map(const char []map)
{ {
new Handle:fileHandle = OpenFile("maps_66_tick.txt", "r" ); bool changeTick = GetMapTickRate(map) == 0 ? false : true;
char lineBuffer[256];
bool changeTick = false;
while(!IsEndOfFile(fileHandle) && ReadFileLine(fileHandle, lineBuffer, sizeof(lineBuffer)))
{
TrimString(lineBuffer);
if (StrEqual(map, lineBuffer, false))
{
changeTick = true;
break;
}
}
CloseHandle(fileHandle);
float interveral_per_tick_pre = GetConVarFloat(FindConVar("sm_interval_per_tick")); float interveral_per_tick_pre = GetConVarFloat(FindConVar("sm_interval_per_tick"));
bool double_map_change = false; bool double_map_change = false;