- misc stuff for readability (& trigger appveyor)

This commit is contained in:
Ilya Shurumov 2021-07-26 21:16:10 +06:00 committed by InspirationByte
parent a0e8ad4d71
commit c0dd470d7b
3 changed files with 14 additions and 22 deletions

View File

@ -45,8 +45,8 @@ int bcollided2d(CDATA2D *body, int* boxOverlap)
} }
// hmmm, why? // hmmm, why?
as = rcossin_tbl[(dtheta & 0x7ff) * 2]; as = RSIN(dtheta & 0x7ff); // rcossin_tbl[(dtheta & 0x7ff) * 2];
ac = rcossin_tbl[(dtheta + 1024 & 0x7ff) * 2]; ac = RSIN(dtheta + 1024 & 0x7ff); // rcossin_tbl[(dtheta + 1024 & 0x7ff) * 2];
delta.vx = body[0].x.vx - body[1].x.vx; delta.vx = body[0].x.vx - body[1].x.vx;
delta.vz = body[0].x.vz - body[1].x.vz; delta.vz = body[0].x.vz - body[1].x.vz;

View File

@ -971,15 +971,11 @@ void InitialiseCarHandling(void)
// [D] [T] // [D] [T]
void CheckCarToCarCollisions(void) void CheckCarToCarCollisions(void)
{ {
int fz; int fx, fz;
int fx; int sx, sz;
int sz;
int sx;
int loop1, loop2; int loop1, loop2;
int lbod; int lbod, wbod, hbod;
int wbod;
int hbod;
int xx, zz; int xx, zz;
BOUND_BOX* bb; BOUND_BOX* bb;
@ -988,7 +984,6 @@ void CheckCarToCarCollisions(void)
CAR_DATA* cp; CAR_DATA* cp;
SVECTOR* colBox; SVECTOR* colBox;
if (ghost_mode == 1) if (ghost_mode == 1)
return; return;

View File

@ -13,6 +13,8 @@
#include "glaunch.h" #include "glaunch.h"
#include "system.h" #include "system.h"
#define GRAVITY_FORCE (-7456) // D1 has -10922
struct CAR_LOCALS struct CAR_LOCALS
{ {
LONGVECTOR4 vel; LONGVECTOR4 vel;
@ -520,9 +522,9 @@ void AddWheelForcesDriver1(CAR_DATA* cp, CAR_LOCALS* cl)
void StepOneCar(CAR_DATA* cp) void StepOneCar(CAR_DATA* cp)
{ {
static int frictionLimit[6] = { static int frictionLimit[6] = {
0x3ED000, 0x178E000, 1005 * ONE, 6030 * ONE,
0x3ED000, 0x13A1000, 1005 * ONE, 5025 * ONE,
0x75C6000,0x13A1000 1884 * ONE, 5025 * ONE
}; };
volatile int impulse; volatile int impulse;
@ -532,14 +534,9 @@ void StepOneCar(CAR_DATA* cp)
int a, b, speed; int a, b, speed;
int count, i; int count, i;
CAR_LOCALS _cl; CAR_LOCALS _cl;
LONGVECTOR4 deepestNormal; LONGVECTOR4 deepestNormal, deepestLever, deepestPoint;
LONGVECTOR4 deepestLever; LONGVECTOR4 pointPos, surfacePoint, surfaceNormal;
LONGVECTOR4 deepestPoint; LONGVECTOR4 lever, reaction;
LONGVECTOR4 pointPos;
LONGVECTOR4 surfacePoint;
LONGVECTOR4 surfaceNormal;
LONGVECTOR4 lever;
LONGVECTOR4 reaction;
VECTOR direction; VECTOR direction;
sdPlane* SurfacePtr; sdPlane* SurfacePtr;
@ -559,7 +556,7 @@ void StepOneCar(CAR_DATA* cp)
} }
cp->hd.acc[0] = 0; cp->hd.acc[0] = 0;
cp->hd.acc[1] = -7456; // apply gravity cp->hd.acc[1] = GRAVITY_FORCE; // apply gravity
cp->hd.acc[2] = 0; cp->hd.acc[2] = 0;
// calculate car speed // calculate car speed