21.09.2012, 05:03
(
Последний раз редактировалось Audiophr3ak; 21.09.2012 в 10:52.
)
Suggest the most efficient (for performance) global timing system:
1) A timer gets server time (GetTime) each second, compares it with custom server variables (hh, mm ,ss), if they not same - makes them same, updates time (SetPlayerTime) for all players using a loop every next minute.
2)Same system, but "GetTime" replaced with a counter (ss++, mm++ and so on).
I know 1st variant would work more sharp, but 2nd variant gives an ability to set time directly in game.
EDIT: seems like noone have a clue, nevermind then.
1) A timer gets server time (GetTime) each second, compares it with custom server variables (hh, mm ,ss), if they not same - makes them same, updates time (SetPlayerTime) for all players using a loop every next minute.
2)Same system, but "GetTime" replaced with a counter (ss++, mm++ and so on).
I know 1st variant would work more sharp, but 2nd variant gives an ability to set time directly in game.
EDIT: seems like noone have a clue, nevermind then.