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

Function NPC_SetCombatPoint

code/game/NPC_combat.cpp:3102–3121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3100*/
3101
3102qboolean NPC_SetCombatPoint( int combatPointID )
3103{
3104 if (combatPointID==NPCInfo->combatPoint)
3105 {
3106 return qtrue;
3107 }
3108
3109 //Free a combat point if we already have one
3110 if ( NPCInfo->combatPoint != -1 )
3111 {
3112 NPC_FreeCombatPoint( NPCInfo->combatPoint );
3113 }
3114
3115 if ( NPC_ReserveCombatPoint( combatPointID ) == qfalse )
3116 return qfalse;
3117
3118 NPCInfo->combatPoint = combatPointID;
3119
3120 return qtrue;
3121}
3122
3123extern qboolean CheckItemCanBePickedUpByNPC( gentity_t *item, gentity_t *pickerupper );
3124gentity_t *NPC_SearchForWeapons( void )

Callers 11

Sniper_MoveFunction · 0.70
Grenadier_MoveFunction · 0.70
Boba_DoSniperFunction · 0.70
Boba_TacticsSelectFunction · 0.70
Boba_RespawnFunction · 0.70
Boba_UpdateFunction · 0.70
NPC_BSFleeFunction · 0.70
NPC_StartFleeFunction · 0.70
ST_CommanderFunction · 0.70

Calls 2

NPC_FreeCombatPointFunction · 0.70
NPC_ReserveCombatPointFunction · 0.70

Tested by

no test coverage detected