diff --git a/pkg/base/obj_nade.lua b/pkg/base/obj_nade.lua index 6083b5f..ea9d68d 100644 --- a/pkg/base/obj_nade.lua +++ b/pkg/base/obj_nade.lua @@ -99,7 +99,7 @@ function new_nade(settings) this.vz = this.vz * MODE_NADE_ADAMP end - this.vy = this.vy + 5*9.81*MODE_NADE_STEP*MODE_NADE_STEP + this.vy = this.vy + 5*MODE_GRAVITY*MODE_NADE_STEP*MODE_NADE_STEP end function this.explode_dmg() diff --git a/pkg/base/obj_particle.lua b/pkg/base/obj_particle.lua index 96320e9..b32ae56 100644 --- a/pkg/base/obj_particle.lua +++ b/pkg/base/obj_particle.lua @@ -139,7 +139,7 @@ function new_particle(settings) this.vz = this.vz * this.adamp end - this.vy = this.vy + 5*9.81*this.step*this.step + this.vy = this.vy + 5*MODE_GRAVITY*this.step*this.step end function this.tick(sec_current, sec_delta) diff --git a/pkg/iceball/lib/wobj.lua b/pkg/iceball/lib/wobj.lua index a6d7c86..7b4482e 100644 --- a/pkg/iceball/lib/wobj.lua +++ b/pkg/iceball/lib/wobj.lua @@ -46,7 +46,7 @@ function wobj_new(settings) -- Calculate jump speed required to jump d blocks high. function this.get_jump_speed(d) local grav = this.grav or 1.0 - local acc = 9.81*4.0*grav + local acc = MODE_GRAVITY*4.0*grav -- d = a*t*t/2 -- d, a known; find t @@ -96,7 +96,7 @@ function wobj_new(settings) -- d = v*t + (a*t*t)/2 -- Tested to be consistent over a wide variety of sec_delta values. if this.grav then - local acc = 9.81*4.0*this.grav + local acc = MODE_GRAVITY*4.0*this.grav this.vg.y = this.vg.y + sec_delta*acc end