Skip to content

Commit 9b68a7d

Browse files
Merge pull request #186 from mateusfavarin/main
Update online version
2 parents 77b0401 + 23e4013 commit 9b68a7d

File tree

3 files changed

+40
-4
lines changed

3 files changed

+40
-4
lines changed

decompile/General/AltMods/OnlineCTR/global.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef ONLINE_GLOBAL_H
22
#define ONLINE_GLOBAL_H
33

4-
#define VERSION 1018
4+
#define VERSION 1019
55
//#define ONLINE_BETA_MODE
66

77
#ifndef WINDOWS_INCLUDE
@@ -139,9 +139,9 @@ struct OnlineCTR
139139

140140
// Last windowsClientSync counter
141141
char lastWindowsClientSync;
142-
142+
143143
char desiredFPS;
144-
144+
145145
// control when PSX and PC send/recv
146146
char sleepControl;
147147
char gpuSubmitTooLate;
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#include <common.h>
2+
3+
void VehPhysForce_OnGravity(struct Driver * driver, Vec3 * velocity)
4+
{
5+
gte_SetRotMatrix(driver->matrixMovingDir);
6+
7+
Vec3 rotatedVelocity;
8+
Matrix matrixMovingT;
9+
const SVec3 vel = { .x = velocity->x, .y = velocity->y, .z = velocity->z };
10+
TransposeMatrix(&matrixMovingT, &driver->matrixMovingDir);
11+
MulMatrixVec_Light(&rotatedVelocity, &matrixMovingT, &vel);
12+
13+
Vec3 rotatedGravity;
14+
SVec3 gravity = { .x = 0, .y = -driver->const_Gravity, .z = 0 };
15+
if (driver->underDriver->quadFlags & QUAD_LOW_GRAVITY)
16+
{
17+
gravity.y = -(driver->const_Gravity * 41) / 100;
18+
}
19+
gravity.y = (gravity.y * sdata->gGT->elapsedTimeMS) / ELAPSED_MS;
20+
MulVector_Light(&rotatedGravity, &gravity);
21+
22+
if (((rotatedGravity.z < 0) && (driver->unk_offset3B2 > 0)) ||
23+
((rotatedGravity.z > 0) && (driver->unk_offset3B2 < 0)))
24+
{
25+
rotatedGravity.z = 0;
26+
}
27+
28+
if ((driver->actionsFlagSet & ACTION_PREVENT_ACCEL) ||
29+
((driver->baseSpeed > 0) && (driver->speedApprox < 0)) ||
30+
((driver->baseSpeed < 0) && (driver->speedApprox > 0)))
31+
{
32+
rotatedGravity.x = 0;
33+
rotatedGravity.z = 0;
34+
}
35+
36+
}

tools/Launcher/ui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void UI::Render(int width, int height)
3535
if (m_username.size() > 9) { m_username = m_username.substr(0, 9); }
3636

3737
bool updateReady = true;
38-
updateReady &= SelectFile(m_gamePath, "Game Path", ".bin", {"Game Files", "*.bin"}, "Path to the NTSC-U version of CTR");
38+
updateReady &= SelectFile(m_gamePath, "Game Path", ".bin", {"Game Files", "*.bin"}, "Path to the clean NTSC-U version of CTR");
3939
updateReady &= SelectFile(m_duckPath, "Duck Path ", ".exe", {"Executable Files", "*.exe"}, "Path to the duckstation executable");
4040
updateReady &= SelectFolder(m_iniPath, "Ini Path ", "Duckstation gamesettings folder.\nUsually in Documents/DuckStation/gamesettings");
4141
ImGui::Text(("Version: " + m_version).c_str());

0 commit comments

Comments
 (0)