'
' This is a built-in Unreal class and it shouldn't be modified
'
' The base class of all actors that can be controlled by players.
' Pawns can be posessed by either players or AI.
'
Class Pawn Expands Root Intrinsic

EnumDef ELifeState = LS_None, LS_Alive, LS_Dying, LS_Dead

EnumDef EAI_Move =             _ ' The move strategy is 
    EAI_MoveNone               _ ' ... nothing specific.
,   EAI_MoveApproach           _ ' ... to approach a target.
,   EAI_MoveBackOff            _ ' ... to strategically retreat.
,   EAI_MoveRunAway              ' ... to run away.

' Misc
Dim YawSpeed as Editable Integer
Dim PitchSpeed as Editable Integer
Dim RollSpeed as Editable Integer
Dim FixFrame as Editable Integer
Dim BaseEyeHeight as Editable Real
Dim EyeHeight as Real
Dim Bob as Real
Dim TeamName as Editable Name
Dim TargetYaw        As Integer
Dim TargetPitch      As Integer
Dim TargetRoll       As Integer

' Player game statistics. 
'   Those which are always accurate are marked [A] (for accurate).
'   Those which are periodically calculated are marked [P] (for periodic).
'   These statistics are tracked for the current level.
Dim KillCount       As Byte     ' [A] The number of enemies killed by this actor.
Dim DeathCount      As Byte     ' [A] The number of times this pawn has died.
Dim SecretCount     As Byte     ' [A] Number of secrets found.
Dim ShotCount       As Integer  ' [A] Number of shots fired.
Dim HitCount        As Integer  ' [A] Number of times enemies have been hit.
Dim DamagedCount    As Integer  ' [A] Total damage taken by actor.
Dim DamageCount     As Integer  ' [A] Total damage inflicted by actor.
Dim HealthCount     As Integer  ' [P] Total health of actor.
Dim LowHealthCount  As Integer  ' [P] Total low-health values of actor.
Dim HighHealthCount As Integer  ' [P] Total high-health values of actor.

' Monster AI response configuration:
'   These properties affect the AI of monsters.
Dim ApproachPeriod         As Editable Byte    ' Deciseconds spent approaching target
Dim ApproachRandomization  As Editable Byte    ' Randomization of ApproachPeriod
Dim AttackPeriod           As Editable Byte    ' Deciseconds spent attacking target
Dim AttackRandomization    As Editable Byte    ' Randomization of AttackPeriod
Dim BackOffPeriod          As Editable Byte    ' Deciseconds spent backing away from targets, or just resting
Dim BackOffRandomization   As Editable Byte    ' Randomization of BackOffPeriod
Dim BackOffThreshold       As Editable Byte    ' Dekaunits. Monster must be at least this close to start backing off.
Dim TargetCloseness        As Editable Byte    ' Monster's preferred distance from target, in dekaunits.
Dim TargetZCloseness       As Editable Byte    ' Monster's preferred height above or below target, in dekaunits.
Dim ApproachDirectness     As Editable Byte    ' Directness of approaching target (0=direct, 255=indirect).
Dim bHasAI                 As Editable Boolean ' Does the pawn have intelligence?
Dim bSensesTargets         As Editable Boolean ' TRUE iff the pawn senses potential targets
Dim bRespondsToNoise       As Editable Boolean ' TRUE iff the pawn responds to nearby noise (not necessarily those of a target).
Dim bRespondsToSights      As Editable Boolean ' TRUE iff the pawn responds to nearby sights (not necessarily those of a target).
Dim bHarmsMonsters         As Editable Boolean ' TRUE iff the pawn harms other monsters (but only when provoked).
Dim bNeverStill            As Editable Boolean ' TRUE iff the pawn never becomes quiescent.
Dim bIsXenophobic          As Editable Boolean ' TRUE iff the pawn harms monsters different from itself. Meaningful only if bHarmsMonsters.
Dim LurkingDistance        As Editable Byte    ' If non-zero, waits until target is this close before attacking. In dekaunits.
Dim AuralAcuity            As Editable Real    ' Measures how well the pawn can hear things. 1.0 means a noise of 1 can be heard 100 units away. 0 means superb hearing.
Dim RunAwayHealthThreshold As Editable Byte    ' Health threshold below which pawn runs away. 0 for none.

Dim AIMove                As EAI_Move 
Dim AIPreviousTask        As EAI_Task
Dim AIPreviousMove        As EAI_Move

Dim AmmoCount(10) As Integer ' Ammo carried by the pawn. Indexed by EAmmoType.

Dim MinorInjurySounds(3) As Editable Sound
Dim MajorInjurySounds(3) As Editable Sound
Dim DeathSounds(2)       As Editable Sound
Dim QuestingSounds(2)    As Editable Sound
Dim StillSounds(2)       As Editable Sound
Dim VictorySounds(2)     As Editable Sound
Dim AttackSounds(4)      As Editable Sound ' Sounds used for pawn-specific attacks
Dim SoundTimer           As          Byte  ' Countdown from last sound made by pawn.

Dim AttackEffects(2)     As Editable Class ' Pyrotechnic effects to use when shooting
Dim ExplosionEffect      As Editable Class ' Pyrotechnic effect when something explodes in the pawn.

Dim NaturalArmor(4) As Editable Real ' Indexed by EDamageType. Values are: 0.0..1.0
Dim HealRate        As Editable Real ' Amount pawn heals each tick.
Dim Armor(4)        As Editable Real ' Indexed by EDamageType

Dim SightRadius          As Editable Real   ' Maximum seeing distance.
Dim PeripheralVision     As Editable Real   ' Cosine of limits of peripheral vision.
Dim HearingAccuracy      As Editable Byte   ' Ability to locate the direction of a noise, 0=none, 255=superb
Dim Visibility           As Byte            ' How visible is the pawn? 0=invisible. 255=highly visible.
Dim Noise                As Real            ' The amount of noise being made by the pawn.

Dim LungeSpeed     As Editable Real ' Lunge speed. Decreases stamina.
Dim RunSpeed       As Editable Real ' Running speed. Does not decreases stamina.
Dim NormalSpeed    As Editable Real ' The usual speed. Does not decrease stamina.
Dim MaxStrength    As Editable Real ' The usual strengh of the pawn.
Dim Strength       As Editable Real ' The current strength of the pawn. 0=weak, 1.0=really strong.
Dim Stamina        As Real   ' Stamina: 0=none (can't run), 1.0=normal max.
Dim Health         As Editable Real   ' Health: 0=none (dead or near death), 100.0=normal maximum, >100 in special situations(?).
Dim DesiredSpeed   As Real   ' Pawn's current desired speed.

Dim LifeState    As ELifeState
Dim Killer       As Actor       ' Actor pawn which killed this pawn, when LifeState==LS_Dead or LS_Dying
Dim DeathSpawn   As Editable Class  ' Object to spawn when pawn dies
Dim HitDisplayTimer As Byte ' Count-down timer set last time monster showed hit animation.

Dim ExplorationTimer As Byte ' Count-down timer to limit consecutive explorations (for performance considerations).

' Information about a target (meaningful if there is a target or if TargetWasLost is TRUE).
Dim TargetLostTime     As Integer   ' Time the target was lost
Dim TargetLastLocation As Vector    ' Last known location of target.
Dim TargetLastVelocity As Vector    ' Last known velocity of target.

' Information about animations, attacks, and so on:
Dim bHasDistantMovingAttack  As Editable Boolean ' Does the monster have a distant, moving attack?
Dim bHasDistantStillAttack   As Editable Boolean ' Does the monster have a distant, still attack?
Dim bHasCloseUpAttack        As Editable Boolean ' Does the monster have a close-up attack?

Dim LastNonFallZ             As Real          ' Z-coordinate of last time on surface or otherwise not falling.

' Status of usually temporary effects: 
Dim InvisibilityTimeLeft   As Integer ' Ticks left before invisibility wears off
Dim SilenceTimeLeft        As Integer ' Ticks left before silence wears off
Dim InvincibilityTimeLeft  As Integer ' Ticks left before invincibility wears off
Dim SuperStaminaTimeLeft   As Integer ' Ticks left before super-stamina wears off
Dim SuperStrengthTimeLeft  As Integer ' Ticks left before super-strength wears off
Dim ExplosiveCharge        As Real    ' Amount of explosive charge imbedded in pawn.
Dim DelayedDamage          As Real    ' Amount of delayed basic damage
Dim DamageDelay            As Byte    ' Ticks left before DelayedDamage takes effect.

' todo: Make the effects into a BYTE flag (simplifies checking)
Dim bHasInvisibility   As Editable Boolean ' TRUE iff the pawn has the power of invisibility.
Dim bHasSilence        As Editable Boolean ' TRUE iff the pawn has the power of silence.
Dim bHasInvincibility  As Editable Boolean ' TRUE iff a target suffers no damage
Dim bHasSuperStrength  As Editable Boolean ' TRUE iff the pawn has the power of strength.
Dim bHasSuperStamina   As Editable Boolean ' TRUE iff the pawn has the power of stamina.
Dim bIsQuiescent       As          Boolean ' TRUE iff the pawn is quiescent
Dim bTargetIsNear      As          Boolean ' TRUE iff the current iTarget is close enough for a melee attack
Dim bTargetWasHere     As          Boolean ' When bTargetWasLost, are we near the place the target was lost?
Dim bTargetWasNear     As          Boolean ' When we have a target, or when bTargetWasLost, was the target recently within melee range?
Dim bTargetWasLost     As          Boolean ' TRUE iff a target was lost. 
Dim bLimitRotation     As Editable Boolean ' TRUE iff pitch and roll rotations are limited (can't turn upside down).
Dim bLookingAlongStair As          Boolean ' TRUE iff the view has been adjusted to look along stairs.
Dim bIsOnSurface       As          Boolean ' TRUE iff the pawn is standing on a surface.
Dim bCheated           As          Boolean ' TRUE iff the pawn has cheated.
Dim bStatusChanged     As          Boolean ' TRUE after change in the pawn's health, ammo, weapons, armour, and so on.
Dim bIsAlarmed         As          Boolean ' TRUE iff the pawn is alarmed by something.

' Player controls:
Dim bCannotTurn        As Editable Boolean ' The pawn is not allowed to turn.
Dim bCannotMove        As Editable Boolean ' The pawn is not allowed to move (forward/backward/left/right/up/down).

Dim MaxStepUpHeight    As Editable Byte    ' Maximum size of upward step.
Dim MaxStepDownHeight  As Editable Byte    ' Maximum size of downward step.

' Max. amount of ammo pawn can carry:
Dim AmmoCapacity(10)  As Editable Integer ' Indexed by EAmmoType

'Inventory information:
Dim RecentWeapons(2) As Actor ' (1) is the most recently used or current weapon, (2) the second most recently used.

' Rendering effects for players
Dim HurtEffectCount as Byte
Dim PickupEffectCount as Byte
Dim HealthEffectCount as Byte
Dim TeleportEffectCount as Byte
Dim bRenderUnderwater as Integer
 