Page 1 of 1

Entity punching issues

PostPosted: Sun Jun 15, 2014 16:19
by MirceaKitsune
Thread for issue #1376:

Playing around with the the SimpleMobs mod helped me notice some serious problems with the current damage system. When the player punches a mob, that mob will only flash and take damage once. Even if you keep aiming at it and punching, or let go of the left mouse button then press it again, no more damage is dealt from that point on. The only way to deal another blow appears to be looking away from the mob (turning around some 90*) then looking back so the selection box re-appears.

I've read somewhere that Minetest wanted to go for a more original damage system, such as the player having to release the left mouse button and press it again. That doesn't sound like a bad idea, but I really hope that having to look away from the mob and back at it again is a bug, since the current system makes fighting virtually broken. With SimpleMobs, I get killed instantly and fighting is outright impossible, unless I have a sword that kills from the first strike.

If it's a bug, it's hopefully nothing complex and can be fixed. If this is intended, please at least add a setting to disable having to look away from mobs to reset damage! In my game, I'd like to enable constant damage too, so that looking at a mob and holding the attack button down deals damage every 1 second. I'd be grateful if Minetest could allow this and not force the current damage system onto all games and servers even if it stays default.

Re: Entity punching issues

PostPosted: Sun Jun 15, 2014 16:59
by BlockMen
Such problems are not known from my creatures mod, so its not an engine problem at all.

Re: Entity punching issues

PostPosted: Sun Jun 15, 2014 17:05
by Krock
I can kill a player with a single click (using steel sword)

Re: Entity punching issues

PostPosted: Sun Jun 15, 2014 17:53
by MirceaKitsune
BlockMen wrote:Such problems are not known from my creatures mod, so its not an engine problem at all.


Isn't the engine the one that detects when a player punched / clicked an entity or other player? IIRC that part is hard-coded.

Re: Entity punching issues

PostPosted: Sun Jun 15, 2014 19:00
by Krock
Why do you post all your Bugs & Problems on the forums and on GitHub?

Re: Entity punching issues

PostPosted: Sun Jun 15, 2014 19:34
by MirceaKitsune
Krock wrote:Why do you post all your Bugs & Problems on the forums and on GitHub?


Since even so, they'll probably get forgotten in a matter of days, and this increases chances of a developer seeing them years from now when I'll be old, and thinking about helping with the issue :)

But really... I typically post in both places because GitHub is the bug tracker where problems are reported and discussed in more technical terms, while the forums are where things can be debated more idly. So I thought it's the best way to get as many opinions and as much activity on each matter.

Re: Entity punching issues

PostPosted: Sun Jun 15, 2014 20:22
by Calinou
MirceaKitsune wrote:
Krock wrote:Why do you post all your Bugs & Problems on the forums and on GitHub?


Since even so, they'll probably get forgotten in a matter of days, and this increases chances of a developer seeing them years from now when I'll be old, and thinking about helping with the issue :)

But really... I typically post in both places because GitHub is the bug tracker where problems are reported and discussed in more technical terms, while the forums are where things can be debated more idly. So I thought it's the best way to get as many opinions and as much activity on each matter.


I like that idea, it makes sense; maybe you could add a [GitHub] prefix or something like that to your topics.

Re: Entity punching issues

PostPosted: Sun Jun 15, 2014 21:47
by stormchaser3000
MirceaKitsune wrote:Thread for issue #1376:

Playing around with the the SimpleMobs mod helped me notice some serious problems with the current damage system. When the player punches a mob, that mob will only flash and take damage once. Even if you keep aiming at it and punching, or let go of the left mouse button then press it again, no more damage is dealt from that point on. The only way to deal another blow appears to be looking away from the mob (turning around some 90*) then looking back so the selection box re-appears.

I've read somewhere that Minetest wanted to go for a more original damage system, such as the player having to release the left mouse button and press it again. That doesn't sound like a bad idea, but I really hope that having to look away from the mob and back at it again is a bug, since the current system makes fighting virtually broken. With SimpleMobs, I get killed instantly and fighting is outright impossible, unless I have a sword that kills from the first strike.

If it's a bug, it's hopefully nothing complex and can be fixed. If this is intended, please at least add a setting to disable having to look away from mobs to reset damage! In my game, I'd like to enable constant damage too, so that looking at a mob and holding the attack button down deals damage every 1 second. I'd be grateful if Minetest could allow this and not force the current damage system onto all games and servers even if it stays default.


i would agree the damage system needs less of a reload time. mabey even no reload time at all.

Tempertest's_documentary wrote:Minetest's damage system
------------------------
The damage system in Minetest is more complex than just hold down the left mouse button. After the first punch your hand or weapon has a "reload" time. This is for most weapons 1 second. After the reload time the player can punch again.

Re: Entity punching issues

PostPosted: Sun Jun 15, 2014 22:37
by MirceaKitsune
Tempertest's_documentary wrote:Minetest's damage system
------------------------
The damage system in Minetest is more complex than just hold down the left mouse button. After the first punch your hand or weapon has a "reload" time. This is for most weapons 1 second. After the reload time the player can punch again.


In that case, this reload time is broken too. Punching doesn't work again after 1 second like that says it should, it only works after you turn around 90* then look back at the mob to punch again. I wonder if anyone else can confirm to be sure.

Re: Entity punching issues

PostPosted: Mon Jun 16, 2014 18:12
by Calinou
MirceaKitsune wrote:
Tempertest's_documentary wrote:Minetest's damage system
------------------------
The damage system in Minetest is more complex than just hold down the left mouse button. After the first punch your hand or weapon has a "reload" time. This is for most weapons 1 second. After the reload time the player can punch again.


In that case, this reload time is broken too. Punching doesn't work again after 1 second like that says it should, it only works after you turn around 90* then look back at the mob to punch again. I wonder if anyone else can confirm to be sure.


I don't have this problem at all. I've played many hours with mobs and with players, with different kinds of weapons (swords, pickaxes, hand…) with no problem, you just have to wait about 1 second for full damage time.

Note that high-damage weapons (eg. 8 damage with 1 second full punch interval) will let you hold down the left mouse button, dealing 1 damage 5 times per second.

Re: Entity punching issues

PostPosted: Mon Jun 16, 2014 19:14
by MirceaKitsune
Calinou wrote:I don't have this problem at all. I've played many hours with mobs and with players, with different kinds of weapons (swords, pickaxes, hand…) with no problem, you just have to wait about 1 second for full damage time.

Note that high-damage weapons (eg. 8 damage with 1 second full punch interval) will let you hold down the left mouse button, dealing 1 damage 5 times per second.


Ok, now I'm really curious. Because I certainly have the problem I mentioned, and not the behavior you're explaining which sounds correct. Are you running latest GIT too? I'll look through my minetest.conf to see if I find anything relevant... maybe I messed up something related to the input or damage?

Re: Entity punching issues

PostPosted: Tue Jun 17, 2014 07:42
by rubenwardy
I do have this problem, or at least I did the last time I checked.

Re: Entity punching issues

PostPosted: Tue Jun 17, 2014 10:48
by Topywo
Reloading works for me exactly as it is meant. Quick punching, less damage and slow punching, more damage. Works both on players, entities and with different tools. I use one of the latest dev's. Lunbuntu from GitHub.

Re: Entity punching issues

PostPosted: Tue Jun 17, 2014 11:12
by MirceaKitsune
Doesn't the mob entity only flash with the first punch however? Also, to get the slow punch you're mentioning, do you need to step away from a mob or look away from it then back? It's strange if only I'm getting this...

Re: Entity punching issues

PostPosted: Tue Jun 17, 2014 12:03
by MirceaKitsune
Ok, I found an important clue in this problem: If you set armor groups to a high value, punching begins to work normally. Apparently it needs to be above 100... only seems to work beyond 500 or so. The tool you are holding doesn't appear to be relevant.

So if you have self.object:set_armor_groups({fleshy=100}) or lower, you get my issue; The mob only takes damage once, then you need to step away and look away from it before you can do damage again. If you set it to 500 or 1000 however, the mob finally takes damage constantly... although it also dies much quickly?

First of all, why does a higher armor value make the mob more vulnerable, rather than the other way around (more armor meaning more strength)? And is it normal that 100 armor causes you to have to back and look away before you can deal damage again?

Re: Entity punching issues

PostPosted: Tue Jun 24, 2014 17:13
by shaneroach
FWIW, I am having this issue using mobf as well. I have not messed with the armor settings yet.

Re: Entity punching issues

PostPosted: Fri Jun 27, 2014 14:13
by Kalista
Confirmed bug with latest dev build, punch on another player (no weapon) does not work after the initial punch unless you look away and then retarget them(ie: it seems to lose the hitbox between punches aka the AABB)

Additional notes: this is with levelDB as the database in case that is help to anyone trying to solve the issue, I'll try with other DB's and see if the error persists although its more likely a client issue.

Re: Entity punching issues

PostPosted: Fri Jun 27, 2014 16:04
by MirceaKitsune
It's not a LevelDB issue. I don't compile Minetest with it and get the same problem.

Re: Entity punching issues

PostPosted: Mon Aug 10, 2015 09:42
by CProgrammerRU
I have fixed it, I changed the full_punch_interval in minetest.register_tool function to 0. But now it is too easy kill some weak mobs, because you can punch them very fast. So the mobs should have more hp.