Skip to content

Streamer mode#745

Merged
nullsystem merged 1 commit into
NeotokyoRebuild:masterfrom
nullsystem:GH-150_StreamerMode
Oct 23, 2024
Merged

Streamer mode#745
nullsystem merged 1 commit into
NeotokyoRebuild:masterfrom
nullsystem:GH-150_StreamerMode

Conversation

@nullsystem

@nullsystem nullsystem commented Oct 16, 2024

Copy link
Copy Markdown
Collaborator

Description

  • No avatar
  • No names (only generic ones)
  • OBS detection (Linux)
  • OBS detection (Windows)
  • Automatic (OBS detection) mode
  • Names are "A...." like Discord streamer mode
  • Won't do: Custom names

Toolchain

  • Linux GCC Distro Native Arch/GCC 14

Linked Issues

@nullsystem nullsystem changed the title Streamer mode [WIP] Streamer mode Oct 16, 2024
Comment thread mp/src/game/shared/neo/neo_player_shared.h Outdated
@Rainyan

Rainyan commented Oct 17, 2024

Copy link
Copy Markdown
Member

A few suggestions:

Obfuscate console printouts

  • IP address prints (your own IP & the server IP - avoid attracting DDOS attacks)
    • This could for example obfuscate the 2 middle octets as: 127.0.0.1 -> 127.*.*.1 (obviously not an issue for local addresses but just as an example)
    • Pretty sure we don't support ipv6 at engine level at all, so it's not something to worry about in this case - although I guess similar deal, but delimiting by : instead of . would work.
  • Home dir prints by comparing env vars $HOME (Linux) and %HOMEPATH% (Windows) for the few prints that use these, to avoid self-doxxing ( /home/johnsmith/..., C:\Users\JohnSmith\...)
    • For example (Linux): Some printout result: /home/realname/foo -> Some printout result: $HOME/foo
    • For example (Windows): Some printout result: C:\Users\realname\foo -> Some printout result: %HOMEPATH%\foo
    • This could probably be implemented as just an unconditional string replace from the Valve V_... strings interface or similar

I imagine there's not that many places where we print the homedir to stdout, so it probably wouldn't need to be a global string replace, but rather just at those sites.

Detect OBS at game launch for cvar initial value


Not that we have to do all of this stuff here in this PR, but this could be worth having in the future.

@nullsystem
nullsystem force-pushed the GH-150_StreamerMode branch 6 times, most recently from 72c4144 to 2521f51 Compare October 21, 2024 20:29
@nullsystem

Copy link
Copy Markdown
Collaborator Author

@Rainyan
Looks like that "enumerating all processes" WINAPI only shows the names of 32-bit processes/programs due to hl2.exe/NT;RE also only being a 32-bit program. For example in my printout, for the names I can see 32-bit programs like hammer++ and steam showing up, but 64-bit programs like OBS and Chrome not showing up.

@nullsystem

nullsystem commented Oct 21, 2024

Copy link
Copy Markdown
Collaborator Author

Found a Process32Next method which actually works so gonna use that instead.

@nullsystem nullsystem changed the title [WIP] Streamer mode Streamer mode Oct 21, 2024
@nullsystem
nullsystem marked this pull request as ready for review October 21, 2024 22:10
@nullsystem
nullsystem requested review from a team and brysondev October 21, 2024 22:15
brysondev
brysondev previously approved these changes Oct 21, 2024
Comment thread mp/src/game/client/cdll_client_int.cpp Outdated
Comment thread mp/src/game/client/cdll_client_int.cpp Outdated
Comment thread mp/src/game/client/cdll_client_int.cpp
Comment thread mp/src/game/client/cdll_client_int.cpp Outdated
Comment thread mp/src/game/client/hud_basechat.cpp Outdated
Comment thread mp/src/game/client/neo/c_neo_player.cpp Outdated
Comment thread mp/src/game/client/neo/c_neo_player.cpp Outdated
Comment thread mp/src/game/client/cdll_client_int.cpp Outdated
Comment thread mp/src/game/shared/neo/neo_player_shared.h Outdated
Comment thread mp/src/game/client/cdll_client_int.cpp Outdated
Comment thread mp/src/game/client/cdll_client_int.cpp Outdated
Comment thread mp/src/game/client/c_playerresource.cpp
* No avatar
* No names (only generic ones), apart from local player
* Chat restricted to local player
* OBS detection (Windows Process32Next + Linux /proc)
* fixes NeotokyoRebuild#150
@nullsystem
nullsystem marked this pull request as ready for review October 23, 2024 21:23
Comment thread mp/src/game/client/neo/c_neo_player.h
@nullsystem nullsystem added this to the v10.0-prealpha milestone Oct 23, 2024
@nullsystem
nullsystem merged commit d4a4e55 into NeotokyoRebuild:master Oct 23, 2024
@nullsystem
nullsystem deleted the GH-150_StreamerMode branch May 7, 2025 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Streamer Mode

3 participants