Comments (4)
@ec- I only found an insta-unlagged server to try it on (in Germany), but with 150ms ping and auto-nudge 1 it felt like LAN game making rail shots no problem. I felt accuracy was better with auto-nudge on than off.
Since my original post I made some additional changes to the auto-nudge logic that I think make it more flexible.
-
I made cl_autonudge a float (range 0 to 1.0) so it can be used as auto nudge factor of ping.
So if you set cl_autonudge 0.333, and have avg ping of 150 then timenudge value becomes
(150 * 0.333) =~ (50) * -1 = -50 -
I changed the average ping calculation to use median average instead of mean average, due to cases of fluctuating ping with extreme highs and lows that could effect the average.
-
I made CL_TimeNudge a function that returns either autoNudged value or cl_timeNudge depending on if autonudge is being used.
Here are the revised functions:
*
==================
CL_AvgPing
Calculates Average Ping from snapshots in buffer. Used by AutoNudge.
==================
*/
float CL_AvgPing( void ) {
int ping[PACKET_BACKUP];
int count = 0;
int i, j, iTemp;
float result;
for ( i = 0; i < PACKET_BACKUP; i++ ) {
if ( cl.snapshots[i].ping > 0 && cl.snapshots[i].ping < 999 ) {
ping[count] = cl.snapshots[i].ping;
count++;
}
}
if ( count == 0 )
return 0;
// sort ping array
for ( i = count - 1; i > 0; --i ) {
for ( j = 0; j < i; ++j ) {
if (ping[j] > ping[j + 1]) {
iTemp = ping[j];
ping[j] = ping[j + 1];
ping[j + 1] = iTemp;
}
}
}
// use median average ping
if ( (count % 2) == 0 )
result = (ping[count / 2] + ping[(count / 2) - 1]) / 2.0;
else
result = ping[count / 2];
return result;
}
/*
==================
CL_TimeNudge
Returns either auto-nudge or cl_timeNudge value.
==================
*/
int CL_TimeNudge( void ) {
float autoNudge = cl_autoNudge->value;
if ( autoNudge != 0 )
return (int)((CL_AvgPing() * autoNudge) + 0.5) * -1;
else
return cl_timeNudge->integer;
}
Then you just have to change one line of code in CL_SetCGameTime method:
// cl.serverTime = cls.realtime + cl.serverTimeDelta - cl_timeNudge->integer;
cl.serverTime = cls.realtime + cl.serverTimeDelta - CL_TimeNudge();
from quake3e.
While I'm sure many will like this, timenudge has a lot of placebo and lacking of empirical evidence that it does any good beside changing the ping number.
It does however have many caveats, including but not limited to prediction errors, and negative impact of timing delay vs the server.
from quake3e.
@iradicus how does it interacts with unlagged mods?
from quake3e.
Well, pretty much every improvement that increases FPS (for example) might be considered as unfair too so I don't see any problems here, it is a nice feature
from quake3e.
Related Issues (20)
- Clarification needed: Why fs_homepath is write protected? HOT 6
- I love this engine. Question about MDR models HOT 2
- Enable Win32 DPI awareness HOT 1
- Building quake3e.app and running on Sonoma doens't open app
- Build: building with Cygwin on Win 8.1 x64 fails (cURL). HOT 12
- Linux: abnormally high GPU usage on Vulkan with r_fbo 1 HOT 5
- more of a question than an issue, but is it possible to use this engine to boot games that run on the quake 3 engine? HOT 1
- Arm64 version doesnt work. HOT 3
- fs_basegame behavior with mods errors with Couldn't load default.cfg HOT 8
- Greyscale Functionality Question HOT 3
- Server map rotation fails after a while HOT 8
- Anisotropic filter broken in Latest Build Oct 29, 2023 HOT 3
- [build] `LDFLAGS` in `./Makefile` should be additive HOT 2
- WASAPI: unsupported channel count 6 HOT 1
- Increase max sv_dlRate HOT 2
- Quake 3 enhanced has weird annoying noisy sound when running *WORKAROUND AVAILABLE* HOT 7
- New Cbuf_Add function doesn't play nice with wait command HOT 6
- Shader Scripts Not Ordering Properly Across .shader Files HOT 12
- R_TEXTUREMODE is not behaving persistently through sessions with the Vulkan renderer HOT 3
- All bot models replaced by player selected model HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quake3e.