Skip to content

Commit 9267734

Browse files
committed
- fix headlights disappearing in bumper view (WTF)
1 parent 8651e2f commit 9267734

2 files changed

Lines changed: 17 additions & 16 deletions

File tree

src_rebuild/Game/C/debris.c

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -409,14 +409,15 @@ MATRIX leaf_mat;
409409
// [D] [T]
410410
void PlacePoolForCar(CAR_DATA *cp, CVECTOR *col, int front, int in_car)
411411
{
412-
short brightness;
413-
POLY_FT4 *poly;
414-
int i;
415412
SVECTOR s[12];
416413
SVECTOR s1[12];
417-
VECTOR mid_position;
418-
VECTOR toss;
419414
VECTOR pos;
415+
VECTOR toss;
416+
SVECTOR smid;
417+
short brightness;
418+
POLY_FT4 *poly;
419+
int i;
420+
420421
CAR_COSMETICS* car_cos;
421422
CVECTOR color;
422423
int Z;
@@ -510,24 +511,24 @@ void PlacePoolForCar(CAR_DATA *cp, CVECTOR *col, int front, int in_car)
510511
s1[2].vz = s1[3].vz;
511512

512513
SetRotMatrix(&cp->hd.drawCarMat);
513-
SetVec(&mid_position, 0, 0, -500);
514+
SetVec(&smid, 0, 0, -500);
515+
ApplyRotMatrix(&smid, &toss);
516+
VecAdd(&toss, &toss, &pos);
514517

515-
gte_ldlv0(&mid_position);
516-
gte_rtv0();
517-
gte_stlvnl(&mid_position);
518-
VecAdd(&mid_position, &mid_position, &pos);
519-
520-
car_road_height = MapHeight(&mid_position);
518+
car_road_height = MapHeight(&toss);
521519

522520
// adjust height and poisition for each vertex
523521
for(i = 0; i < count; i++)
524522
{
525523
int temp_y;
526524

527525
s1[i].vy = 0;
528-
gte_ldv0(&s1[i]);
529-
gte_rtv0();
530-
gte_stlvnl(&toss);
526+
527+
// GCC, What the fuck? Optimized version with macros works like shit - lights are 'wiggly' !!!
528+
ApplyRotMatrix(&s1[i], &toss);
529+
//gte_ldv0(&s1[i]);
530+
//gte_rtv0();
531+
//gte_stlvnl(&toss);
531532

532533
VecAdd(&toss, &toss, &pos);
533534
toss.vy += 200;

src_rebuild/PsyCross

0 commit comments

Comments
 (0)