mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
console/pos: show flipped room when applicable
If Lara is in a room and the flipmap is on, the console will now report the flipped room's number when using the pos command. Resolves #2487.
This commit is contained in:
parent
51af4233be
commit
092fe1dc70
3 changed files with 9 additions and 1 deletions
|
@ -31,6 +31,7 @@
|
|||
- fixed Story So Far showing up even when there's nothing to play (#2611, regression from 2.10)
|
||||
- fixed Story So Far not playing the opening FMV, `cafe.rpl` (#2779, regression from 2.10)
|
||||
- fixed Lara at times ending up in incorrect rooms when using the teleport cheat (#2486, regression from 3.0)
|
||||
- fixed the `/pos` console command reporting the base room number when Lara is actually in a flipped room (#2487, regression from 3.0)
|
||||
- improved bubble appearance (#2672)
|
||||
- improved rendering performance
|
||||
- improved pause exit dialog - it can now be canceled with escape
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
- fixed the camera going out of bounds in 60fps near specific invalid floor data (known as no-space) (#2764, regression from 0.10)
|
||||
- fixed sprites rendering black if no shade value is assigned in the level (#2701, regression from 0.8)
|
||||
- fixed Lara at times ending up in incorrect rooms when using the teleport cheat (#2486, regression from 0.3)
|
||||
- fixed the `/pos` console command reporting the base room number when Lara is actually in a flipped room (#2487, regression from 0.3)
|
||||
- fixed a crash if an image was missing
|
||||
- fixed a crash on level load if an animation has no frames (#2746, regression from 0.8)
|
||||
- fixed a crash in custom levels with large rooms (#2749)
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "game/game_string.h"
|
||||
#include "game/lara/common.h"
|
||||
#include "game/objects/common.h"
|
||||
#include "game/rooms.h"
|
||||
#include "memory.h"
|
||||
#include "strings.h"
|
||||
|
||||
|
@ -45,10 +46,15 @@ static COMMAND_RESULT M_Entrypoint(const COMMAND_CONTEXT *const ctx)
|
|||
String_Format(level_type_fmt, current_level->num + reindex);
|
||||
|
||||
const ITEM *const lara_item = Lara_GetItem();
|
||||
int16_t room_num = lara_item->room_num;
|
||||
const ROOM *const room = Room_Get(room_num);
|
||||
if (Room_GetFlipStatus() && room->flipped_room != NO_ROOM_NEG) {
|
||||
room_num = room->flipped_room;
|
||||
}
|
||||
char *details = lara_item == nullptr
|
||||
? String_Format("%s", GS(OSD_POS_LARA_MISSING))
|
||||
: String_Format(
|
||||
GS(OSD_POS_LARA_POS_FMT), lara_item->room_num,
|
||||
GS(OSD_POS_LARA_POS_FMT), room_num,
|
||||
lara_item->pos.x / (float)WALL_L,
|
||||
lara_item->pos.y / (float)WALL_L,
|
||||
lara_item->pos.z / (float)WALL_L,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue