At what rate are the properties of players refreshed? Is it 60 ticks? Cause when I changed TickThreshold to 20 ticks I got a feeling I'm not getting actual player's velocity but rather velocity he had a moment ago.
EDIT: I've been talking with Falcon about this. He says Soldat recalculates player's speed every tick and SC always hold actual info.
But me and my friend have a feeling that something's not right with the new TActivePlayer.SetVelocity() procedure. Let me explain.
I've been trying to introduce wind to the Ski Jumping script. So I generate random wind speed and add it to player's velocity every 20 ticks like this:
for i:=1 to Game.MaxPlayers do
begin
if(Players[i].Active)then
begin
if(Players[i].Team=1)and(Players[i].OnGround=false)then
begin
Players[i].SetVelocity(Players[i].VelX+windVelX,Players[i].VelY+windVelY);
end;
end;
end;
We've been testing this since yesterday and overall it does work. If the wind is favorable we get longer jumps, if it's not we fly shorter distance.
But sometimes even with unfavorable wind we get distances we couldn't achieve without the wind. We even tried setting wind speed to 0 and sometimes still get a very noticeable increase in our jumps.
Moreover after leaving my test server where we test this and joining my public SJ players sometimes seem to still be affected by the wind for a short while.
I can't really prove there's something wrong in SC cause SJ is very random but again, even with 0 wind speed added to player's velocity we get jumps far longer than previously possible.