Closed Fate-JH closed 4 months ago
Because the continuous integration test servers are not equipped to handle it, the requirements for accessing spectator mode have been temporarily lifted for testing purposes. Anyone should be free to access spectator mode using the appropriate commands until merge.
Did some testing and didn't find any real issues with it. There is some odd behavior if you go into spectator mode while in a vehicle or after deconstructing, but the character was easily "unstuck" by using a /zone command. So just don't do that? This also resolves #1111
I was trying to find weird edge cases when Ronnie came on to test, so can verify his findings as I was there trying them alongside. I did capture an image of the weirdness occurred when using /spectator in a vehicle for amusement;
Outside of that my attempts to break things were largely fruitless, only things potentially of note were;
All in all feels like a pretty robust implementation :)
/setbr doesn't work?
Door not opening when it should:
https://github.com/psforever/PSF-LoginServer/assets/77748540/8683420f-4b37-4d0e-9de1-42740bed1b79
Apparently, spectator mode is tied to the current character, not the client session, so when the character is completely reconstructed for its "spectator mask", the prior-set status of spectating is lost and it just becomes a normal [faction] character who has been become isolated from the game world and his fellow allies and closest enemies. And the doors don't open. To fix the issue, I pushed back the order of setting up the spectating status.
This prompt is apparently important. Whenever you can't see it, the mode doesn't officially count.
This should also adjust some other things that may have been accessible in the prior state.
Hopped on to retest the previously shared issues, but now /spectator doesn't appear to work at all?
The command is accepted in chat, but nothing appears to happen from the player's perspective, nor does anything appear to change for an observer.
Tested across 3 empires, and different accounts.
Ah, I was preparing for the "closing commit" wherein I properly activate spectator mode for database approved characters only. (I want this over with and merged.) No one on the test server is approved.
Can confirm that push appears to successfully resolve being able to open doors whilst in spectator mode 👍
The other less-pressing issues appear to remain as is. (i.e. CE, /setbr)
Commands restored, spectator ce icons wiped
Players could always become a spectator, there's a formal command in the game that allows it, if it's allowed, but the implementation we had was always cumbersome. Asides from the command and a character flag, players who were spectators were just treated by the server as normal players and had all the capabilities of normal players. All the command granted them is the ability to open most doors locally regardless of empire affiliation (not all doors: sanctuary doors to the HART remain locked unless the HART is docked, for example). The server had to put in extra work to hide spectators from the view of normal players. The server had to put in extra work to stop spectators from being damaged (and in some cases other players could still damage spectators and get kicked because of it). Spectators could still drown; they could get killed by death fields; catch on fire and die in lava. And, because the server treated them as normal players, they could get into strange situations that neither the server nor the client was prepared to deal with, "normal" to normal players, but abnormal for others.
To remedy this situation, normal behavior for the players on the server have been broken down into operations and functions, which also store state data, and logic, which controls implementation. Normal players have spectators now have independent logic. (Operations and functions and data are to be shared between different logic modes, where applicable.) The logic of these game modes allows for spectators to be handled completely differently from normal players. Special accommodations only have to be made once, rather than being built into the code, to handle all of the special edge cases that spectators must endure. Also, this format reduces the number of branches that must be traversed to sequester proper spectator activity from proper player activity.
Player Modes Normal Mode Virtually unchanged from current player behavior, and still intermixed with game moderator functionality. The distinction between operations and logic is based on normal players doing normal gameplay things.
Spectator Mode Spectators are not characterized by what they can do but what they can not do. The primary purpose of a spectator account is to be a snitch for the game moderators and a point of view for making films. As a consequence, their skillset is focused on exerting no influence on the battlefield they observe and being able to obscure from their own point of view. The typical spectator role grants them access to any door on a local level, not to affect any other player's concept of that door, for example. Furthermore, a spectator:
When a spectator swaps to the mode, they are outfitted in an infiltration exo-suit. While a black ops soldier is normally green, black ops does not normally have access to the infiltration suit so it does not look any different from the faction's standards. All of their equipment is stripped from them but they are given a Flail targeting laser into what is normally their melee equipment slot. As it is their melee equipment slot, it can not be unequipped or swapped out. On their shoulder are three of the same ribbon bars - the Bending Movie Actor commendation. I need to remind that no one sees this but the player who is the spectator. Spectators have three fixed implants and shortcuts in fixed shortcut slots for those implants. The implants are always initialized and can only activate or deactivate.
Spectators have no equipment but whatevere is assigned to what is normally a dedicated knife melee equipment slot. The Flail laser pointer, while in this slot, can not be removed or dropped or changed. It will visually perform lazing but there is no point. The primary purpose of the pointer is to provide some item that can be used with Range Magnifier but offers the spectator no harmful capabilities.
Spectators have access to the following chat commands:
/zone
,/warp
,/fly
,/speed
,!list
,!nearby
, and!loc
, and, of course,/spectator
for purposes of turning off the player mode. Some other allowable commands are treated the same asspectator off
and will result in the spectator player being sent back to sanctuary as a normal player.As an unrelated note, spectators should be able to interact properly with telepads and routers and zipelines and teleportation rings.
Features
PlayerMode
,NormalMode
andSpectatorMode
Entry points for the logic that will govern this particular user character mode.ChatActor
Originally an actor that lives above the operations and logic regions for the server, also known as support operations of the session, it was separated into its own operations funtions and data section, and logic sections for the different player modes. Currently deprecated and should be removed entirely.Zone
There's a new disticntion calledAllPlayers
which does the same thing asLivePlayers
previous did.LivePlayers
will now be used to track all non-spectator players.UplinkRequest
,UplinkResponse
,UplinkPositionEvent
Packets that were originally deciphered for transcoding of packets related to the CUD (command_detonater
), of at least four are determinate. The developer was unable to determine how the requests dispatched by the CUD correspondss to the responses sent from the server to the client and was incapable of emulating the harmless activity of CUD operation. They serve no purpose as use of the CUD has been rolled back and have no associated tests.Database Added table
Avatarmodepermission
to independently keep track of player mode permissions for both GM and for spectator. An account can still be marked as GM, but that only means any player character owned by that account must be also marked for GM to assume GM activity. Players marked as spectators may spectate independently of being GM's.Caveats
/zone
or/warp
can free the spectator, however, or that player may wait until the shuttle returns.Addenda
ChatService
apparently had been using a super-stale reference to the player's session for a long time now. When a channel is joined, that is the only time the "current" session is retained as a hard copy in the service. To rememdy this, a reference to the dedicated session storage element is passed toChatService
instead, meaning it will never not have access to an up-to-date entry.