94class Sentient :
public Animate
105 float charge_start_time;
107 SafePtr<Weapon> activeWeaponList[MAX_ACTIVE_WEAPONS];
109 WeaponPtr holsteredWeapon;
110 bool weapons_holstered_by_code;
112 float m_fDamageMultipliers[MAX_DAMAGE_MULTIPLIERS];
113 SafePtr<Vehicle> m_pVehicle;
114 SafePtr<TurretGun> m_pTurret;
115 SafePtr<Entity> m_pLadder;
116 str m_sHelmetSurface1;
117 str m_sHelmetSurface2;
119 float m_fHelmetSpeed;
120 bool m_bDontDropWeapons;
122 virtual void EventTake(Event *ev);
123 virtual void EventGiveAmmo(Event *ev);
124 virtual void EventGiveItem(Event *ev);
125 void EventGiveDynItem(Event *ev);
126 void SetBloodModel(Event *ev);
127 void EventUseItem(Event *ev);
128 virtual void EventUseWeaponClass(Event *ev);
129 virtual void EventGiveTargetname(Event *ev);
131 void EventGerman(Event *ev);
132 void EventAmerican(Event *ev);
133 void EventGetTeam(Event *ev);
134 virtual void ClearEnemies();
135 void EventGetThreatBias(Event *ev);
136 void EventSetThreatBias(Event *ev);
137 void SetDamageMult(Event *ev);
138 void SetupHelmet(str sHelmetTiki,
float fSpeed,
float fDamageMult, str sHelmetSurface1, str sHelmetSurface2);
139 void EventSetupHelmet(Event *ev);
140 void EventPopHelmet(Event *ev);
141 bool WearingHelmet(
void);
142 int CheckHitLocation(
int iLocation);
144 virtual void ArmorDamage(Event *ev);
145 virtual qboolean CanBlock(
int meansofdeath, qboolean full_block);
146 void AddBloodSpurt(Vector direction);
147 qboolean ShouldBleed(
int meansofdeath, qboolean dead);
148 qboolean ShouldGib(
int meansofdeath,
float damage);
149 str GetBloodSpurtName(
void);
150 str GetBloodSplatName(
void);
151 float GetBloodSplatSize(
void);
152 str GetGibName(
void);
153 virtual void TurnOffShadow(Event *ev);
154 virtual void TurnOnShadow(Event *ev);
155 virtual void WeaponKnockedFromHands(
void);
157 void EventDropItems(Event *ev);
158 void EventDontDropWeapons(Event *ev);
159 void EventForceDropWeapon(Event *ev);
160 void EventForceDropHealth(Event *ev);
161 void EventGetForceDropWeapon(Event *ev);
162 void EventGetForceDropHealth(Event *ev);
163 void DetachAllActiveWeapons(
void);
164 void AttachAllActiveWeapons(
void);
165 qboolean WeaponsOut(
void);
166 qboolean IsActiveWeapon(
Weapon *weapon);
167 void ActivateWeapon(
Weapon *weapon, weaponhand_t hand);
168 void ActivateLastActiveWeapon(
void);
169 void EventActivateLastActiveWeapon(Event *ev);
170 void EventToggleItemUse(Event *ev);
171 void DeactivateWeapon(
Weapon *weapon);
172 void DeactivateWeapon(weaponhand_t hand);
173 void CheckAnimations(Event *ev);
174 void ChargeWeapon(weaponhand_t hand, firemode_t mode);
175 virtual void FireWeapon(
int number, firemode_t mode);
176 void ReleaseFireWeapon(
int number, firemode_t mode);
183 SafePtr<Sentient> m_pNextSquadMate;
184 SafePtr<Sentient> m_pPrevSquadMate;
185 Sentient *m_NextSentient;
186 Sentient *m_PrevSentient;
188 int m_iAttackerCount;
189 SafePtr<Entity> m_pLastAttacker;
190 SafePtr<Sentient> m_Enemy;
191 float m_fPlayerSightLevel;
194 bool m_bOvercookDied;
195 int m_ShowPapersTime;
202 Vector m_vViewVariation;
204 bool in_melee_attack;
208 float on_fire_stop_time;
209 float next_catch_on_fire_time;
210 int on_fire_tagnums[3];
211 SafePtr<Entity> fire_owner;
213 float attack_blocked_time;
214 float max_mouth_angle;
216 float next_bleed_time;
217 bool m_bForceDropHealth;
218 bool m_bForceDropWeapon;
220 bool m_bFootOnGround_Right;
221 bool m_bFootOnGround_Left;
227 CLASS_PROTOTYPE(Sentient);
231 virtual Vector EyePosition(
void);
233 virtual void SetViewAngles(Vector angles);
234 virtual void SetTargetViewAngles(Vector angles);
235 virtual Vector GetViewAngles(
void);
236 void AddViewVariation(
const Vector& vVariation);
237 void SetMinViewVariation(
const Vector& vVariation);
238 void SetHolsteredByCode(
bool holstered);
239 bool CanSee(Entity *ent,
float fov,
float vision_distance,
bool bNoEnts)
override;
240 bool CanSee(
const Vector& org,
float fov,
float vision_distance,
bool bNoEnts)
override;
241 virtual Vector GunPosition(
void);
242 virtual Vector GunTarget(
bool bNoCollision =
false,
const vec3_t position = NULL,
const vec3_t forward = NULL);
243 void ReloadWeapon(Event *ev);
244 void FireWeapon(Event *ev);
245 void StopFireWeapon(Event *ev);
246 void ChargeWeapon(Event *ev);
247 virtual void EventForceLandmineMeasure(Event *ev);
248 void EventSetWeaponIdleState(Event *ev);
249 void EventPingForMines(Event *ev);
250 void ReleaseFireWeapon(Event *ev);
251 void ChangeWeapon(
Weapon *weapon, weaponhand_t hand);
252 Weapon *GetActiveWeapon(weaponhand_t hand)
const;
253 Weapon *WorstWeapon(
Weapon *ignore = NULL, qboolean bGetItem =
false,
int iIgnoreClass = 0);
254 Weapon *BestWeapon(
Weapon *ignore = NULL, qboolean bGetItem =
false,
int iIgnoreClass = 0);
257 void useWeapon(
const char *weaponname, weaponhand_t hand = WEAPON_MAIN);
258 void useWeapon(
Weapon *weapon, weaponhand_t hand = WEAPON_MAIN);
259 void EventUseWeapon(Event *ev);
260 void EventDeactivateWeapon(Event *ev);
261 int NumWeapons(
void);
262 int AmmoCount(str ammo_type);
263 int MaxAmmoCount(str ammo_type);
264 int AmmoIndex(str ammo_type);
265 int UseAmmo(str ammo_type,
int amount);
266 void GiveAmmo(str type,
int amount,
int max_amount = -1);
267 Ammo *FindAmmoByName(str name);
268 Item *giveItem(str itemname,
int amount = 1);
269 void takeItem(
const char *itemname);
270 void takeAmmoType(
const char *ammoname);
271 void AddItem(
Item *
object);
272 void RemoveItem(
Item *
object);
273 void RemoveWeapons(
void);
274 Weapon *GetWeapon(
int index);
275 Item *FindItemByClassName(
const char *classname);
276 Item *FindItemByModelname(
const char *modelname);
277 Item *FindItemByExternalName(
const char *externalname);
278 Item *FindItem(
const char *itemname);
279 void FreeInventory(
void);
280 void EventFreeInventory(Event *ev);
281 qboolean HasItem(
const char *itemname);
282 qboolean HasWeaponClass(
int iWeaponClass);
283 qboolean HasPrimaryWeapon(
void);
284 qboolean HasSecondaryWeapon(
void);
285 int NumInventoryItems(
void);
288 virtual void DropInventoryItems(
void);
289 void ListInventory(
void);
291 qboolean PowerupActive(
void);
293 void setModel(
const char *mdl);
294 void Archive(
Archiver& arc)
override;
295 void ArchivePersistantData(
Archiver& arc);
296 void DoubleArmor(
void);
297 virtual qboolean DoGib(
int meansofdeath, Entity *inflictor);
298 void JumpXY(Event *ev);
299 void MeleeAttackStart(Event *ev);
300 void MeleeAttackEnd(Event *ev);
301 void BlockStart(Event *ev);
302 void BlockEnd(Event *ev);
303 void StunStart(Event *ev);
304 void StunEnd(Event *ev);
305 void SetAttackBlocked(
bool blocked);
306 virtual void ReceivedItem(
Item *
item);
307 virtual void RemovedItem(
Item *
item);
308 virtual void AmmoAmountChanged(
Ammo *ammo,
int inclip = 0);
309 void AmmoAmountInClipChanged(str ammo_type,
int amount);
311 void SetMaxMouthAngle(Event *ev);
312 void TryLightOnFire(
int meansofdeath, Entity *attacker);
313 void OnFire(Event *ev);
314 void StopOnFire(Event *ev);
315 void SpawnBloodyGibs(Event *ev);
316 void SetMaxGibs(Event *ev);
318 void SpawnEffect(str modelname, Vector pos);
320 bool IsNewActiveWeapon(
void);
321 Weapon *GetNewActiveWeapon(
void);
322 weaponhand_t GetNewActiveWeaponHand(
void);
323 void ClearNewActiveWeapon(
void);
324 void SetNewActiveWeapon(
Weapon *weapon, weaponhand_t hand);
325 void Holster(qboolean putaway);
326 void SafeHolster(qboolean putaway);
327 void ActivateNewWeapon(
void);
328 void ActivateNewWeapon(Event *ev);
329 void UpdateWeapons(
void);
331 void UpdateFootsteps(
void);
332 qboolean AIDontFace()
const override;
333 void PutawayWeapon(Event *ev);
334 void WeaponCommand(Event *ev);
338 void AssertValidSquad();
339 bool IsTeamMate(Sentient *pOther);
340 void JoinNearbySquads(
float fJoinRadius = 1024.0f);
341 void MergeWithSquad(Sentient *pFriendly);
342 void DisbandSquadMate(Sentient *pExFriendly);
343 bool IsSquadMate(Sentient *pFriendly);
345 virtual bool IsDisabled()
const;
348 void SetVehicle(
Vehicle *pVehicle);
353 Entity *GetLadder()
const;
358 void GetActiveWeap(Event *ev);
359 void GetNewActiveWeaponOld(Event *ev);
360 void GetNewActiveWeapon(Event *ev);
361 void GetNewActiveWeaponHand(Event *ev);
362 void EventClientLanding(Event *ev);
364 void FootstepMain(
trace_t *trace,
int iRunning,
int iEquipment);
365 void Footstep(
const char *szTagName,
int iRunning,
int iEquipment);
366 void LandingSound(
float volume,
int iEquipment);