mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 11:52:32 +01:00
- misc stuff for readability (& trigger appveyor)
This commit is contained in:
parent
a0e8ad4d71
commit
c0dd470d7b
@ -45,8 +45,8 @@ int bcollided2d(CDATA2D *body, int* boxOverlap)
|
||||
}
|
||||
|
||||
// hmmm, why?
|
||||
as = rcossin_tbl[(dtheta & 0x7ff) * 2];
|
||||
ac = rcossin_tbl[(dtheta + 1024 & 0x7ff) * 2];
|
||||
as = RSIN(dtheta & 0x7ff); // rcossin_tbl[(dtheta & 0x7ff) * 2];
|
||||
ac = RSIN(dtheta + 1024 & 0x7ff); // rcossin_tbl[(dtheta + 1024 & 0x7ff) * 2];
|
||||
|
||||
delta.vx = body[0].x.vx - body[1].x.vx;
|
||||
delta.vz = body[0].x.vz - body[1].x.vz;
|
||||
|
@ -971,15 +971,11 @@ void InitialiseCarHandling(void)
|
||||
// [D] [T]
|
||||
void CheckCarToCarCollisions(void)
|
||||
{
|
||||
int fz;
|
||||
int fx;
|
||||
int sz;
|
||||
int sx;
|
||||
int fx, fz;
|
||||
int sx, sz;
|
||||
|
||||
int loop1, loop2;
|
||||
int lbod;
|
||||
int wbod;
|
||||
int hbod;
|
||||
int lbod, wbod, hbod;
|
||||
int xx, zz;
|
||||
|
||||
BOUND_BOX* bb;
|
||||
@ -988,7 +984,6 @@ void CheckCarToCarCollisions(void)
|
||||
CAR_DATA* cp;
|
||||
SVECTOR* colBox;
|
||||
|
||||
|
||||
if (ghost_mode == 1)
|
||||
return;
|
||||
|
||||
|
@ -13,6 +13,8 @@
|
||||
#include "glaunch.h"
|
||||
#include "system.h"
|
||||
|
||||
#define GRAVITY_FORCE (-7456) // D1 has -10922
|
||||
|
||||
struct CAR_LOCALS
|
||||
{
|
||||
LONGVECTOR4 vel;
|
||||
@ -520,9 +522,9 @@ void AddWheelForcesDriver1(CAR_DATA* cp, CAR_LOCALS* cl)
|
||||
void StepOneCar(CAR_DATA* cp)
|
||||
{
|
||||
static int frictionLimit[6] = {
|
||||
0x3ED000, 0x178E000,
|
||||
0x3ED000, 0x13A1000,
|
||||
0x75C6000,0x13A1000
|
||||
1005 * ONE, 6030 * ONE,
|
||||
1005 * ONE, 5025 * ONE,
|
||||
1884 * ONE, 5025 * ONE
|
||||
};
|
||||
|
||||
volatile int impulse;
|
||||
@ -532,14 +534,9 @@ void StepOneCar(CAR_DATA* cp)
|
||||
int a, b, speed;
|
||||
int count, i;
|
||||
CAR_LOCALS _cl;
|
||||
LONGVECTOR4 deepestNormal;
|
||||
LONGVECTOR4 deepestLever;
|
||||
LONGVECTOR4 deepestPoint;
|
||||
LONGVECTOR4 pointPos;
|
||||
LONGVECTOR4 surfacePoint;
|
||||
LONGVECTOR4 surfaceNormal;
|
||||
LONGVECTOR4 lever;
|
||||
LONGVECTOR4 reaction;
|
||||
LONGVECTOR4 deepestNormal, deepestLever, deepestPoint;
|
||||
LONGVECTOR4 pointPos, surfacePoint, surfaceNormal;
|
||||
LONGVECTOR4 lever, reaction;
|
||||
VECTOR direction;
|
||||
sdPlane* SurfacePtr;
|
||||
|
||||
@ -559,7 +556,7 @@ void StepOneCar(CAR_DATA* cp)
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
// calculate car speed
|
||||
|
Loading…
Reference in New Issue
Block a user