Initial Commit
This commit is contained in:
commit
967d8a6612
2
README
Normal file
2
README
Normal file
@ -0,0 +1,2 @@
|
||||
# physics_override
|
||||
A dragonfire CSM to change your speed, gravity and jump speed using multipliers
|
23
init.lua
Normal file
23
init.lua
Normal file
@ -0,0 +1,23 @@
|
||||
local legit_override
|
||||
|
||||
local function get_override_factor(name)
|
||||
if minetest.settings:get_bool("override_" .. name) then
|
||||
return tonumber(minetest.settings:get("override_" .. name .. "_factor")) or 1
|
||||
else
|
||||
return 1.0
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_globalstep(function()
|
||||
if not legit_override then return end
|
||||
local override = table.copy(legit_override)
|
||||
override.speed = override.speed * get_override_factor("speed")
|
||||
override.jump = override.jump * get_override_factor("jump")
|
||||
override.gravity = override.gravity * get_override_factor("gravity")
|
||||
minetest.localplayer:set_physics_override(override)
|
||||
end)
|
||||
|
||||
minetest.register_on_recieve_physics_override(function(override)
|
||||
legit_override = override
|
||||
return true
|
||||
end)
|
3
mod.conf
Normal file
3
mod.conf
Normal file
@ -0,0 +1,3 @@
|
||||
name = physics_override
|
||||
author = Fleckenstein
|
||||
description = A dragonfire CSM to change your speed, gravity and jump speed using multipliers
|
6
settingtypes.txt
Normal file
6
settingtypes.txt
Normal file
@ -0,0 +1,6 @@
|
||||
override_speed (SpeedOverride) bool false
|
||||
override_jump (JumpOverride) bool false
|
||||
override_gravity (GravityOverride) bool false
|
||||
override_speed_factor (SpeedOverride Factor) float 1.2
|
||||
override_jump_factor (JumpOverride Factor) float 2.0
|
||||
override_gravity_factor (GravityOverride) float 0.8
|
Loading…
x
Reference in New Issue
Block a user