Can this be adjusted at all? Still seems to be a second off.jlv wrote:Changes:
- Time reported to scripts is now adjusted for interpolation delay when spectating online.
2019-03-20 snapshot (Updated)
Re: 2019-03-20 snapshot (Updated)
Re: 2019-03-20 snapshot (Updated)
The gate drop or something else? It still does report the running order early. The times are correct but they'll arrive early.aeffertz wrote:Can this be adjusted at all? Still seems to be a second off.jlv wrote:Changes:
- Time reported to scripts is now adjusted for interpolation delay when spectating online.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Re: 2019-03-20 snapshot (Updated)
Yeah, the gate drop sound is still ~ a second early.jlv wrote:The gate drop or something else? It still does report the running order early. The times are correct but they'll arrive early.aeffertz wrote:Can this be adjusted at all? Still seems to be a second off.jlv wrote:Changes:
- Time reported to scripts is now adjusted for interpolation delay when spectating online.
Re: 2019-03-20 snapshot (Updated)
Are you sure you're checking the time returned correctly? "mx.get_gate_drop_time" will return -1 until the time passes the gate drop time and return the gate drop time after that. With the time adjusted, it will stop returning -1 a second early relative to the adjusted time but the returned time should still be correct. So if you just check for -1 it won't work. You have to check that the value is positive, meaning it's valid, and that the current (adjusted) time is after the drop time. Something like this:aeffertz wrote:Yeah, the gate drop sound is still ~ a second early.
Code: Select all
/*
################################################################################
## Call g_gate_drop_handler on gate drop.
##
################################################################################
*/
var g_gate_drop_handler = function () { };
var g_gate_position_down = -1;
var g_gate_position_unknown = 0;
var g_gate_position_up = 1;
var g_gate_position = g_gate_position_unknown;
function gate_drop_frame_handler(seconds) {
var gdt;
gate_drop_frame_handler_prev(seconds);
gdt = mx.get_gate_drop_time();
if (gdt >= 0 && seconds > gdt) {
if (g_gate_position == g_gate_position_up)
g_gate_drop_handler();
g_gate_position = g_gate_position_down;
} else
g_gate_position = g_gate_position_up;
}
var gate_drop_frame_handler_prev = mx.frame_handler;
mx.frame_handler = gate_drop_frame_handler;
# Test handler
g_gate_drop_handler = function () { mx.message("Go!"); };
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Re: 2019-03-20 snapshot (Updated)
Ahh, okay. Yeah, right now it's just checking for once it's greater than 0. I'll change that.