All pastes #877786 Raw Edit

Miscellany

public text v1 · immutable
#877786 ·published 2008-01-29 11:40 UTC
rendered paste body
		if(mmgr->GetPlayerCount() > 0 && mmgr->GetPlayerCount() < 2)
		{
			MapCell * mcell = 0;
			Map * mmap = mmgr->GetBaseMap();
			CellSpawns * spawns;
			uint32 x[i] = {230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250};
			uint32 y[j] = {230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250};
			if(!mcell)
			{
				for(int i = 0, i<x->length; i++)
				{
					for (int j = 0; j<y->length; j++)
					{
						mcell = mmgr->GetCell(x[i], y[j]);
						if(!mcell)
						{
							mcell = mmgr->Create( x[i] , y[j] );
							mcell->Init( x[i] , y[j] , mmgr->GetMapId() , mmgr );
							sLog.outDetail( "Created cell [%u,%u] on map %d (instance %d)." , x , y , mmgr->GetMapId() , pPlayer->GetInstanceID() );
							mcell->SetActivity( true );
							mmap->CellGoneActive( x[i] , y[j] );

							spawns = mmap->GetSpawnsList( x[i] , y[j] );
							if( spawns )
								mcell->LoadObjects( spawns );
						}
					}
				}
			}	
		}