Gzdoom quicksave5/19/2023 The Lua interpreter itself is already wrapped in an object that participates in the GC, so when the GC descends to the wrapper, it’s easy to tell it that that set of objects is alive. f3menuload f4menuoptions f5menudisplay f6quicksave f7menuendgame. While gzdoom have already a ready to use quicksave function, it will prompt the first time the. Sol allows customizing how it injects particular types, so I can use that for the type tree that participates in this GC scheme and keep an unordered_set of all objects that are alive in Lua. This file was generated by GZDoom g2.2.0 on Mon Dec 12 20:05:59 2016 These. This gzdoom (and also Zandronum, being it based on an older gzdoom version) bug as hunted me for quite a while, I had sometimes someone reporting it to my and I couldn't recreate it, until eviltechno explained to me this alternative quicksave method. I think I can fix without too much trouble. If an object ends up only being held by Lua, ZDoom will think it’s garbage and delete it prematurely, leaving a dangling reference. Unfortunately, the Lua interpreter is not reachable from ZDoom’s own object tree. The basic idea is to start from some root object and recursively traverse all the objects reachable from that root whatever isn’t reached is garbage and can be deleted. They usually pop up after or before a battle. Check point saves are nearly 30 secs up to 2 min between each other. (This is only the latest version changelog, you can find the full DML version history here) Supported sourceport. It is an entirely checkpoint based save system and as I am sure you have noticed the checkpoints are in very sparse supply and tend to be in spots. Rather, all the game objects participate in tracing garbage collection. GZdoom 'Quicksave.sav' files gets saved in the same directory as the dml 2.X executable instead on the gzdoom one. Turns out TObjPtr doesn’t do reference counting. Eventually Lua reaps the closure, then C++ reaps the closure, then the wrapped AInventory ‘s refcount drops, and all is well. ![]() ![]() I don’t know how I got this idea in my head, but I was pretty sure that ZDoom’s TObjPtr did reference counting and would automatically handle the lifetime problems in the above code. Script "open_church_door" ( int tag ) Ĭ++’s closures are slightly goofy and it took me a few tries to land on this, but it works.
0 Comments
Leave a Reply. |