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

Question: How is the limit of turrets for the engineer set? #695

Open
countnoobula opened this issue Feb 20, 2025 · 2 comments
Open

Question: How is the limit of turrets for the engineer set? #695

countnoobula opened this issue Feb 20, 2025 · 2 comments

Comments

@countnoobula
Copy link

countnoobula commented Feb 20, 2025

Hi all,

I truly appreciate all of recent opensourcing of code, and it's an incredible dive into a history of gaming.
I've only just begun to look through the code, and I'll be honest that C++ is not my forte, but it's a part I've always wanted to know/been curious about, and unfortunately I don't see discussions tab so I opted to open an issue.

I have always wondered since TF2 had the one event (I think it was defending against robot invasion?) of where the engineer could build two sentry guns, how/where is that limit defined, and then overriden for the game mode?

That particular change of gameplay mechanics, and the awe of it always stuck with me and I've always wondered where it is defined.

If someone would be so kind as to help, or if I find it I'll comment to this. I am incredibly curious to finally answer the near decade long question of how it was done.

I appreciate all of the help, efforts and sharing 🙏


Update:

So far, I have tracked there is a use count that is incremented and decremented at

sentryHint->DecrementUseCount();
but I have yet to fully understand it

@beachbagging
Copy link

Might be this -
// Maximum number of a type of objects on a single resource zone

#define MAX_OBJECTS_PER_ZONE 1

@DevGeah
Copy link

DevGeah commented Feb 21, 2025

It is not the second one. Looking for it currently.

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

No branches or pull requests

3 participants