mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 03:42:34 +01:00
- misc changes
This commit is contained in:
parent
277d391add
commit
d4cdb48ddf
@ -40,13 +40,8 @@ void DrawDebugOverlays()
|
||||
gte_SetRotMatrix(&inv_camera_matrix);
|
||||
|
||||
SVECTOR a, b;
|
||||
a.vx = ld.posA.vx - camera_position.vx;
|
||||
a.vy = ld.posA.vy - camera_position.vy;
|
||||
a.vz = ld.posA.vz - camera_position.vz;
|
||||
|
||||
b.vx = ld.posB.vx - camera_position.vx;
|
||||
b.vy = ld.posB.vy - camera_position.vy;
|
||||
b.vz = ld.posB.vz - camera_position.vz;
|
||||
VecSubtract(&a, &ld.posA, &camera_position);
|
||||
VecSubtract(&b, &ld.posB, &camera_position);
|
||||
|
||||
gte_ldv3(&a, &b, &b);
|
||||
|
||||
|
@ -2172,8 +2172,8 @@ int PingInCivCar(int minPingInDist)
|
||||
}
|
||||
else
|
||||
{
|
||||
i = 0;
|
||||
while (i < numLanes)
|
||||
|
||||
for (i = 0; i < numLanes; i++)
|
||||
{
|
||||
// collect the lanes.
|
||||
allowedToPark = ROAD_IS_PARKING_ALLOWED_AT(&roadInfo, i);
|
||||
@ -2186,8 +2186,6 @@ int PingInCivCar(int minPingInDist)
|
||||
// pick only non-parkable driveable lanes if parked cars not requested
|
||||
if (tryPingInParkedCars && allowedToPark || ROAD_IS_AI_LANE(&roadInfo, i) && !allowedToPark)
|
||||
possibleLanes[numPossibleLanes++] = i;
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
if (numPossibleLanes == 0)
|
||||
|
@ -2059,7 +2059,7 @@ void IdentifyZone(envsound* ep, envsoundinfo* E, int pl)
|
||||
|
||||
int tmp[4];
|
||||
float _g[4];
|
||||
__bitfield64 zones;
|
||||
bitfield64 zones;
|
||||
int snd;
|
||||
|
||||
// [A] does it really needed? we don't have that much sounds to be played
|
||||
@ -2123,9 +2123,9 @@ void IdentifyZone(envsound* ep, envsoundinfo* E, int pl)
|
||||
if (dist < vol)
|
||||
{
|
||||
if (i < 32)
|
||||
zones.l |= 1 << (i & 0x1f);
|
||||
zones.l |= 1 << (i & 31);
|
||||
else
|
||||
zones.h |= 1 << (i & 0x1f);
|
||||
zones.h |= 1 << (i & 31);
|
||||
|
||||
tmp[j] = i;
|
||||
|
||||
@ -2137,9 +2137,9 @@ void IdentifyZone(envsound* ep, envsoundinfo* E, int pl)
|
||||
else
|
||||
{
|
||||
if (i < 32)
|
||||
zones.l |= 1 << (i & 0x1f);
|
||||
zones.l |= 1 << (i & 31);
|
||||
else
|
||||
zones.h |= 1 << (i & 0x1f);
|
||||
zones.h |= 1 << (i & 31);
|
||||
|
||||
tmp[j] = i;
|
||||
j++;
|
||||
|
@ -47,6 +47,20 @@ extern short rcossin_tbl[8192];
|
||||
#define RemapVal( val, A, B, C, D) \
|
||||
(C + (D - C) * (val - A) / (B - A))
|
||||
|
||||
#define VecCopy(_v, _xyz) \
|
||||
{ \
|
||||
(_v)->vx = (_xyz)->vx; \
|
||||
(_v)->vy = (_xyz)->vy; \
|
||||
(_v)->vz = (_xyz)->vz; \
|
||||
}
|
||||
|
||||
#define VecNegate(_v) \
|
||||
{ \
|
||||
(_v)->vx = -(_v)->vx; \
|
||||
(_v)->vy = -(_v)->vy; \
|
||||
(_v)->vz = -(_v)->vz; \
|
||||
}
|
||||
|
||||
#define SetVec(_v, _x, _y, _z) \
|
||||
{ \
|
||||
(_v)->vx = _x; \
|
||||
|
Loading…
Reference in New Issue
Block a user