Compare commits

...

3 Commits
5.1.1 ... 5.2.0

Author SHA1 Message Date
sfan5
da8ecc1d68 player_api: Prevent knockback when player is set as attached
This is not directly related to player models but fits well
as a convenience feature in player_api.
2020-03-17 22:08:36 +01:00
An0n3m0us
1965e21b1e Player model: Add bobbing to walk animation, more subtle standing animation 2019-12-23 02:14:25 +00:00
Paramat
7d2827522c Move hotbar code/textures, and damage sound, from player_api to default
These are unrelated to the Player API and player object.
All other GUI/HUD code and textures are in default.
All other engine hardcoded sounds are in default.
The player_api mod is highly likely to be used unchanged in new games,
so logical grouping of content will help the creation of new games.
2019-10-18 02:43:06 +01:00
9 changed files with 15 additions and 42 deletions

View File

@@ -4,6 +4,7 @@ See license.txt for license information.
Provides an API to allow multiple mods to set player models and textures.
Also sets the default model, texture, and player flags.
This mod is only for content related to the Player API and the player object.
Authors of source code
----------------------
@@ -16,17 +17,13 @@ stujones11 (CC BY-SA 3.0):
character.b3d
character.blend -- Both derived from a model by MirceaKitsune (CC BY-SA 3.0)
An0n3m0us (CC BY-SA 3.0):
character.b3d
character.blend -- Player animation improvement
Jordach (CC BY-SA 3.0):
character.png
paramat (CC BY-SA 3.0):
gui_hotbar.png
gui_hotbar_selected.png
celeron55, Perttu Ahola <celeron55@gmail.com> (CC BY-SA 3.0):
player.png
player_back.png
sonictechtonic (CC BY 3.0):
https://www.freesound.org/people/sonictechtonic/sounds/241872/
player_damage.ogg

View File

@@ -96,6 +96,15 @@ end)
local player_set_animation = player_api.set_animation
local player_attached = player_api.player_attached
-- Prevent knockback for attached players
local old_calculate_knockback = minetest.calculate_knockback
function minetest.calculate_knockback(player, ...)
if player_attached[player:get_player_name()] then
return 0
end
return old_calculate_knockback(player, ...)
end
-- Check each player and apply animations
minetest.register_globalstep(function(dtime)
for _, player in pairs(minetest.get_connected_players()) do

View File

@@ -31,6 +31,4 @@ minetest.register_on_joinplayer(function(player)
{x = 200, y = 219},
30
)
player:hud_set_hotbar_image("gui_hotbar.png")
player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
end)

View File

@@ -22,7 +22,7 @@ Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Copyright (C) 2011-2018 celeron55, Perttu Ahola <celeron55@gmail.com>
Copyright (C) 2012-2018 Jordach
Copyright (C) 2018 stujones11
Copyright (C) 2018 paramat
Copyright (C) 2019 An0n3m0us
You are free to:
Share — copy and redistribute the material in any medium or format.
@@ -51,34 +51,3 @@ rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/3.0/
------------------------------------
Attribution 3.0 Unported (CC BY 3.0)
Copyright (C) 2014-2018 sonictechtonic
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by/3.0/

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B