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 #5013 Battlescape crashes when a killed alien drops its weapons on the floor
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue basics
  • Type of issue
    Bug report
  • Category
    Battlescape
  • Targetted for
    2.5
  • Status
    Closed
  • Progress
  • Priority
    6. Vital
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    Not estimated
  • Time spent
    500 hours
    Click here to see time logged against this issue
Issue details
  • Resolution
    RESOLVED
  • Reproducability
    Always
  • 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
commit 49cb7eb260fe2d50e8c24b485ae broke the battlescape.
During a mission, after an alien is killed and its inventory is put on the floor the game crashes, with the error "no weapon given for item"
Steps to reproduce this issue
Start a mission, wait for aliens to show up, then kill one. The games goes back to the world map.

The problem has been introduced in commit 49cb7eb260fe2d50e8c24b485aefbc0585c08799. Stepping in the code, I saw that in G_SendInventory all containers in the inventory of the "floor" entity have id == 0. Therefore using cont->id in ent.getContainer(cont->id) always returns the first container, and not the one that actually contains the items. Looking better at the code, the inventory of the floor is probably never initialized. G_SpawnFloor calls G_Spawn, that in turns get a free Edict from the pool and uses it, but this bypasses the Inventory constructor.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif