roman-murashov / hedgewars

Automatically exported from code.google.com/p/hedgewars
GNU General Public License v2.0
0 stars 0 forks source link

Sticky mine: Bug in combination with Highlander #767

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In Highlander mode, if you have sticky mines, shoot the first mine anywhere.
2. Very shortly before move time is over, shoot the second mine towards a hog, 
such that the time expires once the mine is not flying any more.

What is the expected output? What do you see instead?

The mine should explode. Health should be detracted, if the hog dies, the 
player who shot the mine should inherit the weapons.

Actually, since 0.9.20, the first thing which happens is that the turn switches 
to the next player. After the switch, the sticky mine explodes - such that the 
player who shot the mine won't benefit. If the attacked hog dies, the next 
player inherits the attacked hog's weapons (instead of the hog who shot the 
mine).

If we play with vampirism switched on, the next player's health will raise too.

What version of the product are you using? On what operating system?

0.9.20.3-1 on arch linux x84_64
Please provide any additional information below.

Original issue reported on code.google.com by goo...@v.de1.cc on 12 Jan 2014 at 12:25

GoogleCodeExporter commented 8 years ago
This miiiight have been introduced when changing the rule for infinite attack 
sticky mines.
There was a test for "when to activate the sticky mine" that checked 2 rules. 
Both the turnbased rule, and the infinite attack (use a bit of a delay) rule.

The result was that if you fired sticky mine juuust before end of turn in .19, 
you could hit the turn based rule and the mine would explode in mid air due to 
proximity to the thrower.  Or even simply kill the thrower.

In .20 it just checks the delay of one second.  So, it might be that if you 
threw with less than a second on the clock that the turn could successfully 
shift.

I'm not sure restoring the old behaviour is a good idea, but perhaps we could 
tweak the delay.  Maybe shorten it.  Or consider some other condition.

Anyway. Not a major bug.

See r419e5c651870

Original comment by kyberneticist@gmail.com on 12 Jan 2014 at 6:16

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
It is caused by timer not stopping while sticky mine flies.

Original comment by ndig...@gmail.com on 26 Jan 2014 at 3:41