mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
phys: reduced number of collision checks on x axis
This commit is contained in:
@@ -1388,10 +1388,9 @@ open class ActorWithBody : Actor {
|
||||
(pxStart + sub)..(pxEnd - sub)
|
||||
}
|
||||
else*/
|
||||
pxStart..pxEnd
|
||||
(pxStart / TILE_SIZED).floorToInt()..(pxEnd / TILE_SIZED).floorToInt()
|
||||
|
||||
for (x in xs) {
|
||||
val tx = (x / TILE_SIZED).floorToInt() // round down toward negative infinity
|
||||
for (tx in xs) {
|
||||
val tile = world!!.getTileFromTerrain(tx, ty)
|
||||
|
||||
if (feet && isFeetTileHeight) {
|
||||
|
||||
Reference in New Issue
Block a user