try to fix head collision bugs again, revert last few changes
parent
8159962a5b
commit
36eec8ff01
8
init.lua
8
init.lua
|
@ -1,8 +1,6 @@
|
|||
|
||||
local modname = "balloon_bop"
|
||||
balloon_bop = {}
|
||||
balloon_bop.physical = {}
|
||||
balloon_bop.collisionbox = {}
|
||||
|
||||
local round_time_default = 20
|
||||
|
||||
|
@ -36,14 +34,12 @@ arena_lib.register_minigame( modname , {
|
|||
},
|
||||
|
||||
|
||||
-- The prefix (string) is what's going to appear in most of the lines printed by your mod.
|
||||
-- Default is [Arena_lib]
|
||||
-- The prefix (string) is what's going to appear in most of the lines printed by your mod. Default is [Arena_lib]
|
||||
|
||||
prefix = "["..modname.."] ",
|
||||
|
||||
|
||||
time_mode = 'incremental', -- for our sample minigame, we will use incrementing time.
|
||||
-- This will allow us to use on_time_tick if we want to.
|
||||
time_mode = 'incremental', -- for our sample minigame, we will use incrementing time. This will allow us to use on_time_tick if we want to.
|
||||
|
||||
|
||||
hotbar = {
|
||||
|
|
|
@ -154,7 +154,7 @@ local balloon = {
|
|||
--todo: add pop sound
|
||||
return
|
||||
end
|
||||
if moveresult.touching_ground then
|
||||
if moveresult.touching_ground and not(moveresult.standing_on_object) then
|
||||
self._touching_ground = true
|
||||
else
|
||||
--slow our x,z velocities
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
-- replace "sample_minigame" with the mod name here
|
||||
balloon_bop.infohuds = {}
|
||||
|
||||
|
||||
arena_lib.on_start("balloon_bop", function(arena)
|
||||
|
||||
for pl_name,stats in pairs(arena.players) do -- it is a good convention to use "pl_name" in for loops and "p_name" elsewhere
|
||||
|
@ -23,12 +22,6 @@ arena_lib.on_start("balloon_bop", function(arena)
|
|||
scale = {x = 100, y = 100}, -- covered later
|
||||
size = {x = 2 },
|
||||
})
|
||||
balloon_bop.physical[pl_name] = player:get_properties().physical
|
||||
balloon_bop.collisionbox[pl_name] = player:get_properties().collisionbox
|
||||
player:set_properties({
|
||||
physical=false,
|
||||
collisionbox={-.5,0,-.5,.5,0.001,0.5}
|
||||
})
|
||||
end
|
||||
end
|
||||
-- arena.current_round_time = arena.round_time
|
||||
|
@ -59,12 +52,6 @@ arena_lib.on_join("balloon_bop", function(p_name, arena, as_spectator)
|
|||
scale = {x = 100, y = 100}, -- covered later
|
||||
size = {x = 2 },
|
||||
})
|
||||
balloon_bop.physical[p_name] = player:get_properties().physical
|
||||
balloon_bop.collisionbox[p_name] = player:get_properties().collisionbox
|
||||
player:set_properties({
|
||||
physical=false,
|
||||
collisionbox={-.5,0,-.5,.5,0.001,0.5}
|
||||
})
|
||||
end
|
||||
end
|
||||
end)
|
|
@ -49,10 +49,6 @@ arena_lib.on_time_tick("balloon_bop", function(arena)
|
|||
if player then
|
||||
player:hud_remove(balloon_bop.infohuds[pl_name])
|
||||
balloon_bop.infohuds[pl_name] = nil
|
||||
player:set_properties({
|
||||
physical = balloon_bop.physical[pl_name] or true,
|
||||
collisionbox = balloon_bop.collisionbox[pl_name] or {-0.5, 0.0, -0.5, 0.5, 1.0, 0.5},
|
||||
})
|
||||
end
|
||||
end
|
||||
minetest.chat_send_player(pl_name,"Game Over! Your score is ".. arena.score .."!")
|
||||
|
@ -77,11 +73,7 @@ end)
|
|||
arena_lib.on_quit("balloon_bop", function(arena, p_name, is_spectator)
|
||||
player = minetest.get_player_by_name(p_name)
|
||||
if player then
|
||||
player:hud_remove(balloon_bop.infohuds[p_name])
|
||||
player:hud_remove(balloon_bop.infohuds[pl_name])
|
||||
balloon_bop.infohuds[p_name] = nil
|
||||
player:set_properties({
|
||||
physical = balloon_bop.physical[pl_name] or true,
|
||||
collisionbox = balloon_bop.collisionbox[p_name]
|
||||
})
|
||||
end
|
||||
end)
|
Loading…
Reference in New Issue