Add "onlyCheckCenter" option to ray cast check#372
Add "onlyCheckCenter" option to ray cast check#372Ingrim4 merged 6 commits intoImprex-Development:masterfrom
Conversation
| this.rayCastCheckEnabled = section.getBoolean("rayCastCheck.enabled", | ||
| section.getBoolean("useRayCastCheck", | ||
| section.getBoolean("useFastGazeCheck", false))); | ||
| this.rayCastCheckOnlyCheckCenter = section.getBoolean("rayCastCheck.onlyCheckCenter", false); |
There was a problem hiding this comment.
I would be open to enable this flag by default since it shouldn't decrease security and we only lose some accuracy which is fine I think. I haven't had time to this yet so I'm not sure how big the impact is on accuracy. Any thoughts?
There was a problem hiding this comment.
I was wrong about one thing. Enabling this option should improve performance. The default is false because before this PR all users used the default check full block. I'm not sure how much of a performance boost. I added this option because some PVP games (like UHC) don't require particularly precise checks.
There was a problem hiding this comment.
I will leave it off by default for now, maybe will change this in the future though.
Ingrim4
left a comment
There was a problem hiding this comment.
lgtm, probably will compile now
Description
Disabling this option increases efficiency by reducing the number of ray casts
Related Issue
No
Motivation and Context
The original ray cast check checks all corners and edges of the block. Disabling this option allows you to check only the center point of the block, reducing the performance cost of ray cast.
How Has This Been Tested?
Local server
Types of Changes