18#define ACTOR_LOG imageToConsole("gfx/icon16/eye", ICN_SIZE, "Actor Log")
21var
int autocvar_g_infiniteAmmo = 0i;
22var
bool autocvar_ai_debugNav =
false;
25_ncActor_Log(
string className,
string functionName,
float edictNum,
string warnMessage)
27 if (autocvar_g_logTimestamps)
28 printf(
"%s ^9%f ^5%s (%d) ^7: %s\n", ACTOR_LOG, time, functionName, edictNum, warnMessage);
30 printf(
"%s ^5%s (%d) ^7: %s\n", ACTOR_LOG, functionName, edictNum, warnMessage);
32#define ncActor_Log(...) if (autocvar_g_logLevel >= LOGLEVEL_DEBUG) _ncActor_Log(classname, __FUNC__, num_for_edict(this), sprintf(__VA_ARGS__))
134 nonvirtual
bool UseAmmo(
int,
int);
136 nonvirtual
bool HasAmmo(
int,
int);
151 nonvirtual
bool HasItem(
string);
183 virtual void SpawnKey(
string,
string);
193 virtual void Save(
float);
194 virtual void Restore(
string,
string);
198 virtual void Input(entity,
string,
string);
201 virtual void Death(entity inflictor, entity attacker,
int damagePoints, vector dir, vector absImpactPos,
int hitBody);
243 virtual void ChasePath(
string startPath);
265 nonvirtual
float __ActForPrefix(
string actName,
string animPrefix,
string emotionString);
271 int m_pathfindingNodeCount;
272 int m_pathfindingCurrentNode;
273 nodeslist_t *m_pathfindingGraph;
274 vector m_pathfindingDestination;
277 float m_timeUntilDroppingRoute;
278 vector m_pathfindingLastPos;
279 entity m_followingEntity;
280 float m_moveSpeedKey;
286 int m_ammoTypes[MAX_AMMO_TYPES];
288 NETWORKED_FLOAT(m_itemStart)
289 NETWORKED_FLOAT(m_currentStamina)
290 float m_weaponCookingTime;
296 string m_sndStepLadderLeft;
297 string m_sndStepLadderRight;
300 string m_sndPainSmall;
301 string m_sndPainMedium;
302 string m_sndPainLarge;
303 string m_sndPainHuge;
304 string m_sndLandSoft;
305 string m_sndLandHard;
306 string m_sndHitArmor;
307 string m_sndHitFlesh;
308 string m_sndAirGaspHeavy;
309 string m_sndAirGaspLight;
311 string m_sndTeleportExit;
312 string m_sndTeleportStart;
313 string m_sndWaterExit;
314 string m_sndWaterEnter;
315 string m_sndWaterWade;
316 string m_sndWaterSwim;
318 string m_sndHealthtake;
320 string m_sndUseSuccess;
325 float m_actIdleCrouch;
326 float m_actIdleProne;
328 float m_actWalkCrouch;
329 float m_actWalkProne;
335 float m_actReloadStart;
337 float m_actReloadEnd;
347.ncWeapon m_activeWeapon;
348.ncWeapon m_firstWeapon;
351void ncActor_ListInventory(
ncActor);
This entity class represents an object with choreographed/free-form movement.
Definition Actor.h:93
nonvirtual bool AddItem(ncItem)
Adds the specified ncItem to the inventory.
Definition Actor.qc:1957
virtual void FiredWeapon(string, string)
Definition Actor.qc:115
nonvirtual int PathCurrentNode(void)
Definition Actor.qc:627
virtual void Restore(string, string)
Similar to ncIO::SpawnKey() but for save-game fields.
Definition Actor.qc:379
virtual void Event_DrawWeapon(void)
Definition Actor.qc:122
virtual bool CanProne(void)
Overridable: Returns whether the client can prone, with the commands +prone and goprone.
Definition Actor.qc:305
virtual void SetAnimationPrefix(string animPrefix)
Definition Actor.qc:71
virtual void Respawn(void)
Server: Called when the entity first spawns or when game-logic requests the entity to return to its o...
Definition Actor.qc:578
virtual void Event_FireWeapon(void)
Definition Actor.qc:128
virtual void SelectNewSchedule(void)
Overridable: Called regularily to select a new schedule to perform.
Definition Actor.qc:555
nonvirtual bool CancelSchedule(void)
Forces a named schedule to be performed.
Definition Actor.qc:586
nonvirtual float GetMoveSpeedScale(void)
Returns the movement speed scale.
Definition Actor.qc:1217
nonvirtual int PathNodeCount(void)
Definition Actor.qc:621
virtual void CheckRouteProgression_Path(void)
Internal use only.
Definition Actor.qc:838
nonvirtual bool RemoveItem(string)
Removes a named ncItem from the inventory Returns false when impossible.
Definition Actor.qc:1759
nonvirtual bool IsLeaning(void)
Returns true when the entity is leaning.
Definition Actor.qc:293
nonvirtual bool UseAmmo(int, int)
Uses ammo up of a specified type.
Definition Actor.qc:1372
nonvirtual ncItem GetItem(string)
Returns true or false depending on if the entity has the named item.
Definition Actor.qc:1440
virtual void AddedItemCallback(ncItem)
Definition Actor.qc:1477
virtual void RestoreComplete(void)
Called when the entity has been successfully restored from a savegame file.
Definition Actor.qc:527
virtual void Input(entity, string, string)
Called when we are being prompted by another object/function with an input message.
Definition Actor.qc:663
virtual void Event_ReloadWeapon(void)
Definition Actor.qc:138
virtual void Event_ReloadWeaponStart(void)
Definition Actor.qc:133
virtual void DebugDraw(void)
Definition Actor.qc:1083
nonvirtual void SwitchToWeapon(string)
Switches the entity to use the desired weapon.
Definition Actor.qc:1916
virtual bool CanCrouch(void)
Returns if this class is capable of crouching.
nonvirtual bool RemoveAllWeapons(void)
Removes all weapons from the inventory.
Definition Actor.qc:1867
nonvirtual bool RemoveAllItems(bool)
Removes all items from the inventory.
Definition Actor.qc:1823
nonvirtual void ThinkSchedules(void)
Definition Actor.qc:547
nonvirtual bool HasExactItem(ncItem)
Returns true or false depending on if the entity has the exact item.
Definition Actor.qc:1404
nonvirtual float GetStamina(void)
Definition Actor.qc:263
nonvirtual ncWeapon GetNextWeapon(void)
Retrieve the 'next' weapon in the inventory, sorted by SortWeaponChain().
Definition Actor.qc:2078
virtual void ReceiveEvent(float eventID)
Definition Actor.qc:156
virtual void OnRemoveEntity(void)
Handles what happens before the entity gets removed from the client game.
Definition Actor.qc:1185
virtual void Save(float)
Handles saving a copy of this entity to a given filehandle.
Definition Actor.qc:343
nonvirtual bool HasAmmo(int, int)
Returns whether or not the entity has enough of the specified ammo and type.
Definition Actor.qc:1388
nonvirtual vector PathDestination(void)
Definition Actor.qc:633
nonvirtual bool DropWeaponInSlot(int)
Drops the first item in someones specified inventory slot, placing it into the world in front of them...
Definition Actor.qc:1730
virtual bool CanCrouch(void)
Overridable: Returns whether the client can crouch, with the commands +crouch and gocrouch.
Definition Actor.qc:317
virtual void RouteToPositionDenyFlags(vector, int)
When called, will plot a route to a given world coordinate and start moving, ignoring any links that ...
Definition Actor.qc:1107
nonvirtual void SwitchToBestWeapon(bool)
Definition Actor.qc:1645
nonvirtual ncWeapon GetLastWeapon(void)
Retrieve the 'last' weapon they had chosen.
Definition Actor.qc:2106
nonvirtual bool HasItem(string)
Returns true or false depending on if the entity has the named item.
Definition Actor.qc:1471
virtual void Spawned(void)
Called when the entity is fulled initialized.
Definition Actor.qc:457
nonvirtual bool GiveItem(string)
Adds a named ncItem to the inventory.
Definition Actor.qc:1565
virtual void ReloadCachedAttributes(void)
Shared: Called on launch/reload to read variables from defaults.
Definition Actor.qc:180
nonvirtual vector GetRouteDirection(void)
Returns the current movement direction.
Definition Actor.qc:1046
nonvirtual bool RemoveWeaponInSlot(int)
Removes the first item in someones specified inventory slot.
Definition Actor.qc:1701
virtual bool CanSprint(void)
Overridable: Returns whether the client can sprint, with the command +sprint.
Definition Actor.qc:299
virtual void Event_HolsterWeapon(void)
Definition Actor.qc:148
virtual float GetBackSpeed(void)
Overridable: Returns the desired maximum backwardss movement speed.
Definition Actor.qc:336
virtual bool CanLean(void)
Overridable: Returns whether the client can lean, with the commands +leanleft and +leanright.
Definition Actor.qc:311
nonvirtual bool GiveAmmo(int, int)
Gives ammo up of a specified type.
Definition Actor.qc:1345
virtual void Physics_Run(void)
Overridable: Called when the entity is ready to move.
Definition Actor.qc:1223
nonvirtual bool MaxAmmo(int)
Returns whether the specified type is maxed out.
Definition Actor.qc:1319
nonvirtual void __FiredWeapon(string, string)
Definition Actor.qc:167
nonvirtual ncWeapon GetPreviousWeapon(void)
Retrieve the 'previous' weapon in the inventory, sorted by SortWeaponChain().
Definition Actor.qc:2092
virtual void RouteClear(void)
When called, will wipe any memory of an ongoing route.
Definition Actor.qc:1193
virtual void Death(entity inflictor, entity attacker, int damagePoints, vector dir, vector absImpactPos, int hitBody)
Called when the health is equal or below 0.
Definition Actor.qc:540
nonvirtual bool IsPerforming(void)
Definition Actor.qc:572
virtual void ChasePath(string startPath)
When called, will start following a path_corner.
Definition Actor.qc:1171
nonvirtual void PerformSchedule(string)
Definition Actor.qc:608
nonvirtual int GetReserveAmmo(int)
Returns the amount of reserve ammo of a given type.
Definition Actor.qc:1308
virtual void RouteEnded(void)
Called when the object is done moving to its destination.
Definition Actor.qc:832
nonvirtual string GetCurrentWeapon(void)
Returns the name of the current weapon.
Definition Actor.qc:1906
nonvirtual bool PlantCharge(string)
Definition Actor.qc:1267
nonvirtual bool IsCrouching(void)
Returns true when the entity is ducked/crouching.
Definition Actor.qc:269
virtual void SpawnKey(string, string)
This method handles entity key/value pairs on map load.
Definition Actor.qc:254
nonvirtual void LaunchProjectile(string, bool, float)
Definition Actor.qc:1239
nonvirtual vector GetRouteMovevalues(void)
Returns the current movement values in a single vector (x = fwd, y = rt, y = up)
Definition Actor.qc:1009
nonvirtual bool IsStanding(void)
Returns true when the entity is standing, walking.
Definition Actor.qc:281
nonvirtual void SwitchToExactWeapon(ncWeapon)
Switches the entity to use the desired weapon.
Definition Actor.qc:1945
nonvirtual void MessageSchedule(string)
Definition Actor.qc:599
virtual float GetSideSpeed(void)
Overridable: Returns the desired maximum side movement speed.
Definition Actor.qc:330
virtual void Event_ReloadWeaponEnd(void)
Definition Actor.qc:143
nonvirtual void SetMoveSpeedScale(float)
Sets the scale on the movement before physics are run.
Definition Actor.qc:1211
nonvirtual ncEntity MakeCorpse(float deathSequence)
Call to make a corpse of this actor.
Definition Actor.qc:639
virtual float GetForwardSpeed(void)
Overridable: Returns the desired maximum forward movement speed.
Definition Actor.qc:324
nonvirtual bool IsProne(void)
Returns true when the entity is ducked/crouching.
Definition Actor.qc:275
nonvirtual bool IsSprinting(void)
Returns true when the entity is running.
Definition Actor.qc:287
nonvirtual bool GiveExactItem(ncItem)
Definition Actor.qc:1489
void ncActor(void)
Definition Actor.qc:18
virtual ncWeapon SortWeaponChain(void)
Returns the first weapon in the chain, while ensuring the inventory is sorted.
Definition Actor.qc:1963
virtual void RouteToPosition(vector)
When called, will plot a route to a given world coordinate and start moving.
Definition Actor.qc:1077
virtual void CheckRouteProgression(void)
Internal use only.
Definition Actor.qc:860
void ncEntity(void)
The constructor.
Definition Entity.qc:29
This entity class represents inventory items, weapons.
Definition Item.h:138
void ncSurfacePropEntity(void)
Definition SurfacePropEntity.qc:18
This entity class represents weapon based items.
Definition Weapon.h:305