Wall slams - Damage on high velocity impact. (#1600)

* Wallslammed!

* Removes debug logging

* Buff damage to 5 by default
This commit is contained in:
Víctor Aguilera Puerto
2020-08-07 16:22:32 +02:00
committed by GitHub
parent 8a66bf0284
commit 079937a9fe
9 changed files with 85 additions and 14 deletions

View File

@@ -13,6 +13,7 @@ using Robust.Shared.GameObjects.Components.Transform;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
@@ -323,8 +324,8 @@ namespace Content.Server.GameObjects.Components.Atmos
switch (_state)
{
case ProcessState.TileEqualize:
if(ProcessTileEqualize())
_state = ProcessState.ActiveTiles;
ProcessTileEqualize();
_state = ProcessState.ActiveTiles;
return;
case ProcessState.ActiveTiles:
if(ProcessActiveTiles())
@@ -335,8 +336,8 @@ namespace Content.Server.GameObjects.Components.Atmos
_state = ProcessState.HighPressureDelta;
return;
case ProcessState.HighPressureDelta:
if(ProcessHighPressureDelta())
_state = ProcessState.Hotspots;
ProcessHighPressureDelta();
_state = ProcessState.Hotspots;
break;
case ProcessState.Hotspots:
if(ProcessHotspots())
@@ -347,7 +348,7 @@ namespace Content.Server.GameObjects.Components.Atmos
UpdateCounter++;
}
public bool ProcessTileEqualize()
public void ProcessTileEqualize()
{
_stopwatch.Restart();
@@ -360,10 +361,10 @@ namespace Content.Server.GameObjects.Components.Atmos
number = 0;
// Process the rest next time.
if (_stopwatch.Elapsed.TotalMilliseconds >= LagCheckMaxMilliseconds)
return false;
return;
}
return true;
return;
}
public bool ProcessActiveTiles()
@@ -411,7 +412,7 @@ namespace Content.Server.GameObjects.Components.Atmos
return true;
}
public bool ProcessHighPressureDelta()
public void ProcessHighPressureDelta()
{
_stopwatch.Restart();
@@ -427,10 +428,10 @@ namespace Content.Server.GameObjects.Components.Atmos
number = 0;
// Process the rest next time.
if (_stopwatch.Elapsed.TotalMilliseconds >= LagCheckMaxMilliseconds)
return false;
return;
}
return true;
return;
}
private bool ProcessHotspots()