Vertical docking port, docking sounds, water flows properly between horizontally docked hulls, falseoutput of signal check components can be changed, lighting and FOW works between hulls (todo: some logic for determining when to update light.HullsInRange when two subs are moving relative to each other)
This commit is contained in:
@@ -375,7 +375,18 @@ namespace Barotrauma.Lights
|
||||
|
||||
Vector2 lightSourcePos = light.Position;
|
||||
|
||||
if (light.Submarine==null && parentEntity != null && parentEntity.Submarine != null) lightSourcePos -= parentEntity.Submarine.Position;
|
||||
if (parentEntity != null && parentEntity.Submarine != null)
|
||||
{
|
||||
if (light.Submarine == null)
|
||||
{
|
||||
lightSourcePos -= parentEntity.Submarine.Position;
|
||||
}
|
||||
else if (light.Submarine != parentEntity.Submarine)
|
||||
{
|
||||
lightSourcePos += (light.Submarine.Position-parentEntity.Submarine.Position);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CachedShadow cachedShadow = null;
|
||||
if (!cachedShadows.TryGetValue(light, out cachedShadow) ||
|
||||
|
||||
Reference in New Issue
Block a user