From 8f4623a55ad65d3dc944865482800b9cfb7d9242 Mon Sep 17 00:00:00 2001 From: RallyBlock Date: Tue, 10 Nov 2026 05:31:11 -0500 Subject: [PATCH] Camera server-only on host; fix click screen Y --- client.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client.cs b/client.cs index 9fd497b..41506a3 100644 --- a/client.cs +++ b/client.cs @@ -58,7 +58,7 @@ function RPGClient_NormScreenPos(%pos) %h = 1; } %x = getWord(%pos, 0) / %w; - %y = getWord(%pos, 1) / %h; + %y = 1 - getWord(%pos, 1) / %h; return RPGClient_ClampNorm(%x, %y); } @@ -259,16 +259,15 @@ function RPGClient_SendClick(%button, %pos) %norm = RPGClient_NormScreenPos(%pos); %nx = getWord(%norm, 0); %ny = getWord(%norm, 1); + commandToServer('RPG_Click', %button, %nx, %ny, RPGClient_Aspect(), $RPGClient::Yaw, $RPGClient::Dist, $RPGClient::Pitch, $RPGClient::PanX, $RPGClient::PanY); if (%button == 0) { %gnd = RPGClient_PickGround(%nx, %ny); if (%gnd !$= "") { commandToServer('RPG_Go', getWord(%gnd, 0), getWord(%gnd, 1), getWord(%gnd, 2)); - return; } } - commandToServer('RPG_Click', %button, %nx, %ny, RPGClient_Aspect(), $RPGClient::Yaw, $RPGClient::Dist, $RPGClient::Pitch, $RPGClient::PanX, $RPGClient::PanY); } function RPGClient_Mouse::onMouseDown(%this, %mod, %pos, %clicks) @@ -354,7 +353,7 @@ function RPGClient_EnsureCursor() function RPGClient_NetCam() { - return isObject(ServerConnection) && !isObject(localClientConnection); + return $RPGClient::Active && isObject(ServerConnection); } function RPGClient_CameraTick()