mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-10-04 09:27:30 +02:00
2ade022179
Since merging by distance only creates false positives (one would have to increase the bounding box for an entry, but the angles would never be 100% right), we never merge, instead we don't add a new entry if the position is the same, the time value is not updated in this case. For validity of an entry you always have to consider the time span until the previous (younger) entry or until now for the latest entry. Rough changes: * Use an interface for accessing trace entries. * Use a linked structure for the actual trace. * Use maximum age and size to limit the number of stored entries. * Use a pool to somewhat limit object creation (size may need configuration or scaling with number of players). * Since the trace starts empty, have the field be final. * Keep trace elements if settings are changed, cut size if necessary. * Remove obsolete tests. Potentially missing: * Usage of LocationTrace has not been checked if we need to account for the time of the latest entry not necessarily being updated (!). * New tests, e.g. accounting for the expiration of entries. Follow ups: * (Extend fight/loop checks to a latency window mechanism.) |
||
---|---|---|
.. | ||
src | ||
pom.xml |