UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Bug report #458 Soldier hitpoints shot down to negative value
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Bug report
  • Category
    General
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    6. Vital
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (1)
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    Not estimated
Issue details
  • Resolution
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Complexity
    Not determined
  • Platform
    Not determined
  • Architecture
    Not determined
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/bugs/458 Item 458] imported from sourceforge.net tracker on 2013-01-28 18:21:29

This happened during a network game over internet. A soldier of me got hit by a rocket launcher triggering strange events.

- For my opponent it looked like my soldier surived.
- I rechecked and discovered the soldier disappeared from my screen, but the selection number was still active.
- When clicking on selection No. i saw this soldier had negative Health
- some seconds after discovering that the game crashed
===== Comments Ported from Sourceforge =====

====== cassiterite (2006-11-29 23:16:07) ======

Logged In: YES
user_id=1171370
Originator: NO

Thanks for reporting this bug.

I've changed the code to prevent HP from becoming negative (trunk revision 4976). I initially thought this should fix the problem, but now I realise negative HP is probably allowed, but should never be seen because by the time HP becomes 0 or less, the soldier should be killed (and removed from your selection list).

Can you remember how many HP the soldier had before being hit by the rocket? In RC6 rockets generally don't do a great deal of damage and so if your soldier hadn't been hit before and was in heavy armor, he probably should have have survived.

Also, was the server set-up on your machine or your opponents (i.e. did you create the game or did you join your opponent's game?).
====== zhdophanti (2006-11-29 23:33:58) ======

Logged In: YES
user_id=1649289
Originator: YES

I was host of the game.
Well i don't know exactly how much hitpoints the soldier had
(the game was last week :) ). But as much as i can remember it should have
been something around 50 to 70% percent. I can be wrong, but to me
it seemed like the soldier took a decent amount of damage by the hit.
Anyway the soldier had only light or no armor .. cause it was a sniper
and normally i take armor only for soldiers fighting at the front ;)
====== cassiterite (2006-12-15 13:48:15) ======

Logged In: YES
user_id=1171370
Originator: NO

Zenerka and I have managed to reproduce this bug on a few occasions, although it seems only to be a problem with the rocket launcher and can be tricky to trigger (we are still trying to work out a reliable way of making it happen). Definitely have some leads though, so hopefully a fix won't be too far away.
====== hoehrer (2006-12-18 09:12:18) ======

Logged In: YES
user_id=1434318
Originator: NO

I've committed some small fixed to HP assignment - please try to reproduce the bug with Revision 5289.

Werner
====== cassiterite (2006-12-19 08:31:25) ======

Logged In: YES
user_id=1171370
Originator: NO

hoehrer, I should have been clearer in my previous comment here.

Firstly some background: before any attempts to fix this bug, it was quite common for a damanged actor's HP to be negative server-side and even momentarily in the client after stats are transmitted/received. Both the client and server were able to handle negative HP values with no problems, but the player never really saw this negative HP condition as the server sends a message to kill the actor immediately after updating the stats which of course deletes it from the teamlist.

My initial and flawed attempt at fixing the bug was sufficient for removing this condition... it was no longer possible for negative HPs to reach the client. Testing of course revealed this had no impact on the real bug - the soldier hit with the RPG should have been "killed" (i.e. had 0 HP) but it was not being removed from the teamlist and the game would eventually crash.

Recently I've commited many small bug-fixes that try to address potential causes of the real problem. I have been merging these to 2.0 branch where Zenerka and I have been testing them. In our last session we failed to reproduce this bug after numerous attempts. I would like to test it further before concluding that it is indeed fixed though.
====== cassiterite (2006-12-28 00:01:01) ======

Logged In: YES
user_id=1171370
Originator: NO

After further extensive testing this bug no longer seems to be reproduceable.

Note another bug encountered during testing: I've noticed on the odd occasion soldiers killed by splash damage from an RPG (and possibly other weapons) can be animated as dying/disappearing before the rocket explodes. I mention it here as there is an outside chance it could be related somehow to this bug.

I'm tentatively marking this bug as fixed (with a pending status). Please reopen if anyone encounters it again with current trunk or 2.0 branch.
====== nobody (2006-12-29 14:32:35) ======

Logged In: NO

I believe the "target dies too early" problem is the following (closed) bug - it seems the fix hasn't worked after all:
https://sourceforge.net/tracker/index.php?func=detail&aid=1542759&group_id=157793&atid=805242

Werner
====== sf-robot (2007-01-11 03:20:06) ======

Logged In: YES
user_id=1312539
Originator: NO

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Steps to reproduce this issue
Nothing entered.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif