henpemaz / Rain-Meadow

Rain World multiplayer engine and custom game mode
123 stars 15 forks source link

Spectator: deny transfer for requested objects #337

Open 6fears7 opened 1 week ago

6fears7 commented 1 week ago

To prevent awkward issues with ownership when spectator wants to bounce around and watch players.

6fears7 commented 1 week ago

This will be more tricky to manage than I thought:

  1. Not me
  2. Not in this room

                            this.game.cameras[0].followAbstractCreature = ac;
                          // check Online AC owner, if not in room with me, then isActuallySpectating = true
                            if (ac.Room.realizedRoom == null)
                            {
                                this.game.world.ActivateRoom(ac.Room);
                            }
            // transfer this resource if possible
            if (isSupervisor && owner != null && owner.hasLeft)  // && !isActuallySpectating ->> need to link this to the oe
            {
                RainMeadow.Debug($"Transfering abandoned resource {this}");
                PickNewOwner();
            }
6fears7 commented 6 days ago

Need to check Story's PlayersCanOwn