NpcClientStartup: Difference between revisions

From PSwiki
Jump to navigation Jump to search
Created page with 'On startup the NPC Client will cache various bits of data. LoadNPCTypes(const char* xmlfile) This loads all the data in ''data/npcbehave.xml'' and builds '''NPCType''' for …'
 
Ethryn (talk | contribs)
m add to category (Engine documents)
Line 15: Line 15:


Should note that none of the entities are created though, just their NPC objects.  When entities are sent from the server to the npcclient it will attach the NPC to those entities.
Should note that none of the entities are created though, just their NPC objects.  When entities are sent from the server to the npcclient it will attach the NPC to those entities.
[[Category:Engine documents]]

Revision as of 00:05, 23 October 2010

On startup the NPC Client will cache various bits of data.

 LoadNPCTypes(const char* xmlfile)

This loads all the data in data/npcbehave.xml and builds NPCType for each one. These are stored in the the psNPCClient.npctypes array.


 ReadNPCsFromDatabase()

This reads all the data from the sc_npc_definitions table and will create a new NPC object for each of them. They are stored inside the psNPCClient.npcs array.


It also loads up the tribe and path information.


Should note that none of the entities are created though, just their NPC objects. When entities are sent from the server to the npcclient it will attach the NPC to those entities.