Planeshift
|
Hate list modifications. More...
#include <npcoperations.h>
Public Member Functions | |
HateListOperation () | |
virtual bool | Load (iDocumentNode *node) |
virtual ScriptOperation * | MakeCopy () |
virtual OperationResult | Run (NPC *npc, bool interrupted) |
virtual | ~HateListOperation () |
![]() | |
void | AddRandomRange (csVector3 &dest, float radius, float margin=0.0) |
Move a point somwhere random within radius of the orignial point. More... | |
virtual OperationResult | Advance (float timedelta, NPC *npc) |
virtual bool | AtInterruptedAngle (const csVector3 &pos, const iSector *sector, float angle) |
virtual bool | AtInterruptedAngle (NPC *npc) |
virtual bool | AtInterruptedPosition (const csVector3 &pos, const iSector *sector) |
virtual bool | AtInterruptedPosition (NPC *npc) |
virtual bool | CheckEndPointOk (NPC *npc, const csVector3 &myPos, iSector *mySector, const csVector3 &endPos, iSector *endSector) |
Check if the end point where ok. More... | |
virtual bool | CheckMoveOk (NPC *npc, csVector3 oldPos, iSector *oldSector, const csVector3 &newPos, iSector *newSector, int resultFromExtrapolate) |
Check if the move where ok. More... | |
void | CopyCheckMoveOk (ScriptOperation *source) |
Copy CheckMoveOk paramters from the source script. More... | |
virtual void | Failure (NPC *npc) |
Called when the run operation return OPERATION_FAILED. More... | |
virtual float | GetAngularVelocity (NPC *npc) |
virtual const csString & | GetCollisionPerception (NPC *npc) |
Return the Collision perception event name. More... | |
virtual const csString & | GetFallingPerception (NPC *npc) |
Return the Falling perception event name. More... | |
virtual const csString & | GetInBoundsPerception (NPC *npc) |
Return the In Bounds perception event name. More... | |
virtual const char * | GetName () const |
virtual const csString & | GetOutOfBoundsPerception (NPC *npc) |
Return the Out of Bounds perception event name. More... | |
virtual State | GetState () const |
virtual float | GetVelocity (NPC *npc) |
Return the velocity for the npc. More... | |
virtual void | InterruptOperation (NPC *npc) |
bool | LoadCheckMoveOk (iDocumentNode *node) |
Load attributes for the CheckMoveOk check. More... | |
bool | LoadVelocity (iDocumentNode *node) |
ScriptOperation (const char *sciptName) | |
ScriptOperation (const ScriptOperation *other) | |
void | SetAnimation (NPC *npc, const char *name) |
This function will set an animation for the NPC, the animation will play once. More... | |
void | SetParent (Behavior *behavior) |
Set the parent behavior for this operation. More... | |
virtual void | SetState (State state) |
virtual | ~ScriptOperation () |
Protected Types | |
enum | { MAX_HATE = 0x0001, MIN_HATE = 0x0002, ABS_HATE = 0x0004, DELTA_HATE = 0x0008, HATE_PERCEPTION = 0x0010 } |
Flags definitions for use in the flags variable. More... | |
Protected Attributes | |
float | absoluteHate |
Hate should be set to this value if ABS_HATE is set. More... | |
float | deltaHate |
Added to hate if DELTA_HATE is set. More... | |
unsigned int | flags |
Flags. More... | |
float | maxHate |
Hate should have a max value if MAX_HATE is set. More... | |
float | minHate |
Hate should bave a min value if MIN_HATE is set. More... | |
![]() | |
float | ang_vel |
Shared angular velocity, used by all that rotates. More... | |
bool | checkTribeHome |
Set to true if the tribe home should be checked by CheckMoveOk. More... | |
csString | collision |
Perception names to use for collision detected by CheckMoveOk. More... | |
int | consecCollisions |
Shared by move functions. Used by CheckMoveOk to detect collisions. More... | |
csString | failurePerception |
The Perception to fire when a operation return OPERATION_FAILED. More... | |
csString | falling |
Perception names to use for fall detected by CheckMoveOk. More... | |
csString | inBounds |
Perception names to use for in bounds detected by CheckMoveOk. More... | |
float | interrupted_angle |
csVector3 | interrupted_position |
iSector * | interrupted_sector |
csString | name |
csString | outOfBounds |
Perception names to use for out of bounds detected by CheckMoveOk. More... | |
Behavior * | parent |
State | state |
float | vel |
Shared linear velocity, used by all that moves. More... | |
VelSource | velSource |
Source used for velocity. More... | |
Additional Inherited Members | |
![]() | |
enum | OperationResult { OPERATION_NOT_COMPLETED, OPERATION_COMPLETED, OPERATION_FAILED } |
enum | State { READY_TO_RUN, RUNNING, INTERRUPTED, COMPLETED } |
enum | VelSource { VEL_DEFAULT, VEL_USER, VEL_WALK, VEL_RUN } |
![]() | |
int | StartMoveTo (NPC *npc, const csVector3 &dest, iSector *sector, float vel, const char *action, float &angle) |
This function is used by MoveTo AND Navigate operations. More... | |
void | TurnTo (NPC *npc, const csVector3 &dest, iSector *destsect, csVector3 &forward, float &angle) |
![]() | |
static void | StopMovement (NPC *npc) |
Utility function used by many operation to stop movement of an NPC. More... | |
Hate list modifications.
Definition at line 909 of file npcoperations.h.
|
protected |
Flags definitions for use in the flags variable.
Enumerator | |
---|---|
MAX_HATE | |
MIN_HATE | |
ABS_HATE | |
DELTA_HATE | |
HATE_PERCEPTION |
Use last perception instead of target. |
Definition at line 915 of file npcoperations.h.
|
inline |
Definition at line 931 of file npcoperations.h.
|
inlinevirtual |
Definition at line 932 of file npcoperations.h.
|
virtual |
Reimplemented from ScriptOperation.
|
virtual |
Implements ScriptOperation.
|
virtual |
Implements ScriptOperation.
|
protected |
Hate should be set to this value if ABS_HATE is set.
Definition at line 927 of file npcoperations.h.
|
protected |
Added to hate if DELTA_HATE is set.
Definition at line 928 of file npcoperations.h.
Flags.
Definition at line 924 of file npcoperations.h.
|
protected |
Hate should have a max value if MAX_HATE is set.
Definition at line 925 of file npcoperations.h.
|
protected |
Hate should bave a min value if MIN_HATE is set.
Definition at line 926 of file npcoperations.h.