Skip to content

Commit 46c3922

Browse files
authored
Merge branch 'dev' into voicechat-command
2 parents ccef71f + e55c96e commit 46c3922

27 files changed

Lines changed: 345 additions & 246 deletions

PackageScript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ for task in MMSPlugin.binaries:
113113
mapcfg_folder = builder.AddFolder(os.path.join(packages[sdk_name].sdk_name, 'cfg', MMSPlugin.metadata['name'], 'maps'))
114114
gamedata_folder = builder.AddFolder(os.path.join(packages[sdk_name].sdk_name, 'addons', MMSPlugin.metadata['name'], 'gamedata'))
115115
builder.AddCopy(os.path.join('configs', 'admins.jsonc.example'), configs_folder)
116-
builder.AddCopy(os.path.join('configs', 'discordbots.cfg.example'), configs_folder)
116+
builder.AddCopy(os.path.join('configs', 'discordbots.jsonc.example'), configs_folder)
117117
builder.AddCopy(os.path.join('configs', 'maplist.jsonc.example'), configs_folder)
118118
builder.AddCopy(os.path.join('cfg', MMSPlugin.metadata['name'], 'cs2fixes.cfg'), cfg_folder)
119119
builder.AddCopy(os.path.join('cfg', MMSPlugin.metadata['name'], 'maps', 'de_somemap.cfg'), mapcfg_folder)

cfg/cs2fixes/cs2fixes.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cs2f_stopsound_enable 0 // Whether to enable stopsound
77
cs2f_noblock_enable 0 // Whether to use player noblock, which sets debris collision on every player
88
cs2f_noblock_grenades 0 // Whether to use noblock on grenade projectiles
99
cs2f_block_team_messages 0 // Whether to block team join messages
10-
cs2f_movement_unlocker_enable 0 // Whether to enable movement unlocker
10+
cs2f_movement_unlocker_enable 0 // Whether to enable movement unlocker, clients will not predict
1111
cs2f_use_old_push 0 // Whether to use the old CSGO trigger_push behavior (Necessary for surf and other modes that heavily use ported pushes)
1212
cs2f_hide_enable 0 // Whether to enable hide (WARNING: randomly crashes clients since 2023-12-13 CS2 update)
1313
cs2f_votemanager_enable 0 // Whether to enable votemanager features such as map vote fix, nominations, RTV and extends
@@ -26,6 +26,7 @@ cs2f_fix_game_bans 0 // Whether to fix CS2 game bans spreading to all new jo
2626
cs2f_free_armor 0 // Whether kevlar (1+) and/or helmet (2) are given automatically
2727
cs2f_block_particle_msgs 0 // Whether to block CUserMsg_ParticleManager messages to fix lag/crashes, experimental
2828
cs2f_disable_setmodel 0 // Whether to disable SetModel usage from maps (custom input, cs_script function)
29+
cs2f_allow_duck_spam 0 // Whether to allow duck spamming by removing the duck slowdown, clients will only partially predict [0 = disabled, 1 = both teams, 2 = T only, 3 = CT only]
2930
3031
cs2f_beacon_particle "particles/cs2fixes/admin_beacon.vpcf" // .vpcf file to be precached and used for player beacon
3132
cs2f_motd_url "" // Server MOTD URL, shows up as a "Server Website" button in scoreboard

configs/discordbots.cfg.example

Lines changed: 0 additions & 14 deletions
This file was deleted.

configs/discordbots.jsonc.example

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"YourFirstBot":
3+
{
4+
"webhook": "DISCORD_WEBHOOK_1",
5+
"override_name": false
6+
},
7+
"YourSecondBot":
8+
{
9+
"webhook": "DISCORD_WEBHOOK_2",
10+
"avatar": "AVATAR_IMAGE_2",
11+
"override_name": true
12+
}
13+
}

gamedata/cs2fixes.jsonc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@
5656
"windows": "C8 42 EB ? 4C 8B 77 ? 4D 39 66",
5757
"linux": "C8 42 41 C7 85 ? ? ? ? ? ? ? ? 41 C7 85 ? ? ? ? ? ? ? ? E9"
5858
},
59-
// Called right after "Removed %s(%s)\n"
60-
"UTIL_Remove":
61-
{
62-
"library": "server",
63-
"windows": "48 85 C9 74 ? 48 8B D1 48 8B 0D ? ? ? ?",
64-
"linux": "48 89 FE 48 85 FF 74 ? 48 8D 05 ? ? ? ? 48"
65-
},
6659
// "SetPosition" is passed to this
6760
"CEntitySystem_AddEntityIOEvent":
6861
{

src/addresses.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ bool addresses::Initialize(CGameConfig* g_GameConfig)
5555
RESOLVE_SIG(g_GameConfig, "CCSPlayerController_SwitchTeam", addresses::CCSPlayerController_SwitchTeam);
5656
RESOLVE_SIG(g_GameConfig, "CBasePlayerController_SetPawn", addresses::CBasePlayerController_SetPawn);
5757
RESOLVE_SIG(g_GameConfig, "CBaseModelEntity_SetModel", addresses::CBaseModelEntity_SetModel);
58-
RESOLVE_SIG(g_GameConfig, "UTIL_Remove", addresses::UTIL_Remove);
5958
RESOLVE_SIG(g_GameConfig, "CEntitySystem_AddEntityIOEvent", addresses::CEntitySystem_AddEntityIOEvent);
6059
RESOLVE_SIG(g_GameConfig, "CEntityInstance_AcceptInput", addresses::CEntityInstance_AcceptInput);
6160
RESOLVE_SIG(g_GameConfig, "CGameEntitySystem_FindEntityByClassName", addresses::CGameEntitySystem_FindEntityByClassName);

src/adminsystem.cpp

Lines changed: 2 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,74 +1338,6 @@ CAdminSystem::CAdminSystem()
13381338
m_iDCPlyIndex = 0;
13391339
}
13401340

1341-
// TODO: Remove this once servers have been given a few months to update cs2fixes
1342-
bool CAdminSystem::ConvertAdminsKVToJSON()
1343-
{
1344-
KeyValues* pKV = new KeyValues("admins");
1345-
KeyValues::AutoDelete autoDelete(pKV);
1346-
1347-
const char* pszPath = "addons/cs2fixes/configs/admins.cfg";
1348-
1349-
if (!pKV->LoadFromFile(g_pFullFileSystem, pszPath))
1350-
{
1351-
Warning("Failed to load %s\n", pszPath);
1352-
return false;
1353-
}
1354-
1355-
ordered_json jAdmins;
1356-
1357-
jAdmins["Admins"] = ordered_json(ordered_json::value_t::object);
1358-
1359-
for (KeyValues* pKey = pKV->GetFirstSubKey(); pKey; pKey = pKey->GetNextKey())
1360-
{
1361-
ordered_json jAdmin;
1362-
1363-
if (!pKey->FindKey("steamid"))
1364-
{
1365-
Warning("Admin entry %s is missing 'steam' key\n", pKey->GetName());
1366-
return false;
1367-
}
1368-
1369-
jAdmin["name"] = pKey->GetName();
1370-
1371-
if (pKey->FindKey("flags"))
1372-
jAdmin["flags"] = pKey->GetString("flags", nullptr);
1373-
1374-
if (pKey->FindKey("immunity"))
1375-
jAdmin["immunity"] = pKey->GetInt("immunity", 0);
1376-
1377-
jAdmins["Admins"][pKey->GetString("steamid", "")] = jAdmin;
1378-
}
1379-
1380-
const char* pszJsonPath = "addons/cs2fixes/configs/admins.jsonc";
1381-
const char* pszKVConfigRenamePath = "addons/cs2fixes/configs/admins_old.cfg";
1382-
char szPath[MAX_PATH];
1383-
V_snprintf(szPath, sizeof(szPath), "%s%s%s", Plat_GetGameDirectory(), "/csgo/", pszJsonPath);
1384-
std::ofstream jsonFile(szPath);
1385-
1386-
if (!jsonFile.is_open())
1387-
{
1388-
Panic("Failed to open %s\n", pszJsonPath);
1389-
return false;
1390-
}
1391-
1392-
jsonFile << std::setfill('\t') << std::setw(1) << jAdmins << std::endl;
1393-
1394-
char szKVRenamePath[MAX_PATH];
1395-
V_snprintf(szPath, sizeof(szPath), "%s%s%s", Plat_GetGameDirectory(), "/csgo/", pszPath);
1396-
V_snprintf(szKVRenamePath, sizeof(szPath), "%s%s%s", Plat_GetGameDirectory(), "/csgo/", pszKVConfigRenamePath);
1397-
1398-
std::rename(szPath, szKVRenamePath);
1399-
1400-
// remove old cfg example if it exists
1401-
const char* pszKVExamplePath = "addons/cs2fixes/configs/admins.cfg.example";
1402-
V_snprintf(szPath, sizeof(szPath), "%s%s%s", Plat_GetGameDirectory(), "/csgo/", pszKVExamplePath);
1403-
std::remove(szPath);
1404-
1405-
Message("Successfully converted KV1 admins.cfg to JSON format at %s\n", pszJsonPath);
1406-
return true;
1407-
}
1408-
14091341
bool CAdminSystem::LoadAdmins()
14101342
{
14111343
m_mapAdmins.clear();
@@ -1418,13 +1350,8 @@ bool CAdminSystem::LoadAdmins()
14181350

14191351
if (!jsonFile.is_open())
14201352
{
1421-
if (!ConvertAdminsKVToJSON())
1422-
{
1423-
Panic("Failed to open %s and convert KV1 admins.cfg to JSON format, admins are not loaded!\n", pszJsonPath);
1424-
return false;
1425-
}
1426-
1427-
jsonFile.open(szPath);
1353+
Panic("Failed to open %s, admins are not loaded!\n", pszJsonPath);
1354+
return false;
14281355
}
14291356

14301357
ordered_json jAdminConfig = ordered_json::parse(jsonFile, nullptr, false, true);

src/adminsystem.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,6 @@ class CAdminSystem
189189
void AddDisconnectedPlayer(const char* pszName, uint64 xuid, const char* pszIP);
190190
void ShowDisconnectedPlayers(CCSPlayerController* const pAdmin);
191191

192-
// TODO: Remove this once servers have been given a few months to update cs2fixes
193-
bool ConvertAdminsKVToJSON();
194-
195192
private:
196193
std::map<std::string, CAdminBase> m_mapAdminGroups;
197194
std::map<uint64, CAdmin> m_mapAdmins;

src/cs2_sdk/entity/cbasetoggle.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@
2424
class CBaseToggle : CBaseModelEntity
2525
{
2626
DECLARE_SCHEMA_CLASS(CBaseToggle);
27+
28+
SCHEMA_FIELD(Vector, m_vecPosition1);
29+
SCHEMA_FIELD(Vector, m_vecPosition2);
2730
};

0 commit comments

Comments
 (0)