-
-#if 0
- /* Get surface samples
- *
- * TODO: Replace this with a spiral starting from the player position
- */
- for( int y=0; y<WALKGRID_SIZE; y++ )
- {
- for( int x=0; x<WALKGRID_SIZE; x++ )
- {
- struct grid_sample *s = &wg.samples[y][x];
- v3_muladds( wg.region[0], (v3f){ x, 0, y }, k_gridscale, s->pos );
- s->pos[1] = cell[1];
- player_walkgrid_samplepole( s );
- }
- }
-
- /*
- * Calculate h+v clipping distances.
- * Distances are stored in A always, so you know that if the sample is
- * invalid, this signifies the start of the manifold as opposed to the
- * extent or bounds of it.
- */
- for( int i=0; i<2; i++ )
- {
- for( int x=0; x<WALKGRID_SIZE; x++ )
- {
- for( int z=0; z<WALKGRID_SIZE-1; z++ )
- {
- struct grid_sample *sa, *sb;
- if( i == 1 )
- {
- sa = &wg.samples[z][x];
- sb = &wg.samples[z+1][x];
- }
- else
- {
- sa = &wg.samples[x][z];
- sb = &wg.samples[x][z+1];
- }
-
- player_walkgrid_clip( sa, sb, i );
-
- if( sa->type == k_sample_type_valid &&
- sb->type == k_sample_type_valid )
- vg_line( sa->pos, sb->pos, 0xffffffff );
-#if 0
- if( sa->valid != sb->valid )
- {
- clipdir[i*2] = (float)(sa->valid - sb->valid) * k_gridscale;
-
- player_walkgrid_clip( sa->valid? sa->pos: sb->pos,
- clipdir, sa->clip[i] );
- }
- else
- {
- if( sa->valid )
- {
- vg_line( sa->pos, sb->pos, 0xffffffff );
- }
- }
-#endif
- }
- }
- }
-#endif
-