• Is there anything really fast like DTVars to send from client to server?
    6 replies, posted
I'd like the send the information about the player's current view angles to the server from the client but I've hit the wall atm. What's the quickest way to send information from the client to the server, repeatedly?
With the [URL="wiki.garrysmod.com/page/Net_Library_Usage"]net library[/URL]. net.Start('yourmessagename') net.Write...() --check the wiki net.SendToServer() But why do you need to send it, can't you just use ply:EyeAngles() on the server?
[QUOTE=wh1t3rabbit;42921183]With the [URL="http://wiki.garrysmod.com/page/Net_Library_Usage"]net library[/URL]. net.Start('yourmessagename') net.Write...() --check the wiki net.SendToServer() But why do you need to send it, can't you just use ply:EyeAngles() on the server?[/QUOTE] Net Library is too slow, I need the view angle not the eye angle. So far the only solution I've found is to emulate it server side, which is a freaking pain in the arse. Any other guess? What does ply:SetEyeAngles() uses (you can call it clientside and it gets sent to the server fairly quickly)?
[QUOTE=CrashLemon;42921236]Net Library is too slow, I need the view angle not the eye angle. So far the only solution I've found is to emulate it server side, which is a freaking pain in the arse. Any other guess? What does ply:SetEyeAngles() uses (you can call it clientside and it gets sent to the server fairly quickly)?[/QUOTE] The net library uses the same thing as the rest of everything else, the "delay" should be the same as anything else (minus Lua overhead of course, but that is small enough to be counted out.) The only other methods of sending data are usermessages and it's basically the same thing, except deprecated.
[QUOTE=CrashLemon;42921236]Net Library is too slow, I need the view angle not the eye angle. So far the only solution I've found is to emulate it server side, which is a freaking pain in the arse. Any other guess? What does ply:SetEyeAngles() uses (you can call it clientside and it gets sent to the server fairly quickly)?[/QUOTE] Hmm well the only two ways I know of sending data to the server is via the net library or via console commands. I've always assumed net library was faster than console commands, and if that isn't fast enough then I'm stumped. [editline]20th November 2013[/editline] Edit/automerge: [quote]What does ply:SetEyeAngles() uses (you can call it clientside and it gets sent to the server fairly quickly)?[/quote] I'm guessing here, but I assume it somehow puts the value into the next [URL="http://wiki.garrysmod.com/page/GM/CreateMove"]:CreateMove()[/URL]
Just for reference, the "DTVars" implementation is literally a wrapper for the net library for entities.
[QUOTE=CrashLemon;42920705]I'd like the send the information about the player's current view angles to the server from the client but I've hit the wall atm. What's the quickest way to send information from the client to the server, repeatedly?[/QUOTE] The server doesn't care about your camera angle. So your best bet is predicting it on the server.
Sorry, you need to Log In to post a reply to this thread.