View Single Post
CoolJosh3k
AlliedModders Donor
Join Date: Mar 2010
Old 08-04-2022 , 23:43   Re: [TF2] Quick plugin review before I submit
Reply With Quote #7

Quote:
Originally Posted by FlaminSarge View Post
...The current map, maybe?

It may be worth having this plugin check GameTime/EngineTime is a very high actual value (one that would have floating point imprecision) before doing any changes. That could probably be accomplished by having the default value of each of the time cvars just be ridiculously high (ideally just before server starts getting really bad FP imprecision).

Potential concern would be whether float to int comparison (GetEngineTime() >= (cvar int value)) has trouble when either side of the comparison may be a ridiculously high value.
While I do assume it is floating error related (as well as others like yourself), I can't know for sure.

I expect if only ever treated as a float, then it is possible to detect when an error would have occurred. I think though that having it be some regular, predictable outcome that a server operator can configure is quite useful.

I have since released this plugin in a more official capacity, as per this thread: https://forums.alliedmods.net/showthread.php?t=338903

There are certainly a few things that could be added to make this plugin more flexible, but the base functionality and solution is all there.

It is my hope that by sharing this really old solution of mine, that others in the community might get some use out of it.
CoolJosh3k is offline