server/engine/gameLogic/Player.js
// from list, break down each element and store according to what vertices they touch

from list, break down each element and store according to what vertices they touch
from list break down each element and store according to what vertices they touch
function storeVerticesToMap(items, mappedData){
    mappedData = mappedData || {};
    var newVertexStuffV1;
    var newVertexStuffV2;
    for (var key in items){
        newVertexStuffV1 = [];
        newVertexStuffV2 = [];
        v1 = items[key][0];
        v2 = items[key][1];
        if (mappedData[v1]){
            newVertexStuffV1 = mappedData[v1];
        }
        newVertexStuffV1.push(items[key]);
        mappedData[v1] = newVertexStuffV1;
        if (mappedData[v2]){
            newVertexStuffV2 = mappedData[v2];
        }
        newVertexStuffV2.push(items[key]);
        mappedData[v2] = newVertexStuffV2;
    }
    return mappedData;
}
function storeVerticesToMap ( items , mappedData ) { mappedData = mappedData || { } ; var newVertexStuffV1 ; var newVertexStuffV2 ; for ( var key in items ) { newVertexStuffV1 = [ ] ; newVertexStuffV2 = [ ] ; v1 = items [ key ] [ 0 ] ; v2 = items [ key ] [ 1 ] ; if ( mappedData [ v1 ] ) { newVertexStuffV1 = mappedData [ v1 ] ; } newVertexStuffV1 . push ( items [ key ] ) ; mappedData [ v1 ] = newVertexStuffV1 ; if ( mappedData [ v2 ] ) { newVertexStuffV2 = mappedData [ v2 ] ; } newVertexStuffV2 . push ( items [ key ] ) ; mappedData [ v2 ] = newVertexStuffV2 ; } return mappedData ; }
from list, break down each element and store according to what vertices they touch
from list break down each element and store according to what vertices they touch