sirhamsteralot / HaE-PBLimiter

Profiles pb's and damages them when their runtime goes over a set value
MIT License
11 stars 5 forks source link

[feature request] ability to use LastRunTimeMs property for calculation #10

Closed LordTylus closed 5 years ago

LordTylus commented 5 years ago

Hello,

we noticed on our servers that the average calculated via

public Program() {
    Runtime.UpdateFrequency = UpdateFrequency.Update1;
}

double avg;

public void Main(String argument, UpdateType updateSource) {

    avg = avg*0.995+Runtime.LastRunTimeMs*0.005;

    Echo(avg+"");
}

with ingame scripting has an average that is little to waay of from what the server measures.

Differences vary from 0.02 to 0.2 ms. (this will get a separate report)

But it would be very useful if we could decide which kind of calculation to use. So either we can use the current way of taking time vs just getting LastRunTimeMs and calling it a day.

Personally I would prefer to use LastRunTimeMs because it offers the players ways of analyzing their scripts performance themselves

Settings used for testing:

sirhamsteralot commented 5 years ago

implemented ability to in v1.0.9.4