Commit b0d405a
Fix pmove_fixed (#70)
* cvar: add cg_packetdelay
adds access to cl_packetdelay which is normally cheat protected; useful for both
testing and ping equalizing.
* cvar: add `cl_maxfps` which replaces `com_maxfps`
Add a new client `cl_maxfps` which allows specifying the maximum desired fps
value; which may not be the same as the maximum allowed.
`com_maxfps` is now derived from `cl_maxfps`.
Current values are 250 when `pmove_fixed=1` and 125 when `pmove_fixed=0`
The default value of `cl_maxfps -1` should probably be preferred because it
just picks the best currently supported max. Future patches will raise this to
500 in the pmove_fixed=1 case.
* bug fixes: fix old nail bugs and refine prediction
- remove fudge factors for prediction being a rendered frame ahea and use the
time from command frame directly. --> 0 error on prediction.
- fix ancient nail bugs where they were not being correctly snapped
- fix ancient nail bugs where original position was wrong for collision calcs
* platform: fix mingw cross compile
The introduced byteswap.h dependency isn't portable, use supported intrinsics
* pmove: add pmove_float
add upstream `pmove_float` (default on) which makes jump height no longer fps
dependent. Previously this specific behavior resulted from accumulated errors
on gravity truncation; resolve by not truncating gravity except for one case
which otherwise results in erratic accel.
Note: This doesnt fix other fps dependent accel
* pmove_fixed: refactor ClientEndFrame
- not correctly executed under pmove_fixed
- no reason to evaluate every _client_ frame
- no reason to buffer underruns (client >1s stale has bigger problems)
- merge per server frame checks
* pmove-fixed: rectify and cleanup
- remove client toggle (either it works for everyone or it's bugged and
shouldn't be used)
- remove realping, adds high per-frame overhead, not used
- remove latency simulation, packetdelay exists and adds complexity to
prediction cache / one less think to think about with pmove_fixed
- move pmove_var fixup out of clientthink
* pmove-fixed: add handling for overlapping client frames
pmove_fixed would previously incorrectly overlap and not handle certain frames
due to treatment of time. Many frames being assigned the same time was
resulting in inconsistent processing, caching, etc.
pmove also segmented ranges awkwardly, e.g. (pmsec*n, pmsec*(n+1)], change
this to [pmsec%n,pmsec*(n+1)) which brings mod range in congruence.
Resolve this by making it an internal detail to pmove, allowing external code to
behave independently wrt pmove_fixed being enabled.
* pmove: interp view pos with pmove_fixed
When pmove_fixed is enable we want to generate interpolated subframes between
movement frames so that we're updating the viewport at the intended rate
(consider for example the case of walking in a straight line without moving
mouse).
---------
Co-authored-by: newby <newby@qwtf.live>1 parent d83df8c commit b0d405a
21 files changed
Lines changed: 514 additions & 557 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
166 | 170 | | |
167 | 171 | | |
168 | 172 | | |
| |||
225 | 229 | | |
226 | 230 | | |
227 | 231 | | |
228 | | - | |
229 | | - | |
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
318 | 317 | | |
319 | 318 | | |
320 | 319 | | |
| |||
764 | 763 | | |
765 | 764 | | |
766 | 765 | | |
| 766 | + | |
767 | 767 | | |
768 | 768 | | |
769 | 769 | | |
| |||
1451 | 1451 | | |
1452 | 1452 | | |
1453 | 1453 | | |
1454 | | - | |
| 1454 | + | |
| 1455 | + | |
1455 | 1456 | | |
1456 | 1457 | | |
1457 | 1458 | | |
1458 | 1459 | | |
1459 | 1460 | | |
1460 | 1461 | | |
1461 | 1462 | | |
| 1463 | + | |
1462 | 1464 | | |
1463 | 1465 | | |
1464 | 1466 | | |
| |||
2302 | 2304 | | |
2303 | 2305 | | |
2304 | 2306 | | |
| 2307 | + | |
2305 | 2308 | | |
2306 | 2309 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
970 | | - | |
| 970 | + | |
971 | 971 | | |
972 | 972 | | |
973 | 973 | | |
| |||
1025 | 1025 | | |
1026 | 1026 | | |
1027 | 1027 | | |
| 1028 | + | |
1028 | 1029 | | |
1029 | 1030 | | |
1030 | 1031 | | |
| |||
1058 | 1059 | | |
1059 | 1060 | | |
1060 | 1061 | | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
1061 | 1067 | | |
1062 | | - | |
| 1068 | + | |
1063 | 1069 | | |
1064 | | - | |
1065 | | - | |
1066 | 1070 | | |
1067 | | - | |
1068 | | - | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1069 | 1074 | | |
| 1075 | + | |
| 1076 | + | |
1070 | 1077 | | |
1071 | 1078 | | |
1072 | 1079 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | 173 | | |
175 | 174 | | |
176 | 175 | | |
| |||
198 | 197 | | |
199 | 198 | | |
200 | 199 | | |
201 | | - | |
202 | | - | |
203 | 200 | | |
204 | 201 | | |
205 | 202 | | |
| |||
209 | 206 | | |
210 | 207 | | |
211 | 208 | | |
| 209 | + | |
| 210 | + | |
212 | 211 | | |
213 | 212 | | |
214 | 213 | | |
| |||
515 | 514 | | |
516 | 515 | | |
517 | 516 | | |
| 517 | + | |
| 518 | + | |
518 | 519 | | |
519 | 520 | | |
520 | 521 | | |
| |||
538 | 539 | | |
539 | 540 | | |
540 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
541 | 548 | | |
542 | 549 | | |
543 | 550 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
671 | 670 | | |
| 671 | + | |
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
| |||
736 | 736 | | |
737 | 737 | | |
738 | 738 | | |
| 739 | + | |
739 | 740 | | |
740 | 741 | | |
741 | 742 | | |
| |||
755 | 756 | | |
756 | 757 | | |
757 | 758 | | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
| 759 | + | |
762 | 760 | | |
763 | 761 | | |
764 | 762 | | |
| |||
829 | 827 | | |
830 | 828 | | |
831 | 829 | | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | 830 | | |
837 | 831 | | |
838 | 832 | | |
| |||
917 | 911 | | |
918 | 912 | | |
919 | 913 | | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | 914 | | |
925 | 915 | | |
926 | 916 | | |
927 | 917 | | |
928 | 918 | | |
929 | 919 | | |
| 920 | + | |
930 | 921 | | |
931 | 922 | | |
932 | 923 | | |
933 | 924 | | |
934 | 925 | | |
935 | 926 | | |
936 | | - | |
937 | | - | |
| 927 | + | |
| 928 | + | |
938 | 929 | | |
939 | 930 | | |
940 | 931 | | |
| |||
985 | 976 | | |
986 | 977 | | |
987 | 978 | | |
| 979 | + | |
| 980 | + | |
988 | 981 | | |
989 | 982 | | |
990 | 983 | | |
| |||
1016 | 1009 | | |
1017 | 1010 | | |
1018 | 1011 | | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
1019 | 1031 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| |||
899 | 901 | | |
900 | 902 | | |
901 | 903 | | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | 309 | | |
| 310 | + | |
325 | 311 | | |
326 | 312 | | |
327 | 313 | | |
328 | 314 | | |
| 315 | + | |
329 | 316 | | |
330 | 317 | | |
331 | 318 | | |
| |||
349 | 336 | | |
350 | 337 | | |
351 | 338 | | |
352 | | - | |
353 | 339 | | |
354 | 340 | | |
355 | 341 | | |
| |||
377 | 363 | | |
378 | 364 | | |
379 | 365 | | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | 366 | | |
385 | | - | |
386 | | - | |
| 367 | + | |
387 | 368 | | |
388 | 369 | | |
389 | 370 | | |
| |||
423 | 404 | | |
424 | 405 | | |
425 | 406 | | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
| 407 | + | |
432 | 408 | | |
433 | 409 | | |
434 | 410 | | |
| |||
0 commit comments