rem: TimeIn += 2;
add: TimeIn += ONE_SECOND / 30;
context: PlanetSide (PMENU_STATE pMS){	SIZE index;	DWORD TimeIn;	PLANETSIDE_DESC PSD;	BYTE TectonicsChanceTab[] = {0*3, 0*3, 1*3, 2*3, 4*3, 8*3, 16*3, 32*3};	BYTE WeatherChanceTab[] = {0*3, 0*3, 1*3, 2*3, 3*3, 6*3, 12*3, 24*3};	BYTE FireChanceTab[] = {0*3, 0*3, 1*3, 2*3, 4*3, 12*3, 24*3, 48*3};	memset ((PPLANETSIDE_DESC)&PSD, 0, sizeof (PSD));	PSD.InTransit = TRUE;	PSD.OldMenuSounds = MenuSounds;	MenuSounds = 0;	PSD.TectonicsChance =			TectonicsChanceTab[pSolarSysState->SysInfo.PlanetInfo.Tectonics];	PSD.WeatherChance =			WeatherChanceTab[pSolarSysState->SysInfo.PlanetInfo.Weather];	index = pSolarSysState->SysInfo.PlanetInfo.SurfaceTemperature;	if (index < 50)		PSD.FireChance = FireChanceTab[0];	else if (index < 100)		PSD.FireChance = FireChanceTab[1];	else if (index < 150)		PSD.FireChance = FireChanceTab[2];	else if (index < 250)		PSD.FireChance = FireChanceTab[3];	else if (index < 350)		PSD.FireChance = FireChanceTab[4];	else if (index < 550)		PSD.FireChance = FireChanceTab[5];	else if (index < 800)		PSD.FireChance = FireChanceTab[6];	else		PSD.FireChance = FireChanceTab[7];	PSD.ElementLevel = GetSBayCapacity (NULL_PTR)			- GLOBAL_SIS (TotalElementMass);	PSD.MaxElementLevel = MAX_SCROUNGED;	if (GET_GAME_STATE (IMPROVED_LANDER_CARGO))		PSD.MaxElementLevel <<= 1;	if (PSD.ElementLevel < PSD.MaxElementLevel)		PSD.MaxElementLevel = PSD.ElementLevel;	PSD.ElementLevel = 0;	PSD.MineralText[0].align = ALIGN_CENTER;	PSD.MineralText[0].pStr = PSD.AmountBuf;	PSD.MineralText[1] = PSD.MineralText[0];	PSD.MineralText[2] = PSD.MineralText[1];	PSD.ColorCycle[0] = BUILD_COLOR (MAKE_RGB15 (0x1F, 0x3, 0x00), 0x7F);	PSD.ColorCycle[1] = BUILD_COLOR (MAKE_RGB15 (0x1F, 0xA, 0x00), 0x7D);	PSD.ColorCycle[2] = BUILD_COLOR (MAKE_RGB15 (0x1F, 0x11, 0x00), 0x7B);	PSD.ColorCycle[3] = BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x00), 0x71);	for (index = 4; index < (NUM_TEXT_FRAMES >> 1) - 4; ++index)		PSD.ColorCycle[index] = BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F);	PSD.ColorCycle[(NUM_TEXT_FRAMES >> 1) - 4] = BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x00), 0x71);	PSD.ColorCycle[(NUM_TEXT_FRAMES >> 1) - 3] = BUILD_COLOR (MAKE_RGB15 (0x1F, 0x11, 0x00), 0x7B);	PSD.ColorCycle[(NUM_TEXT_FRAMES >> 1) - 2] = BUILD_COLOR (MAKE_RGB15 (0x1F, 0xA, 0x000), 0x7D);	PSD.ColorCycle[(NUM_TEXT_FRAMES >> 1) - 1] = BUILD_COLOR (MAKE_RGB15 (0x1F, 0x3, 0x00), 0x7F);	pMS->ModuleFrame = (FRAME)&PSD;	index = NORMALIZE_FACING ((COUNT)TFB_Random ());	LanderFrame[0] = SetAbsFrameIndex (			LanderFrame[0], index			);	pMS->delta_item = 0;	pSolarSysState->MenuState.Initialized += 4;	InitPlanetSide ();	TimeIn = GetTimeCounter ();	for (index = 0; index <= NUM_LANDING_DELTAS; ++index)	{		if (index == 0)			TimeIn += ONE_SECOND;		else			TimeIn += 2;		do		{			ScrollPlanetSide (0, 0, index);		} while (GetTimeCounter () < TimeIn);	}	PSD.InTransit = FALSE;	TimeIn += 2;	pSolarSysState->MenuState.flash_rect1.corner.x = LOWORD (TimeIn);	pSolarSysState->MenuState.flash_rect1.corner.y = HIWORD (TimeIn);	pMS->Initialized = FALSE;	pMS->InputFunc = DoPlanetSide;	DoInput ((PVOID)pMS);	if (!(GLOBAL (CurrentActivity) & CHECK_ABORT))	{		SIZE crew_left;		RECT r;		//CONTEXT OldContext;		crew_left = HIBYTE (pMS->delta_item);		r.corner.x = SIS_ORG_X;		r.corner.y = SIS_ORG_Y;		r.extent.width = SIS_SCREEN_WIDTH;		r.extent.height = SIS_SCREEN_HEIGHT;		if (crew_left == 0)		{#ifdef NEVER			ScrollPlanetSide (0, 0, 0);#endif /* NEVER */			--GLOBAL_SIS (NumLanders);			SetSemaphore (GraphicsSem);			DrawLanders ();			ClearSemaphore (GraphicsSem);			ReturnToOrbit (&r);		}		else		{			PSD.InTransit = TRUE;			PlaySound (SetAbsSoundIndex (LanderSounds, LANDER_RETURNS),					GAME_SOUND_PRIORITY + 1);			TimeIn = GetTimeCounter ();			for (index = NUM_LANDING_DELTAS; index >= 0; --index)			{				if (index == 0)					TimeIn += (ONE_SECOND >> 1);				else					TimeIn += 2;				do				{					ScrollPlanetSide (0, 0, index);				} while (GetTimeCounter () < TimeIn);			}			ReturnToOrbit (&r);#ifdef SPIN_ON_LAUNCH			// If PauseRotate is set to 2 the plaet will be displayed, but won't rotate			// Until the lander animation is complete			pSolarSysState->PauseRotate = 0;			// Give The RotatePlanet thread a slice to draw the planet			SleepThread (1);#endif			SetSemaphore (GraphicsSem);			SetContext (SpaceContext);			AnimateLaunch (LanderFrame[6], TRUE);			DeltaSISGauges (crew_left, 0, 0);			if (PSD.ElementLevel)			{				for (index = 0; index < NUM_ELEMENT_CATEGORIES; ++index)				{					GLOBAL_SIS (ElementAmounts[index]) +=							PSD.ElementAmounts[index];					GLOBAL_SIS (TotalElementMass) +=							PSD.ElementAmounts[index];				}				DrawStorageBays (FALSE);			}			ClearSemaphore (GraphicsSem);			GLOBAL_SIS (TotalBioMass) += PSD.BiologicalLevel;		}	}	pMS->ModuleFrame = 0;	{		HELEMENT hElement, hNextElement;		for (hElement = GetHeadElement ();				hElement; hElement = hNextElement)		{			ELEMENTPTR ElementPtr;			LockElement (hElement, &ElementPtr);			hNextElement = _GetSuccLink (ElementPtr);			if (ElementPtr->state_flags & FINITE_LIFE)			{				UnlockElement (hElement);				RemoveElement (hElement);				FreeElement (hElement);				continue;			}			UnlockElement (hElement);		}	}	ZeroVelocityComponents (&GLOBAL (velocity));	MenuSounds = PSD.OldMenuSounds;		pSolarSysState->MenuState.Initialized -= 4;	pSolarSysState->PauseRotate = 0;}