mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-29 08:17:59 +03:00
Minor formatting
This commit is contained in:
parent
bfc7d1b3d4
commit
07879bc744
7 changed files with 16 additions and 16 deletions
|
@ -14,13 +14,13 @@ Version 1.3
|
|||
* Fix player not being able to pick up a torch when crouching.
|
||||
* Fix jittery camera when performing crawl-to-hang.
|
||||
* Fix several issues with limited pistol ammo.
|
||||
* Fix Lara not being able to crawl if two-handed weapon is currently equipped.
|
||||
* Fix player not being able to crawl if two-handed weapon is currently equipped.
|
||||
* Fix playback issues with audio tracks placed in subfolders.
|
||||
* Fix legacy trigger leveljumps ignoring provided level index.
|
||||
* Separate underwater wall and ceiling switch objects into two slots each.
|
||||
* Improve fly cheat collision.
|
||||
* Add global events.
|
||||
* Add previously missing Lara start position object functionality.
|
||||
* Add previously missing player start position object functionality.
|
||||
* Add fast speed for fly cheat by holding Sprint input action.
|
||||
* Allow walking on slopes when wading in water (similar to quicksand).
|
||||
* Allow player to pull certain levers with both hands when holding a flare.
|
||||
|
|
|
@ -71,7 +71,7 @@ void InitializeLara(bool restore)
|
|||
InitializePlayerStateMachine();
|
||||
InitializeLaraMeshes(LaraItem);
|
||||
InitializeLaraAnims(LaraItem);
|
||||
InitializeLaraStartPosition(LaraItem);
|
||||
InitializeLaraStartPosition(*LaraItem);
|
||||
|
||||
g_Hud.StatusBars.Initialize(*LaraItem);
|
||||
}
|
||||
|
@ -164,20 +164,20 @@ void InitializeLaraLoad(short itemNumber)
|
|||
LaraItem = &g_Level.Items[itemNumber];
|
||||
}
|
||||
|
||||
void InitializeLaraStartPosition(ItemInfo* item)
|
||||
void InitializeLaraStartPosition(ItemInfo& playerItem)
|
||||
{
|
||||
for (auto& it : g_Level.Items)
|
||||
for (const auto& item : g_Level.Items)
|
||||
{
|
||||
if (it.ObjectNumber != GAME_OBJECT_ID::ID_LARA_START_POS)
|
||||
if (item.ObjectNumber != GAME_OBJECT_ID::ID_LARA_START_POS)
|
||||
continue;
|
||||
|
||||
if (!it.TriggerFlags || it.TriggerFlags != RequiredStartPos)
|
||||
if (!item.TriggerFlags || item.TriggerFlags != RequiredStartPos)
|
||||
continue;
|
||||
|
||||
item->Pose = it.Pose;
|
||||
item->RoomNumber = it.RoomNumber;
|
||||
playerItem.Pose = item.Pose;
|
||||
playerItem.RoomNumber = item.RoomNumber;
|
||||
|
||||
TENLog("Player start position has been set according to start position object with index " + std::to_string(it.TriggerFlags), LogLevel::Info);
|
||||
TENLog("Player start position has been set according to start position object with index " + std::to_string(item.TriggerFlags), LogLevel::Info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@ void InitializeLara(bool restore);
|
|||
void InitializeLaraLoad(short itemNumber);
|
||||
void InitializeLaraMeshes(ItemInfo* item);
|
||||
void InitializeLaraAnims(ItemInfo* item);
|
||||
void InitializeLaraStartPosition(ItemInfo* item);
|
||||
void InitializeLaraStartPosition(ItemInfo& playerItem);
|
||||
void InitializeLaraLevelJump(ItemInfo* item, LaraInfo* lBackup);
|
||||
void InitializeLaraDefaultInventory();
|
||||
void InitializeLaraDefaultInventory();
|
||||
|
|
|
@ -812,7 +812,7 @@ std::optional<Vector3> GetStaticObjectLos(const Vector3& origin, int roomNumber,
|
|||
return std::nullopt;
|
||||
}
|
||||
|
||||
std::pair<GameVector, GameVector> GetRayFrom2DPosition(Vector2 screenPos)
|
||||
std::pair<GameVector, GameVector> GetRayFrom2DPosition(const Vector2& screenPos)
|
||||
{
|
||||
auto pos = g_Renderer.GetRay(screenPos);
|
||||
|
||||
|
|
|
@ -11,4 +11,4 @@ int ObjectOnLOS2(GameVector* origin, GameVector* target, Vector3i* vec, MESH_IN
|
|||
bool LOSAndReturnTarget(GameVector* origin, GameVector* target, int push);
|
||||
|
||||
std::optional<Vector3> GetStaticObjectLos(const Vector3& origin, int roomNumber, const Vector3& dir, float dist, bool onlySolid);
|
||||
std::pair<GameVector, GameVector> GetRayFrom2DPosition(Vector2 screenPos);
|
||||
std::pair<GameVector, GameVector> GetRayFrom2DPosition(const Vector2& screenPos);
|
||||
|
|
|
@ -750,7 +750,7 @@ void TestTriggers(int x, int y, int z, FloorInfo* floor, Activator activator, bo
|
|||
break;
|
||||
|
||||
case TO_FINISH:
|
||||
NextLevel = value ? value : CurrentLevel + 1;
|
||||
NextLevel = value ? value : (CurrentLevel + 1);
|
||||
RequiredStartPos = timer;
|
||||
break;
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace TEN::Scripting::Util
|
|||
static sol::optional <std::unique_ptr<Static>> PickStatic(const Vec2& screenPos)
|
||||
{
|
||||
auto realScreenPos = PercentToScreen(screenPos.x, screenPos.y);
|
||||
auto ray = GetRayFrom2DPosition(Vector2(int(std::get<0>(realScreenPos)), int(std::get<1>(realScreenPos))));
|
||||
auto ray = GetRayFrom2DPosition(Vector2((int)std::get<0>(realScreenPos), (int)std::get<1>(realScreenPos)));
|
||||
|
||||
MESH_INFO* mesh = nullptr;
|
||||
auto vector = Vector3i::Zero;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue