Of course - It seems im becoming one of the Multiplayer gurus anyway -

The most effective method for me right now(without getting lag and/or snap-back) is to have a LOCAL entity(on client) that updates to a global entity(on server):

Code:

entity* player2; // create a entity pointer
player=ent_createlocal("player.mdl",nullvector,player_action); // local entity
player2=ent_create("player.mdl",player.x,null); // global entity, visible to other clients
player2.invisible=on; // make it invisible so you dont see it on the local PC



Updating is a difficult thing, you have to find the right amount of updates without getting too much data that is sent per frame.

Actually I am doing this by making a seperate loop that hat a wait(3); instead of a wait(1); at the end so the position of the player is sent every 3 frames instead of every frame, this saves bandwidth.
Code:

while(1)
{
vec_set(player2.x,player.x); // set the player2 position to the actual player position
send_skill(player2.x,send_vec); // send_vec to send the 2 following skills aswell
// player2.x, .y and .z
wait(3); // wait 3 frames to save bandwidth
}



this is heavily simplified, but you should get a idea of what i am talking about.

about the server sending this information back to all clients you dont have to worry about, as it is a global entity, the server automatically sends the positions to all clients.

I hope you got the idea. Dont hesitate to ask if you've got any further questions


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku