From 072fdce14480e5a7da890a12421b8d6b4f44aa99 Mon Sep 17 00:00:00 2001 From: jenz Date: Thu, 6 Jun 2024 14:49:09 +0200 Subject: [PATCH] resetting grav on forwards --- ReplicateGravity/scripting/ReplicateGravity.sp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ReplicateGravity/scripting/ReplicateGravity.sp b/ReplicateGravity/scripting/ReplicateGravity.sp index fe32b46d..89192ab5 100644 --- a/ReplicateGravity/scripting/ReplicateGravity.sp +++ b/ReplicateGravity/scripting/ReplicateGravity.sp @@ -61,4 +61,17 @@ public void OnGameFrame() g_flClientGravityReplicate[client] = flClientGravityReplicate; } } -} \ No newline at end of file +} + +//probably not needed at all. +public void OnClientDisconnect(int client) +{ + float flServerGravity = g_hCVar_Gravity.FloatValue; + g_flClientGravityReplicate[client] = flServerGravity; +} + +public void OnClientPostAdminCheck(int client) +{ + float flServerGravity = g_hCVar_Gravity.FloatValue; + g_flClientGravityReplicate[client] = flServerGravity; +}