|
Planeshift
|
This object represents each NPC managed by this superclient. More...
#include <npc.h>
Classes | |
| struct | Locate |
| Structure to hold located positions. More... | |
Public Types | |
| enum | { LOCATION_NONE = 0, LOCATION_POS = 1, LOCATION_SECTOR = 2, LOCATION_ANGLE = 4, LOCATION_WP = 8, LOCATION_RADIUS = 16, LOCATION_TARGET = 32, LOCATION_ALL = -1 } |
| typedef csHash< Locate *, csString > | LocateHash |
Public Member Functions | |
| void | AddAutoMemorize (csString types) |
| Add new types to the autoMemorize store. More... | |
| void | AddToHateList (gemNPCActor *attacker, float delta) |
| Change the hate list value for an attacker. More... | |
| void | CheckPosition () |
| void | ClearState () |
| Clear the NPCs state. More... | |
| bool | ContainAutoMemorizeType (const csString &type) |
| Check if the type is contained in the NPC autoMemorize store. More... | |
| bool | CopyLocate (csString source, csString destination, unsigned int flags) |
| Copy locates. More... | |
| bool | Delete () |
| Remove this NPC from npc_definitions. More... | |
| void | Disable (bool disable=true) |
| void | Dump () |
| Dump all information for one NPC to the console. More... | |
| void | DumpBehaviorList (csString &output) |
| Dump all behaviors for npc. More... | |
| void | DumpControlled (csString &output) |
| Dump the controlled npcs for npc. More... | |
| void | DumpDebugLog (csString &output) |
| Dump the debug log for npc. More... | |
| void | DumpHateList (csString &output) |
| Dump all hated entities for npc. More... | |
| void | DumpHateList (NPC *npc) |
| Dump all hated entities for npc. More... | |
| void | DumpMemory (csString &output) |
| Dump the memory for npc. More... | |
| void | DumpReactionList (csString &output) |
| Dump all reactions for npc. More... | |
| void | DumpState (csString &output) |
| Dump all state information for npc. More... | |
| void | GetActiveLocate (csVector3 &pos, iSector *§or, float &rot) |
| Get the NPCs current active locate. More... | |
| void | GetActiveLocate (Waypoint *&wp) |
| Return the wp of the current active locate. More... | |
| float | GetActiveLocateRadius () const |
| Get the radius of the last locate operatoins. More... | |
| gemNPCActor * | GetActor () |
| float | GetAngularVelocity () |
| Return the angular velocity of this NPC. More... | |
| NPCType * | GetBrain () |
| csString | GetBuffer (const csString &bufferName) |
| Return a named buffer from the NPC. More... | |
| Tribe::Memory * | GetBufferMemory () |
| Retrive the current buffer memory of the npc. More... | |
| Tribe::Asset * | GetBuildingSpot () |
| Get the stored building spot for this NPC. More... | |
| Behavior * | GetCurrentBehavior () |
| uint8_t | GetDRCounter (csTicks when, const csVector3 &pos, float yRot, iSector *sector, const csVector3 &vel, float angVel) |
| EID | GetEID () |
| Return the entity ID if an entity exist else 0. More... | |
| float | GetEntityHate (gemNPCActor *entity) |
| Retrive the hate this NPC has to a given entity. More... | |
| int | GetFallCounter () |
| Return the fall counter. More... | |
| float | GetHP () |
| Get the npc HP. More... | |
| float | GetHPRate () const |
| Get the npc HPRate. More... | |
| Perception * | GetLastPerception () |
| psLinearMovement * | GetLinMove () |
| float | GetMana () |
| Get the npc Mana. More... | |
| float | GetManaRate () const |
| Get the npc ManaRate. More... | |
| float | GetMaxHP () const |
| Get the npc MaxHP. More... | |
| float | GetMaxMana () const |
| Get the npc MaxMana. More... | |
| float | GetMaxMenStamina () const |
| Get the npc MaxMenStamina. More... | |
| float | GetMaxPysStamina () const |
| Get the npc MaxPysStamina. More... | |
| float | GetMenStamina () |
| Get the npc MenStamina. More... | |
| float | GetMenStaminaRate () const |
| Get the npc MenStaminaRate. More... | |
| gemNPCActor * | GetMostHated (float range, bool includeOutsideRegion, bool includeInvisible, bool includeInvincible, float *hate=NULL) |
| Find the most hated entity within range of the NPC. More... | |
| gemNPCActor * | GetMostHated (csVector3 &pos, iSector *sector, float range, LocationType *region, bool includeOutsideRegion, bool includeInvisible, bool includeInvincible, float *hate) |
| Find the most hated entity within range of a given position. More... | |
| iMovable * | GetMovable () |
| const char * | GetName () |
| gemNPCActor * | GetNearestActor (float range, csVector3 &destPosition, iSector *&destSector, float &destRange) |
| Return the nearest actor within the given range. More... | |
| gemNPCActor * | GetNearestDeadActor (float range) |
| gemNPCActor * | GetNearestNPC (float range, csVector3 &destPosition, iSector *&destSector, float &destRange) |
| Return the nearest NPC within the given range. More... | |
| gemNPCActor * | GetNearestPlayer (float range, csVector3 &destPosition, iSector *&destSector, float &destRange) |
| Return the nearest player within the given range. More... | |
| gemNPCActor * | GetNearestVisibleFriend (float range) |
| const char * | GetOrigBrainType () |
| gemNPCObject * | GetOwner () |
| const char * | GetOwnerName () |
| PID | GetPID () |
| float | GetPysStamina () |
| Get the npc PysStamina. More... | |
| float | GetPysStaminaRate () const |
| Get the npc PysStaminaRate. More... | |
| psNPCRaceListMessage::NPCRaceInfo_t * | GetRaceInfo () |
| Get the npc race info. More... | |
| LocationType * | GetRegion () |
| csString & | GetRegionName () |
| float | GetRunVelocity () |
| Return the run velocity for this NPC. More... | |
| const csVector3 & | GetSpawnPosition () const |
| Return the position part of the spawn position. More... | |
| iSector * | GetSpawnSector () const |
| Return the sector part of the spawn position. More... | |
| gemNPCObject * | GetTarget () |
| Tribe * | GetTribe () |
| Get the tribe this npc belongs to. More... | |
| const csString & | GetTribeMemberType () const |
| Return the type/class for this NPC's tribe membership if any. More... | |
| float | GetVelocity () |
| Return the ?override? velocity for this NPC. More... | |
| float | GetWalkVelocity () |
| Return the walk velocity for this NPC. More... | |
| bool | HasAutoMemorizeTypes () const |
| Check if the NPC has anything to automemorize. More... | |
| void | IncrementFallCounter () |
| Increment the fall counter. More... | |
| csString | Info (const csString &infoRequestSubCmd) |
| Provide info about the NPC. More... | |
| bool | InsertCopy (PID use_char_id, PID ownerPID) |
| Insert a new copy of NPC into npc_definitions. More... | |
| bool | IsAlive () const |
| bool | IsDisabled () |
| bool | IsInsideRegion () |
| Check the inside region state of the npc. More... | |
| bool | IsInsideTribeHome () |
| Check the inside tribe home state of the npc. More... | |
| bool | Load (iResultRow &row, csHash< NPCType *, const char * > &npctypes, EventManager *eventmanager, PID usePID) |
| Loads an NPC from one row of sc_npc_definitions, it also loads the corresponding brain. More... | |
| void | Load (const char *name, PID pid, NPCType *type, const char *region_name, int debugging, bool disabled, EventManager *eventmanager) |
| Loads an NPC base information and his brain. More... | |
| NPC (psNPCClient *npcclient, NetworkManager *networkmanager, psWorld *world, iEngine *engine, iCollideSystem *cdsys) | |
| void | ReleaseControl (gemNPCActor *actor) |
| Release control of another controlled entity. More... | |
| void | RemoveAutoMemorize (csString types) |
| Remove types from the autoMemorize store. More... | |
| void | RemoveFromHateList (EID who) |
| Remove a entity from the hate list. More... | |
| void | ReplaceBuffers (csString &result) |
| Replace $NBUFFER[x] with values from the NPC buffer. More... | |
| void | ReplaceLocations (csString &result) |
| Replace a location. More... | |
| void | ScopedTimerCallback (const ScopedTimer *timer) |
| Callback for debug scope timers. More... | |
| void | SetActor (gemNPCActor *actor) |
| void | SetAlive (bool a) |
| void | SetBrain (NPCType *type) |
| Sets a new brain (npctype) to this npc. More... | |
| void | SetBuffer (const csString &bufferName, const csString &value) |
| Set/Update the value of a named buffer. More... | |
| void | SetBufferMemory (Tribe::Memory *memory) |
| Set a new buffer memory for the NPC. More... | |
| void | SetBuildingSpot (Tribe::Asset *buildingSpot) |
| Set a building spot for this NPC. More... | |
| void | SetDRCounter (uint8_t counter) |
| void | SetInsideRegion (bool inside) |
| Set the inside region state. More... | |
| void | SetInsideTribeHome (bool inside) |
| Set the inside tribe home state. More... | |
| void | SetLastPerception (Perception *pcpt) |
| void | SetLocate (const csString &destination, const NPC::Locate &locate) |
| Set the NPCs locate. More... | |
| void | SetOwner (EID owner_EID) |
| Sets the owner of this npc. More... | |
| void | SetTarget (gemNPCObject *t) |
| void | SetTribe (Tribe *new_tribe) |
| Set a new tribe for this npc. More... | |
| void | SetTribeMemberType (const char *tribeMemberType) |
| Set the type/class for this npc in a tribe. More... | |
| void | StoreSpawnPosition () |
| Store the start position. More... | |
| void | TakeControl (gemNPCActor *actor) |
| Take control of another entity. More... | |
| void | Tick () |
| void | TriggerEvent (Perception *pcpt, float maxRange=-1.0, csVector3 *basePos=NULL, iSector *baseSector=NULL, bool sameSector=false) |
| Send a perception to this NPC. More... | |
| void | TriggerEvent (const char *pcpt) |
| Send a perception to this NPC. More... | |
| void | UpdateControlled () |
| Update entities controlled by this NPC. More... | |
| virtual | ~NPC () |
Public Member Functions inherited from iScriptableVar | |
| virtual | ~iScriptableVar () |
Public Member Functions inherited from RemoteDebug | |
| void | AddDebugClient (uint clientNum, int debugLevel) |
| Add a client to receive debug information. More... | |
| int | GetDebugging () const |
| Get the local debugging level. More... | |
| csString | GetRemoteDebugClientsString () const |
| Utility function to retrive a string with all remote debugging clients for debug outputs. More... | |
| bool | IsDebugging () |
| Check if debugging is enabled. More... | |
| bool | IsDebugging (int debugLevel) |
| Check if this NPC is debugging at the given level. More... | |
| void | Printf (int debugLevel, const char *msg,...) |
| Function to generate a debug print. More... | |
| RemoteDebug () | |
| Constructor. More... | |
| void | RemoveDebugClient (uint clientNum) |
| Remove client from list of debug receivers. More... | |
| void | SetDebugging (int debugLevel) |
| Set a new debug level. More... | |
| bool | SwitchDebugging () |
| Switch the local debuging state. More... | |
| virtual | ~RemoteDebug () |
| Destructor. More... | |
Protected Types | |
| typedef csHash< csString, csString > | BufferHash |
Protected Member Functions | |
| void | Advance (csTicks when) |
| void | TickPostProcess (csTicks when) |
| Handle post tick processing. More... | |
Protected Attributes | |
| Locate * | activeLocate |
| The current "Active" locate. More... | |
| bool | alive |
| float | ang_vel |
| csArray< csString > | autoMemorizeTypes |
| Used to store what types of perceptions to memorize without changing behaviors. More... | |
| NPCType * | brain |
| bool | checked |
| csVector3 | checkedPos |
| bool | checkedResult |
| iSector * | checkedSector |
| csArray< csWeakRef< gemNPCActor > > | controlledActors |
| Actors that are dragged/pushed around by this NPC. More... | |
| bool | disabled |
| uint8_t | DRcounter |
| int | fallCounter |
| HateList | hatelist |
| Stat | hp |
| bool | insideRegion |
| State variable for inside outside region checks. More... | |
| bool | insideTribeHome |
| State variable for inside outside tribe home checks. More... | |
| Perception * | last_perception |
| csTicks | last_update |
| float | lastDrAngVel |
| bool | lastDrMoving |
| csVector3 | lastDrPosition |
| iSector * | lastDrSector |
| csTicks | lastDrTime |
| csVector3 | lastDrVel |
| float | lastDrYRot |
| Stat | mana |
| Stat | menStamina |
| iMovable * | movable |
| csString | name |
| gemNPCActor * | npcActor |
| NPCType * | oldbrain |
| delete at checkpoint More... | |
| csString | origtype |
| Name of NPCType for 'reload'. More... | |
| EID | owner_id |
| PID | pid |
| Stat | pysStamina |
| psNPCRaceListMessage::NPCRaceInfo_t * | raceInfo |
| LocationType * | region |
| Cached pointer to the region. More... | |
| csString | region_name |
| Region name as loaded from db. More... | |
| float | runVelocity |
| float | scale |
| Model scale value. More... | |
| csVector3 | spawnPosition |
| The stored position that this NPC where spawned. More... | |
| iSector * | spawnSector |
| The stored sector that this NPC where spawned. More... | |
| LocateHash | storedLocates |
| List of stored locate locations. More... | |
| EID | target_id |
| Tribe * | tribe |
| csString | tribeMemberType |
| What type/class is this NPC in the tribe. More... | |
| csString | type |
| float | vel |
| float | walkVelocity |
Protected Attributes inherited from RemoteDebug | |
| csArray< csString > | debugLog |
| Local debug log of last n print statments. More... | |
| int | nextDebugLogEntry |
| The next entry to use. More... | |
|
protected |
| typedef csHash<Locate*,csString> NPC::LocateHash |
| anonymous enum |
| NPC::NPC | ( | psNPCClient * | npcclient, |
| NetworkManager * | networkmanager, | ||
| psWorld * | world, | ||
| iEngine * | engine, | ||
| iCollideSystem * | cdsys | ||
| ) |
|
virtual |
| void NPC::AddAutoMemorize | ( | csString | types | ) |
Add new types to the autoMemorize store.
They should be "," seperated.
| void NPC::AddToHateList | ( | gemNPCActor * | attacker, |
| float | delta | ||
| ) |
Change the hate list value for an attacker.
| attacker | The entity that should be adjusted. |
| delta | The change in hate to apply to the attacker. |
|
protected |
| void NPC::CheckPosition | ( | ) |
| void NPC::ClearState | ( | ) |
Clear the NPCs state.
Brain, hatelist, etc. is cleared.
| bool NPC::ContainAutoMemorizeType | ( | const csString & | type | ) |
Check if the type is contained in the NPC autoMemorize store.
Copy locates.
Typically used to take backups of "Active" locate.
| bool NPC::Delete | ( | ) |
Remove this NPC from npc_definitions.
| void NPC::Disable | ( | bool | disable = true | ) |
| void NPC::Dump | ( | ) |
Dump all information for one NPC to the console.
The main use of this fuction is the "print \<pid\>" npcclient console command.
| void NPC::DumpBehaviorList | ( | csString & | output | ) |
Dump all behaviors for npc.
| void NPC::DumpControlled | ( | csString & | output | ) |
Dump the controlled npcs for npc.
| void NPC::DumpDebugLog | ( | csString & | output | ) |
Dump the debug log for npc.
| void NPC::DumpHateList | ( | csString & | output | ) |
Dump all hated entities for npc.
| void NPC::DumpHateList | ( | NPC * | npc | ) |
Dump all hated entities for npc.
Using debug prints at level 5.
| void NPC::DumpMemory | ( | csString & | output | ) |
Dump the memory for npc.
| void NPC::DumpReactionList | ( | csString & | output | ) |
Dump all reactions for npc.
| void NPC::DumpState | ( | csString & | output | ) |
Dump all state information for npc.
| void NPC::GetActiveLocate | ( | csVector3 & | pos, |
| iSector *& | sector, | ||
| float & | rot | ||
| ) |
Get the NPCs current active locate.
| void NPC::GetActiveLocate | ( | Waypoint *& | wp | ) |
Return the wp of the current active locate.
| wp | will be set with the wp currently in the active locate. |
| float NPC::GetActiveLocateRadius | ( | ) | const |
Get the radius of the last locate operatoins.
|
inline |
| NPCType* NPC::GetBrain | ( | ) |
| csString NPC::GetBuffer | ( | const csString & | bufferName | ) |
Return a named buffer from the NPC.
Function used to get data from buffers containing information.
| bufferName | The buffer name. |
|
inline |
| Tribe::Asset* NPC::GetBuildingSpot | ( | ) |
Get the stored building spot for this NPC.
| Behavior* NPC::GetCurrentBehavior | ( | ) |
| EID NPC::GetEID | ( | ) |
Return the entity ID if an entity exist else 0.
| float NPC::GetEntityHate | ( | gemNPCActor * | entity | ) |
Retrive the hate this NPC has to a given entity.
| entity | The entity to check for hate. |
|
inline |
| float NPC::GetHP | ( | ) |
Get the npc HP.
| float NPC::GetHPRate | ( | ) | const |
Get the npc HPRate.
|
inline |
| psLinearMovement* NPC::GetLinMove | ( | ) |
| float NPC::GetMana | ( | ) |
Get the npc Mana.
| float NPC::GetManaRate | ( | ) | const |
Get the npc ManaRate.
| float NPC::GetMaxHP | ( | ) | const |
Get the npc MaxHP.
| float NPC::GetMaxMana | ( | ) | const |
Get the npc MaxMana.
| float NPC::GetMaxMenStamina | ( | ) | const |
Get the npc MaxMenStamina.
| float NPC::GetMaxPysStamina | ( | ) | const |
Get the npc MaxPysStamina.
| float NPC::GetMenStamina | ( | ) |
Get the npc MenStamina.
| float NPC::GetMenStaminaRate | ( | ) | const |
Get the npc MenStaminaRate.
| gemNPCActor* NPC::GetMostHated | ( | float | range, |
| bool | includeOutsideRegion, | ||
| bool | includeInvisible, | ||
| bool | includeInvincible, | ||
| float * | hate = NULL |
||
| ) |
Find the most hated entity within range of the NPC.
Check the hate list and retrive most hated entity within range.
| range | The range to search for hated entities. |
| includeOutsideRegion | Include enties outside region in the search. |
| includeInvisible | Include invisible entities in the search. |
| includeInvincible | Include invincible entities in the search. |
| hate | If diffrent from NULL, set upon return to the hate of the hated. |
| gemNPCActor* NPC::GetMostHated | ( | csVector3 & | pos, |
| iSector * | sector, | ||
| float | range, | ||
| LocationType * | region, | ||
| bool | includeOutsideRegion, | ||
| bool | includeInvisible, | ||
| bool | includeInvincible, | ||
| float * | hate | ||
| ) |
Find the most hated entity within range of a given position.
Check the hate list and retrive most hated entity within range.
| pos | The position |
| sector | The sector of the position |
| range | The range to search for hated entities. |
| region | The region to search for hated entities within. |
| includeOutsideRegion | Include enties outside region in the search. |
| includeInvisible | Include invisible entities in the search. |
| includeInvincible | Include invincible entities in the search. |
| hate | If diffrent from NULL, set upon return to the hate of the hated. |
| gemNPCActor* NPC::GetNearestActor | ( | float | range, |
| csVector3 & | destPosition, | ||
| iSector *& | destSector, | ||
| float & | destRange | ||
| ) |
Return the nearest actor within the given range.
| range | The search range to look for players |
| destPosition | Return the position of the target |
| destSector | Return the sector of the target |
| destRange | Return the range to the target |
| gemNPCActor* NPC::GetNearestDeadActor | ( | float | range | ) |
| gemNPCActor* NPC::GetNearestNPC | ( | float | range, |
| csVector3 & | destPosition, | ||
| iSector *& | destSector, | ||
| float & | destRange | ||
| ) |
| gemNPCActor* NPC::GetNearestPlayer | ( | float | range, |
| csVector3 & | destPosition, | ||
| iSector *& | destSector, | ||
| float & | destRange | ||
| ) |
Return the nearest player within the given range.
| range | The search range to look for players |
| destPosition | Return the position of the target |
| destSector | Return the sector of the target |
| destRange | Return the range to the target |
| gemNPCActor* NPC::GetNearestVisibleFriend | ( | float | range | ) |
| gemNPCObject* NPC::GetOwner | ( | ) |
| const char* NPC::GetOwnerName | ( | ) |
| float NPC::GetPysStamina | ( | ) |
Get the npc PysStamina.
| float NPC::GetPysStaminaRate | ( | ) | const |
Get the npc PysStaminaRate.
| psNPCRaceListMessage::NPCRaceInfo_t* NPC::GetRaceInfo | ( | ) |
Get the npc race info.
| LocationType* NPC::GetRegion | ( | ) |
| const csVector3& NPC::GetSpawnPosition | ( | ) | const |
Return the position part of the spawn position.
| iSector* NPC::GetSpawnSector | ( | ) | const |
Return the sector part of the spawn position.
| gemNPCObject* NPC::GetTarget | ( | ) |
| Tribe* NPC::GetTribe | ( | ) |
Get the tribe this npc belongs to.
| const csString& NPC::GetTribeMemberType | ( | ) | const |
Return the type/class for this NPC's tribe membership if any.
|
inline |
|
inline |
| csString NPC::Info | ( | const csString & | infoRequestSubCmd | ) |
Provide info about the NPC.
This funcion is both used by the "/info" in the client and the "info <pid> npcclient console command.
| bool NPC::InsertCopy | ( | PID | use_char_id, |
| PID | ownerPID | ||
| ) |
Insert a new copy of NPC into npc_definitions.
|
inline |
|
inline |
| bool NPC::Load | ( | iResultRow & | row, |
| csHash< NPCType *, const char * > & | npctypes, | ||
| EventManager * | eventmanager, | ||
| PID | usePID | ||
| ) |
Loads an NPC from one row of sc_npc_definitions, it also loads the corresponding brain.
Used at boot time
| void NPC::Load | ( | const char * | name, |
| PID | pid, | ||
| NPCType * | type, | ||
| const char * | region_name, | ||
| int | debugging, | ||
| bool | disabled, | ||
| EventManager * | eventmanager | ||
| ) |
Loads an NPC base information and his brain.
| void NPC::ReleaseControl | ( | gemNPCActor * | actor | ) |
Release control of another controlled entity.
| void NPC::RemoveAutoMemorize | ( | csString | types | ) |
Remove types from the autoMemorize store.
They should be "," seperated.
| void NPC::RemoveFromHateList | ( | EID | who | ) |
Remove a entity from the hate list.
| void NPC::ReplaceBuffers | ( | csString & | result | ) |
Replace $NBUFFER[x] with values from the NPC buffer.
| result | String to replace buffers in. |
| void NPC::ReplaceLocations | ( | csString & | result | ) |
Replace a location.
This replace $LOCATION[<location>.<attribute>].
|
virtual |
Callback for debug scope timers.
Implements ScopedTimerCB.
| void NPC::SetActor | ( | gemNPCActor * | actor | ) |
| void NPC::SetAlive | ( | bool | a | ) |
| void NPC::SetBrain | ( | NPCType * | type | ) |
Sets a new brain (npctype) to this npc.
| type | The new type to assign to this npc. |
| void NPC::SetBuffer | ( | const csString & | bufferName, |
| const csString & | value | ||
| ) |
Set/Update the value of a named buffer.
| bufferName | The buffer name. |
| value | The value to put in the buffer. |
| void NPC::SetBufferMemory | ( | Tribe::Memory * | memory | ) |
| void NPC::SetBuildingSpot | ( | Tribe::Asset * | buildingSpot | ) |
Set a building spot for this NPC.
| buildingSpot | The building spot to set. |
|
inline |
|
inline |
| void NPC::SetLastPerception | ( | Perception * | pcpt | ) |
| void NPC::SetLocate | ( | const csString & | destination, |
| const NPC::Locate & | locate | ||
| ) |
Set the NPCs locate.
| void NPC::SetOwner | ( | EID | owner_EID | ) |
Sets the owner of this npc.
The server will send us the owner of the entity connected to it so we can follow it's directions.
| owner_EID | the eid of the entity who owns this npc. |
| void NPC::SetTarget | ( | gemNPCObject * | t | ) |
| void NPC::SetTribe | ( | Tribe * | new_tribe | ) |
Set a new tribe for this npc.
| void NPC::SetTribeMemberType | ( | const char * | tribeMemberType | ) |
Set the type/class for this npc in a tribe.
| void NPC::StoreSpawnPosition | ( | ) |
Store the start position.
Store the current position as spawn position so that NPCs can locate spawn position.
| void NPC::TakeControl | ( | gemNPCActor * | actor | ) |
Take control of another entity.
| void NPC::Tick | ( | ) |
|
protected |
Handle post tick processing.
| void NPC::TriggerEvent | ( | Perception * | pcpt, |
| float | maxRange = -1.0, |
||
| csVector3 * | basePos = NULL, |
||
| iSector * | baseSector = NULL, |
||
| bool | sameSector = false |
||
| ) |
Send a perception to this NPC.
This will send the perception to this npc. If the maxRange has been set to something greater than 0.0 a range check will be applied. Only if within the range from the base position and sector will this perception be triggered.
| pcpt | Perception to be sent. |
| maxRange | If greater then 0.0 then max range apply |
| basePos | The base position for range checks. |
| baseSector | The base sector for range checks. |
| sameSector | Only trigger if in same sector |
| void NPC::TriggerEvent | ( | const char * | pcpt | ) |
Send a perception to this NPC.
Uses the above method, but acts as a wrapper. Receives only the name of the perception and uses default values for the rest of the arguments
| void NPC::UpdateControlled | ( | ) |
Update entities controlled by this NPC.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |