Compare commits

..

No commits in common. "master" and "nalc-1.2.0" have entirely different histories.

2 changed files with 3 additions and 10 deletions

View File

@ -1,5 +1,4 @@
local has_monoids = minetest.global_exists("player_monoids") local has_monoids = minetest.global_exists("player_monoids")
local has_pova = minetest.global_exists("pova")
local function freeze(player) local function freeze(player)
local player_name = player:get_player_name() local player_name = player:get_player_name()
@ -7,9 +6,6 @@ local function freeze(player)
player_monoids.speed:add_change(player, 0, "cozy:speed") player_monoids.speed:add_change(player, 0, "cozy:speed")
player_monoids.jump:add_change(player, 0, "cozy:jump") player_monoids.jump:add_change(player, 0, "cozy:jump")
player_monoids.gravity:add_change(player, 0, "cozy:gravity") player_monoids.gravity:add_change(player, 0, "cozy:gravity")
elseif has_pova then
pova.add_override(player_name, "force", {speed = 0, jump = 0, gravity = 0})
pova.do_override(player)
else else
player:set_physics_override({speed = 0, jump = 0, gravity = 0}) player:set_physics_override({speed = 0, jump = 0, gravity = 0})
end end
@ -22,9 +18,6 @@ local function unfreeze(player)
player_monoids.speed:del_change(player, "cozy:speed") player_monoids.speed:del_change(player, "cozy:speed")
player_monoids.jump:del_change(player, "cozy:jump") player_monoids.jump:del_change(player, "cozy:jump")
player_monoids.gravity:del_change(player, "cozy:gravity") player_monoids.gravity:del_change(player, "cozy:gravity")
elseif has_pova then
pova.del_override(player_name, "force")
pova.do_override(player)
else else
player:set_physics_override({speed = 1, jump = 1, gravity = 1}) player:set_physics_override({speed = 1, jump = 1, gravity = 1})
end end

View File

@ -1,4 +1,4 @@
name = cozy name = cozy
depends = player_api depends = default, player_api
optional_depends = player_monoids, pova optional_depends = player_monoids
description = Adds sitting down, and lying down player animations. description = Adds sitting down, and lying down player animations.