Fix crash when loading multiplayer level with outside/terrain player spawn position.
player::start_roomnum and object::roomnum encode a terrain cell number with the highest bit set. So when accessing Terrain_seg[] we need to remove that bit to get a valid index.
Related Issues
Fixes #442
Screenshots (if applicable)
Checklist
[x] I have tested my changes locally and verified that they work as intended.
[x] I have documented any new or modified functionality.
[x] I have reviewed the changes to ensure they do not introduce any unnecessary complexity or duplicate code.
[x] I understand that by submitting this pull request, I am agreeing to license my contributions under the project's license.
Pull Request Type
Description
Fix crash when loading multiplayer level with outside/terrain player spawn position.
player::start_roomnum
andobject::roomnum
encode a terrain cell number with the highest bit set. So when accessingTerrain_seg[]
we need to remove that bit to get a valid index.Related Issues
Fixes #442
Screenshots (if applicable)
Checklist
Additional Comments