DarianLStephens / hamlet-dst

DST in Hamlet! With a particular focus on the interior system
3 stars 0 forks source link

WARNING: Storage collision when entering 2 interiors and exiting a lower one. #1

Closed DarianLStephens closed 2 years ago

DarianLStephens commented 2 years ago
I think it's because it uses the array length, when it should be checking the stored offset of every loaded interior.
    Possibly good for a new function, 'GetFreeOffset', or GetNextFreeOffset'? 'FindFreeOffset'?
        Just continually loop through interior.storage_offset?

        I have an idea:
            for ipairs the loaded interior list, local number, + 1 for every iteration until you find one that doesn't match! Either we run off the end, or find an empty spot.
                Or could probably just use k, but this is maybe more reliable? Dunno.
DarianLStephens commented 2 years ago

Pretty sure the problem is line #1885.

DarianLStephens commented 2 years ago

Seems to be fixed in commit 4.