- Fixed shadows not being cast if the lightsource is outside the sub and the convexhull is not
- Option to change the texture of the "light sphere" - Added "headlights" to the scooters
This commit is contained in:
@@ -11,6 +11,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
private string particles;
|
||||
|
||||
private float useState;
|
||||
|
||||
private ParticlePrefab.DrawTargetType usableIn;
|
||||
|
||||
[HasDefaultValue(0.0f, false)]
|
||||
@@ -50,6 +52,10 @@ namespace Barotrauma.Items.Components
|
||||
if (character == null) return false;
|
||||
if (!character.IsKeyDown(InputType.Aim) || character.Stun>0.0f) return false;
|
||||
|
||||
IsActive = true;
|
||||
useState = 0.1f;
|
||||
|
||||
|
||||
if (character.AnimController.InWater)
|
||||
{
|
||||
if (usableIn == ParticlePrefab.DrawTargetType.Air) return true;
|
||||
@@ -91,12 +97,13 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Draw(SpriteBatch spriteBatch, bool editing = false)
|
||||
|
||||
public override void Update(float deltaTime, Camera cam)
|
||||
{
|
||||
IsActive = false;
|
||||
useState -= deltaTime;
|
||||
|
||||
if (useState <= 0.0f) IsActive = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user