diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-01-02 10:38:54 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-01-02 12:32:25 +0100 |
commit | 42e4a068bb1cd363c3ed308e10c2747a6035e2de (patch) | |
tree | 7e9ce483e3a9eab7d23ec4c4e6476f22ecfa761e /src/core/Game.cpp | |
parent | Partial controller buttons support (diff) | |
download | re3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.tar re3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.tar.gz re3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.tar.bz2 re3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.tar.lz re3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.tar.xz re3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.tar.zst re3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.zip |
Diffstat (limited to 'src/core/Game.cpp')
-rw-r--r-- | src/core/Game.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 348ac26d..8405c2ec 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -96,6 +96,7 @@ #include "postfx.h" #include "custompipes.h" #include "screendroplets.h" +#include "VarConsole.h" #ifdef USE_TEXTURE_POOL #include "TexturePools.h" #endif @@ -113,6 +114,10 @@ char CGame::aDatFile[32]; bool CGame::russianGame = false; bool CGame::japaneseGame = false; #endif +#ifndef MASTER +CVector CGame::PlayerCoords; +bool8 CGame::VarUpdatePlayerCoords; +#endif int gameTxdSlot; @@ -557,6 +562,16 @@ bool CGame::Initialise(const char* datFile) #ifdef USE_TEXTURE_POOL _TexturePoolsUnknown(true); #endif + +#ifndef MASTER + PlayerCoords = FindPlayerCoors(); + VarConsole.Add("X PLAYER COORD", &PlayerCoords.x, 10.0f, -10000.0f, 10000.0f, true); + VarConsole.Add("Y PLAYER COORD", &PlayerCoords.y, 10.0f, -10000.0f, 10000.0f, true); + VarConsole.Add("Z PLAYER COORD", &PlayerCoords.z, 10.0f, -10000.0f, 10000.0f, true); + VarConsole.Add("UPDATE PLAYER COORD", &VarUpdatePlayerCoords, true); +#endif + + DMAudio.SetStartingTrackPositions(true); DMAudio.ChangeMusicMode(MUSICMODE_GAME); return true; @@ -837,6 +852,12 @@ void CGame::Process(void) CWindModifiers::Number = 0; if (!CTimer::GetIsPaused()) { +#ifndef MASTER + if (VarUpdatePlayerCoords) { + FindPlayerPed()->Teleport(PlayerCoords); + VarUpdatePlayerCoords = false; + } +#endif CSprite2d::SetRecipNearClip(); CSprite2d::InitPerFrame(); CFont::InitPerFrame(); |