mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-16 05:24:06 +09:00
Physics stuff Float -> Double
Former-commit-id: 54ccee75769691aa6aaa2416767bd15270f63347 Former-commit-id: 61e892434f48adf11e3ca49b60928a930fd5cde9
This commit is contained in:
@@ -17,12 +17,12 @@ interface InventoryItem {
|
||||
/**
|
||||
* Weight of the item, Float
|
||||
*/
|
||||
var mass: Float
|
||||
var mass: Double
|
||||
|
||||
/**
|
||||
* Scale of the item. Real mass: mass * (scale^3)
|
||||
*/
|
||||
var scale: Float
|
||||
var scale: Double
|
||||
|
||||
/**
|
||||
* Effects applied while in pocket
|
||||
|
||||
@@ -9,12 +9,12 @@ import org.newdawn.slick.GameContainer
|
||||
class TileAsItem(tileNum: Int) : InventoryItem {
|
||||
|
||||
override var itemID: Int = 0
|
||||
override var mass: Float = 0f
|
||||
override var scale: Float = 1f
|
||||
override var mass: Double = 0.0
|
||||
override var scale: Double = 1.0
|
||||
|
||||
init {
|
||||
itemID = tileNum
|
||||
mass = TilePropCodex.getProp(tileNum).density / 1000f
|
||||
mass = TilePropCodex.getProp(tileNum).density / 1000.0
|
||||
}
|
||||
|
||||
override fun effectWhileInPocket(gc: GameContainer, delta_t: Int) {
|
||||
|
||||
Reference in New Issue
Block a user