Increases clickrate cap.

Changelog

🆑 Vanagandr

tweak: Increased theoretical maximum clicks-per-second from 6.9 (practical max 5.5) to 10.26 (practical max 8.5).

rscadd: Added a debug tool for determining ingame click rates.

/🆑

Details

A number of marine weapons have fire delays of 1 tick, giving them a maximum theoretical single-fire ROF of 10 rounds per second. This is also displayed in the ingame stats screen. However, in practice, maximum click rate is capped by this limiter, which determines how many clicks the game will respect. It's also affected by click-drags 'eating' clicks, but that's a different MR.

This MR raises the cap, though it still doesn't quite reach the displayed rate.

Tests were done using an autoclicker set to 5ms or 50ms, manual spamclick, and the debug tool's "autoclick" to get the code-maximum.

Current click limiter: 
(if(world.time <= next_click)
    return
next_click = world.time + 1)

STAFF LOG: We did 32 clicks over 4.9 seconds, for an average clicks-per-second of 6.53061.
STAFF LOG: We did 23 clicks over 3.4 seconds, for an average clicks-per-second of 6.76471.
STAFF LOG: We did 27 clicks over 4.1 seconds, for an average clicks-per-second of 6.58537.
STAFF LOG: We did 27 clicks over 4.1 seconds, for an average clicks-per-second of 6.58537.
Autoclicker average = 6.617/s. Maximum manual = 5.5/s. Maximum permitted by code = 6.9.

It seems to hurt manual clicks a lot also; the same apparent click rate as used in the last test seemed to top out at 5.5 clicks processed using this setting. But it's hard to say for sure.

No click limiter:

STAFF LOG: We did 40 clicks over 3.05 seconds, for an average clicks-per-second of 13.1148.
STAFF LOG: We did 43 clicks over 3.3 seconds, for an average clicks-per-second of 13.0303.
STAFF LOG: We did 37 clicks over 2.85 seconds, for an average clicks-per-second of 12.9825.
STAFF LOG: We did 37 clicks over 2.8 seconds, for an average clicks-per-second of 13.2143.
Autoclicker average = 13.085/s.

Allegedly (per Neth's MR that last re-enabled this limiter) no-limit means people can DDOS the server with clicks. I don't know if that's true.

Tweaked click limiter:
(if(world.time < next_click)
    return
next_click = world.time + 1)

STAFF LOG: We did 10 clicks over 1.35 seconds, for an average clicks-per-second of 7.40741.
STAFF LOG: We did 21 clicks over 2.85 seconds, for an average clicks-per-second of 7.36842.
STAFF LOG: We did 29 clicks over 4.05 seconds, for an average clicks-per-second of 7.16049.
STAFF LOG: We did 27 clicks over 3.75 seconds, for an average clicks-per-second of 7.2.
Autoclicker average = 7.28/s. Maximum manual = 8.5/s. Maximum code permits = 10.26.

As this goes by ticks rather than IRL seconds, this probably also increases click rates during very laggy rounds, though realtime ROF is likely to be the same. Also, the clickrate tool goes by ticks rather than realtime seconds. I'm not sure how that works.

Closes

Edited by Vanagandr

Merge request reports

Loading
Loading