mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 18:44:05 +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)
|
(pxStart + sub)..(pxEnd - sub)
|
||||||
}
|
}
|
||||||
else*/
|
else*/
|
||||||
pxStart..pxEnd
|
(pxStart / TILE_SIZED).floorToInt()..(pxEnd / TILE_SIZED).floorToInt()
|
||||||
|
|
||||||
for (x in xs) {
|
for (tx in xs) {
|
||||||
val tx = (x / TILE_SIZED).floorToInt() // round down toward negative infinity
|
|
||||||
val tile = world!!.getTileFromTerrain(tx, ty)
|
val tile = world!!.getTileFromTerrain(tx, ty)
|
||||||
|
|
||||||
if (feet && isFeetTileHeight) {
|
if (feet && isFeetTileHeight) {
|
||||||
|
|||||||
Reference in New Issue
Block a user