Skip to content

Conversation

@megascatterbomb
Copy link

@megascatterbomb megascatterbomb commented Sep 14, 2025

team_control_point has a SetOwner input for manually changing a point's ownership to a specified team. This input will credit a player for capturing the point if that player is the caller. If the calling entity is not a player, no credit is given.

However, there is an additional guard and assert against null callers which unexpectedly prevents the point from changing ownership at all. Given that nothing happens with the caller unless that caller is a player, these checks don't appear to serve any purpose beyond what the IsPlayer check already achieves.

This PR removes the guard and assert, incorporating the null-check alongside the IsPlayer check.

An easy way to test this PR is to use the following command in console on a koth map. Do not use ent_fire as that sets you as the caller.

script Entities.FindByClassname(null, "team_control_point").AcceptInput("SetOwner", "3", null, null)

@megascatterbomb megascatterbomb changed the title Allow null caller on team_control_point's SetOwner input [TF2] Allow null caller on team_control_point's SetOwner input Sep 14, 2025
Bitl added a commit to BitlDevelopmentStudios/source-sdk-2013-bds-base that referenced this pull request Sep 14, 2025
@EricS-Valve EricS-Valve merged commit adb82c7 into ValveSoftware:master Oct 24, 2025
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.

2 participants