mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 12:04:06 +09:00
issue #26 resolved (someone is hoolding stale ingame context)
This commit is contained in:
@@ -508,7 +508,7 @@ open class ActorHumanoid(
|
||||
|
||||
val timedJumpCharge = jumpFunc(MAX_JUMP_LENGTH, jmpCtr)
|
||||
forceVec.y -= getJumpAcc(jumpPower, timedJumpCharge)
|
||||
forceVec.y += getDrag(AppLoader.UPDATE_RATE.toFloat(), forceVec).y
|
||||
forceVec.y += getDrag(AppLoader.UPDATE_RATE, forceVec).y
|
||||
|
||||
simYPos += forceVec.y // ignoring all the fluid drag OTHER THAN THE AIR
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ class ActorInventory(@Transient val actor: Pocketed, var maxCapacity: Int, var c
|
||||
actor.avStrength / 1000.0
|
||||
else
|
||||
1.0 // TODO variable: scale, strength
|
||||
val swingDmgToFrameDmg = AppLoader.UPDATE_RATE.toFloat().toDouble() / actor.actorValue.getAsDouble(AVKey.ACTION_INTERVAL)!!
|
||||
val swingDmgToFrameDmg = AppLoader.UPDATE_RATE.toDouble() / actor.actorValue.getAsDouble(AVKey.ACTION_INTERVAL)!!
|
||||
|
||||
// damage the item
|
||||
newItem.durability -= (baseDamagePerSwing * swingDmgToFrameDmg).toFloat()
|
||||
|
||||
@@ -23,7 +23,7 @@ open class ParticleBase(renderOrder: Actor.RenderOrder, val despawnUponCollision
|
||||
/** Will NOT actually delete from the CircularArray */
|
||||
@Volatile var flagDespawn = false
|
||||
|
||||
override fun run() = update(AppLoader.UPDATE_RATE.toFloat())
|
||||
override fun run() = update(AppLoader.UPDATE_RATE)
|
||||
|
||||
var isNoSubjectToGrav = false
|
||||
var dragCoefficient = 3.0
|
||||
|
||||
@@ -28,7 +28,7 @@ interface Pocketed {
|
||||
}
|
||||
|
||||
inventory.itemEquipped[item.equipPosition] = null
|
||||
item.effectOnUnequip(AppLoader.UPDATE_RATE.toFloat())
|
||||
item.effectOnUnequip(AppLoader.UPDATE_RATE)
|
||||
}
|
||||
|
||||
fun unequipItem(itemID: ItemID?) {
|
||||
@@ -56,7 +56,7 @@ interface Pocketed {
|
||||
|
||||
if (item.equipPosition >= 0) {
|
||||
inventory.itemEquipped[item.equipPosition] = item.dynamicID
|
||||
item.effectWhenEquipped(AppLoader.UPDATE_RATE.toFloat())
|
||||
item.effectWhenEquipped(AppLoader.UPDATE_RATE)
|
||||
}
|
||||
// else do nothing
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@ class ThreadActorUpdate(val startIndex: Int, val endIndex: Int) : Runnable {
|
||||
override fun run() {
|
||||
for (i in startIndex..endIndex) {
|
||||
val it = Terrarum.ingame!!.actorContainerActive[i]
|
||||
it.update(AppLoader.UPDATE_RATE.toFloat())
|
||||
it.update(AppLoader.UPDATE_RATE)
|
||||
|
||||
if (it is Pocketed) {
|
||||
it.inventory.forEach { inventoryEntry ->
|
||||
ItemCodex[inventoryEntry.item]?.effectWhileInPocket(AppLoader.UPDATE_RATE.toFloat())
|
||||
ItemCodex[inventoryEntry.item]?.effectWhileInPocket(AppLoader.UPDATE_RATE)
|
||||
if (it.equipped(inventoryEntry.item)) {
|
||||
ItemCodex[inventoryEntry.item]?.effectWhenEquipped(AppLoader.UPDATE_RATE.toFloat())
|
||||
ItemCodex[inventoryEntry.item]?.effectWhenEquipped(AppLoader.UPDATE_RATE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user