made event timing more precise; allowed tick times <1ms
This commit is contained in:
parent
7cc28c5e97
commit
e8f69cce08
@ -12,7 +12,7 @@ function serverCmdLST(%client, %time)
|
||||
{
|
||||
if(%client.isAdmin || %client.isSuperAdmin)
|
||||
{
|
||||
%time = mClamp(%time, 0, 999999);
|
||||
%time = mClampFloat(%time, 0, 999999);
|
||||
$Pref::Server::LuaLogic::OPT_TICK_TIME = %time/1000;
|
||||
messageAll('', '\c3%1\c6 has set the logic tick time to \c3%2\c6 millisecond%3.', %client.name, %time, %time == 1 ? "":"s");
|
||||
lualogic_sendoptions();
|
||||
|
@ -1,7 +1,7 @@
|
||||
function LuaLogicTCP::sendData(%this)
|
||||
{
|
||||
cancel(%this.lualogicTick);
|
||||
%this.lualogicTick = %this.schedule(31, "sendData");
|
||||
%this.lualogicTick = %this.schedule(1, "sendData");
|
||||
|
||||
if(%this.data !$= "")
|
||||
{
|
||||
|
@ -1,4 +1,8 @@
|
||||
|
||||
function mClampFloat(%x, %min, %max){
|
||||
return %x<%min ? %min : (%x>%max ? %max : %x);
|
||||
}
|
||||
|
||||
function lualogic_registergatedefinition(%data){
|
||||
//lualogic_registergatedefinition_auto(%data);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user