diff --git a/OpenGTA-win/OpenGTA-win.vcxproj b/OpenGTA-win/OpenGTA-win.vcxproj index 5994736..87563ab 100755 --- a/OpenGTA-win/OpenGTA-win.vcxproj +++ b/OpenGTA-win/OpenGTA-win.vcxproj @@ -93,7 +93,7 @@ true true ../../libs/boost-gil-extension;../../tes-engine;../../eigen;../../boost_1_67_0/;../../libs/jpeg-9;../../libs/jpeg-9/vc10;../../libs/lpng1510;..\;..\math;..\coldet\;..\util;..\..\SDL2-2.0.8\include;..\..\physfs-3.0.1\build\install\include;..\opensteer\include;..\replaceLoki - DO_SCALE2X;WIN32;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions) + IMMEDIATELY_PLAY;DO_SCALE2X;WIN32;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions) false MultiThreadedDebugDLL @@ -129,7 +129,7 @@ true true ../../libs/boost-gil-extension;../../tes-engine;../../eigen;../../boost_1_67_0/;../../libs/jpeg-9;../../libs/jpeg-9/vc10;../../libs/lpng1510;..\;..\math;..\coldet\;..\util;..\..\SDL2-2.0.8\include;..\..\physfs-3.0.1\build\install\include;..\opensteer\include;..\replaceLoki - WIN32;NDEBUG;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions) + IMMEDIATELY_PLAY;DO_SCALE2X;WIN32;NDEBUG;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions) false diff --git a/game_objects.cpp b/game_objects.cpp index a90c4d4..63e3f16 100755 --- a/game_objects.cpp +++ b/game_objects.cpp @@ -771,10 +771,13 @@ activeWeapon = chooseWeapon; if (rot < 0.0f) rot += 360.0f; - static const float accelerationK = 0.00002; - +#ifdef NDEBUG + static const float accelerationK = 0.00004; + static const float slowK = 0.02; +#else + static const float accelerationK = 0.00004; static const float slowK = 0.1; - +#endif switch(m_control.getMove()) { @@ -833,10 +836,15 @@ activeWeapon = chooseWeapon; { OpenGL::Camera & cam = OpenGL::CameraHolder::Instance(); - static const float camVelocityK = 300.0; + static const float camVelocityK = 700.0; cam.getEye().y = 10 + velocity*camVelocityK; + if (cam.getEye().y >= 12) + { + cam.getEye().y = 12; + } + } diff --git a/viewer.cpp b/viewer.cpp index 7057d15..977cb2e 100755 --- a/viewer.cpp +++ b/viewer.cpp @@ -68,7 +68,7 @@ OpenGTA::CityView *city = NULL; GUI::Label * fps_label = NULL; //Xperimental -- Vladislav Khorev vladislav.khorev@fishrungames.com -int city_num = 0; +int city_num = 2; const char* styles_8[3] = { "STYLE001.GRY", "STYLE002.GRY", "STYLE003.GRY" }; const char* styles_24[3] = { "STYLE001.G24", "STYLE002.G24", "STYLE003.G24" }; @@ -605,16 +605,17 @@ void updateAnim() { void create_car_at(const Vector3D v) { - - //OpenGTA::Car& cx = OpenGTA::SpriteManagerHolder::Instance().getCar(2909); + int carId; + if (city_num == 0) + { + carId = 18; + } + else + { + carId = 74; + } - //OpenGTA::Car c(cx); - - //c.pos.x -= 1.0; - - //Car(const Vector3D & _pos, float _rot, uint32_t id, uint8_t _type, int16_t _remap = -1); - //OpenGTA::Car c2(Vector3D(7.25000000, 2.06562519, 90.2031250), 180, 999999, 18, 0); - OpenGTA::Car c2(Vector3D(v.x, v.y, v.z), 180, 999999, 18, 0); + OpenGTA::Car c2(Vector3D(v.x, v.y, v.z), 180, 999999, carId, 0); OpenGTA::SpriteManagerHolder::Instance().add(c2); } @@ -1246,6 +1247,27 @@ void run_main() { GUI::Manager & guiManager = GUI::ManagerHolder::Instance(); + //Xperimental -- initial init -- Vladislav Khorev vladislav.khorev@fishrungames.com + +#ifdef IMMEDIATELY_PLAY + + + follow_toggle = true; + city->setViewMode(false); + Vector3D p(cam.getEye()); + create_ped_at(p); + cam.setVectors(Vector3D(p.x, 10, p.z), Vector3D(p.x, 9.0f, p.z), Vector3D(0, 0, -1)); + cam.setFollowMode(OpenGTA::SpriteManagerHolder::Instance().getPedById(0xffffffff).pos); + cam.setCamGravity(true); + + + Vector3D px(cam.getEye() + Vector3D(2.0, 0.0, 2.0)); + create_car_at(px); + + + +#endif + while(!global_Done && !global_EC) { while (SDL_PollEvent(&event)) { switch(event.type) {