mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 21:14:04 +09:00
blocks camera and framebuffer seems working
This commit is contained in:
@@ -34,7 +34,7 @@ typealias Second = Float
|
||||
open class ActorWithPhysics(renderOrder: RenderOrder, val immobileBody: Boolean = false, physics: Boolean = true) : ActorWithBody(renderOrder) {
|
||||
|
||||
|
||||
val COLLISION_TEST_MODE = true
|
||||
val COLLISION_TEST_MODE = false
|
||||
|
||||
/** !! ActorValue macros are on the very bottom of the source !! **/
|
||||
|
||||
@@ -323,10 +323,6 @@ open class ActorWithPhysics(renderOrder: RenderOrder, val immobileBody: Boolean
|
||||
override fun update(delta: Float) {
|
||||
if (isUpdate && !flagDespawn) {
|
||||
|
||||
hitbox.translate(0.0, 2.0)
|
||||
|
||||
|
||||
|
||||
if (!assertPrinted) assertInit()
|
||||
|
||||
if (sprite != null) sprite!!.update(delta)
|
||||
@@ -339,6 +335,7 @@ open class ActorWithPhysics(renderOrder: RenderOrder, val immobileBody: Boolean
|
||||
isNoSubjectToFluidResistance = isPlayerNoClip
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Codes that modifies velocity (moveDelta and externalForce) //
|
||||
////////////////////////////////////////////////////////////////
|
||||
@@ -488,6 +485,7 @@ open class ActorWithPhysics(renderOrder: RenderOrder, val immobileBody: Boolean
|
||||
* Apply only if not grounded; normal force is precessed separately.
|
||||
*/
|
||||
private fun applyGravitation() {
|
||||
|
||||
if (!isNoSubjectToGrav && !(gravitation.y > 0 && walledBottom || gravitation.y < 0 && walledTop)) {
|
||||
//if (!isWalled(hitbox, COLLIDING_BOTTOM)) {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user