Author Topic: Changing the timescale silently  (Read 1387 times)

I'm trying to change the timescale silently.
Neither setTimescale(%scale) nor timescale(%scale) worked.

Any other ways of doing this?

commandToAll('timescale',%num);

...yes, because making the clients BELIEVE the timescale has changed will definitely make the SERVER believe the timescale has changed.

Server-sided (no announcement):

setTimeScale(value);
commandToAll('TimeScale', value);


Client-sided (with announcement and admin-only by default):

commandToServer('TimeScale', value);

Again, setTimescale isn't working. Tried it on a Single Player server, Internet server, and dedicated server. Worked on none of them.

Again, setTimescale isn't working. Tried it on a Single Player server, Internet server, and dedicated server. Worked on none of them.

On every type of server that has always worked for me. Are you sure base/scripts/mainServer.cs.dso (or something like it, I don't remember the exact name) was executed and you're using a value in the range 0.2 <= value <= 2?

I am indeed using a value inside the clamped range, and I see a "base/server/mainServer.cs" running.
Blockland, y u b so wierd.

I am indeed using a value inside the clamped range, and I see a "base/server/mainServer.cs" running.
Blockland, y u b so wierd.

How is it "not working"? Have you tried scheduling something after using setTimeScale and comparing to the system clock?

By not working, I mean it's... not working.
Timescale misalignments are not subtle. If you have even a 0.1 timescale difference between the server and client, you get very noticeable jerking whenever you move, jump, jet, and with really large differences, turn.

EDIT: It also helps that getTimescale() is constantly returning whatever I last set the timescale to using /timescale.

By not working, I mean it's... not working.
Timescale misalignments are not subtle. If you have even a 0.1 timescale difference between the server and client, you get very noticeable jerking whenever you move, jump, jet, and with really large differences, turn.

EDIT: It also helps that getTimescale() is constantly returning whatever I last set the timescale to using /timescale.

Try testing it with this:

Code: [Select]
echo("Starting test for normal timescale.");
setTimeScale(1);
schedule(1000, 0, echo, "Finished.\n");
schedule(1500, 0, echo, "Starting test for lowest timescale.");
schedule(1500, 0, setTimeScale, 0.2);
schedule(2500, 0, echo, "Finished.");

Does the second test take longer?

How about we don't change the timescale silently? Clients should know what's happening.

How about we don't change the timescale silently? Clients should know what's happening.
Not all the time.
 :cookieMonster:

How about we don't change the timescale silently? Clients should know what's happening.
Sure. Let's also let the clients know whenever a brick is planted. They deserve to know.

Sure. Let's also let the clients know whenever a brick is planted. They deserve to know.
Don't be silly, what we really need is a dedicated newsfeed on a per-server basis. How else are the clients supposed to keep up with all these important happenings?