#30 Dropped Items Invisible on Reload

closed-fixed
nobody
gameplay (11)
5
2011-06-18
2011-04-15
Enness
No

Occasionally, pickups spawned from killed monsters (in particular, the spheres created from the Crusader's Holy Strength ability) will become invisible if the game is saved directly next to them and reloaded. The items are still there, however, and can be collected as normal if you touch them.

I was able to reproduce this easily by killing an enemy until a sphere appeared, then saving and immediately loading the game just saved. I have verified that it affects both OpenGL and Software modes.

It appears to happen with other items dropped from killed monsters. Items placed on the map initially, or spawned from destroyed containers, appear to be unaffected by the glitch.

Currently using Version 1.5.0 rc-1. I am unaware whether this is present in earlier versions, or in the original engine.

Discussion

1 2 > >> (Page 1 of 2)
  • Enness

    Enness - 2011-04-15
    • priority: 5 --> 2
     
  • Enness

    Enness - 2011-04-15
    • priority: 2 --> 3
     
  • Enness

    Enness - 2011-04-15

    A quick update, as I am unable to edit...

    I've just winessed a dropped Chaos Device, and a Holy Strength sphere, save and reload properly. Reproductability may be more intermittent than I originally thought.

    I went back to a save at the start of hub 4 to test a bit more. First I was able to get a sphere to vanish completely across save/load, as if it had not existed. In a second test, the cross from the sphere's center survived save/load while the outer orb did not. A third test again failed to maintain it at all. And a fourth produced two spheres, only one of which survived though it was invisible.

    (I now regret so quickly lowering the priority, with the impression it was merely a graphical glitch. So that explains the back-and-forth changes. I think this can now be classes as a gameplay bug, as well.)

     
  • Enness

    Enness - 2011-04-15
    • labels: 691119 --> gameplay
    • priority: 3 --> 5
     
  • Ozkan Sezer

    Ozkan Sezer - 2011-04-15

    Hmm, didn't try making a Holy Strength thing to appear, but I tried by using the "drop key" (backspace, by default), dropped many items, saved and loaded, saw that some of them were lost. However, waited a few seconds and noticed that the game's behavior is to lose them after a time. Never would have imagined testing the gameplay this way ;)
    And right, I don't think that this is a graphical glitch, it should be something in the HexenC (game) code. Low priority, but noted.

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-16

    There has been a fix suggested for this bug, but it may need some more testing. (see the attached num_edicts.patch. Thomas' analysis follows:

    "We both know that the goodies in the Temple of Mars aren't restored
    after re-entering the level. I also wondered why randomly spawned
    items by killed monsters were only occasionally restored, even though
    they had been written to the savegame. The key to this bug is
    sv.num_edicts.

    When a savegame is loaded, host_cmd.c::LoadGamestate is called; via
    sv_main.c::SV_SpawnServer pr_edict.c::ED_LoadFromFile is executed
    which parses all entities from the map in the .pak file as if a fresh
    level were loaded and has them initiated one after another; quite a
    number of entities (lights for instance) remove themselves and only
    those, that do not, have sv.num_edicts incremented.

    During game play, sv.num_edicts sometimes needs to be adjusted (i.e.
    incremented) when all slots are occupied, either because entities
    bound to be freed haven't been freed yet or none have been freed
    longer than 0.5s ago (see pr_edict.c::ED_Alloc). When a savegame is
    loaded, entities are restored all right, but sv.num_edicts isn't
    adjusted accordingly; so all entities the index of which exceeds the
    value of sv.num_edicts after a fresh level load are ignored by
    SV_Physics. This is always the case with the goodies in the Temple of
    Mars as they are only spawned after ED_LoadFromFile is executed, but
    no monster or other entity has been freed yet.

    [...]
    The fact that SV_Physics ignores the Tome even though it's there means
    that we have to increase the boundary by 1 and - tada - it reappears.
    It's probably due to the fact that the world is an entity too, but its
    entity number is 0.
    [...]
    It is indeed so, checked with SV_Edicts at various loading stages.
    This can also be easily verified by loading a fresh level, running
    'edictcount' and then 'edict [edictcount#]' which results in an error
    message "Bad edict number" whereas edict #-1 doesn't; thus

    if (entnum >= sv.num_edicts)
    {
    Con_DPrintf("%s: entnum %d >= sv.num_edicts (%d)\n",
    __thisfunc__, entnum, sv.num_edicts);
    if (entnum < MAX_EDICTS)
    sv.num_edicts = entnum + 1;
    }

    ... should be correct."

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-16

    a save demonstrating the issue (requires portals game)

     
    Attachments
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-16

    another save demonstating the issue (requires portals game)

     
    Attachments
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-16

    suggested fix patch by Thomas

     
    Attachments
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-18

    a save demonstrating the issue in nightmare mode (needs portals game)

     
    Attachments
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-18
    • status: open --> closed-fixed
     
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-18

    This is fixed in the svn repository as of revision 4053 today. Test builds for win32 and win64 are attached here: please test and give us feedback.

    If all goes well, the fix will be integrated in the next formal release. Closing this bug as fixed.

     
  • Enness

    Enness - 2011-06-18

    With the test build, I am unable to produce the glitch in the whole of Romeric1 (or Demo1). :)

    The only glitch I encountered seems unlikely to be related to the fix, but here it is: After fighting the first Medusa, (god mode as otherwise it wopuld've wiped me at that range :P ) I saved and reloaded to test the persistence of what it dropped. After loading, I was unable to move as if trapped in my own hitbox - Projectiles could not escape either.

    Seeing as the Medusa has an attack that seems to do something similar, I'm suspicious... I'll be glad to file a separate report if you can confirm that it most likely wasn't broken by the patch.

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-18

    Hello Enness: Glad to hear that the load glitch is solved for you too.

    As for the new problem you are reporting: I don't know how to reproduce it, so I don't know whether it is related (I don't think it is related though..). Can you give us a save before and after the fight? Can you reproduce the issue using an exe without the load fix (such as an unmodified 1.5.0-rc3)?
    (In any case, even if it is an unlikely aftermath of the load fix, please open a new bug item for it, so that it can be followed more easily.)

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-18

    I forwarded your medusa issue to Thomas. In addition to what I already
    mentioned in the previous response, here is what he has to say:
    "He's probably, what the game calls, stoned? ... one becomes incapable
    of movement, health drops to 1 or so and when the medusa comes close it
    smashes you to pieces - even with the Icon of the Defender active (I
    think god mode does protect you, but I'm not sure). ... really doesn't
    sound as if it were related to the patch. Would be interesting to see
    what it looks like with chase_active." (i.e. "chase mode" in the menu)

    It'd be also good to know whether you were able to move before loading
    the game for certain.

     
  • Enness

    Enness - 2011-06-18

    Alright, I'll start a tracker if I can reproduce that.

    Oddly, in the process, I encountered another case where the outer sphere of a Holy Strength vanished between save and load. The center (and the item itself) remained, so I wonder if there's still an obscure glitch involved with generated effects. I have a save of this, which I can share if needed.

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-19

    > Oddly, in the process, I encountered another case where the outer
    > sphere of a Holy Strength vanished between save and load. The center
    > (and the item itself) remained, so I wonder if there's still an
    > obscure glitch involved with generated effects. I have a save of
    > this, which I can share if needed.

    Yes, please post the save.

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-19

    broken Holy Strength save

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-19

    Attached your save here so it doesn't get lost.

    Tried loading your s10, I started floating around (many ""scooted Unstuck. messages in developer mode), and when I touched the sphere it gave an error:
    ADDRESS 15137(?) 174(think).think 15138(?)
    soul.hc : crusader_soul_touch
    soul.hc : crusader_soul_touch
    assignment to world entity
    Host_Error: Program error

    There is something wrong with the save itself, I think. Forwarded it to Thomas.

    As for the s11 save, I don't have a problem with it, although no matter what I did I wasn't able to make her drop a sphere yet ;)

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-19

    suggested fix for the "soul sphere bug"

     
    Attachments
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-19

    good sphere save after the s11 save from the H2_Saves_BrokenItem.7z archive

     
    Attachments
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-19

    It seems like your s10 save was "re-saved" after loading it which lead to interesting things.. And this was due to another bug, not an aftermath of the original glitch's fix.

    Thomas located the bug and suggested a fix (LoadGamestate-2.diff attached here). I attached new test builds for win32 and win64. Please test and give us feedback. (Note, however, this will not fix your s10, i.e. the one found in H2_Saves_BrokenItem.7z, because it was broken by the bug. I attached a "goodsphrere" save here for your reference.)

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-19

    new test build for windows (win64 / x64)

     
    Attachments
  • Ozkan Sezer

    Ozkan Sezer - 2011-06-19

    new test build for windows (32 bit / x86)

     
    Attachments
1 2 > >> (Page 1 of 2)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks