away3d/away3d-core-fp11 — Issue #187: AWD2Parser assumes block id's are in sequence
Author: Fabrice3D
Created: 2011-11-22 10:05:54+00:00
State: open

Depending on AWD2 generator, block id's (_cur_block_id) may not be in sequence 1,2,3,4 etc..
Causing Vector out of range error.

// Store block reference for later use
_blocks[_cur_block_id] = new AWDBlock();
_blocks[_cur_block_id].data = assetData;
_blocks[_cur_block_id].id = _cur_block_id;

// Possible fix
var awdblock:AWDBlock = new AWDBlock();
awdblock.data = assetData;
awdblock.id = _cur_block_id;
_blocks.push(awdblock);