[TF2] Quick plugin review before I submit
Hi there, :bacon!:
I was hoping to get some eyeballs on this before I submit it for review. Hopefully there is nothing wrong with it, but I wrote it back in 2017. The purpose of this plugin is to stop the jitter issues that a TF2 server can experience if the server has been empty and on the same map for too long. I'm not entirely sure how to describe it, other than a server getting the jitters. If you've ever connected to a server that has been sitting on the same map for hours you'll probably know what I mean. It is a basic solution of just restarting the server every hour, provided there is no one actually in it. Thanks in advance to anyone who can verify it for me, or help me fix issues. :) Here is my code: Code:
#include <sourcemod> |
Re: [TF2] Quick plugin review before I submit
Moved to SM
|
Re: [TF2] Quick plugin review before I submit
Quote:
I did not even notice I was under the AMX section due to how things are laid out. |
Re: [TF2] Quick plugin review before I submit
This jitter is probably because the server GameTime value gets very high and starts to experience floating point imprecision. This video takes it to an extreme, but it's a similar deal.
I thought that a simple mapchange fixes this, rather than a restart? I didn't think this issue affected EngineTime, either. |
Re: [TF2] Quick plugin review before I submit
Quote:
Of course back in 2017, when I wrote this, I probably didn't even know what a floating point was! :P Simply changing the map is probably a better solution, but I figure a restart is going to possibly catch other issues that might also exist on a server. The one downside I can think of for a restart, is that it creates a whole new log file. Once the basic functionality is public as an actual plugin, I'd be very welcoming if anyone wanted to update it an add the ability to initiate a map change instead. Of course this does open questions about which map and how to decide. I would assume then that there are no obvious issues. I am inclined to submit this as an actual public-ready plugin then soon. |
Re: [TF2] Quick plugin review before I submit
Quote:
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. |
Re: [TF2] Quick plugin review before I submit
Quote:
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. |
Re: [TF2] Quick plugin review before I submit
use new syntax: https://wiki.alliedmods.net/SourcePa...itional_Syntax
|
Re: [TF2] Quick plugin review before I submit
Quote:
|
All times are GMT -4. The time now is 01:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.