EDIT: OK my bad, board_heights[ num ];
so I solved it, doh!
Sorry for the thread, but my mind cant think, this is one of those problems Ive had over the last 30 years, where it doesnt make sense, usually its cause Ive done something wrong
why is height always 0.0?
ta zed
edit ok you cant do color or bold in a code field
so I solved it, doh!
Sorry for the thread, but my mind cant think, this is one of those problems Ive had over the last 30 years, where it doesnt make sense, usually its cause Ive done something wrong
Code:
for ( int x=0; x<VERT_HEIGHT_RESX; x++ ) {
for ( int y=0; y<VERT_HEIGHT_RESY; y++ ) {
board_heights[x+VERT_HEIGHT_RESX*y] = 0.0f;
int num = dungeon.tiles[x+VERT_HEIGHT_RESX*y];
if ( num >= 'a' && num <= 'z' ) {
board_heights[x+VERT_HEIGHT_RESX*y] = dungeon.ReturnFloatFromKeyValue( num );
print( board_heights[x+VERT_HEIGHT_RESX*y] );[B] [COLOR=#ff4d4d]// good values[/COLOR][/B]
height_field[ x+VERT_HEIGHT_RESX*y ] = board_heights[x+VERT_HEIGHT_RESX*y];[B] [COLOR=#ff4d4d]// works[/COLOR][/B]
}
}
}
for ( int x=0; x<VERT_HEIGHT_RESX; x++ ) {
for ( int y=0; y<VERT_HEIGHT_RESY; y++ ) {
int xx = x;//(x<VERT_HEIGHT_RESX) ? x : VERT_HEIGHT_RESX-1;
int yy = y;//(y<VERT_HEIGHT_RESY) ? y : VERT_HEIGHT_RESY-1;
float height = 0.0f;
int num = dungeon.tiles[ xx+VERT_HEIGHT_RESX*yy ];
if ( num >= 'a' && num <= 'z' ) {
height = board_heights[ num ];
print( height + " " + num ); [B][COLOR=#ff4d4d] // always 0.0[[/COLOR]/B]
}
}
}
why is height always 0.0?
ta zed
edit ok you cant do color or bold in a code field
Last edited: