summaryrefslogtreecommitdiff
path: root/sourcemod-1.5-dev/scripting/ljstats.sp
diff options
context:
space:
mode:
authornavewindre <nw@moneybot.cc>2023-11-21 08:27:13 +0100
committernavewindre <nw@moneybot.cc>2023-11-21 08:27:13 +0100
commit8fa5a23370c82437eb3cfcadf62fb05a43846ac6 (patch)
tree37c1566f9ac88f664ca84446f0a618ee42d5b764 /sourcemod-1.5-dev/scripting/ljstats.sp
parent5484eec6124316381391695d8d06fc78d12cf3ce (diff)
big (huge)
Diffstat (limited to 'sourcemod-1.5-dev/scripting/ljstats.sp')
-rw-r--r--sourcemod-1.5-dev/scripting/ljstats.sp112
1 files changed, 5 insertions, 107 deletions
diff --git a/sourcemod-1.5-dev/scripting/ljstats.sp b/sourcemod-1.5-dev/scripting/ljstats.sp
index 7ede154..30df4ee 100644
--- a/sourcemod-1.5-dev/scripting/ljstats.sp
+++ b/sourcemod-1.5-dev/scripting/ljstats.sp
@@ -943,6 +943,8 @@ public OnClientPutInServer(client)
//#endif
g_PlayerStates[client][nVerbosity] = g_nVerbosity;
*/
+
+ g_PlayerStates[client][bLJEnabled] = true;
g_PlayerStates[client][bOnGround] = true;
g_PlayerStates[client][fBlockDistance] = -1.0;
g_PlayerStates[client][IllegalJumpFlags] = IJF_NONE;
@@ -1042,18 +1044,14 @@ public OnClientCookiesCached(client)
if(StringToInt(strCookie) == 0)
{
- #if defined LJSERV
SetCookie(client, g_hCookieLJEnabled, true);
- SetCookie(client, g_hCookieBlockMode, true);
- #endif
-
SetCookie(client, g_hCookieSound, g_bLJSound);
SetCookie(client, g_hCookieShowBhopStats, g_bShowBhopStats);
SetCookie(client, g_hCookieVerbosity, g_nVerbosity);
- SetCookie(client, g_hCookieShowAllJumps, false);
+ SetCookie(client, g_hCookieShowAllJumps, true);
#if defined LJSERV
SetCookie(client, g_hCookieShowPrestrafeHint, true);
@@ -3085,60 +3083,7 @@ PlayerLand(client)
decl String:buf[1024];
g_PlayerStates[client][strHUDHint][0] = 0;
-
- if(g_PlayerStates[client][bBlockMode])
- {
- if(g_PlayerStates[client][fBlockDistance] != -1.0)
- {
- Format(buf, sizeof(buf), "%.1f block %s\n",
- g_PlayerStates[client][fBlockDistance],
- g_PlayerStates[client][bFailedBlock] ? "(failed)" : "");
-
- StrCat(g_PlayerStates[client][strHUDHint], HUD_HINT_SIZE, buf);
- }
- else
- {
- Format(buf, sizeof(buf), "??? block %s\n",
- g_PlayerStates[client][bFailedBlock] ? "(failed) " : "");
-
- StrCat(g_PlayerStates[client][strHUDHint], HUD_HINT_SIZE, buf);
- }
-
- if(g_PlayerStates[client][fBlockDistance] != -1.0 && g_PlayerStates[client][vBlockNormal][0] != 0.0 && g_PlayerStates[client][vBlockNormal][1] != 0.0 && g_PlayerStates[client][nVerbosity] > 2)
- {
- new Float:f = 32.0 * (FloatAbs(g_PlayerStates[client][vBlockNormal][0]) + FloatAbs(g_PlayerStates[client][vBlockNormal][1]) - 1.0);
- new Float:fAngle = FloatAbs(RadToDeg(ArcSine(g_PlayerStates[client][vBlockNormal][0])));
- fAngle = fAngle <= 45.0 ? fAngle : 90 - fAngle;
-
- Format(buf, sizeof(buf), "(%.1f rotated by %.1fÂș)\n",
- g_PlayerStates[client][fBlockDistance] + f,
- fAngle);
-
- StrCat(g_PlayerStates[client][strHUDHint], HUD_HINT_SIZE, buf);
- }
-
- if(g_PlayerStates[client][fBlockDistance] != -1.0 && g_PlayerStates[client][nVerbosity] > 1)
- {
- new Float:vJumpAngle[3], Float:vJumpOrig[3], Float:vBlockN[3];
-
- vJumpAngle = vCurOrigin;
- Array_Copy(g_PlayerStates[client][vJumpOrigin], vJumpOrig, 3);
-
- vBlockN[0] = g_PlayerStates[client][vBlockNormal][0];
- vBlockN[1] = g_PlayerStates[client][vBlockNormal][1];
-
- vJumpAngle[2] = 0.0;
- vJumpOrig[2] = 0.0;
-
- SubtractVectors(vJumpAngle, vJumpOrig, vJumpAngle);
- NormalizeVector(vJumpAngle, vJumpAngle);
-
- Format(buf, sizeof(buf), "%.2f degrees off block\n",
- RadToDeg(ArcCosine(GetVectorDotProduct(vJumpAngle, vBlockN))));
-
- StrCat(g_PlayerStates[client][strHUDHint], HUD_HINT_SIZE, buf);
- }
- }
+
decl String:strJump[32];
@@ -3230,54 +3175,7 @@ PlayerLand(client)
buf[0] = 0;
Append(buf, sizeof(buf), "\n");
-
- if(g_PlayerStates[client][bBlockMode])
- {
- if(g_PlayerStates[client][fBlockDistance] != -1.0)
- {
- Append(buf, sizeof(buf), "%.01f block%s",
- g_PlayerStates[client][fBlockDistance],
- g_PlayerStates[client][bFailedBlock] ? " (failed)" : "");
- }
- else
- {
- Append(buf, sizeof(buf), "??? block%s",
- g_PlayerStates[client][bFailedBlock] ? " (failed)" : "");
- }
-
- if(g_PlayerStates[client][fBlockDistance] != -1.0 && g_PlayerStates[client][vBlockNormal][0] != 0.0 && g_PlayerStates[client][vBlockNormal][1] != 0.0)
- {
- new Float:f = 32.0 * (FloatAbs(g_PlayerStates[client][vBlockNormal][0]) + FloatAbs(g_PlayerStates[client][vBlockNormal][1]) - 1.0);
- new Float:fAngle = FloatAbs(RadToDeg(ArcSine(g_PlayerStates[client][vBlockNormal][0])));
- fAngle = fAngle <= 45.0 ? fAngle : 90 - fAngle;
-
- Append(buf, sizeof(buf), " (%.1f rotated by %.1f)",
- g_PlayerStates[client][fBlockDistance] + f,
- fAngle);
- }
-
- if(g_PlayerStates[client][fBlockDistance] != -1.0)
- {
- new Float:vJumpAngle[3], Float:vJumpOrig[3], Float:vBlockN[3];
-
- vJumpAngle = vCurOrigin;
- Array_Copy(g_PlayerStates[client][vJumpOrigin], vJumpOrig, 3);
-
- vBlockN[0] = g_PlayerStates[client][vBlockNormal][0];
- vBlockN[1] = g_PlayerStates[client][vBlockNormal][1];
-
- vJumpAngle[2] = 0.0;
- vJumpOrig[2] = 0.0;
-
- SubtractVectors(vJumpAngle, vJumpOrig, vJumpAngle);
- NormalizeVector(vJumpAngle, vJumpAngle);
-
- Append(buf, sizeof(buf), " - %.2f degrees off block",
- RadToDeg(ArcCosine(GetVectorDotProduct(vJumpAngle, vBlockN))));
- }
-
- Append(buf, sizeof(buf), "\n");
- }
+
Append(buf, sizeof(buf), "%s%s%s\nDistance: %.2f",
strJump, strJumpDir,