Merge remote-tracking branch 'upstream/master' into forkhausen
This commit is contained in:
commit
c6b85fdf93
18 changed files with 73 additions and 51 deletions
|
@ -10,8 +10,7 @@ License of boat model:
|
|||
GNU GPLv3 <https://www.gnu.org/licenses/gpl-3.0.html>
|
||||
|
||||
## Textures
|
||||
All textures are from the Faithful texture pack for Minecraft.
|
||||
See the main MineClone 2 license to learn more.
|
||||
See the main MineClone 2 README.md file to learn more.
|
||||
|
||||
## Code
|
||||
Code based on Minetest Game, licensed under the MIT License (MIT).
|
||||
|
|
|
@ -3,12 +3,6 @@ mcl_minecarts
|
|||
Based on the mod "boost_carts" by Krock.
|
||||
Target: Run smoothly and do not use too much CPU.
|
||||
|
||||
TODO:
|
||||
- Minecraft-like physics
|
||||
- Add activator rail
|
||||
- Add more rail textures
|
||||
- Add loaded minecarts
|
||||
|
||||
License of source code:
|
||||
-----------------------
|
||||
MIT License
|
||||
|
@ -23,10 +17,5 @@ Authors/licenses of media files:
|
|||
Minecart model:
|
||||
22i (GPLv3)
|
||||
|
||||
Wuzzy (based on Pixel Perfection 1.11, MIT License):
|
||||
carts_rail_crossing_pwr.png
|
||||
carts_rail_curved_pwr.png
|
||||
carts_rail_t_junction_pwr.png
|
||||
|
||||
Other texture files (CC BY-SA 3.0:
|
||||
Texture files (CC BY-SA 3.0):
|
||||
XSSheep
|
||||
|
|
|
@ -933,14 +933,25 @@ local do_env_damage = function(self)
|
|||
and (nodef.groups.disable_suffocation ~= 1)
|
||||
and (nodef.groups.opaque == 1) then
|
||||
|
||||
-- 2 damage per second
|
||||
-- TODO: Deal this damage once every 1/2 second
|
||||
self.health = self.health - 2
|
||||
-- Short grace period before starting to take suffocation damage.
|
||||
-- This is different from players, who take damage instantly.
|
||||
-- This has been done because mobs might briefly be inside solid nodes
|
||||
-- when e.g. climbing up stairs.
|
||||
-- This is a bit hacky because it assumes that do_env_damage
|
||||
-- is called roughly every second only.
|
||||
self.suffocation_timer = self.suffocation_timer + 1
|
||||
if self.suffocation_timer >= 3 then
|
||||
-- 2 damage per second
|
||||
-- TODO: Deal this damage once every 1/2 second
|
||||
self.health = self.health - 2
|
||||
|
||||
if check_for_death(self, "suffocation", {type = "environment",
|
||||
pos = pos, node = self.standing_in}) then
|
||||
return true
|
||||
if check_for_death(self, "suffocation", {type = "environment",
|
||||
pos = pos, node = self.standing_in}) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
else
|
||||
self.suffocation_timer = 0
|
||||
end
|
||||
|
||||
return check_for_death(self, "", {type = "unknown"})
|
||||
|
@ -3349,7 +3360,7 @@ minetest.register_entity(name, {
|
|||
replace_offset = def.replace_offset or 0,
|
||||
on_replace = def.on_replace,
|
||||
timer = 0,
|
||||
env_damage_timer = 0, -- only used when state = "attack"
|
||||
env_damage_timer = 0,
|
||||
tamed = false,
|
||||
pause_timer = 0,
|
||||
horny = false,
|
||||
|
@ -3396,6 +3407,7 @@ minetest.register_entity(name, {
|
|||
shoot_arrow = def.shoot_arrow,
|
||||
sounds_child = def.sounds_child,
|
||||
explosion_strength = def.explosion_strength,
|
||||
suffocation_timer = 0,
|
||||
-- End of MCL2 extensions
|
||||
|
||||
on_spawn = def.on_spawn,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue