3 Commity a3a5c917b6 ... e31aa2b0e2

Autor SHA1 Správa Dátum
  Asher Gordon e31aa2b0e2 Raise the bug's shadow slightly. 4 rokov pred
  Asher Gordon d10248b539 Raise the y axis increment a bit more for shadows, etc. 4 rokov pred
  Asher Gordon 80e0b1683a Fix FLT_MAX being used instead of -FLT_MAX and vice versa. 4 rokov pred

+ 2 - 1
src/kofola/game_logic.cpp

@@ -2288,7 +2288,8 @@ void gl_Pripoj_Flek_k_Berusce(ITEMDESC * pItem)
 
   pFlek->Flag = pItem->Index_Of_Game_Mesh;
   pFlek->pos[0] = 0;
-  pFlek->pos[1] = 0;
+  // Raise shadows a bit. This fixes an issue in level 323.
+  pFlek->pos[1] = 0.01;
   pFlek->pos[2] = 0;
   pFlek->Material = kom_najdi_material("flek10");
   pFlek->nx[0] = 1;

+ 13 - 13
src/komat/Berusky3d_castice.cpp

@@ -245,13 +245,13 @@ int pe_updatuj_strepiny(G_KONFIG * p_ber, PARMETAC * p_par)
   p_min = &p_par->min;
   p_max = &p_par->max;
 
-  p_max->x = -FLT_MAX;
-  p_max->y = -FLT_MAX;
-  p_max->z = -FLT_MAX;
+  p_min->x = -FLT_MAX;
+  p_min->y = -FLT_MAX;
+  p_min->z = -FLT_MAX;
 
-  p_min->x = FLT_MAX;
-  p_min->y = FLT_MAX;
-  p_min->z = FLT_MAX;
+  p_max->x = FLT_MAX;
+  p_max->y = FLT_MAX;
+  p_max->z = FLT_MAX;
 
   p_par->pnum = 0;
 
@@ -403,13 +403,13 @@ int pe_updatuj_fleky(G_KONFIG * p_ber, PARMETAC * p_par)
   p_min = &p_par->min;
   p_max = &p_par->max;
 
-  p_max->x = -FLT_MAX;
-  p_max->y = -FLT_MAX;
-  p_max->z = -FLT_MAX;
+  p_min->x = -FLT_MAX;
+  p_min->y = -FLT_MAX;
+  p_min->z = -FLT_MAX;
 
-  p_min->x = FLT_MAX;
-  p_min->y = FLT_MAX;
-  p_min->z = FLT_MAX;
+  p_max->x = FLT_MAX;
+  p_max->y = FLT_MAX;
+  p_max->z = FLT_MAX;
 
   p_par->pnum = 0;
 
@@ -946,7 +946,7 @@ int pe_updatuj_kour_stopa(G_KONFIG * p_ber, PARMETAC * p_mt)
 
       p_par->p = *p_hnizdo->p_pivot;
       {
-        VECT min(FLT_MAX), max(-FLT_MAX);
+        VECT min(-FLT_MAX), max(FLT_MAX);
         kd_bunka_min_max(&p_par->p, &min, &max);
       }
       

+ 1 - 1
src/komat/Berusky3d_kofola_interface.cpp

@@ -1033,7 +1033,7 @@ void kom_flek_zmen(FlekHandle fh, BOD * p_p, BOD * p_nx, BOD * p_nz, float dx,
   p_flek->p = *p_p;
 
   // Eliminate y-axis fighting
-  p_flek->p.y += 0.001;
+  p_flek->p.y += 0.02;
 
   p_flek->nx.x = p_nx->x * dx;
   p_flek->nx.y = p_nx->y * dx;