New spectate commands#1611
Conversation
|
One issue I've found using this so far is that it's difficult to know exactly who is closest to the center of the screen without a crosshair |
|
Now I'm wondering if it would be better to workout the player closest to the center client side and have a command sent to the server to spectate a specific player instead, that way there wouldn't be any issues with prediction and you could also use this for binds to spectate specific players without looking at them |
|
I can test this out later today. I do have a suggestion, though not sure how much of a lift it is on your end. Would it be better to draw a camera icon or the players name above their head when they are the one closest to the clients screen center? |
Agiel
left a comment
There was a problem hiding this comment.
What's the status of this PR? I think it's fine to merge as is. If we want more explicit feedback before switching to the new target we can add that later.
yeah i started messing around with a clean spectator ui in this pr ill have to move that stuff to a separate branch when i can be bothered |
|
the naming of some of the functions is still a mess, but technically it works |
… all command checks to neo_player
…for recent commands if player not in a observer mode that follows the player
…ommands, this config is meant to be copied and changed
|
This should close #1647 |
Description
This PR now adds commands for spectating a player based on their position in the new top hud, as well as spectating a player closest to the center of the screen and spectating the fastest player.
The following commands require the new squad hud to work reliably/at all
spec_player_by_hud_position works similar to sm_spec_slot, except theres no guarantee that the first 5 numbers will correspond to jinrai entirely, or that the next 5 numbers will correspond to nsf entirely. In a 3v3 scenario, spec_player_by_hud_position 0-2 will return jinrai players, and spec_player_by_hud_position 3-5 will return nsf players. In a 10v10 scenario spec_player_by_hud_position 0-9 will return jinrai players, and 10-19 will return nsf players. This makes the same binds work for any tournament format, though in games with more than 10 players you are likely to run out of binds.
select_next/previous_alive_player_in_hud change which player in the top hud is selected, without changing the observer mode to that player. Everytime the selection changes that player will flash with an orange colour for one second. The command spectate_player_selected_in_hud can then be used to change the spectate target to the currently selected one.
spec_next/previous_entity_in_hud works similar to select, except the spectate target is changed immediately. The next and previous targets are determined by the current target, not where the selection is.
The following commands will work regardless of the new squad hud being enabled
spec_player_under_mouse will change the spectate target to whoever's center of mass is closes to the center of the spectator's screen
spec_fastest_player will change the spectate target to whoever is currently moving the fastest.
I have included an example config to try out the new commands. I recommend backing up your current config/controls beforehand
(Edit)
I have also added
sm_spec_last_hurt — Target on the last player who was damaged.
sm_spec_last_shooter — Target on the last player who fired their weapon.
sm_spec_last_event — Target on the latest event of any kind from the list below:
sm_spec_last_attacker — Target on the last player who did damage.
sm_spec_last_killer — Target on the last player who got a kill.
sm_spec_last_ghoster — Target on the last ghost carrier.
In the form of
spec_last_hurt
spec_last_shooter
spec_last_event
spec_last_attacker
spec_last_killer
spec_last_ghoster
(Edit 2)
I have also added a command to automatically spectate the killer of the current spectate target
-fixes #1647