Hi,
I'm trying to figure out the best way to handle shooting an automatic weapon in a multiplayer game, currently I have two solutions:
1- Left mouse btn down: Run a timer on client side which keeps calling Server_Fire each few milliseconds and then stop the timer and call Server_StopFire when left mouse btn is up
2- Left mouse btn down: Call server one time only for Server_Fire and let the server run the timer and stop when client sends Server_StopFire
Which one should I go for or is there a better approach ?
Thanks a lot.
I'm trying to figure out the best way to handle shooting an automatic weapon in a multiplayer game, currently I have two solutions:
1- Left mouse btn down: Run a timer on client side which keeps calling Server_Fire each few milliseconds and then stop the timer and call Server_StopFire when left mouse btn is up
2- Left mouse btn down: Call server one time only for Server_Fire and let the server run the timer and stop when client sends Server_StopFire
Which one should I go for or is there a better approach ?
Thanks a lot.
Comment