Skip to content

Commit 96af6c6

Browse files
author
Niko
committed
bugfix
1 parent c08442e commit 96af6c6

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

decompile/General/Vehicle/VehPhysForce_0_ConvertSpeedToVec.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#include <common.h>
22

3+
// causes bug:
4+
// https://discord.com/channels/527135227546435584/527136553957589005/1349544147916292106
5+
36
void DECOMP_VehPhysForce_ConvertSpeedToVec(struct Driver* driver)
47
{
58
int yAngle = driver->axisRotationY;

decompile/General/Vehicle/VehPhysForce_2_OnApplyForces.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ void DECOMP_VehPhysForce_OnApplyForces(struct Thread * thread, struct Driver * d
1212
const SVec3 radius = { .x = 0, .y = 25, .z = 0 };
1313
MulMatrixVec(&driver->originToCenter, (Matrix*)&driver->matrixFacingDir, &radius);
1414

15-
DECOMP_VehPhysForce_ConvertSpeedToVec(driver);
15+
// DECOMP_VehPhysForce_ConvertSpeedToVec(driver);
16+
VehPhysForce_ConvertSpeedToVec(driver, &driver->velocity, 0);
1617

1718
if ((driver->underDriver) && (driver->underDriver->terrain_type == TERRAIN_MUD))
1819
{

decompile/buildList.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,11 @@ common, exe, VehGroundSkids_Subset2, 0x0, General/Vehicle/VehGrou
13251325
//common, exe, VehPhysCrash_AI, 0x0, General/Vehicle/VehPhysCrash_2_AI.c //TODO
13261326
//common, exe, VehPhysCrash_Attack, 0x0, General/Vehicle/VehPhysCrash_3_Attack.c //TODO
13271327
//common, exe, VehPhysCrash_AnyTwoCars, 0x0, General/Vehicle/VehPhysCrash_4_AnyTwoCars.c //TODO
1328-
common, exe, VehPhysForce_ConvertSpeedToVec, 0x0, General/Vehicle/VehPhysForce_0_ConvertSpeedToVec.c
1328+
1329+
// causes bug:
1330+
// https://discord.com/channels/527135227546435584/527136553957589005/1349544147916292106
1331+
//common, exe, VehPhysForce_ConvertSpeedToVec, 0x0, General/Vehicle/VehPhysForce_0_ConvertSpeedToVec.c
1332+
13291333
//common, exe, VehPhysForce_OnGravity, 0x0, General/Vehicle/VehPhysForce_1_OnGravity.c
13301334
common, exe, VehPhysForce_OnApplyForces, 0x0, General/Vehicle/VehPhysForce_2_OnApplyForces.c
13311335
//common, exe, VehPhysForce_CollideDrivers, 0x0, General/Vehicle/VehPhysForce_3_CollideDrivers.c //TODO

include/functions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ void VehPhysCrash_ConvertVecToSpeed(struct Driver* d, int* v);
983983
//VehPhysCrash_AI()
984984
//VehPhysCrash_Attack()
985985
void VehPhysCrash_AnyTwoCars(struct Thread* thread, u_short* param_2, int* param_3);
986-
//VehPhysForce_ConvertSpeedToVec()
986+
void VehPhysForce_ConvertSpeedToVec(struct Driver* d, short* velArr, int x);
987987
//VehPhysForce_OnGravity()
988988
void VehPhysForce_OnApplyForces(struct Thread* t, struct Driver* d);
989989
void VehPhysForce_CollideDrivers(struct Thread* t, struct Driver* d);

0 commit comments

Comments
 (0)