Barotrauma Server Doc
Barotrauma.Limb Class Reference
Inheritance diagram for Barotrauma.Limb:
Barotrauma.ISerializableEntity Barotrauma.ISpatialEntity

Public Member Functions

 Limb (Ragdoll ragdoll, Character character, LimbParams limbParams)
 
void MoveToPos (Vector2 pos, float force, bool pullFromCenter=false)
 
void MirrorPullJoint ()
 
AttackResult AddDamage (Vector2 simPosition, float damage, float bleedingDamage, float burnDamage, bool playSound)
 
AttackResult AddDamage (Vector2 simPosition, IEnumerable< Affliction > afflictions, bool playSound, float damageMultiplier=1, float penetration=0f, Character attacker=null)
 
bool SectorHit (Vector2 armorSector, Vector2 simPosition)
 
void Update (float deltaTime)
 
void HideAndDisable (float duration=0, bool ignoreCollisions=true)
 
void ReEnable ()
 
bool UpdateAttack (float deltaTime, Vector2 attackSimPos, IDamageable damageTarget, out AttackResult attackResult, float distance=-1, Limb targetLimb=null)
 Returns true if the attack successfully hit something. If the distance is not given, it will be calculated. More...
 
void ExecuteAttack (IDamageable damageTarget, Limb targetLimb, out AttackResult attackResult)
 
void Release ()
 
void ApplyStatusEffects (ActionType actionType, float deltaTime)
 
void Blink ()
 
void UpdateBlink (float deltaTime, float referenceRotation)
 
IEnumerable< LimbJointGetConnectedJoints ()
 
IEnumerable< LimbGetConnectedLimbs ()
 
void Remove ()
 
void LoadParams ()
 

Public Attributes

readonly Character character
 
readonly Ragdoll ragdoll
 Note that during the limb initialization, character.AnimController returns null, whereas this field is already assigned. More...
 
readonly LimbParams Params
 
PhysicsBody body
 
Hull Hull
 
readonly LimbType type
 
readonly Attack attack
 
Vector2 DebugTargetPos
 
Vector2 DebugRefPos
 
readonly List< WearableSpriteWearingItems = new List<WearableSprite>()
 
readonly List< WearableSpriteOtherWearables = new List<WearableSprite>()
 
float BlinkPhase
 
bool FreezeBlinkState
 

Protected Member Functions

float GetArmorSectorSize (Vector2 armorSector)
 

Properties

float SeveredFadeOutTime = 10 [get]
 
Vector2 StepOffset [get]
 
bool InWater [get, set]
 
bool IgnoreCollisions [get, set]
 
Vector2 MouthPos [get, set]
 
List< DamageModifierDamageModifiers = new List<DamageModifier>() [get]
 
int HealthIndex [get]
 
float Scale [get]
 
float AttackPriority [get]
 
bool? DoesFlip [get]
 
bool DoesMirror [get]
 
float SteerForce [get]
 
bool IsLowerBody [get]
 
bool IsLeg [get]
 
bool? IsSevered [get, set]
 
Submarine Submarine [get]
 
bool Hidden [get, set]
 
Vector2?? WorldPosition [get]
 
Vector2??? Position [get]
 
Vector2 SimPosition [get]
 
float Rotation [get]
 
Vector2 AnimTargetPos [get]
 
float Mass [get]
 
bool Disabled [get, set]
 
Vector2 LinearVelocity [get]
 
float?? Dir [get, set]
 
int RefJointIndex [get]
 
bool PullJointEnabled [get, set]
 
float PullJointMaxForce [get, set]
 
Vector2 PullJointWorldAnchorA [get, set]
 
Vector2 PullJointWorldAnchorB [get, set]
 
Vector2 PullJointLocalAnchorA [get]
 
bool Removed [get]
 
Items.Components.Rope AttachedRope [get, set]
 
string Name [get]
 
bool IsDead [get]
 
float Health [get]
 
float HealthPercentage [get]
 
bool IsHuman [get]
 
AIState AIState [get]
 
bool IsFlipped [get]
 
bool CanBeSeveredAlive [get]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get]
 
Dictionary< ActionType, List< StatusEffect > > StatusEffects [get]
 
bool IsStuck [get]
 
- Properties inherited from Barotrauma.ISerializableEntity
string Name [get]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get]
 
- Properties inherited from Barotrauma.ISpatialEntity
Vector2 Position [get]
 
Vector2 WorldPosition [get]
 
Vector2 SimPosition [get]
 
Submarine Submarine [get]
 

Detailed Description

Definition at line 204 of file Limb.cs.

Constructor & Destructor Documentation

◆ Limb()

Barotrauma.Limb.Limb ( Ragdoll  ragdoll,
Character  character,
LimbParams  limbParams 
)

Definition at line 637 of file Limb.cs.

Member Function Documentation

◆ AddDamage() [1/2]

AttackResult Barotrauma.Limb.AddDamage ( Vector2  simPosition,
float  damage,
float  bleedingDamage,
float  burnDamage,
bool  playSound 
)

Definition at line 735 of file Limb.cs.

◆ AddDamage() [2/2]

AttackResult Barotrauma.Limb.AddDamage ( Vector2  simPosition,
IEnumerable< Affliction afflictions,
bool  playSound,
float  damageMultiplier = 1,
float  penetration = 0f,
Character  attacker = null 
)

Definition at line 748 of file Limb.cs.

◆ ApplyStatusEffects()

void Barotrauma.Limb.ApplyStatusEffects ( ActionType  actionType,
float  deltaTime 
)

Definition at line 1226 of file Limb.cs.

◆ Blink()

void Barotrauma.Limb.Blink ( )

Definition at line 1317 of file Limb.cs.

◆ ExecuteAttack()

void Barotrauma.Limb.ExecuteAttack ( IDamageable  damageTarget,
Limb  targetLimb,
out AttackResult  attackResult 
)

Definition at line 1128 of file Limb.cs.

◆ GetArmorSectorSize()

float Barotrauma.Limb.GetArmorSectorSize ( Vector2  armorSector)
protected

Definition at line 879 of file Limb.cs.

◆ GetConnectedJoints()

IEnumerable<LimbJoint> Barotrauma.Limb.GetConnectedJoints ( )

◆ GetConnectedLimbs()

IEnumerable<Limb> Barotrauma.Limb.GetConnectedLimbs ( )

Definition at line 1377 of file Limb.cs.

◆ HideAndDisable()

void Barotrauma.Limb.HideAndDisable ( float  duration = 0,
bool  ignoreCollisions = true 
)

Definition at line 935 of file Limb.cs.

◆ LoadParams()

void Barotrauma.Limb.LoadParams ( )

Definition at line 1414 of file Limb.cs.

◆ MirrorPullJoint()

void Barotrauma.Limb.MirrorPullJoint ( )

Definition at line 730 of file Limb.cs.

◆ MoveToPos()

void Barotrauma.Limb.MoveToPos ( Vector2  pos,
float  force,
bool  pullFromCenter = false 
)

Definition at line 717 of file Limb.cs.

◆ ReEnable()

void Barotrauma.Limb.ReEnable ( )

Definition at line 955 of file Limb.cs.

◆ Release()

void Barotrauma.Limb.Release ( )

Definition at line 1213 of file Limb.cs.

◆ Remove()

void Barotrauma.Limb.Remove ( )

Definition at line 1395 of file Limb.cs.

◆ SectorHit()

bool Barotrauma.Limb.SectorHit ( Vector2  armorSector,
Vector2  simPosition 
)

Definition at line 867 of file Limb.cs.

◆ Update()

void Barotrauma.Limb.Update ( float  deltaTime)

Definition at line 884 of file Limb.cs.

◆ UpdateAttack()

bool Barotrauma.Limb.UpdateAttack ( float  deltaTime,
Vector2  attackSimPos,
IDamageable  damageTarget,
out AttackResult  attackResult,
float  distance = -1,
Limb  targetLimb = null 
)

Returns true if the attack successfully hit something. If the distance is not given, it will be calculated.

Definition at line 970 of file Limb.cs.

◆ UpdateBlink()

void Barotrauma.Limb.UpdateBlink ( float  deltaTime,
float  referenceRotation 
)

Definition at line 1322 of file Limb.cs.

Member Data Documentation

◆ attack

readonly Attack Barotrauma.Limb.attack

Definition at line 273 of file Limb.cs.

◆ BlinkPhase

float Barotrauma.Limb.BlinkPhase

Definition at line 1312 of file Limb.cs.

◆ body

PhysicsBody Barotrauma.Limb.body

Definition at line 217 of file Limb.cs.

◆ character

readonly Character Barotrauma.Limb.character

Definition at line 209 of file Limb.cs.

◆ DebugRefPos

Vector2 Barotrauma.Limb.DebugRefPos

Definition at line 310 of file Limb.cs.

◆ DebugTargetPos

Vector2 Barotrauma.Limb.DebugTargetPos

Definition at line 309 of file Limb.cs.

◆ FreezeBlinkState

bool Barotrauma.Limb.FreezeBlinkState

Definition at line 1313 of file Limb.cs.

◆ Hull

Hull Barotrauma.Limb.Hull

Definition at line 221 of file Limb.cs.

◆ OtherWearables

readonly List<WearableSprite> Barotrauma.Limb.OtherWearables = new List<WearableSprite>()

Definition at line 495 of file Limb.cs.

◆ Params

readonly LimbParams Barotrauma.Limb.Params

Definition at line 214 of file Limb.cs.

◆ ragdoll

readonly Ragdoll Barotrauma.Limb.ragdoll

Note that during the limb initialization, character.AnimController returns null, whereas this field is already assigned.

Definition at line 213 of file Limb.cs.

◆ type

readonly LimbType Barotrauma.Limb.type

Definition at line 227 of file Limb.cs.

◆ WearingItems

readonly List<WearableSprite> Barotrauma.Limb.WearingItems = new List<WearableSprite>()

Definition at line 493 of file Limb.cs.

Property Documentation

◆ AIState

AIState Barotrauma.Limb.AIState
get

Definition at line 596 of file Limb.cs.

◆ AnimTargetPos

Vector2 Barotrauma.Limb.AnimTargetPos
get

Definition at line 440 of file Limb.cs.

◆ AttachedRope

Items.Components.Rope Barotrauma.Limb.AttachedRope
getset

Definition at line 586 of file Limb.cs.

◆ AttackPriority

float Barotrauma.Limb.AttackPriority
get

Definition at line 280 of file Limb.cs.

◆ CanBeSeveredAlive

bool Barotrauma.Limb.CanBeSeveredAlive
get

Definition at line 599 of file Limb.cs.

◆ DamageModifiers

List<DamageModifier> Barotrauma.Limb.DamageModifiers = new List<DamageModifier>()
get

Definition at line 274 of file Limb.cs.

◆ Dir

float?? Barotrauma.Limb.Dir
getset

Definition at line 478 of file Limb.cs.

◆ Disabled

bool Barotrauma.Limb.Disabled
getset

Definition at line 459 of file Limb.cs.

◆ DoesFlip

bool? Barotrauma.Limb.DoesFlip
get

Definition at line 281 of file Limb.cs.

◆ DoesMirror

bool Barotrauma.Limb.DoesMirror
get

Definition at line 294 of file Limb.cs.

◆ Health

float Barotrauma.Limb.Health
get

Definition at line 592 of file Limb.cs.

◆ HealthIndex

int Barotrauma.Limb.HealthIndex
get

Definition at line 278 of file Limb.cs.

◆ HealthPercentage

float Barotrauma.Limb.HealthPercentage
get

Definition at line 593 of file Limb.cs.

◆ Hidden

bool Barotrauma.Limb.Hidden
getset

Definition at line 389 of file Limb.cs.

◆ IgnoreCollisions

bool Barotrauma.Limb.IgnoreCollisions
getset

Definition at line 230 of file Limb.cs.

◆ InWater

bool Barotrauma.Limb.InWater
getset

Definition at line 223 of file Limb.cs.

◆ IsDead

bool Barotrauma.Limb.IsDead
get

Definition at line 591 of file Limb.cs.

◆ IsFlipped

bool Barotrauma.Limb.IsFlipped
get

Definition at line 597 of file Limb.cs.

◆ IsHuman

bool Barotrauma.Limb.IsHuman
get

Definition at line 594 of file Limb.cs.

◆ IsLeg

bool Barotrauma.Limb.IsLeg
get

Definition at line 334 of file Limb.cs.

◆ IsLowerBody

bool Barotrauma.Limb.IsLowerBody
get

Definition at line 312 of file Limb.cs.

◆ IsSevered

bool? Barotrauma.Limb.IsSevered
getset

Definition at line 353 of file Limb.cs.

◆ IsStuck

bool Barotrauma.Limb.IsStuck
get

Definition at line 1168 of file Limb.cs.

◆ LinearVelocity

Vector2 Barotrauma.Limb.LinearVelocity
get

Definition at line 461 of file Limb.cs.

◆ Mass

float Barotrauma.Limb.Mass
get

Definition at line 442 of file Limb.cs.

◆ MouthPos

Vector2 Barotrauma.Limb.MouthPos
getset

Definition at line 257 of file Limb.cs.

◆ Name

string Barotrauma.Limb.Name
get

Definition at line 588 of file Limb.cs.

◆ Position

Vector2??? Barotrauma.Limb.Position
get

Definition at line 400 of file Limb.cs.

◆ PullJointEnabled

bool Barotrauma.Limb.PullJointEnabled
getset

Definition at line 497 of file Limb.cs.

◆ PullJointLocalAnchorA

Vector2 Barotrauma.Limb.PullJointLocalAnchorA
get

Definition at line 575 of file Limb.cs.

◆ PullJointMaxForce

float Barotrauma.Limb.PullJointMaxForce
getset

Definition at line 503 of file Limb.cs.

◆ PullJointWorldAnchorA

Vector2 Barotrauma.Limb.PullJointWorldAnchorA
getset

Definition at line 509 of file Limb.cs.

◆ PullJointWorldAnchorB

Vector2 Barotrauma.Limb.PullJointWorldAnchorB
getset

Definition at line 542 of file Limb.cs.

◆ RefJointIndex

int Barotrauma.Limb.RefJointIndex
get

Definition at line 491 of file Limb.cs.

◆ Removed

bool Barotrauma.Limb.Removed
get

Definition at line 580 of file Limb.cs.

◆ Rotation

float Barotrauma.Limb.Rotation
get

Definition at line 422 of file Limb.cs.

◆ Scale

float Barotrauma.Limb.Scale
get

Definition at line 279 of file Limb.cs.

◆ SerializableProperties

Dictionary<Identifier, SerializableProperty> Barotrauma.Limb.SerializableProperties
get

Definition at line 627 of file Limb.cs.

◆ SeveredFadeOutTime

float Barotrauma.Limb.SeveredFadeOutTime = 10
get

Definition at line 207 of file Limb.cs.

◆ SimPosition

Vector2 Barotrauma.Limb.SimPosition
get

Definition at line 405 of file Limb.cs.

◆ StatusEffects

Dictionary<ActionType, List<StatusEffect> > Barotrauma.Limb.StatusEffects
get

Definition at line 635 of file Limb.cs.

◆ SteerForce

float Barotrauma.Limb.SteerForce
get

Definition at line 307 of file Limb.cs.

◆ StepOffset

Vector2 Barotrauma.Limb.StepOffset
get

Definition at line 219 of file Limb.cs.

◆ Submarine

Submarine Barotrauma.Limb.Submarine
get

Definition at line 387 of file Limb.cs.

◆ WorldPosition

Vector2?? Barotrauma.Limb.WorldPosition
get

Definition at line 395 of file Limb.cs.