UFO: Alien Invasion Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report #297  -  After bad hit:294 TUs for a soldier but no movement possible
Posted Sep 04, 2006 - updated Jan 28, 2013
icon_info.png This issue has been closed with status "Closed" and resolution "Not determined".
Issue details
  • Type of issue
    Bug report
  • Status
     
    Closed
  • Assigned to
     cassiterite
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     kerner_debug
  • Owned by
    Not owned by anyone
  • Estimated time
    Not estimated
  • Category
    Battlescape
  • Resolution
    Not determined
  • Priority
    2. Low
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Targetted for
    icon_milestones.png Not determined
  • Complexity
    icon_customdatatype.png Not determined
  • Platform
    icon_customdatatype.png Not determined
  • Architecture
    icon_customdatatype.png Not determined
Issue description
Item 297 imported from sourceforge.net tracker on 2013-01-28 18:15:21

SVN:3303 Map:japan06n

System: SuSE 10.1 xorg-x11-server-6.9.0-50.20 fglrx_6_9_0_SUSE101-8.27.10-1 (ATI Saphire RV350)

See attached screenshots(ufo08.jpg),the TU calculation get wrong.First there are too many(>200),but there are not enough time units to move(even not 1m),and afterwards the bar for movement is scaled wrong(ufo09.jpg)

console.log:
=============================== ⇑ top
New morale is 2 - entity morale is 2 New morale is 201 - entity morale is 201 ExecuteString: 'deselpr' ExecuteString: 'deselsr' ExecuteString: 'deselpl' ExecuteString: 'deselsl' MSG_WriteByte: range error -7 ('game/g_client.c', line 90) Jenniver Gibson ist verwirrt ExecuteString: 'dispr' ExecuteString: 'dissr' ExecuteString: 'displ' ExecuteString: 'dissl' ExecuteString: 'deselfloor0' ExecuteString: 'deselfloor1' ExecuteString: 'deselfloor2' ExecuteString: 'disfloor3' ExecuteString: 'disfloor4' ExecuteString: 'disfloor5' ExecuteString: 'disfloor6' ExecuteString: 'disfloor7' ExecuteString: 'selfloor0' CL_PlaceItem: shared container: '0x19b51f18' Team 7 ended round, team 0's round started! Team 0 ended round, team 1's round started! ExecuteString: 'startround' ExecuteString: 'levelup' ExecuteString: 'deselfloor0' ExecuteString: 'deselfloor1' ExecuteString: 'deselfloor2' ExecuteString: 'disfloor3' ExecuteString: 'disfloor4' ExecuteString: 'disfloor5' ExecuteString: 'disfloor6' ExecuteString: 'disfloor7' ExecuteString: 'selfloor1' ExecuteString: '+select 178 2335997' ExecuteString: 'deselpr' ExecuteString: 'deselsr' ExecuteString: 'deselpl' ExecuteString: 'deselsl' ExecuteString: 'tostand' ExecuteString: 'startreaction' ExecuteString: 'hudselect0' ExecuteString: 'huddeselect1' ExecuteString: 'huddeselect2' ExecuteString: 'huddeselect3' ExecuteString: 'huddeselect4' ExecuteString: 'huddeselect5' ExecuteString: 'huddeselect6' ExecuteString: 'huddeselect7' ExecuteString: 'tostands' ExecuteString: 'tostanda' ExecuteString: '' ExecuteString: 'startreactions' ExecuteString: 'startreactiona' ExecuteString: '' ExecuteString: 'hudselects0' ExecuteString: 'hudselecta0' ExecuteString: '' ExecuteString: '-select 178 2336105' ExecuteString: 'screenshot' ExecuteString: '+select 178 2347282' MSG_WriteFormat: bbs MSG_WriteFormat: g Nicht genug Zeiteinheiten ExecuteString: '-select 178 2347379' ExecuteString: '+select 178 2353167' MSG_WriteFormat: bbs MSG_WriteFormat: g Nicht genug Zeiteinheiten ExecuteString: '-select 178 2353308' ExecuteString: 'screenshot'
=========================== ⇑ top
Comments Ported from Sourceforge  ⇑ top
kerner_debug (2006-09-04 14:22:39)  ⇑ top
TUs wrong
kerner_debug (2006-09-04 14:23:22)  ⇑ top
Wrong scaled TU-Bar
cassiterite (2006-09-04 15:56:06)  ⇑ top
Logged In: YES user_id=1171370

I've applied a patch that should fix this (applied to SVN trunk as rev 3310).

The error I believe is in the server, possibly in the morale adjustment function (which can reduce time-units and lacked a check on if this made them negative). A negative time-unit is likely to cause this error: MSG_WriteByte: range error -7 ('game/g_client.c', line 90)

and alias the timeunits when received by the client (essentially to be 255 units too high).

The check I implemented ensures negative time-units are never sent to the client which should fix this issue.
rechner-tester (2006-09-07 13:17:13)  ⇑ top
Logged In: YES user_id=1363849

Wouldn't it be better to avoid negative TU on the server instead of not sending them to the clients? I'm quite sure this bug will be seen in the future again, also when your fix maybe okay for the moment.
Steps to reproduce this issue
Nothing entered.