Atmos Delta-Pressure Window Shattering (#39238)
This PR adds delta-pressure damage. In short, airtight structures can now take damage proportional to the difference in pressures between the sides of the structure.
This commit is contained in:
@@ -150,4 +150,31 @@ public sealed partial class CCVars
|
||||
/// </summary>
|
||||
public static readonly CVarDef<float> AtmosTankFragment =
|
||||
CVarDef.Create("atmos.max_explosion_range", 26f, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Whether atmospherics will process delta-pressure damage on entities with a DeltaPressureComponent.
|
||||
/// Entities with this component will take damage if they are exposed to a pressure difference
|
||||
/// above the minimum pressure threshold defined in the component.
|
||||
/// </summary>
|
||||
// TODO: Needs CVARs for global configuration, like min pressure, max damage, etc.
|
||||
public static readonly CVarDef<bool> DeltaPressureDamage =
|
||||
CVarDef.Create("atmos.delta_pressure_damage", true, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Number of entities to submit for parallel processing per processing run.
|
||||
/// Low numbers may suffer from thinning out the work per job and leading to threads waiting,
|
||||
/// or seeing a lot of threading overhead.
|
||||
/// High numbers may cause Atmospherics to exceed its time budget per tick, as it will not
|
||||
/// check its time often enough to know if it's exceeding it.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<int> DeltaPressureParallelToProcessPerIteration =
|
||||
CVarDef.Create("atmos.delta_pressure_parallel_process_per_iteration", 1000, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Number of entities to process per processing job.
|
||||
/// Low numbers may cause Atmospherics to see high threading overhead,
|
||||
/// high numbers may cause Atmospherics to distribute the work unevenly.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<int> DeltaPressureParallelBatchSize =
|
||||
CVarDef.Create("atmos.delta_pressure_parallel_batch_size", 10, CVar.SERVERONLY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user