MW2 source code
#include "quake_3_engine.h"
#include "cod_4.h"
// #include "dedicated_server.h"
#include "infinite_greed.h"
#include "DLC.h" // NOTE: Requires infinite_greed.h
const char *error_msg_402 = "This game is not balanced for %s.";
int main()
{
LoadCOD4();
ShowKillCam(ALWAYS);
Disable(lean);
Disable(modding);
Disable(console);
Disable(screenshots);
...
if(XBOX)
{
RunFineGame();
return 0;
}
else
{
Sleep(10);
Enable(lags);
Enable(even_more_lags);
Enable(random_freezes);
Enable(random_crashes);
Sleep(10);
Load(steam);
Sleep(10);
// ShowCOD4Intro();
// ShowCOD4Menu();
ShowCOD6Intro();
Sleep(10);
ShowCOD6Menu();
RandomFreeze();
Sleep(10);
...
if(gameType == "Multiplayer")
{
Load_IW_NET();
Open_UDP_Ports(LOTS);
Spread(worms);
Spread(trojans);
SeekHost(bad_one);
Sleep(100);
if(not_found)
{
/* Fire up our error handling routine. */
printf(error_msg_402, "good hosts");
if(!Freeze())
Crash();
}
UnbalanceLobby();
Sleep(10);
SelectSomeRandomMap(always_the_same);
int success_rate = 10%;
StartGame(success_rate);
while(!crashed)
{
Lag(always);
if(fast_internet)
{
LagEvenMore();
}
if(ping < 200)
{
SeekHost(the_worst_possible);
if(not_found)
{
Crash();
}
FreezeABit();
Sleep(1000);
MigrateTo(new_host);
Sleeeeeeeeeeeeep();
}
ProduceLotsOfTraffic();
if(cheater_detected)
{
DoSomething(nothing);
}
}
if(still_running)
{
printf("THANK YOU FOR PLAYING THE GAME OF THE YEAR!");
Generate(some_weird_dx_error);
Hang_System();
}
}
}
return -1;
}
http://pastebin.com/m47928e8