mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-30 22:41:20 +01:00
Fix rails in creative inventory, make minecart with tnt not crash server when exploding, make minecart with tnt slightly more powerful than regular tnt
This commit is contained in:
parent
6d9cae1034
commit
b6e51a3c40
2 changed files with 6 additions and 5 deletions
|
@ -414,12 +414,15 @@ end
|
||||||
local function do_detached_movement(self, dtime)
|
local function do_detached_movement(self, dtime)
|
||||||
local staticdata = self._staticdata
|
local staticdata = self._staticdata
|
||||||
|
|
||||||
|
-- Make sure the object is still valid before trying to move it
|
||||||
|
if not self.object or not self.object:get_pos() then return end
|
||||||
|
|
||||||
-- Apply physics
|
-- Apply physics
|
||||||
if mcl_physics then
|
if mcl_physics then
|
||||||
mcl_physics.apply_entity_environmental_physics(self)
|
mcl_physics.apply_entity_environmental_physics(self)
|
||||||
else
|
else
|
||||||
-- Simple physics
|
-- Simple physics
|
||||||
local friction = self.object:get_velocity()
|
local friction = self.object:get_velocity() or vector.new(0,0,0)
|
||||||
friction.y = 0
|
friction.y = 0
|
||||||
|
|
||||||
local accel = vector.new(0,-9.81,0) -- gravity
|
local accel = vector.new(0,-9.81,0) -- gravity
|
||||||
|
@ -1322,7 +1325,7 @@ register_minecart({
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
if self._boomtimer <= 0 then
|
if self._boomtimer <= 0 then
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
mcl_explosions.explode(pos, 4, { drop_chance = 1.0 })
|
mcl_explosions.explode(pos, 6, { drop_chance = 1.0 })
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
tnt.smoke_step(pos)
|
tnt.smoke_step(pos)
|
||||||
|
|
|
@ -156,6 +156,7 @@ table_merge(SLOPED_RAIL_DEF,{
|
||||||
mesh = "sloped_track.obj",
|
mesh = "sloped_track.obj",
|
||||||
groups = {
|
groups = {
|
||||||
rail_slope = 1,
|
rail_slope = 1,
|
||||||
|
not_in_creative_inventory = 1,
|
||||||
},
|
},
|
||||||
collision_box = {
|
collision_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
@ -217,9 +218,6 @@ local function register_straight_rail(base_name, tiles, def)
|
||||||
mod.register_rail(base_name, base_def)
|
mod.register_rail(base_name, base_def)
|
||||||
base_def.craft = nil; sloped_def.craft = nil
|
base_def.craft = nil; sloped_def.craft = nil
|
||||||
table_merge(base_def,{
|
table_merge(base_def,{
|
||||||
groups = {
|
|
||||||
not_in_creative_inventory = 1,
|
|
||||||
},
|
|
||||||
_mcl_minecarts = {
|
_mcl_minecarts = {
|
||||||
railtype = "straight",
|
railtype = "straight",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue