Переписал трение на пасейку (говно)
This commit is contained in:
@@ -6,6 +6,7 @@ namespace VeloX;
|
||||
|
||||
public partial class VeloXCar
|
||||
{
|
||||
[Property, Feature( "Engine" ), Sync] public EngineState EngineState { get; set; }
|
||||
[Property, Feature( "Engine" )] public EngineStream Stream { get; set; }
|
||||
public EngineStreamPlayer StreamPlayer { get; set; }
|
||||
|
||||
@@ -181,7 +182,6 @@ public partial class VeloXCar
|
||||
if ( currentGear < 0 && ForwardSpeed < -100 )
|
||||
return;
|
||||
|
||||
|
||||
if ( Math.Abs( avgForwardSlip ) > 10 )
|
||||
return;
|
||||
|
||||
@@ -351,8 +351,4 @@ public partial class VeloXCar
|
||||
IsRedlining = (isRedlining && inputThrottle > 0);
|
||||
}
|
||||
|
||||
public void StreamEngineUpdate()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,17 +7,11 @@ namespace VeloX;
|
||||
[Title( "VeloX - Car" )]
|
||||
public partial class VeloXCar : VeloXBase
|
||||
{
|
||||
protected override void OnAwake()
|
||||
{
|
||||
base.OnAwake();
|
||||
|
||||
StreamPlayer = new( Stream );
|
||||
}
|
||||
protected override void OnStart()
|
||||
{
|
||||
base.OnStart();
|
||||
|
||||
if ( !IsProxy )
|
||||
StreamPlayer = new( Stream );
|
||||
if ( IsDriver )
|
||||
{
|
||||
UpdateGearList();
|
||||
UpdatePowerDistribution();
|
||||
@@ -35,26 +29,24 @@ public partial class VeloXCar : VeloXBase
|
||||
StreamPlayer.EngineState = EngineState;
|
||||
StreamPlayer.IsRedlining = IsRedlining;
|
||||
|
||||
if ( Driver.IsValid() && Driver.IsProxy )
|
||||
StreamPlayer.Update( Time.Delta, Scene.Camera.WorldPosition );
|
||||
else
|
||||
StreamPlayer.Update( Time.Delta, WorldPosition );
|
||||
StreamPlayer.Update( Time.Delta, WorldPosition );
|
||||
}
|
||||
|
||||
}
|
||||
protected override void OnFixedUpdate()
|
||||
{
|
||||
if ( IsProxy )
|
||||
if ( !IsDriver )
|
||||
return;
|
||||
|
||||
base.OnFixedUpdate();
|
||||
|
||||
Brake = Math.Clamp( frontBrake + rearBrake + (Input.Down( "Jump" ) ? 1 : 0), 0, 1 );
|
||||
|
||||
var dt = Time.Delta;
|
||||
EngineThink( dt );
|
||||
WheelThink( dt );
|
||||
UpdateSteering( dt );
|
||||
|
||||
Brake = Math.Clamp( frontBrake + rearBrake + (Input.Down( "Jump" ) ? 1 : 0), 0, 1 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user