Skip to content

Commit

Permalink
- misc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SoapyMan committed Feb 3, 2022
1 parent 277d391 commit d4cdb48
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
9 changes: 2 additions & 7 deletions src_rebuild/DebugOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 2 additions & 4 deletions src_rebuild/Game/C/civ_ai.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions src_rebuild/Game/C/gamesnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand All @@ -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++;
Expand Down
14 changes: 14 additions & 0 deletions src_rebuild/Game/dr2math.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down

0 comments on commit d4cdb48

Please sign in to comment.