Skip to content

Commit c0dd470

Browse files
committed
- misc stuff for readability (& trigger appveyor)
1 parent a0e8ad4 commit c0dd470

3 files changed

Lines changed: 14 additions & 22 deletions

File tree

src_rebuild/Game/C/bcollide.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ int bcollided2d(CDATA2D *body, int* boxOverlap)
4545
}
4646

4747
// hmmm, why?
48-
as = rcossin_tbl[(dtheta & 0x7ff) * 2];
49-
ac = rcossin_tbl[(dtheta + 1024 & 0x7ff) * 2];
48+
as = RSIN(dtheta & 0x7ff); // rcossin_tbl[(dtheta & 0x7ff) * 2];
49+
ac = RSIN(dtheta + 1024 & 0x7ff); // rcossin_tbl[(dtheta + 1024 & 0x7ff) * 2];
5050

5151
delta.vx = body[0].x.vx - body[1].x.vx;
5252
delta.vz = body[0].x.vz - body[1].x.vz;

src_rebuild/Game/C/handling.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -971,15 +971,11 @@ void InitialiseCarHandling(void)
971971
// [D] [T]
972972
void CheckCarToCarCollisions(void)
973973
{
974-
int fz;
975-
int fx;
976-
int sz;
977-
int sx;
974+
int fx, fz;
975+
int sx, sz;
978976

979977
int loop1, loop2;
980-
int lbod;
981-
int wbod;
982-
int hbod;
978+
int lbod, wbod, hbod;
983979
int xx, zz;
984980

985981
BOUND_BOX* bb;
@@ -988,7 +984,6 @@ void CheckCarToCarCollisions(void)
988984
CAR_DATA* cp;
989985
SVECTOR* colBox;
990986

991-
992987
if (ghost_mode == 1)
993988
return;
994989

src_rebuild/Game/C/wheelforces.c

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#include "glaunch.h"
1414
#include "system.h"
1515

16+
#define GRAVITY_FORCE (-7456) // D1 has -10922
17+
1618
struct CAR_LOCALS
1719
{
1820
LONGVECTOR4 vel;
@@ -520,9 +522,9 @@ void AddWheelForcesDriver1(CAR_DATA* cp, CAR_LOCALS* cl)
520522
void StepOneCar(CAR_DATA* cp)
521523
{
522524
static int frictionLimit[6] = {
523-
0x3ED000, 0x178E000,
524-
0x3ED000, 0x13A1000,
525-
0x75C6000,0x13A1000
525+
1005 * ONE, 6030 * ONE,
526+
1005 * ONE, 5025 * ONE,
527+
1884 * ONE, 5025 * ONE
526528
};
527529

528530
volatile int impulse;
@@ -532,14 +534,9 @@ void StepOneCar(CAR_DATA* cp)
532534
int a, b, speed;
533535
int count, i;
534536
CAR_LOCALS _cl;
535-
LONGVECTOR4 deepestNormal;
536-
LONGVECTOR4 deepestLever;
537-
LONGVECTOR4 deepestPoint;
538-
LONGVECTOR4 pointPos;
539-
LONGVECTOR4 surfacePoint;
540-
LONGVECTOR4 surfaceNormal;
541-
LONGVECTOR4 lever;
542-
LONGVECTOR4 reaction;
537+
LONGVECTOR4 deepestNormal, deepestLever, deepestPoint;
538+
LONGVECTOR4 pointPos, surfacePoint, surfaceNormal;
539+
LONGVECTOR4 lever, reaction;
543540
VECTOR direction;
544541
sdPlane* SurfacePtr;
545542

@@ -559,7 +556,7 @@ void StepOneCar(CAR_DATA* cp)
559556
}
560557

561558
cp->hd.acc[0] = 0;
562-
cp->hd.acc[1] = -7456; // apply gravity
559+
cp->hd.acc[1] = GRAVITY_FORCE; // apply gravity
563560
cp->hd.acc[2] = 0;
564561

565562
// calculate car speed

0 commit comments

Comments
 (0)