Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

player texture brightens on damage #5739

Closed
DS-Minetest opened this issue May 9, 2017 · 19 comments

Comments

@DS-Minetest
Copy link
Contributor

commented May 9, 2017

It's a bug that many people experienced already. The player's texture becomes brighter and brighter. I thought, a mod would cause it but no. Probably this also happens with any other entity. Normally the brightening effect should wear off after ~1 second. But if you get much times damage at once (eg. from many mobs or radiation), it doesn't.

some links, that were given to me

https://github.com/minetest/minetest/blob/master/src/content_cao.cpp#L1759
https://github.com/minetest/minetest/blob/master/src/content_cao.cpp#L1311
https://github.com/minetest/minetest/blob/master/src/content_cao.cpp#L1233
c57b4f

@rubenwardy rubenwardy changed the title player texture brightens player texture brightens on damage May 9, 2017
@Fixer-007

This comment has been minimized.

Copy link
Contributor

commented May 9, 2017

I think I've seen that too

@ExeterDad

This comment has been minimized.

Copy link

commented May 9, 2017

I can confirm this as well. I thought it was related to our skins mod so I didn't think much of it. I've also noticed after a player is killed, They appear white.

@paramat

This comment has been minimized.

Copy link
Member

commented May 10, 2017

Didi it perhaps go red a while ago and now goes pale? I've noticed this too it seemed weird.

@GreenXenith

This comment has been minimized.

Copy link
Contributor

commented May 10, 2017

It has never gone red in the past. It has always gone white with a smoke puff. The player HUD flashes red and fades but the model doesn't (and hasn't).

@Calinou

This comment has been minimized.

Copy link
Member

commented May 10, 2017

This is not really a bug (at least, I think), though the implementation can lead to confusion – since March 2012 or so, players being hit by you will flash white, the duration will depend based on the damage dealt. Since somewhere in 2015 or 2016, players receiving any damage will flash white, not just players you hit. (Also, they will flash white if you hit them even if PvP is disabled.)

A smoke puff also appears when you kill any entity directly, including a player. It's just a single, non-animated texture that stays present for 1 second (it can also appear several times if you "kill" the entity more than once due to lag).

@DS-Minetest

This comment has been minimized.

Copy link
Contributor Author

commented May 10, 2017

@Calinou The bug is that the texture doesn't become normal again sometimes.

@kilbith

This comment has been minimized.

Copy link
Contributor

commented May 17, 2017

I can reproduce it. After a serie of hits :

screenshot_20170517_152258

@stujones11

This comment has been minimized.

Copy link
Contributor

commented May 17, 2017

Fix #5767

@lhofhansl

This comment has been minimized.

Copy link
Contributor

commented May 13, 2018

Looks like this is happening again now.
Not exactly sure when it started. Made a feeble attempt to track it down, but didn't find the culprit, yet.

@paramat paramat reopened this May 13, 2018
@lhofhansl

This comment has been minimized.

Copy link
Contributor

commented May 13, 2018

OK... Figured it out. The modifier is passed as const std::string &mod. It should be passed by value; otherwise we may pass the same reference around. The comment right above the definition in content_cao.h even states that.

See 8e0b80a

@lhofhansl

This comment has been minimized.

Copy link
Contributor

commented May 13, 2018

Will file a new PR, or we can make the two line change in place. Fine either way. :)

@DS-Minetest

This comment has been minimized.

Copy link
Contributor Author

commented Sep 20, 2018

#7332 was merged, this can be closed again (if I didn't get anything wrong).

@SmallJoker

This comment has been minimized.

@SmallJoker SmallJoker reopened this May 23, 2019
@LoneWolfHT

This comment has been minimized.

Copy link

commented May 25, 2019

Could this be fixed? Or is the fix a little more complex than I think it'll be?

SmallJoker added a commit that referenced this issue May 26, 2019
The old texture modifier is restored by passing `m_previous_texture_modifier`.
Either copy it manually or let the function parameter do that.

Victims so far:
8e0b80a Apr 2018
eb2bda7 May 2019
@SmallJoker

This comment has been minimized.

Copy link
Member

commented May 26, 2019

@SmallJoker SmallJoker closed this May 26, 2019
@ClobberXD

This comment has been minimized.

Copy link
Contributor

commented Jun 27, 2019

I don't think this issue has been fixed yet. I faced this issue quite a few times today. MT is at 91d244c (latest at the time of compiling today). Ironically, I haven't encountered this bug ever before, and it started showing up only after I updated to a1459a9. Strangely, this happens only on a local server, where I run two instances of MT on the same machine, one being the server+client and the other being the client.

Steps to reproduce

  • Kill a player on a local server.
  • Observe that their skin isn't restored to normal upon the last hit, when they die.
  • Observe that their skin is permanently white from then (the first death) onwards.

I'll try to make a video soon. Please re-open this issue.

@rubenwardy rubenwardy reopened this Jun 27, 2019
@LoneWolfHT

This comment has been minimized.

Copy link

commented Jun 27, 2019

This was fixed for me

@SmallJoker

This comment has been minimized.

Copy link
Member

commented Jun 27, 2019

Ensure it's a clean build, so that any build issues can be excluded as possible cause. The patch worked fine, fixed the issue for me.

@ClobberXD

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2019

Can't reproduce with a clean build after numerous attempts. Sorry for the trouble. This issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.