-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alt room refactoring #384
Alt room refactoring #384
Conversation
in room_sector_s: sector_above, sector_below was replaced by room_above, room_below; rooms swapping was disabled; TODO: delete all unused code from room module; clean up disabled code in render module; implement swap room algorithm (big function);
…t_room_refactoring
alt room info in room_s: alternate_room_next, alternate_room_prev (just alt rooms list pointers), real_room (active in game room with portals); TODO: using Physics_SetOwnerObject cause problems on level destrucruction; activate flip room function (and update flip conditions); check all rooms getting usage (add check real where it is necessary);
fixed real_room pointer calculation;
Fixed Sectors_Is2SidePortals(...) function (I still not complete understand how tweens generation works between two rooms in case of alt rooms); World_SetFlipState(...) was partial enabled; TODO: fix rendering in case of camera inside portal (in rooms border); made World_SetFlipState() fully working; WorldRoom_FindRealRoomInSequence(...): replace "min id" by "where to portals lead" condition;
World_SetFlipState(...) function is fully enabled;
real room are calculated by near rooms portals;
In Tomb of Qualopec portal from room 18 to room 11 doesn't work, Lara can't pass. In Cistern swapping to water room doesn't transfer its water attribute, only the water surface is seen. #343 is still valid. In altroom4 test level Lara starts in a wrong room. In altroom1 test level room swapping doesn't work. |
"In altroom1 test level room swapping doesn't work." - I test it, it does not works because I stay as is swapping sequence (if I swap 3 cycled rooms from 1 to 3, then 1 made full turn and no changes for 1 (real room), 2 and 3 changed). How to correctly swap rooms? does I need to mark next_alt_room as swapped / unswapped (like world.cpp str 976)? |
|
about altroom initial pickable objects state: in Natla's mines pistols and large med is accessible before 3 puzzle hole activation (or it is an additional script with objects enabling / disabling)? |
… bullet crash); added paranoid real rooms checking to renderer and frustums building; fixed Room_SwapContent(...) function; fixed World_SetFlipState(...) function;
Are you sure it's altroom1? There are only two that should be swapped. One has a raised cube and the other doesn't. |
if rooms are cycled, swapping does twice, so no visible changes |
altroom1 passed; |
There is something wrong with the water rooms in Cistern. After swapping rooms, Lara can still swim in the air after climbing from water. There are no changes in Tomb of Qualopec and altroom4 also. |
I'm not sure. But in TR3 NPC inventory is kept under their feet. Maybe that's the same? |
fixed character height info calculation; fixed HACK in World_SetFlipState(...) function;
This is actually described in #259. |
…t_room_refactoring
…n use alt versions of neighboard rooms;
In Natla's Mines camera repeatedly bumps into invisible boat static near waterfall when she's floating on the surface. |
In Natla's Mines there is something wrong with sector EDIT: ditto for sector |
altroom2 test was (and still is) broken in 1048ab7. |
thanks for info... next I will fix - alt / normal room collision filter (disable / enable function too). |
fixed World_FindRoomByPosCogerrence; TODO: fix near / overlapped room list generation;
…om has more priority); little list generation workaround fix;
Thanks for feedback - it helps to fix serious bugs in early stage |
"altroom4 test can not been passed, because at same time only one room (in alt room sequence) is available for entities / rendering" Then it should be changed to remain compatible, because in the Core engine this level just works as expected. So, obviously there is no such limitation. Camera there sees only one room at a time, depending on its direction relative to a portal. |
alt rooms used only for content store;
no more "check flip" functions: only real_room ptr or Sector_CheckRealRoom(...);
Room collision generation is workaround, because real tween collision between rooms depend on room combination (alt / real version) so there are two ways: 1) generate additional tween collision meshes for ALL room / real room combinations; 2) generate on fly after every World_SetFlipState();
UPD: only 2) is sane solution;