Author Topic: [Solved] Item Pile Shows Wrong Floorob  (Read 1385 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
[Solved] Item Pile Shows Wrong Floorob
« on: April 12, 2023, 10:02:14 am »
An item pile is supposed to show the floorob of the heaviest item in the pile, for example: an alien corpse (rather than any of the pieces of equipment that the alien was carrying).

Currently, the sorting seems to be using a semi-alphabetical system. As I picked up items off the pile, it would show the floorob of an item slightly higher in the alphabet, however the item pile was only maybe half gone by the time it wrapped back around to near the beginning of the alphabet again, only going forward it seemed to select item floorobs at random all the way to the end of the item pile.

It also seems to be inconsistent, as alien corpses are correctly showing on the ground where the alien died. Alien corpses always seem to go to the top of the pile, while alien artifacts list high on the pile but not necessarily above the equipment which had been brought to the mission.

I can't figure out a pattern to it.

- - - - -

Edit: I realized after some more playing around with it that any pile I make after the mission starts will correctly put all items in order from heaviest to lightest. It is only the starting pile which does not follow this order. On reflection, I think it is quite possible that the initial pile sorting is done by the order in which things were assigned to the craft.

Edit 2: Ah, I see.
« Last Edit: April 12, 2023, 10:33:42 am by The Reaver of Darkness »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9108
    • View Profile
Re: Item Pile Shows Wrong Floorob
« Reply #1 on: April 12, 2023, 10:15:46 am »
attached

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9108
    • View Profile
Re: [Solved] Item Pile Shows Wrong Floorob
« Reply #2 on: April 12, 2023, 10:18:20 am »
for those who don't read IT speak

1. if the pile has more than 100 items, just draw the first one

2. otherwise, if there is any corpse there, draw the first corpse

3. otherwise, draw the first heaviest item


PS: OXC doesn't have points #1 and #2.... they were added in OXCE to speed up map rendering... the calculation of the heaviest item is an expensive operation performed every frame on every tile and with many items (e.g. craft inventory pile) it could slow down the map rendering by 5% or more
« Last Edit: April 12, 2023, 10:21:35 am by Meridian »