mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 14:34:04 +09:00
more renaming things
Former-commit-id: 80e29fc17e431e350d8d4860273ec42bc4ad67df Former-commit-id: d70546a097d66ade94de93b4be157b7c9637e98f
This commit is contained in:
@@ -40,7 +40,7 @@ abstract class Actor(val renderOrder: ActorOrder) : Comparable<Actor>, Runnable
|
||||
*/
|
||||
fun generateUniqueReferenceID(): Int {
|
||||
fun checkForCollision(value: Int) =
|
||||
Terrarum.ingame.hasActor(value) ||
|
||||
Terrarum.ingame.theGameHasActor(value) ||
|
||||
value < ItemCodex.ITEM_COUNT_MAX ||
|
||||
value < when (renderOrder) {
|
||||
ActorOrder.BEHIND -> ItemCodex.ITEM_COUNT_MAX
|
||||
|
||||
@@ -65,7 +65,7 @@ open class ActorWithSprite(renderOrder: ActorOrder, val immobileBody: Boolean =
|
||||
)
|
||||
|
||||
/**
|
||||
* TODO external force? do we need this? we have moveDelta
|
||||
* Elevators/Movingwalks/etc.: edit hitbox manually!
|
||||
*
|
||||
* Velocity vector for newtonian sim.
|
||||
* Acceleration: used in code like:
|
||||
@@ -506,9 +506,12 @@ open class ActorWithSprite(renderOrder: ActorOrder, val immobileBody: Boolean =
|
||||
}
|
||||
}
|
||||
// axis X
|
||||
if (isTouchingSide(nextHitbox, COLLIDING_LEFT) || isTouchingSide(nextHitbox, COLLIDING_RIGHT)
|
||||
&& moveDelta.x != 0.0) { // check right and left
|
||||
if (isTouchingSide(nextHitbox, COLLIDING_LEFT) || isTouchingSide(nextHitbox, COLLIDING_RIGHT)) { // check right and left
|
||||
// the actor is hitting the wall
|
||||
|
||||
// FIXME balls are stuck in this
|
||||
if (referenceID != 321321321)
|
||||
println("$this trying to reflectX")
|
||||
hitAndReflectX()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user