Barotrauma Client Doc
Barotrauma.Networking.RespawnManager Class Reference
Inheritance diagram for Barotrauma.Networking.RespawnManager:
Barotrauma.Entity Barotrauma.Networking.IServerSerializable Barotrauma.ISpatialEntity Barotrauma.Networking.INetSerializable

Public Types

enum class  State { Waiting , Transporting , Returning }
 

Public Member Functions

 RespawnManager (NetworkMember networkMember, SubmarineInfo shuttleInfo)
 
void Update (float deltaTime)
 
void ForceRespawn ()
 
void RespawnCharacters (Vector2? shuttlePos)
 
Vector2 FindSpawnPos ()
 
void ShowRespawnPromptIfNeeded (float delay=5.0f)
 
void ClientEventRead (IReadMessage msg, float sendingTime)
 
- Public Member Functions inherited from Barotrauma.Entity
 Entity (Submarine submarine, ushort id)
 
void FreeID ()
 Removes the entity from the entity dictionary and frees up the ID it was using. More...
 
virtual void Remove ()
 

Static Public Member Functions

static AfflictionPrefab GetRespawnPenaltyAfflictionPrefab ()
 
static Affliction GetRespawnPenaltyAffliction ()
 
static void GiveRespawnPenaltyAffliction (Character character)
 
- Static Public Member Functions inherited from Barotrauma.Entity
static IReadOnlyCollection< EntityGetEntities ()
 
static int FindFreeIdBlock (int minBlockSize)
 Finds a contiguous block of free IDs of at least the given size More...
 
static Entity FindEntityByID (ushort ID)
 Find an entity based on the ID More...
 
static void RemoveAll ()
 
static void DumpIds (int count, string filename)
 

Properties

static float SkillLossPercentageOnDeath [get]
 How much skills drop towards the job's default skill levels when dying More...
 
bool UsingShuttle [get]
 
DateTime RespawnTime [get]
 When will the shuttle be dispatched with respawned characters More...
 
DateTime ReturnTime [get]
 When will the sub start heading back out of the level More...
 
bool RespawnCountdownStarted [get]
 
bool ReturnCountdownStarted [get]
 
State CurrentState [get]
 
static bool?? UseRespawnPrompt [get]
 
Submarine RespawnShuttle [get]
 
int PendingRespawnCount [get]
 
int RequiredRespawnCount [get]
 
bool ForceSpawnInMainSub [get]
 
- Properties inherited from Barotrauma.Entity
static int EntityCount [get]
 
bool Removed [get]
 
bool IdFreed [get]
 
virtual Vector2 SimPosition [get]
 
virtual Vector2 Position [get]
 
virtual Vector2 WorldPosition [get]
 
virtual Vector2 DrawPosition [get]
 
Submarine Submarine [get, set]
 
AITarget AiTarget [get]
 
bool InDetectable [get, set]
 
double SpawnTime [get]
 
string ErrorLine [get]
 
- Properties inherited from Barotrauma.ISpatialEntity
Vector2 Position [get]
 
Vector2 WorldPosition [get]
 
Vector2 SimPosition [get]
 
Submarine Submarine [get]
 

Additional Inherited Members

- Public Attributes inherited from Barotrauma.Entity
readonly ushort ID
 Unique, but non-persistent identifier. Stays the same if the entities are created in the exactly same order, but doesn't persist e.g. between the rounds. More...
 
readonly string CreationStackTrace
 
readonly UInt64 CreationIndex
 
- Static Public Attributes inherited from Barotrauma.Entity
const ushort NullEntityID = 0
 
const ushort EntitySpawnerID = ushort.MaxValue
 
const ushort RespawnManagerID = ushort.MaxValue - 1
 
const ushort DummyID = ushort.MaxValue - 2
 
const ushort ReservedIDStart = ushort.MaxValue - 3
 
const ushort MaxEntityCount = ushort.MaxValue - 4
 
static EntitySpawner Spawner
 
- Protected Member Functions inherited from Barotrauma.Entity
virtual ushort DetermineID (ushort id, Submarine submarine)
 
- Protected Attributes inherited from Barotrauma.Entity
AITarget aiTarget
 

Detailed Description

Member Enumeration Documentation

◆ State

Enumerator
Waiting 
Transporting 
Returning 

Definition at line 19 of file BarotraumaShared/SharedSource/Networking/RespawnManager.cs.

Constructor & Destructor Documentation

◆ RespawnManager()

Barotrauma.Networking.RespawnManager.RespawnManager ( NetworkMember  networkMember,
SubmarineInfo  shuttleInfo 
)

Member Function Documentation

◆ ClientEventRead()

void Barotrauma.Networking.RespawnManager.ClientEventRead ( IReadMessage  msg,
float  sendingTime 
)

◆ FindSpawnPos()

Vector2 Barotrauma.Networking.RespawnManager.FindSpawnPos ( )

◆ ForceRespawn()

void Barotrauma.Networking.RespawnManager.ForceRespawn ( )

◆ GetRespawnPenaltyAffliction()

static Affliction Barotrauma.Networking.RespawnManager.GetRespawnPenaltyAffliction ( )
static

◆ GetRespawnPenaltyAfflictionPrefab()

static AfflictionPrefab Barotrauma.Networking.RespawnManager.GetRespawnPenaltyAfflictionPrefab ( )
static

◆ GiveRespawnPenaltyAffliction()

static void Barotrauma.Networking.RespawnManager.GiveRespawnPenaltyAffliction ( Character  character)
static

◆ RespawnCharacters()

void Barotrauma.Networking.RespawnManager.RespawnCharacters ( Vector2?  shuttlePos)

◆ ShowRespawnPromptIfNeeded()

void Barotrauma.Networking.RespawnManager.ShowRespawnPromptIfNeeded ( float  delay = 5.0f)

◆ Update()

void Barotrauma.Networking.RespawnManager.Update ( float  deltaTime)

Property Documentation

◆ CurrentState

State Barotrauma.Networking.RespawnManager.CurrentState
get

◆ ForceSpawnInMainSub

bool Barotrauma.Networking.RespawnManager.ForceSpawnInMainSub
get

◆ PendingRespawnCount

int Barotrauma.Networking.RespawnManager.PendingRespawnCount
get

◆ RequiredRespawnCount

int Barotrauma.Networking.RespawnManager.RequiredRespawnCount
get

◆ RespawnCountdownStarted

bool Barotrauma.Networking.RespawnManager.RespawnCountdownStarted
get

◆ RespawnShuttle

Submarine Barotrauma.Networking.RespawnManager.RespawnShuttle
get

◆ RespawnTime

DateTime Barotrauma.Networking.RespawnManager.RespawnTime
get

When will the shuttle be dispatched with respawned characters

Definition at line 46 of file BarotraumaShared/SharedSource/Networking/RespawnManager.cs.

◆ ReturnCountdownStarted

bool Barotrauma.Networking.RespawnManager.ReturnCountdownStarted
get

◆ ReturnTime

DateTime Barotrauma.Networking.RespawnManager.ReturnTime
get

When will the sub start heading back out of the level

Definition at line 51 of file BarotraumaShared/SharedSource/Networking/RespawnManager.cs.

◆ SkillLossPercentageOnDeath

float Barotrauma.Networking.RespawnManager.SkillLossPercentageOnDeath
staticget

How much skills drop towards the job's default skill levels when dying

Definition at line 17 of file BarotraumaShared/SharedSource/Networking/RespawnManager.cs.

◆ UseRespawnPrompt

bool?? Barotrauma.Networking.RespawnManager.UseRespawnPrompt
staticget

◆ UsingShuttle

bool Barotrauma.Networking.RespawnManager.UsingShuttle
get