mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-28 05:21:05 +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 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
|
||||
if mcl_physics then
|
||||
mcl_physics.apply_entity_environmental_physics(self)
|
||||
else
|
||||
-- Simple physics
|
||||
local friction = self.object:get_velocity()
|
||||
local friction = self.object:get_velocity() or vector.new(0,0,0)
|
||||
friction.y = 0
|
||||
|
||||
local accel = vector.new(0,-9.81,0) -- gravity
|
||||
|
@ -1322,7 +1325,7 @@ register_minecart({
|
|||
local pos = self.object:get_pos()
|
||||
if self._boomtimer <= 0 then
|
||||
self.object:remove()
|
||||
mcl_explosions.explode(pos, 4, { drop_chance = 1.0 })
|
||||
mcl_explosions.explode(pos, 6, { drop_chance = 1.0 })
|
||||
return
|
||||
else
|
||||
tnt.smoke_step(pos)
|
||||
|
|
|
@ -156,6 +156,7 @@ table_merge(SLOPED_RAIL_DEF,{
|
|||
mesh = "sloped_track.obj",
|
||||
groups = {
|
||||
rail_slope = 1,
|
||||
not_in_creative_inventory = 1,
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
|
@ -217,9 +218,6 @@ local function register_straight_rail(base_name, tiles, def)
|
|||
mod.register_rail(base_name, base_def)
|
||||
base_def.craft = nil; sloped_def.craft = nil
|
||||
table_merge(base_def,{
|
||||
groups = {
|
||||
not_in_creative_inventory = 1,
|
||||
},
|
||||
_mcl_minecarts = {
|
||||
railtype = "straight",
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue