juso40 / bl2sdk_Mods

MIT License
43 stars 104 forks source link

[Solution] BSABT: Modded user incorrectly relocated whenever any other player fully joins or respawns #50

Open CtrlAltCuteness opened 1 month ago

CtrlAltCuteness commented 1 month ago

Edit: Solution in first comment.

Whenever I'm playing as the host via. "Friends Only" with SHiFT, but also by LAN with OfflineHelpers mod (which was used to isolate the issue to BSABT), my position and facing angle gets set even though I never died nor pressed any keybind to relocate myself.

Requirements:

Steps to reproduce:

  1. Host joins their game and moves away from any FT station / respawn point and / or just looks directly at the floor or sky.
  2. Client player joins in with their character.
  3. Host is forcibly relocated and reoriented.
  4. Client dies in any way and finishes the full-game-screen respawn visual.
  5. Host is forcibly relocated and reoriented.

Expected result: Host never being forcibly relocated nor reoriented when it is someone else respawning or joining while still being in the same map.

CtrlAltCuteness commented 1 month ago

Found the issue thanks to two other people. In the file betterspawns.py the following line in Spawns -> Enable -> hk_spawn_travel needs to be changed:

# Incorrect
self.set_spawn_location(bl2tools.get_player_controller())

# Correct
self.set_spawn_location(caller)

Edit: There may be another one right around there with the same line but I haven't tested if that is needed to be fixed as well or not.