mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 22:44:04 +09:00
renaming some shits to make them have more sensible name
Former-commit-id: 1c86d460750aa19f65b6e2a0cd7ac1c51ab8ca21 Former-commit-id: 1dd9c33f3eb05b2c48b85ca70ebf3a1b5e57e51a
This commit is contained in:
@@ -172,7 +172,7 @@ open class ActorWithBody : Actor() {
|
||||
@Transient private val gravitation: Vector2 = world.gravitation
|
||||
@Transient val DRAG_COEFF_DEFAULT = 1.2
|
||||
/** Drag coefficient. Parachutes have much higher value than bare body (1.2) */
|
||||
private var DRAG_COEFF: Double
|
||||
var dragCoefficient: Double
|
||||
get() = actorValue.getAsDouble(AVKey.DRAGCOEFF) ?: DRAG_COEFF_DEFAULT
|
||||
set(value) {
|
||||
if (value < 0)
|
||||
@@ -424,7 +424,7 @@ open class ActorWithBody : Actor() {
|
||||
* Drag of atmosphere
|
||||
* D = Cd (drag coefficient) * 0.5 * rho (density) * V^2 (velocity sqr) * A (area)
|
||||
*/
|
||||
val D: Vector2 = Vector2(veloX.magnSqr(), veloY.magnSqr()) * DRAG_COEFF * 0.5 * A// * tileDensityFluid.toDouble()
|
||||
val D: Vector2 = Vector2(veloX.magnSqr(), veloY.magnSqr()) * dragCoefficient * 0.5 * A// * tileDensityFluid.toDouble()
|
||||
|
||||
val V: Vector2 = (W - D) / mass * SI_TO_GAME_ACC
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.newdawn.slick.Input
|
||||
* @param actor : here you 'snap in' the actor you wish to control
|
||||
* Created by minjaesong on 16-10-23.
|
||||
*/
|
||||
class PossessedPlayerWrapper(val actor: ActorHumanoid) {
|
||||
class PlayableActorWrapper(val actor: ActorHumanoid) {
|
||||
|
||||
init {
|
||||
if (actor !is Controllable)
|
||||
Reference in New Issue
Block a user