15.11.2014, 16:30
Quote:
I don't see what's so difficult. Start the timer when they enter a vehicle, kill the timer when they leave it.
Per player timers with this logic will make the most efficient option. pawn Код:
|
Quote:
I mean that if you use multiple timers, there is a loop over them somwhere internally in the server. If you use one timer, the loop is in your code. Either way - there is a loop to call the same chunk of code (the main loop body) multiple times. People seem to think that moving the loop in to your code is a good thing because the server (which is written in C++ BTW, not PAWN) is somehow bad at loops and anyone can do better in 3 seconds of PAWN. WHY people think this, I don't know!
|
Quote:
If you have only one timer (execution time is obviously exaggerated):
Код:
Player sync Timer called (exec time = 5 seconds) Timer ends > players go without sync for 5 seconds Player sync Код:
Player sync Small Timer called (exec time = 1 sec) Small Timer ends > players go without sync for 1 second Player sync Small Timer2 called (exec time = 1 sec) Small Timer2 ends > players go without sync for 1 second Player sync ... |