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

team_maxAirstrikes/team_maxArtillery does not work correctly #2493

Open
x0rnn opened this issue Feb 28, 2024 · 8 comments
Open

team_maxAirstrikes/team_maxArtillery does not work correctly #2493

x0rnn opened this issue Feb 28, 2024 · 8 comments
Labels
🐞 Bug Something isn't working cat: mod QAGAME Category mod (qagame) P3: Normal Priority 3
Milestone

Comments

@x0rnn
Copy link
Contributor

x0rnn commented Feb 28, 2024

https://www.mediafire.com/file/e82puftaupztlp6/szkqm5.mp4/file

team_maxAirstrikes "2" should allow 2 airstrikes per minute, as per the video it happened 4 times per minute.

@x0rnn
Copy link
Contributor Author

x0rnn commented Feb 29, 2024

Streamable link, should be available 90 days I think: https://streamable.com/ts368r

@Aciz
Copy link
Member

Aciz commented Feb 29, 2024

In scenarios where team_maxAirstrikes or team_maxArtillery is set, the way air support limits are calculated is following (example with airstrike, artillery is same):

  • airstrike counter is incremented by 60000 / team_maxAirstrikes value when an airstrike is called (so in case of team_maxAirstrikes 2 = 30000
  • each frame, airstrike counter is decremented by server frametime (1000 / sv_fps)
  • the check if airstrike is available is determined by checking if airstrike counter > 60000, if it's less, then airstrike is available

Given this, setting the limit to 2 will always allow initially 3 airstrikes to be called, because as soon as the first airstrike is called, the counter is already decremented by one frametime, so the check for airstrike counter > 60000 will be false, and the airstrike goes through.

Looking at the clip, the airstrikes are called roughly at the following timestamps:

  • first airstrikes ~10:05
  • second airstrike ~9:48
  • third airstrike ~9:36
  • fourth airstrike ~9:07

Give or take few seconds of error since I'm judging just from the video without actually seeing the exact times where airstrikes are thrown, there's nothing wrong with this clip and it's working as expected.

  • 1st airstrike called = counter is at 30000
  • 2nd airstrike called = ~10-15s passed since first airstrike
    • counter has decreased to ~10000-15000 = counter is now at ~40000-45000
  • 3rd airstrike called = ~30s passed since first airstrike
    • counter has decreased to ~10000-15000 = counter is now at ~40000-45000
  • 4th airstrike called = ~1min passed since first airstrike
    • counter has decreased to ~10000-15000 = counter is now at ~40000-45000

Whether or not the method for limiting makes sense is another question, but the current limitation method works as expected.

@x0rnn
Copy link
Contributor Author

x0rnn commented Mar 1, 2024

So setting it to 1 would allow 2 per minute... Not very intuitive, but at least I figured out why it was way more spammy on the server since we migrated to legacy.

@Aciz
Copy link
Member

Aciz commented Mar 1, 2024

FWIW ETPro seems to limit air support in similar way, there's not explicit cvars for it but the limiting seems to work the same way.

@x0rnn
Copy link
Contributor Author

x0rnn commented Mar 1, 2024

On ETPro there is just g_heavyWeaponRestriction, which in itself worked better. Having it the same value on legacy didn't work, there was still more HW spam, that's why I enabled team_maxAirstrikes.

@Aciz
Copy link
Member

Aciz commented Mar 1, 2024

Yeah the math works out a bit different, legacy has separated airstrike/artillery limits as separate limits, whereas etmain (and probably etpro) use the same limit for both.

@jackeri
Copy link
Member

jackeri commented Mar 1, 2024

Since we have a cvar for both of them we should also probably have a "combined" one, meaning that we might allow 2 artilleries and 2 airstrikes, but also limit the spam to 3 of either per minute in total.

@Aciz
Copy link
Member

Aciz commented Mar 1, 2024

Yeah, something like team_maxAirsupport which if set, would override both team_maxArtillery and team_maxAirstrikes.

@Aranud Aranud added 🐞 Bug Something isn't working P3: Normal Priority 3 cat: mod QAGAME Category mod (qagame) labels Mar 4, 2024
@Aranud Aranud added this to the Future milestone Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working cat: mod QAGAME Category mod (qagame) P3: Normal Priority 3
Projects
None yet
Development

No branches or pull requests

4 participants