Throttle CamSync only; always apply local orbit

This commit is contained in:
RallyBlock committed 2026-11-09 20:49:29 -05:00
1 parent 79e042d719
commit 52edfe59d3
1 file changed
+6 -6
+6 -6
View File
@@ -592,12 +592,7 @@ function RPGClient_ApplyCamera(%forceSync)
return;
}
%now = getSimTime();
if (!%forceSync && %now - $RPGClient::LastCamSync < 40)
{
return;
}
$RPGClient::LastCamSync = %now;
commandToServer('RPG_CamSync', $RPGClient::Yaw, $RPGClient::Dist, 0, 0);
%doSync = %forceSync || %now - $RPGClient::LastCamSync >= 40;
%body = %conn.Player;
if (!isObject(%body))
{
@@ -631,6 +626,11 @@ function RPGClient_ApplyCamera(%forceSync)
%cam.setTransform(%xfm);
%cam.setOrbitMode(%body, %xfm, 0, 32, $RPGClient::Dist);
%cam.setOrbitDist($RPGClient::Dist);
if (%doSync)
{
$RPGClient::LastCamSync = %now;
commandToServer('RPG_CamSync', $RPGClient::Yaw, $RPGClient::Dist, 0, 0);
}
}
function RPGClient_ScheduleCamera()