MCPcopy Create free account
hub / github.com/JACoders/OpenJK / NPC_PrecacheByClassName

Function NPC_PrecacheByClassName

code/game/NPC_stats.cpp:1440–1568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1438}
1439
1440void NPC_PrecacheByClassName( const char* type )
1441{
1442 if (!type || !type[0])
1443 {
1444 return;
1445 }
1446
1447 if ( !Q_stricmp( "gonk", type))
1448 {
1449 NPC_Gonk_Precache();
1450 }
1451 else if ( !Q_stricmp( "mouse", type))
1452 {
1453 NPC_Mouse_Precache();
1454 }
1455 else if ( !Q_stricmpn( "r2d2", type, 4))
1456 {
1457 NPC_R2D2_Precache();
1458 }
1459 else if ( !Q_stricmp( "atst", type))
1460 {
1461 NPC_ATST_Precache();
1462 }
1463 else if ( !Q_stricmpn( "r5d2", type, 4))
1464 {
1465 NPC_R5D2_Precache();
1466 }
1467 else if ( !Q_stricmp( "mark1", type))
1468 {
1469 NPC_Mark1_Precache();
1470 }
1471 else if ( !Q_stricmp( "mark2", type))
1472 {
1473 NPC_Mark2_Precache();
1474 }
1475 else if ( !Q_stricmp( "interrogator", type))
1476 {
1477 NPC_Interrogator_Precache(NULL);
1478 }
1479 else if ( !Q_stricmp( "probe", type))
1480 {
1481 NPC_Probe_Precache();
1482 }
1483 else if ( !Q_stricmp( "seeker", type))
1484 {
1485 NPC_Seeker_Precache();
1486 }
1487 else if ( !Q_stricmpn( "remote", type, 6))
1488 {
1489 NPC_Remote_Precache();
1490 }
1491 else if ( !Q_stricmpn( "shadowtrooper", type, 13 ) )
1492 {
1493 NPC_ShadowTrooper_Precache();
1494 }
1495 else if ( !Q_stricmp( "minemonster", type ))
1496 {
1497 NPC_MineMonster_Precache();

Callers 3

SP_NPC_spawnerFunction · 0.85
NPC_Spawn_fFunction · 0.85
CG_NPC_PrecacheFunction · 0.85

Calls 15

Q_stricmpFunction · 0.85
Q_stricmpnFunction · 0.85
SandCreature_PrecacheFunction · 0.85
RT_PrecacheFunction · 0.85
NPC_Rosh_Dark_PrecacheFunction · 0.85
NPC_Tusken_PrecacheFunction · 0.85
NPC_Saboteur_PrecacheFunction · 0.85
NPC_Jawa_PrecacheFunction · 0.85

Tested by

no test coverage detected