harbingerofme / DebugToolkit

Debugging commands for Risk of Rain 2. Previously known as RoR2Cheats.
https://thunderstore.io/package/IHarbHD/DebugToolkit/
BSD 3-Clause "New" or "Revised" License
14 stars 8 forks source link

A bunch of small fixes/improvements (kill_all, spawn_as, teleport_on_cursor) #176

Closed SChinchi closed 6 months ago

SChinchi commented 7 months ago

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.

xiaoxiao921 commented 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

SChinchi commented 6 months ago

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.

SChinchi commented 6 months ago

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?

xiaoxiao921 commented 6 months ago

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

SChinchi commented 6 months ago

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.

xiaoxiao921 commented 6 months ago

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

SChinchi commented 6 months ago

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.