Fix cam pitch (neg euler); restore Corpse+orbit; drop bad chat hooks

This commit is contained in:
RallyBlock committed 2026-11-10 01:46:54 -05:00
1 parent 0de8a64149
commit e1e0d95e45
1 file changed
+19 -16
+19 -16
View File
@@ -161,7 +161,7 @@ function RPGClient_ViewTransform(%body, %yaw, %dist, %panX, %panY)
%ey = %cy + %by;
%ez = %cz + %bz;
%eye = %ex @ " " @ %ey @ " " @ %ez;
%euler = %pitch @ " 0 " @ (%yaw + $pi);
%euler = (-%pitch) @ " 0 " @ (%yaw + $pi);
%rot = eulerRadToMatrix(%euler);
return %eye @ " " @ %rot;
}
@@ -188,6 +188,7 @@ function RPGClient_NetCam()
function RPGClient_CameraTick()
{
$RPGClient::CamTickSched = 0;
RPGClient_PollChatOpen();
if (!isObject(ServerConnection) || !$RPGClient::CamTickOn)
{
return;
@@ -260,6 +261,18 @@ function RPGClient_SetChatOpen(%open)
$RPGClient::ChatOpen = %open ? 1 : 0;
}
function RPGClient_PollChatOpen()
{
if (!$RPGClient::ChatOpen || !isObject(newChatText))
{
return;
}
if (!newChatText.isVisible())
{
$RPGClient::ChatOpen = 0;
}
}
function RPGClient_RpgKeys()
{
return $RPGClient::Active && !RPGClient_TextTyping();
@@ -558,13 +571,14 @@ function RPGClient_ApplyCamera(%forceSync)
%cam.unmountImage(0);
if (!$RPGClient::OrbitInit)
{
%cam.setMode("Fly", 0);
%cam.mode = "Fly";
$mvFreeLook = 0;
$firstPerson = 0;
%cam.setMode("Corpse", %body);
%cam.mode = "Corpse";
%cam.thirdPersonOnly = 1;
$RPGClient::OrbitInit = 1;
}
%cam.setOrbitMode(%body, %xfm, 0, 32, $RPGClient::Dist);
%cam.setTransform(%xfm);
%cam.setOrbitDist($RPGClient::Dist);
}
function RPGClient_ScheduleCamera()
@@ -1215,17 +1229,6 @@ package RPGClient_ChatKeys
}
}
function newChatText::onWake(%this)
{
Parent::onWake(%this);
RPGClient_SetChatOpen(1);
}
function newChatText::onSleep(%this)
{
Parent::onSleep(%this);
RPGClient_SetChatOpen(0);
}
};
activatePackage(RPGClient_ChatKeys);