ITEMS/mcl_armor: Fix armor rendering when wearing pumpkin #244

Merged
erlehmann merged 1 commits from fix-pumpkin-armor-rendering-2 into master 2022-01-23 20:59:15 +01:00
Owner
Problem

TRACKING ISSUE: #45

Body armor is rendered in correctly when one is wearing a pumpkin on their head as armor.

This PR is a fixed version of #242 which did not cherry-pick.

Solution

Correctly overlay the armor texture on the player texture.

Details

See MineClone2 issue: MineClone2/MineClone2#1277

This was cherry-picked from MineClone2: 12192d1a8d

Testing Steps
Verify Bug
  1. Go into a Mineclonia world in commit 3b92d060f4
  2. Put on body armor.
  3. Put on a pumpkin in the armor slot for the head armor.
  4. Press go into 3rd person perspective (default: Press C).
  5. See that the player is holding the texture of the body armor
Verify Patch
  1. Check out Mineclonia commit 6bfb97842f
  2. Go into the same world again
  3. Press C to go into 3rd person perspective
  4. See that the armor looks normal now
  5. For each armor slot, put some armor in it and take it out again and see that it looks right.

note: This PR does not fix the issue that armor is applied improperly when you swap armor in the armor slots. see #46

##### Problem TRACKING ISSUE: #45 Body armor is rendered in correctly when one is wearing a pumpkin on their head as armor. This PR is a fixed version of https://git.minetest.land/Mineclonia/Mineclonia/pulls/242 which did not cherry-pick. ##### Solution Correctly overlay the armor texture on the player texture. ##### Details See MineClone2 issue: https://git.minetest.land/MineClone2/MineClone2/issues/1277 This was cherry-picked from MineClone2: https://git.minetest.land/MineClone2/MineClone2/commit/12192d1a8ddffdae1ec13ea8f6efc6fe2465c2b8 ##### Testing Steps ###### Verify Bug 1. Go into a Mineclonia world in commit 3b92d060f493f4dd18a2fab268ee699fa460cd3f 2. Put on body armor. 3. Put on a pumpkin in the armor slot for the head armor. 4. Press go into 3rd person perspective (default: Press C). 5. See that the player is holding the texture of the body armor ###### Verify Patch 1. Check out Mineclonia commit 6bfb97842fb61f7d7c36fa13cc583a838f5cce65 2. Go into the same world again 3. Press C to go into 3rd person perspective 4. See that the armor looks normal now 5. For each armor slot, put some armor in it and take it out again and see that it looks right. note: This PR does not fix the issue that armor is applied improperly when you swap armor in the armor slots. see https://git.minetest.land/Mineclonia/Mineclonia/issues/46
erlehmann added 1 commit 2022-01-23 20:18:41 +01:00
6bfb97842f
Fix armor rendering when wearing pumpkin
Before this patch, wearing a pumpkin would make body armor render as a
corrupted item held in the player's left hand instead of on their body.
Some parts of their armor would also get rendered on the player's feet.

(cherry picked from commit 12192d1a8d)
Li0n_2 approved these changes 2022-01-23 20:50:56 +01:00
Li0n_2 left a comment
Member

I followed the testing instructions. lgtm

I followed the testing instructions. lgtm
erlehmann merged commit b1b96e3fac into master 2022-01-23 20:59:15 +01:00
erlehmann deleted branch fix-pumpkin-armor-rendering-2 2022-01-23 20:59:31 +01:00
This repo is archived. You cannot comment on pull requests.
No description provided.