Repository navigation
Conversation
Calculating the place names can be expensive to perf, so offer cvar to disable it.
remove devmsg
remove std::function usage
format the "near" messages client side instead of server side
Add a "server" bool to the event for filtering the predicted events (because they'd have a bad predicted placename). This way we can allow printing self-pinged place names which can be useful for team practice, or just verifying what place name your ping got associated with.
89512cd to
c397b5a
Compare
|
This should be good for review now. |
sunmachine
left a comment
There was a problem hiding this comment.
Found something that probably violates your own intent as written... gotta' step aside, still reading more.
…build because it is needed for the release path, and would silently fail (because we don't typically assert for release)
Remove the incorrect assertion of the function predicate flow being mutually exclusive with this code path (not true for teamplay maps with 0 named navmesh places). This is handled gracefully so this assertion can be removed.
Continuation of a64ece5 for removal of the incorrect & redundant asserts.
As adapted from code review feedback: NeotokyoRebuild#2189 (comment) Co-authored-by: Dan Peavey <sunMachine@users.noreply.github.com>
| inline bool ArePingsAllowed() | ||
| { | ||
| // Only allow pings for game modes with friendlies, because it makes no sense to send pings to your enemies. | ||
| return IsTeamplay(); | ||
| } |
There was a problem hiding this comment.
Ah, so a second design question, maybe for you and @DESTROYGIRL to chat about from their contribution in #2032.
- Before
fcba5e9(from 2026-07-25),DrawNeoHudElementbailed on!NEORules()->IsTeamplay(), so DM had no visible pings. - Bots won't ping and only see own pings in non-teamplay modes #2032 then lands and removed that check on purpose, and added the own-pings-only filter, so DM players could see their own pings.
There was a problem hiding this comment.
Addressed in 1d32565 - I think the behaviour introduced by #2032 is correct, so I've simply updated the condition to call the new ArePingsAllowed gamerules function to be consistent with changes made by this PR.
The commit 1d32565 is essentially a no-op at this moment (since it just inlines to what we already had), but it makes the intent more explicit in the spirit of a single source of truth.
There was a problem hiding this comment.
@Rainyan there might be a contradiction if I'm reading 1d32565 correctly. #2032's behaviour is that Deathmatch players still see their own pings, but ArePingsAllowed() returns false for everyone in Deathmatch, so CheckPingButton (neo_player_shared.cpp:153) never fires the event and the local player gets nothing.
There was a problem hiding this comment.
(super-specifically DM-and-not-TDM so this likely doesn't matter?) I'm running a sanity check...
There was a problem hiding this comment.
@Rainyan there might be a contradiction if I'm reading
1d32565correctly. #2032's behaviour is that Deathmatch players still see their own pings, but ArePingsAllowed() returns false for everyone in Deathmatch, so CheckPingButton (neo_player_shared.cpp:153) never fires the event and the local player gets nothing.
Oh, I see what you mean now. But still, I assume we would still not want to print pings for non-collaborative modes, since if everyone is your enemy it just doesn't make very much sense as a mechanic to be sending pings in the first place(?)
There was a problem hiding this comment.
Do I undestand it correctly you're requesting I preserve the ability for free-for-all DM players to be able to ping stuff just for themselves?
Not saying that as a rhetorical question, but just to make it clear what exactly is the behaviour you would hope I preserve here; this might be a stupid question. (Systematically I guess it would be cool if we had some kind of gamerules sanity checker for these kinds of situations, but anyways.)
There was a problem hiding this comment.
Bingo! And that's per #2032 specifically, which is why I framed it up top as a contradiction I was observing.
Edit: Not a stupid question. 👍
There was a problem hiding this comment.
You know what, at this point I just don't care anymore. Realistically, we're never going to release this game, nor am I never going to get hired anywhere, so none of this has any practical meaning besides some kind of ridiculous intellectual exercise that I'm too poor to play along with. Whatever edge case you wanted to change here, I'm sure you can throw at Claude and it'll come up with a solution faster and more correct than I ever could.
I don't think there's anything for me to do here anymore, in this PR, or in this repo, or in this ridiculous line of career where apparently human engineering is just not worthwhile anymore, and I'm tired to pretend otherwise. Godspeed to you guys, it was a good run.
There was a problem hiding this comment.
In case you're still willing to humour this PR after my meltdown, I have addressed the aforementioned in d598dbc. If that's still insufficient then I frankly don't know what we are even building here but hopefully you will have a better idea.
There was a problem hiding this comment.
Just glad to see and read an update dude, hope you're well man. I'll give this proper thought again soon, this week is a life-heavy week!!
sunmachine
left a comment
There was a problem hiding this comment.
Your own pings no longer show on your screen by default when using cl_neo_player_pings_print_own 0.
But, your teammates still see them!! These three suggestions restore it and should be applied together.
Co-authored-by: Dan Peavey <sunMachine@users.noreply.github.com>
9075847 to
1dc2eb0
Compare
|
@sunmachine Thanks, adapted your fix above to 1dc2eb0 |
Merging the ping behaviour behind `CNEORules::ArePingsAllowed` as part of PR NeotokyoRebuild#2189. This is a no-op at time of this commit, since we're essentially just inlining the `IsTeamplay` call, but it makes the intent more explicit and aligns with the PR changes.
There was a problem hiding this comment.
One last thing to double-check, see my confusion here.
| if (!NEORules() || !NEORules()->ArePingsAllowed()) | ||
| { | ||
| return; | ||
| } | ||
|
|
There was a problem hiding this comment.
This is the contradiction I was talking about. This will remove a DM players' own pings.
The other suggestions added in this review handle the code move and fix it.
| if (!NEORules() || !NEORules()->ArePingsAllowed()) | |
| { | |
| return; | |
| } |
There was a problem hiding this comment.
Sorry, I'm still not quite clear on why we would not want to check for this condition here. But I'll probably have to sit down and go through this all again properly from the beginning and pay more attention.
There was a problem hiding this comment.
If you mean "why remove exactly this part and put it back in a different way elsewhere", it's because I'm removing the check from the player's CheckPingButton and making it happen at the HUD level instead where it has knowledge of isOwnPing.
Edit: And specifically if we block the event from sending here, you won't see your own event. Why keep it on the server at all then in this case? Demo recording and being consistent about its usability is all I can fathom, honestly.
| // This is already checked by the emitter side, but we check again because it could arrive late (dynamic custom rule change etc.) | ||
| if (!NEORules() || !NEORules()->ArePingsAllowed()) | ||
| { | ||
| return; | ||
| } |
There was a problem hiding this comment.
With the send-side check gone, only the null guard is needed here. Moving ArePingsAllowed to another area...
| // This is already checked by the emitter side, but we check again because it could arrive late (dynamic custom rule change etc.) | |
| if (!NEORules() || !NEORules()->ArePingsAllowed()) | |
| { | |
| return; | |
| } | |
| if (!NEORules()) | |
| { | |
| return; | |
| } |
| const bool isOwnPing = (pingerIndex == localPlayer->entindex()); | ||
| if (!isOwnPing) | ||
| { | ||
| if (pingerIndex == 0 || GetClientVoiceMgr()->IsPlayerBlocked(pingerIndex)) |
There was a problem hiding this comment.
Outside teamplay, only other players' pings get dropped, so your own still shows.
| if (pingerIndex == 0 || GetClientVoiceMgr()->IsPlayerBlocked(pingerIndex)) | |
| // Pings can arrive late after a rule change, so filter other players' pings here. | |
| if (pingerIndex == 0 || GetClientVoiceMgr()->IsPlayerBlocked(pingerIndex) || !NEORules()->ArePingsAllowed()) |
|
Closing per #2189 (comment) |
…st certainly are doing it
Description
When a player pings a location, instead of printing
<playername> pinged a location, use the actual named place from the navmesh when available:<playername> pinged <placename>.If the player ping doesn't accurately hit a named place, instead find the nearest named place within reason, and print:
<playername> pinged near <placename>.Finally, if no such named place was found, fall back to the current style:
<playername> pinged a location.Example:
Toolchain
Linked Issues