Closed SChinchi closed 6 months ago
The reason for noclip and teleport to be networked like this was to limit people cheating on public parties where the host wouldn't have debugtoolkit installed
I hadn't realised that! I was also under the assumption that the command name and args are passed to the server, where the command wouldn't work if not recognised by the host's machine.
In any case, I case revert teleport_on_cursor to the previous implementation and manually address the Kinematic error kind of like I did with noclip in an earlier fix.
Hokai, done. I wrapped the TeleportHelper fix in the networked component. I tested multiplayer locally, but due to the static nature of how the body is selected, called from a client teleports the host to that location. But that's just a funky consequence of how things had been coded initially... right?
Weird, does the same thing happen with noclip? Because I recall this working just fine in the past.
client call the command, it's executed on the server, then the rpc is fired back to the original sender, and then the client execute the code locally
I explicitly tested this recently with noclip and local networking because I wasn't sure it'd work, but it was actually fine. So now that you mention it, it's a bit weird that it happens for this one. I didn't change any of the logic though for how the body is selected, just how it perform the teleport.
Unless I messed up and didn't compile a networked version. I'll double check.
It's been a long time since I tested this stuff, so it could be that I don't remember well and that it never worked properly lol
Nevermind, I was using a non-networked version!
This is the "fixes" branch. I had the files to patch it, but I was missing the secret sauce from the "fix_project" where it copies back the correct file. I noticed it the moment I saw both versions sitting next to each other with the same file size. :D But then it took me a long time to test it because the pc crashed.
I've been using a fixed project version for so long now that I've forgotten about the before times.
The
spawn_as
change is just because it's pretty much what the TransformBody method is for. I had just forgotten it existed until after the last spawn_as fix.