p2sr / SourceAutoRecord

Speedrun plugin for Source engine games.
MIT License
89 stars 27 forks source link

stupid chat edge-case #219

Closed ThisAMJ closed 4 months ago

ThisAMJ commented 4 months ago

say hi! <- was it sent by blue or orange? what? you can't tell? strange. my jank af code assumes it was blue through a very cursed process

Orange say hi Orange say window Orange sar_chat Orange ghost_chat Blue say hi Blue say window Blue sar_chat Blue ghost_chat
Blue receives say command Blue receives say command Blue receives say command Blue receives say command Blue receives say command Blue receives say command Blue receives say command Blue receives say command
Blue didn't use chat window, NetMessage to Orange Blue didn't use chat window, NetMessage to Orange Blue didn't use chat window, NetMessage to Orange Blue didn't use chat window, NetMessage to Orange Blue didn't use chat window, NetMessage to Orange (coop) blue: hi (coop) blue: hi (ghost) blue: hi
Orange didn't use chat window, NetMessage to Blue Orange confirms it was a chat message with "\x07" prefix Orange confirms it was a chat message with "\x07" prefix (ghost) orange: hi Orange didn't use chat window, NetMessage to Blue
(coop) blue: hi (coop) orange: hi (coop) orange: hi (coop) blue: hi

The leftmost column is the problem. The say command normally detects who sent the command by using UTIL_GetCommandClient, which we don't have. I tried getting at it with no luck, but with like a week I'll probably figure it out.

ThisAMJ commented 4 months ago

Fixed by e5afa02

Orange say hi/say window/sar_chat Orange ghost_chat Blue say hi/say window/sar_chat Blue ghost_chat
Blue receives say command Blue receives say command Blue receives say command Blue receives say command
Blue didn't send it, NetMessage to Orange Blue didn't send it, NetMessage to Orange (coop) blue: hi (ghost) blue: hi
Orange confirms it was a chat message with "\x07" prefix (ghost) orange: hi
(coop) orange: hi