Cannon: Use the cannon's and badguy's bounding boxes to calculate the starting position.
authorFlorian Forster <supertux@octo.it>
Thu, 4 Mar 2010 13:13:53 +0000 (13:13 +0000)
committerFlorian Forster <supertux@octo.it>
Thu, 4 Mar 2010 13:13:53 +0000 (13:13 +0000)
commitabb552e92dddcc7f7b1391b4706763a06ca0782e
treed804c972de2753b03bd93cb3b000e7f385c2100e
parent19ca9e56f0d005d8b71860af54ad84e1ad8d703f
Cannon: Use the cannon's and badguy's bounding boxes to calculate the starting position.

The previous code assumed width of no more than 32 pixels to work correctly.
mathnerd314's change in revision 6530 widened that a bit, but could only be
considered a dirty hack. This change should work for arbitrary badguy widths,
moving narrow badguys (Short Fuse, for example) closer to the Cannon when shot
to the left.

SVN-Revision: 6542
src/badguy/dispenser.cpp