Camera server-only on host; fix click screen Y

This commit is contained in:
RallyBlock committed 2026-11-10 05:31:11 -05:00
1 parent 43d8fddbc2
commit 8f4623a55a
1 file changed
+3 -4
+3 -4
View File
@@ -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()