Merge pull request 'wielditem' (#3) from wielditem into master
Reviewed-on: https://git.minetest.land/epCode/MineClone2/pulls/3
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 582 B |
Before Width: | Height: | Size: 388 B After Width: | Height: | Size: 581 B |
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 571 B |
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 559 B |
Before Width: | Height: | Size: 476 B After Width: | Height: | Size: 637 B |
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 606 B |
Before Width: | Height: | Size: 437 B After Width: | Height: | Size: 618 B |
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 537 B |
Before Width: | Height: | Size: 439 B After Width: | Height: | Size: 541 B |
Before Width: | Height: | Size: 529 B After Width: | Height: | Size: 590 B |
Before Width: | Height: | Size: 759 B After Width: | Height: | Size: 563 B |
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 534 B |
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 639 B |
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 611 B |
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 553 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 601 B |
Before Width: | Height: | Size: 409 B After Width: | Height: | Size: 621 B |
Before Width: | Height: | Size: 866 B After Width: | Height: | Size: 644 B |
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 597 B |
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 527 B |
Before Width: | Height: | Size: 706 B After Width: | Height: | Size: 480 B |
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 600 B |
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 583 B |
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 575 B |
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 436 B |
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 623 B |
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 597 B |
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 607 B |
Before Width: | Height: | Size: 285 B After Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 855 B After Width: | Height: | Size: 559 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 577 B |
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 600 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 521 B |
Before Width: | Height: | Size: 692 B After Width: | Height: | Size: 598 B |
Before Width: | Height: | Size: 356 B After Width: | Height: | Size: 529 B |
Before Width: | Height: | Size: 775 B After Width: | Height: | Size: 595 B |
Before Width: | Height: | Size: 629 B After Width: | Height: | Size: 582 B |
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 580 B |
Before Width: | Height: | Size: 339 B After Width: | Height: | Size: 578 B |
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 521 B |
Before Width: | Height: | Size: 345 B After Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 751 B After Width: | Height: | Size: 606 B |
Before Width: | Height: | Size: 446 B After Width: | Height: | Size: 599 B |
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 605 B |
|
@ -94,6 +94,16 @@ armor.def = {
|
||||||
}
|
}
|
||||||
|
|
||||||
armor.update_player_visuals = function(self, player)
|
armor.update_player_visuals = function(self, player)
|
||||||
|
|
||||||
|
local player_holding = player:get_wielded_item():get_name()
|
||||||
|
if string.find(player_holding,"mcl_tools:") or player_holding == "mcl_mobitems:bone" or player_holding == "mcl_fishing:fishing_rod" then
|
||||||
|
player:set_bone_position("Wield_Item", vector.new(0,3.9,1.3), vector.new(90,0,0))
|
||||||
|
elseif string.find(player_holding, "mcl_bows:bow") then
|
||||||
|
player:set_bone_position("Wield_Item", vector.new(.5,4.5,-1.6), vector.new(90,0,20))
|
||||||
|
else
|
||||||
|
player:set_bone_position("Wield_Item", vector.new(-1.5,4.9,1.8), vector.new(135,0,90))
|
||||||
|
end
|
||||||
|
|
||||||
if not player then
|
if not player then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|