Fix cam pitch (neg euler); restore Corpse+orbit; drop bad chat hooks
This commit is contained in:
1 parent
0de8a64149
commit
e1e0d95e45
1 file changed
+19
-16
@@ -161,7 +161,7 @@ function RPGClient_ViewTransform(%body, %yaw, %dist, %panX, %panY)
|
|||||||
%ey = %cy + %by;
|
%ey = %cy + %by;
|
||||||
%ez = %cz + %bz;
|
%ez = %cz + %bz;
|
||||||
%eye = %ex @ " " @ %ey @ " " @ %ez;
|
%eye = %ex @ " " @ %ey @ " " @ %ez;
|
||||||
%euler = %pitch @ " 0 " @ (%yaw + $pi);
|
%euler = (-%pitch) @ " 0 " @ (%yaw + $pi);
|
||||||
%rot = eulerRadToMatrix(%euler);
|
%rot = eulerRadToMatrix(%euler);
|
||||||
return %eye @ " " @ %rot;
|
return %eye @ " " @ %rot;
|
||||||
}
|
}
|
||||||
@@ -188,6 +188,7 @@ function RPGClient_NetCam()
|
|||||||
function RPGClient_CameraTick()
|
function RPGClient_CameraTick()
|
||||||
{
|
{
|
||||||
$RPGClient::CamTickSched = 0;
|
$RPGClient::CamTickSched = 0;
|
||||||
|
RPGClient_PollChatOpen();
|
||||||
if (!isObject(ServerConnection) || !$RPGClient::CamTickOn)
|
if (!isObject(ServerConnection) || !$RPGClient::CamTickOn)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -260,6 +261,18 @@ function RPGClient_SetChatOpen(%open)
|
|||||||
$RPGClient::ChatOpen = %open ? 1 : 0;
|
$RPGClient::ChatOpen = %open ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function RPGClient_PollChatOpen()
|
||||||
|
{
|
||||||
|
if (!$RPGClient::ChatOpen || !isObject(newChatText))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!newChatText.isVisible())
|
||||||
|
{
|
||||||
|
$RPGClient::ChatOpen = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function RPGClient_RpgKeys()
|
function RPGClient_RpgKeys()
|
||||||
{
|
{
|
||||||
return $RPGClient::Active && !RPGClient_TextTyping();
|
return $RPGClient::Active && !RPGClient_TextTyping();
|
||||||
@@ -558,13 +571,14 @@ function RPGClient_ApplyCamera(%forceSync)
|
|||||||
%cam.unmountImage(0);
|
%cam.unmountImage(0);
|
||||||
if (!$RPGClient::OrbitInit)
|
if (!$RPGClient::OrbitInit)
|
||||||
{
|
{
|
||||||
%cam.setMode("Fly", 0);
|
%cam.setMode("Corpse", %body);
|
||||||
%cam.mode = "Fly";
|
%cam.mode = "Corpse";
|
||||||
$mvFreeLook = 0;
|
%cam.thirdPersonOnly = 1;
|
||||||
$firstPerson = 0;
|
|
||||||
$RPGClient::OrbitInit = 1;
|
$RPGClient::OrbitInit = 1;
|
||||||
}
|
}
|
||||||
|
%cam.setOrbitMode(%body, %xfm, 0, 32, $RPGClient::Dist);
|
||||||
%cam.setTransform(%xfm);
|
%cam.setTransform(%xfm);
|
||||||
|
%cam.setOrbitDist($RPGClient::Dist);
|
||||||
}
|
}
|
||||||
|
|
||||||
function RPGClient_ScheduleCamera()
|
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);
|
activatePackage(RPGClient_ChatKeys);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user