Now playing:
Penguin Cafe Orchestra/, Fight Club (Soundtrack)/, Tron 2.0 Theme, (Odd that I find this helps me focus), Schoene Blaue Danube, Vindaloo, Fatboy Slim – Praise You, Blur – Song 2, Shakira/Britney/Beegees QMix
Code in progress:
// Check the population of hulks in the zone around this // hulk's grid, tracking which cell has the highest count so that // we can pull an older hulk if population limits are reached. GridKey key(gx, gy) ; ChatGrid& cell = _chatGrid[key] ; if ( _countHulks(cell) > wwii_config.stosHulkLimitPerCell ) _popHulk(cell) ; // Setting shlpa to zero disables this functionality if ( wwii_config.stoHulkLimitPerArea <= 0 ) return ; // Start with the assumption ours will be highest populated ChatGrid& highestPopulatedCell = cell ; // Iterators/counters for the loop NEIGHBORS::iterator nIt ; STOS::iterator sIt ; UINT32 hulksInArea ; for ( nIt = cell.neighborhood().begin() ; nIt != cell.neighborhood().end() ; ++nIt ) { ///TODO: Track the highest populated neighbor, count } // Are we worried about population counts? // NOTE: shlpa values can go down as well as up, so // don't assume we'll never be more than 1 over // (hence while instead of if) while ( hulksInArea > wwii_config.stoHulkLimitPerArea ) { _popHulk(highestPopulatedCell) ; --hulksInArea ; }
Recent Comments