Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set observer mode correctly on joining a team #765

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

VantoNortim
Copy link
Contributor

@VantoNortim VantoNortim commented Oct 24, 2024

Description

If player joins a team while game is in progress set them to spectate in first person. If no players set them to freecam.
Spawn player as soon as they selected a loadout
Set loadout to MPN if trying to spawn with invalid one

Toolchain

  • Windows MSVC VS2022

Linked Issues

@VantoNortim VantoNortim force-pushed the fix/GH-273-ObserveOnTeamJoin branch from 94aa644 to c384726 Compare October 24, 2024 23:11
@Rainyan Rainyan self-requested a review November 1, 2024 16:49
Rainyan

This comment was marked as resolved.

@VantoNortim VantoNortim force-pushed the fix/GH-273-ObserveOnTeamJoin branch from 19efefc to 26e0fb0 Compare November 28, 2024 09:57
Copy link
Collaborator

@Rainyan Rainyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be a bug with the free-fly observing as a dead player.

Steps to reproduce:

Set up a convenience bind:

alias "+GoFast" "host_timescale 10"
alias "-GoFast" "host_timescale 1"
bind o +GoFast

this allows you to hold down the O key (or any other bind) to speed up time temporarily.

  • Load a CTG map: map nt_oilstain_ctg
  • Join a playing team
  • Set sv_cheats 1
  • Set mp_forcecamera 0 to allow non-POV dead spec
  • Set mp_neo_warmup_round_time 0
  • Set bot_attack 0 to prevent the bots from going wild
  • Spawn 4 bots: bot; bot; bot; bot
  • Wait for the first round to begin
  • Choose your class and loadout, and spawn in the world
  • Use the GoFast bind to waste time until around 2 minutes remaining in the round clock.
  • Use kill to suicide
  • Wait for the death fade sequence to pass, so you have keyboard control
  • Try to fly around in the free-fly dead spec mode

What should happen:

  • You are able to fly around freely, and also to enter other obs modes by using the space bar

What actually happens:

  • You are stuck observing your own corpse from the third person

Only run death think if not in observer mode
Only remove NEO code from base player.cpp
@Rainyan Rainyan self-requested a review December 21, 2024 04:07
@AdamTadeusz
Copy link
Contributor

Working on comp server variable, and its very easy using the existing hl variables to restrict the observer camera to only spectate teammates, and crucially to only spectate in eye. If theres a weird spectate mode that allows you to follow someone through their eyes but see their 3rd person model, maybe it would be easier just to restrict that observer mode? I don't see much use for it anyway. Also you can replicate that behavior using cl_first_person_uses_worldmodel 1

@VantoNortim
Copy link
Contributor Author

Working on comp server variable, and its very easy using the existing hl variables to restrict the observer camera to only spectate teammates, and crucially to only spectate in eye. If theres a weird spectate mode that allows you to follow someone through their eyes but see their 3rd person model, maybe it would be easier just to restrict that observer mode? I don't see much use for it anyway. Also you can replicate that behavior using cl_first_person_uses_worldmodel 1

I can remove the camera changing stuff and just keep the respawn improvements. Since that should make fix things like respawning in TDM.

@AdamTadeusz AdamTadeusz added the Conflict conflicts with master label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Conflict conflicts with master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Players joining a team during an ongoing round are placed into observer mode
3 participants