From dc48762943a04f1cdb9010979e20ca74c6d82e5e Mon Sep 17 00:00:00 2001 From: navewindre Date: Mon, 13 Nov 2023 15:15:03 +0100 Subject: remove block ljs, sv_enablebunnyhopping 0 stats, better restartgame fix --- sourcemod-1.5-dev/scripting/ljstats.sp | 61 +++++++--------------------------- 1 file changed, 12 insertions(+), 49 deletions(-) (limited to 'sourcemod-1.5-dev/scripting') diff --git a/sourcemod-1.5-dev/scripting/ljstats.sp b/sourcemod-1.5-dev/scripting/ljstats.sp index 48eadb5..250ba56 100644 --- a/sourcemod-1.5-dev/scripting/ljstats.sp +++ b/sourcemod-1.5-dev/scripting/ljstats.sp @@ -215,50 +215,42 @@ enum GAP_SELECTION_MODE enum LJTOP_TABLE { LT_LJ, - LT_BLOCKLJ, LT_SWLJ, LT_BWLJ, LT_CJ, LT_BJ, LT_LAJ, - LT_STRAFEBHOP, - LT_END, + LT_END } new String:g_strLJTopTags[LT_END][] = { "lj", - "blj", "swlj", "bwlj", "cj", "bj", - "laj", - "strafebhop" + "laj" }; new String:g_strLJTopTableName[LT_END][] = { "Longjump", - "Block longjump", "Sideways longjump", "Backwards longjump", "Countjump", "Bhopjump", - "Ladderjump", - "Multibhop" + "Ladderjump" }; new String:g_strLJTopOutput[LT_END][] = { "lj", - "block lj", "sideways lj", "backwards lj", "countjump", "bhopjump", - "ladderjump", - "multibhop" + "ladderjump" }; new String:g_strJumpType[JT_END][] = @@ -1558,18 +1550,10 @@ LJTopCreateMenu(LJTOP_TABLE:nTable) break; } - if(nTable == LT_BLOCKLJ) - { - FormatEx(buf, sizeof(buf), "%s - %.2f (%.2f: %.2f, %d @ %d%%, %.2f)", - g_LJTop[LT_BLOCKLJ][i][m_strName], g_LJTop[LT_BLOCKLJ][i][m_fBlockDistance], g_LJTop[LT_BLOCKLJ][i][m_fDistance], - g_LJTop[LT_BLOCKLJ][i][m_fPrestrafe], g_LJTop[LT_BLOCKLJ][i][m_nStrafes], RoundFloat(g_LJTop[LT_BLOCKLJ][i][m_fSync]), g_LJTop[LT_BLOCKLJ][i][m_fMaxSpeed]); - } - else - { - FormatEx(buf, sizeof(buf), "%s - %.2f (%.2f, %d @ %d%%, %.2f)", - g_LJTop[nTable][i][m_strName], g_LJTop[nTable][i][m_fDistance], - g_LJTop[nTable][i][m_fPrestrafe], g_LJTop[nTable][i][m_nStrafes], RoundFloat(g_LJTop[nTable][i][m_fSync]), g_LJTop[nTable][i][m_fMaxSpeed]); - } + + FormatEx(buf, sizeof(buf), "%s - %.2f (%.2f, %d @ %d%%, %.2f)", + g_LJTop[nTable][i][m_strName], g_LJTop[nTable][i][m_fDistance], + g_LJTop[nTable][i][m_fPrestrafe], g_LJTop[nTable][i][m_nStrafes], RoundFloat(g_LJTop[nTable][i][m_fSync]), g_LJTop[nTable][i][m_fMaxSpeed]); FormatEx(info, sizeof(info), "%s;%d", g_strLJTopTags[nTable], i); @@ -2048,10 +2032,6 @@ LJTopUpdate(client) { LJTopUpdateTable(client, LT_LJ); } - if(g_PlayerStates[client][bBlockMode] && !g_PlayerStates[client][bFailedBlock] && g_PlayerStates[client][fBlockDistance] > g_LJTop[LT_BLOCKLJ][LJTOP_NUM_ENTRIES - 1][m_fBlockDistance]) - { - LJTopUpdateTable(client, LT_BLOCKLJ); - } if(g_PlayerStates[client][JumpDir] == JD_SIDEWAYS && g_PlayerStates[client][fJumpDistance] > g_LJTop[LT_SWLJ][LJTOP_NUM_ENTRIES - 1][m_fDistance]) { LJTopUpdateTable(client, LT_SWLJ); @@ -2073,10 +2053,6 @@ LJTopUpdate(client) { LJTopUpdateTable(client, LT_LAJ); } - else if(g_PlayerStates[client][JumpType] == JT_BHOP && !g_bEnableBunnyHopping && g_PlayerStates[client][fJumpDistance] > g_LJTop[LT_STRAFEBHOP][LJTOP_NUM_ENTRIES - 1][m_fDistance]) - { - LJTopUpdateTable(client, LT_STRAFEBHOP); - } } LJTopUpdateTable(client, LJTOP_TABLE:nLJTopTable) @@ -2093,11 +2069,7 @@ LJTopUpdateTable(client, LJTOP_TABLE:nLJTopTable) new nPos = 0; - while(nPos < 9 && - (nLJTopTable == LT_BLOCKLJ ? g_PlayerStates[client][fBlockDistance] < g_LJTop[nLJTopTable][nPos][m_fBlockDistance] || - (g_PlayerStates[client][fBlockDistance] == g_LJTop[nLJTopTable][nPos][m_fBlockDistance] && - g_PlayerStates[client][fJumpDistance] < g_LJTop[nLJTopTable][nPos][m_fDistance]) : - g_PlayerStates[client][fJumpDistance] < g_LJTop[nLJTopTable][nPos][m_fDistance])) // longest statement in history + while(nPos < 9 && g_PlayerStates[client][fJumpDistance] < g_LJTop[nLJTopTable][nPos][m_fDistance]) // longest statement in history { if(!strcmp(g_LJTop[nLJTopTable][nPos][m_strSteamID], strSteamID)) { @@ -2122,8 +2094,7 @@ LJTopUpdateTable(client, LJTOP_TABLE:nLJTopTable) new bool:bSilent; - if(/*g_LJTop[nLJTopTable][nPos][m_strSteamID][0] == 0 || */g_PlayerStates[client][fJumpDistance] < g_fLJMin || - (nLJTopTable == LT_BLOCKLJ && nOldPos == nPos && g_PlayerStates[client][fBlockDistance] == g_LJTop[nLJTopTable][nPos][m_fBlockDistance])) + if(g_PlayerStates[client][fJumpDistance] < g_fLJMin) { bSilent = true; } @@ -2189,16 +2160,8 @@ LJTopUpdateTable(client, LJTOP_TABLE:nLJTopTable) return; } - if(nLJTopTable == LT_BLOCKLJ) - { - CPrintToChatAll("%s {green}%s top {default}%d{green} in block lj top with {default}%.2f{green} longjump at {default}%.1f{green} block!", - strName, nPos == nOldPos ? "has improved their" : "is now", nPos + 1, g_PlayerStates[client][fJumpDistance], g_PlayerStates[client][fBlockDistance]); - } - else - { - CPrintToChatAll("%s {green}%s top {default}%d{green} in %s top with {default}%.2f{green} %s!", - strName, nPos == nOldPos ? "has improved their" : "is now", nPos + 1, g_strLJTopOutput[nLJTopTable], g_PlayerStates[client][fJumpDistance], g_strJumpTypeLwr[g_PlayerStates[client][JumpType]]); - } + CPrintToChatAll("%s {green}%s top {default}%d{green} in %s top with {default}%.2f{green} %s!", + strName, nPos == nOldPos ? "has improved their" : "is now", nPos + 1, g_strLJTopOutput[nLJTopTable], g_PlayerStates[client][fJumpDistance], g_strJumpTypeLwr[g_PlayerStates[client][JumpType]]); } public Native_CancelJump(Handle:hPlugin, nParams) -- cgit v1.2.3