modded class PlayerBase
{
protected bool m_AutoRunEnabled;
// sync movement on the server side
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
{
if (rpc_type == -12010)
{
Param3<bool, int, int> runParams;
if(!ctx.Read(runParams)) return;
this.GetInputController().OverrideMovementSpeed(runParams.param1, runParams.param2);
this.GetInputController().OverrideMovementAngle(runParams.param1, runParams.param3);
}
super.OnRPC(sender, rpc_type, ctx);
}
void SetAutoRun(bool enabled)
{
m_AutoRunEnabled = enabled;
}
bool IsAutoRunning()
{
return m_AutoRunEnabled;
}
}