Conversation
| // ========================================================================================= | ||
| // BOX FLAGS | ||
| // ========================================================================================= | ||
| public bool Splitter; // Box is a "splitter" (1x1 box at TT_SPLITTER trigger) |
There was a problem hiding this comment.
What is TT_SPLITTER? This terminology does not exist in TRLE.
There was a problem hiding this comment.
SPLITTER is the gray box. Its true nature is to force the generation of 1x1 box that can be blocked or not by doors above them
| // ========================================================================================= | ||
| public bool Splitter; // Box is a "splitter" (1x1 box at TT_SPLITTER trigger) | ||
| public bool NotWalkableBox;// Box is marked as not walkable | ||
| public bool Monkey; // Box has monkey swing ceiling (TT_MONKEY trigger) |
There was a problem hiding this comment.
SPLITTER is the gray box. Its true nature is to force the generation of 1x1 box that can be blocked or not by doors above them
| /// Used to detect slopes and calculate average floor height. | ||
| /// Naming: dec_tilt[1-4] corresponds to XnZp, XpZp, XpZn, XnZn corners. | ||
| /// </summary> | ||
| private int dec_tilt1 = Clicks.ToWorld(-1); // Floor.XnZp (X-, Z+) |
There was a problem hiding this comment.
In my opinion, this should be called not tilt but cornerHeight then.
There was a problem hiding this comment.
I have used original names but i have correct it.
| private List<TombEngineOverlap> dec_overlaps; | ||
| private bool dec_boxExtendsInAnotherRoom; |
There was a problem hiding this comment.
Was it a mistake or dec_boxExtendsInAnotherRoom was renamed to dec_doorCheck unintentionally here?
There was a problem hiding this comment.
This is the original name, and it's the same thing: check door = box expansion continues in the room beyond the door,
| /// <param name="z">World Z coordinate (in sectors)</param> | ||
| /// <returns>True if position is reachable, false if blocked</returns> | ||
| [MethodImpl(MethodImplOptions.AggressiveOptimization)] | ||
| private bool Dec_ClampRoom(int x, int z) |
There was a problem hiding this comment.
What was the reason for the rename? Old name (Dec_CanSectorBeReachedAndIsSolid) sounds more intuitive to me.
There was a problem hiding this comment.
This is the original name
| { | ||
| // Boxes must have the same height for jump | ||
| if (a.TrueFloor != b.TrueFloor) return false; |
There was a problem hiding this comment.
Please describe all changes done in this function further.
| /// Tests all sectors along the shared edge to ensure they connect properly. | ||
| /// </summary> | ||
| [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] | ||
| public bool Dec_TestOverlapXmax(dec_TombEngine_box_aux test, dec_TombEngine_box_aux box) |
There was a problem hiding this comment.
Please describe all changes done in this function further.
| /// Corresponds to TestLeftOverlap() in original box.c. | ||
| /// </summary> | ||
| [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] | ||
| public bool Dec_TestOverlapXmin(dec_TombEngine_box_aux test, dec_TombEngine_box_aux box) |
There was a problem hiding this comment.
Please describe all changes done in this function further.
| /// Corresponds to TestBottomOverlap() in original box.c (inverted axis). | ||
| /// </summary> | ||
| [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] | ||
| public bool Dec_TestOverlapZmax(dec_TombEngine_box_aux test, dec_TombEngine_box_aux box) |
There was a problem hiding this comment.
Please describe all changes done in this function further.
| } | ||
|
|
||
| [MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
| public bool Dec_OverlapZmin(dec_TombEngine_box_aux a, dec_TombEngine_box_aux b) |
There was a problem hiding this comment.
Please describe all changes done in this function further.
155425f to
6957349
Compare
This Pull request fixes many bugs with pathfinding of water creatures.
Additionally, I have cleaned a bit the code and added more comments;