Deathspike Posted December 8, 2006 Share Posted December 8, 2006 Question: Telling a single client that other clients have a modified value? I'll try to explain. Say for example there are 3 players on the server. Player A, B and C. By updating the entityState for each player, i want to tell every player something different (yes, i need entityState). I'm taking the value 'saberHolstered' in the entityState as example. Player A will receive info that player B and C have saberHolstered set to true. Player B will receive info that player A and C have saberHolstered set to false. Player C will receive info that player A and B have saberHolstered set to true. What i am trying to get here, is an awnser how to tell a single client to modify their clientside values (i.e. entityState) of other players. I want to give them a new value for something, that is based on gamestate. I want them to keep that value forever untill i tell them otherwise. Other updates should be overriden by myself again. How would i best go about doing this? Link to comment Share on other sites More sharing options...
ensiform Posted December 8, 2006 Share Posted December 8, 2006 what real value are we talking about, because i assume you aren't actually using saberHolstered. and how long are we talking about forever here because your entity and client pointers on the server will all be cleared on map change(including restart), as well as ps and es. Plus all modules are unloaded and reloaded after map change(including restart). Link to comment Share on other sites More sharing options...
razorace Posted December 8, 2006 Share Posted December 8, 2006 entityState is designed to be broadcast the same to all clients. if you want different data to be transmitted to a specific client, you probably want to use a server command or temp entity to transmit that data. Link to comment Share on other sites More sharing options...
Deathspike Posted December 10, 2006 Author Share Posted December 10, 2006 "you probably want to use a server command or temp entity to transmit that data" Sounds simple; so, how do you do it? Ensiform, it should stay the entire round. Only a couple of values in the entityState struct would have to be send differently - or overwritten by my code. What am i talking about? Well, basicly i'm taking advantage of the prediction code to *fake* ownership of the other, causing prediction to pass you trough. The server will allow it differently, but looks weird without prediction. I want it to be a pure serverside mod, so this should work if i can figure out how to accomplish that which is described above. Bewarely, this is JO and i dont know if JA uses the exact same.. Link to comment Share on other sites More sharing options...
ensiform Posted December 10, 2006 Share Posted December 10, 2006 trap_SendServerCommand( clientNum, message ) parse it in cg_servercmds.c you will probably see it where print and cp, chat, etc are handled. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.