BSP Initialization
From Valve Developer Community
This article is a stub. You can help by adding to it (http://developer.valvesoftware.com/w/index.php?title=BSP_Initialization&action=edit).
All entities from the map are spawned and initialized from the MapEntity_ParseAllEntities function within mapentities.cpp located in src/dlls directory, with the pMapData string containing all the relevant entity info. The MapEntity_ParseEntity function takes care of actually spawning an entity and setting up its keyvalues etc.
This text was taken from a post in the VERC Network Forums, you can see the thread here (http://www.chatbear.com/board.plm?a=viewthread&t=269,1120105649,17601&id=874960&b=4991&v=flatold)
