Nothing entered.
[http://sourceforge.net/p/ufoai/bugs/2233 Item 2233] imported from sourceforge.net tracker on 2013-01-28 19:26:38
tested using version svn:27596
open a map and select my sniper, he has 31 TU available
I make him crouch - consumes 3 TU - remaining 28
I reserve TU for 1 shot - saves 12 TU in green - 16 TU agailable for movement.
I make the unit move north 4 squares and north west 1 in one path. - consumes 16 TU (see attached screen shot. note, I blacked out some sections to improve compression)
after the unit has moved, the remaining TU is 11, however in order to perform reaction fire, the unit needs 12.
The unit moved more than the reserved value.
This issue appears to be related to the way the crouched movement is calculated. the unit stands and walks, and at the end of the turn crouches. however I think the calculation is expecting the unit to crouch move the whole way.
if I move the unit one tile at a time in the path, the movement can be done in 16 TU.
===== Comments Ported from Sourceforge =====
====== markhawrylak (2009-12-23 12:06:02) ======
====== voovoos (2009-12-31 17:12:30) ======
Confirmed. Can be reproduced but only under these conditions:
a) soldier is crouched
b) soldier uses autocrouch feature (stands, moves, crouches)
c) currentTU - reservedTU - expectedTU (value written over bounding box) = 0
d) always only one TU unit is missing after move (for example, should be 12 reserved, is 11)
Can you confirm that these are conditions for reproducing this?
====== markhawrylak (2010-01-01 10:51:49) ======
I am not quite sure of your explanation of point C.
Point D is correct, the unit ends up with 11TU remaining and 12 reserved. the unit moved beyond reserved TU,
Despite the bounding box saying that the move will take 16 TU (as per screen shot), the movement cost was actually 17 TU. hope that helps.
====== voovoos (2010-01-03 00:47:34) ======
Fixed in r27771
Please test and report back here.
====== markhawrylak (2010-01-03 06:30:05) ======
Tested on r27771. the issue appears to be resolved,
however you have introduced a new issue.
1. when a unit is crouched with no reserved TU and has 3 remaining TU, the unit cannot Move, rorate or stand, despite there being 3TU available.
2. when a unit is couched, and has reserved TU for shot + 3, the unit cannot consume the 3 spare TU by moving or rotating, or standing.
====== tlh2000 (2010-01-06 07:02:00) ======
we have the reserved TUs on the server side now, so we should use it in the server - and only the client side code for predictions. Things might change in the server that the client can't know at the time the gamer send his actor.
====== markhawrylak (2010-01-06 07:11:41) ======
tested in r27866 - TEST PASSED
OK the initially raised issue is resolved. the introduced issues 1 and 2 are also resolved.
nice work guys, I know how complex this stuff can be.
closing defect