| 1620 | extern void NPC_BSEmplaced( void ); |
| 1621 | extern qboolean NPC_CheckSurrender( void ); |
| 1622 | void NPC_RunBehavior( int team, int bState ) |
| 1623 | { |
| 1624 | //qboolean dontSetAim = qfalse; |
| 1625 | |
| 1626 | if ( bState == BS_CINEMATIC ) |
| 1627 | { |
| 1628 | NPC_BSCinematic(); |
| 1629 | } |
| 1630 | else if ( NPC->client->ps.weapon == WP_EMPLACED_GUN ) |
| 1631 | { |
| 1632 | NPC_BSEmplaced(); |
| 1633 | NPC_CheckCharmed(); |
| 1634 | return; |
| 1635 | } |
| 1636 | else if ( NPC->client->ps.weapon == WP_SABER ) |
| 1637 | {//jedi |
| 1638 | NPC_BehaviorSet_Jedi( bState ); |
| 1639 | //dontSetAim = qtrue; |
| 1640 | } |
| 1641 | else if ( NPCInfo->scriptFlags & SCF_FORCED_MARCH ) |
| 1642 | {//being forced to march |
| 1643 | NPC_BSDefault(); |
| 1644 | } |
| 1645 | else |
| 1646 | { |
| 1647 | switch( team ) |
| 1648 | { |
| 1649 | |
| 1650 | // case TEAM_SCAVENGERS: |
| 1651 | // case TEAM_IMPERIAL: |
| 1652 | // case TEAM_KLINGON: |
| 1653 | // case TEAM_HIROGEN: |
| 1654 | // case TEAM_MALON: |
| 1655 | // not sure if TEAM_ENEMY is appropriate here, I think I should be using NPC_class to check for behavior - dmv |
| 1656 | case TEAM_ENEMY: |
| 1657 | // special cases for enemy droids |
| 1658 | switch( NPC->client->NPC_class) |
| 1659 | { |
| 1660 | case CLASS_ATST: |
| 1661 | NPC_BehaviorSet_ATST( bState ); |
| 1662 | return; |
| 1663 | case CLASS_PROBE: |
| 1664 | NPC_BehaviorSet_ImperialProbe(bState); |
| 1665 | return; |
| 1666 | case CLASS_REMOTE: |
| 1667 | NPC_BehaviorSet_Remote( bState ); |
| 1668 | return; |
| 1669 | case CLASS_SENTRY: |
| 1670 | NPC_BehaviorSet_Sentry(bState); |
| 1671 | return; |
| 1672 | case CLASS_INTERROGATOR: |
| 1673 | NPC_BehaviorSet_Interrogator( bState ); |
| 1674 | return; |
| 1675 | case CLASS_MINEMONSTER: |
| 1676 | NPC_BehaviorSet_MineMonster( bState ); |
| 1677 | return; |
| 1678 | case CLASS_HOWLER: |
| 1679 | NPC_BehaviorSet_Howler( bState ); |
no test coverage detected