Skip to content

Commit

Permalink
fix has* order, readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Sacchan-VRC committed Sep 15, 2020
1 parent bb08eec commit 93707e2
Show file tree
Hide file tree
Showing 15 changed files with 20,794 additions and 20,562 deletions.
File renamed without changes.
77 changes: 77 additions & 0 deletions Guide_JP.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Guide_JP
m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 52e355960b4a0d242b120fd53f7fe426, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
Binary file modified SF-1/Models/SF-1.fbx
Binary file not shown.
14 changes: 7 additions & 7 deletions SF-1/Scripts/EffectsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public class EffectsController : UdonSharpBehaviour
private bool vapor;
private float Gs_trail = 1000; //ensures it wont cause effects at first frame
[System.NonSerializedAttribute] [HideInInspector] public Animator PlaneAnimator;
private Vector3 PitchLerper = new Vector3(0, 0, 0);
private Vector3 AileronLerper = new Vector3(0, 0, 0);
private Vector3 YawLerper = new Vector3(0, 0, 0);
private Vector3 EngineLerper = new Vector3(0, 0, 0);
private Vector3 PitchLerper = Vector3.zero;
private Vector3 YawLerper = Vector3.zero;
private Vector3 RollLerper = Vector3.zero;
private Vector3 EngineLerper = Vector3.zero;
private Vector3 Enginefireerper = new Vector3(1, 0.6f, 1);
[System.NonSerializedAttribute] [HideInInspector] public float AirbrakeLerper;
[System.NonSerializedAttribute] [HideInInspector] public float DoEffects = 6f; //4 seconds before sleep so late joiners see effects if someone is already piloting
Expand Down Expand Up @@ -117,7 +117,7 @@ private void Update()
vapor = (EngineControl.AirSpeed > 20) ? true : false;// only make vapor when going above "80m/s", prevents vapour appearing when taxiing into a wall or whatever

PitchLerper.x = Mathf.Lerp(PitchLerper.x, rotationinputs.x, 4.5f * Time.deltaTime);
AileronLerper.y = Mathf.Lerp(AileronLerper.y, rotationinputs.z, 4.5f * Time.deltaTime);
RollLerper.y = Mathf.Lerp(RollLerper.y, rotationinputs.z, 4.5f * Time.deltaTime);
YawLerper.y = Mathf.Lerp(YawLerper.y, rotationinputs.y, 4.5f * Time.deltaTime);
Enginefireerper.y = Mathf.Lerp(Enginefireerper.y, EngineControl.Throttle, .9f * Time.deltaTime);

Expand Down Expand Up @@ -147,7 +147,7 @@ private void Update()
{
if (EngineControl.Taxiing)
{
FrontWheel.localRotation = Quaternion.Euler(new Vector3(0, -YawLerper.y * 3, 0));
FrontWheel.localRotation = Quaternion.Euler(new Vector3(0, -YawLerper.y * 4f * (-Mathf.Min((EngineControl.AirSpeed / 10), 1) + 1), 0));
}
else FrontWheel.localRotation = Quaternion.identity;
}
Expand All @@ -159,7 +159,7 @@ private void Update()
elevator.localRotation = Quaternion.Euler(-PitchLerper);

foreach (Transform aileron in Ailerons)
aileron.localRotation = Quaternion.Euler(AileronLerper);
aileron.localRotation = Quaternion.Euler(RollLerper);

foreach (Transform rudder in Rudders)
rudder.localRotation = Quaternion.Euler(YawLerper);
Expand Down
40 changes: 20 additions & 20 deletions SF-1/Scripts/EngineController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ public class EngineController : UdonSharpBehaviour
public float BombHoldDelay = 0.5f;
public Transform[] BombLaunchPoints;
[UdonSynced(UdonSyncMode.None)] public float GunAmmoInSeconds = 12;
public bool HasCruise = true;
public bool HasAfterburner = true;
public bool HasLimits = true;
public bool HasFlare = true;
public bool HasCatapult = true;
public bool HasHook = true;
public bool HasBrake = true;
public bool HasAltHold = true;
/* public bool HasTRIM = true; */
public bool HasCanopy = true;
public bool HasAfterBurner = true;
public bool HasCruise = true;
public bool HasGun = true;
public bool HasAAM = true;
public bool HasAGM = true;
public bool HasBomb = true;
public bool HasGear = true;
public bool HasFlaps = true;
public bool HasHook = true;
public bool HasSmoke = true;
public bool HasFlare = true;
public float ThrottleStrength = 20f;
public float AfterburnerThrustMulti = 1.5f;
public float AccelerationResponse = 4.5f;
Expand Down Expand Up @@ -107,7 +107,7 @@ public class EngineController : UdonSharpBehaviour
public float TakeoffAssist = 5f;
public float TakeoffAssistSpeed = 50f;
public float GLimiter = 12f;
public float AoALimit = 15f;
public float AoALimiter = 15f;
public float CanopyCloseTime = 1.8f;
[UdonSynced(UdonSyncMode.None)] public float Health = 23f;
public float SeaLevel = -10f;
Expand All @@ -122,11 +122,11 @@ public class EngineController : UdonSharpBehaviour
//best to remove synced variables if you aren't using them
[System.NonSerializedAttribute] [HideInInspector] [UdonSynced(UdonSyncMode.None)] public float BrakeInput;
[System.NonSerializedAttribute] [HideInInspector] [UdonSynced(UdonSyncMode.None)] public float Throttle = 0f;
[System.NonSerializedAttribute] [HideInInspector] [UdonSynced(UdonSyncMode.None)] public Vector3 CurrentVel = new Vector3(0, 0, 0);
[System.NonSerializedAttribute] [HideInInspector] [UdonSynced(UdonSyncMode.None)] public Vector3 CurrentVel = Vector3.zero;
[System.NonSerializedAttribute] [HideInInspector] [UdonSynced(UdonSyncMode.None)] public float Gs = 1f;
[System.NonSerializedAttribute] [HideInInspector] [UdonSynced(UdonSyncMode.None)] public float AngleOfAttack;//MAX of yaw & pitch aoa //used by effectscontroller
[System.NonSerializedAttribute] [HideInInspector] [UdonSynced(UdonSyncMode.None)] public int AAMTarget = 0;
[System.NonSerializedAttribute] [HideInInspector] [UdonSynced(UdonSyncMode.None)] public Vector3 SmokeColor = new Vector3(1, 1, 1);
[System.NonSerializedAttribute] [HideInInspector] [UdonSynced(UdonSyncMode.None)] public Vector3 SmokeColor = Vector3.one;
[System.NonSerializedAttribute] [HideInInspector] [UdonSynced(UdonSyncMode.None)] public bool IsFiringGun = false;
[System.NonSerializedAttribute] [HideInInspector] [UdonSynced(UdonSyncMode.None)] public bool Occupied = false; //this is true if someone is sitting in pilot seat
[System.NonSerializedAttribute] [HideInInspector] [UdonSynced(UdonSyncMode.None)] public Vector3 AGMTarget;
Expand Down Expand Up @@ -602,7 +602,7 @@ private void LateUpdate()
}
}

if (Input.GetKeyDown(KeyCode.T) && HasAfterBurner)
if (Input.GetKeyDown(KeyCode.T) && HasAfterburner)
{
EffectsControl.AfterburnerOn = !EffectsControl.AfterburnerOn;
if (EffectsControl.AfterburnerOn)
Expand Down Expand Up @@ -750,12 +750,12 @@ private void LateUpdate()
}
else if (stickdir > 0)//upleft
{
if (HasAfterBurner)
if (HasCruise)
LStickSelection = 8;
}
else if (stickdir > -45)//up
{
if (HasCruise)
if (HasAfterburner)
LStickSelection = 1;
}
else if (stickdir > -90)//upright
Expand Down Expand Up @@ -1611,12 +1611,12 @@ private void LateUpdate()
NumAGM = (int)Mathf.Min(NumAGM + Mathf.Max(Mathf.Floor(FullAGMs / 5), 1), FullAGMs);
NumBomb = (int)Mathf.Min(NumBomb + Mathf.Max(Mathf.Floor(FullBombs / 5), 1), FullBombs);

Debug.Log(string.Concat("fuel", Fuel));
Debug.Log(string.Concat("FullFuel", FullFuel));
Debug.Log(string.Concat("Health", Health));
Debug.Log(string.Concat("FullHealth", FullHealth));
Debug.Log(string.Concat("GunAmmoInSeconds", GunAmmoInSeconds));
Debug.Log(string.Concat("FullGunAmmo", FullGunAmmo));
/* Debug.Log(string.Concat("fuel ", Fuel));
Debug.Log(string.Concat("FullFuel ", FullFuel));
Debug.Log(string.Concat("Health ", Health));
Debug.Log(string.Concat("FullHealth ", FullHealth));
Debug.Log(string.Concat("GunAmmoInSeconds ", GunAmmoInSeconds));
Debug.Log(string.Concat("FullGunAmmo ", FullGunAmmo)); */
Fuel = Mathf.Min(Fuel + (FullFuel / 25), FullFuel);
GunAmmoInSeconds = Mathf.Min(GunAmmoInSeconds + (FullGunAmmo / 20), FullGunAmmo);
Health = Mathf.Min(Health + (FullHealth / 30), FullHealth);
Expand Down Expand Up @@ -1744,7 +1744,7 @@ private void LateUpdate()

//flight limit internally enabled when alt hold is enabled
float GLimitStrength = Mathf.Clamp(-(Gs / GLimiter) + 1, 0, 1);
float AoALimitStrength = Mathf.Clamp(-(Mathf.Abs(AngleOfAttack) / AoALimit) + 1, 0, 1);
float AoALimitStrength = Mathf.Clamp(-(Mathf.Abs(AngleOfAttack) / AoALimiter) + 1, 0, 1);
float Limits = Mathf.Min(GLimitStrength, AoALimitStrength);
PitchInput *= Limits;
}
Expand All @@ -1770,10 +1770,10 @@ private void LateUpdate()
}
}
//'-input' are used by effectscontroller, and multiplied by 'strength' for final values
if (FlightLimitsEnabled && !Taxiing && AngleOfAttack < AoALimit)//flight limits are enabled
if (FlightLimitsEnabled && !Taxiing && AngleOfAttack < AoALimiter)//flight limits are enabled
{
float GLimitStrength = Mathf.Clamp(-(Gs / GLimiter) + 1, 0, 1);
float AoALimitStrength = Mathf.Clamp(-(Mathf.Abs(AngleOfAttack) / AoALimit) + 1, 0, 1);
float AoALimitStrength = Mathf.Clamp(-(Mathf.Abs(AngleOfAttack) / AoALimiter) + 1, 0, 1);
float Limits = Mathf.Min(GLimitStrength, AoALimitStrength);
PitchInput = Mathf.Clamp(/*(MouseY * mouseysens + Lstick.y + */VRPitchRollInput.y + Wf + Sf + downf + upf, -1, 1) * Limits;
YawInput = Mathf.Clamp(Qf + Ef + JoystickPosYaw.x, -1, 1) * Limits;
Expand Down Expand Up @@ -2137,7 +2137,7 @@ void SortTargets(GameObject[] Targets, float[] order)
}
}
}
public void SetLaunchOpositeSideFalse()//for resupplying
public void SetLaunchOpositeSideFalse()//when resupplying
{
AAMLaunchOpositeSide = false;
AGMLaunchOpositeSide = false;
Expand Down
3 changes: 2 additions & 1 deletion SF-1/Scripts/SoundController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ private void Update()

if (!TouchDownNull)
{
if (Landed == false && EngineControl.Taxiing == true) { TouchDown[Random.Range(0, TouchDown.Length)].Play(); }
//play a touchdown sound the frame we start taxiing
if (Landed == false && EngineControl.Taxiing == true && EngineControl.AirSpeed > 35) { TouchDown[Random.Range(0, TouchDown.Length)].Play(); }
if (EngineControl.Taxiing == true) { Landed = true; } else { Landed = false; }
}
//EngineControl.Piloting = true in editor play
Expand Down
54 changes: 27 additions & 27 deletions SF-1/Scripts/WindChanger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,27 @@ private void Start()
}
private void Update()
{
if (localPlayer.IsOwner(gameObject))
{
WindStrength = WindStrengthSlider.value;
WindStr_text.text = WindStrengthSlider.value.ToString("F1");
/* if (localPlayer.IsOwner(gameObject))
{ */
WindStrength = WindStrengthSlider.value;
WindStr_text.text = WindStrengthSlider.value.ToString("F1");

WindGustStrength = WindGustStrengthSlider.value;
WindGustStrength_text.text = WindGustStrengthSlider.value.ToString("F1");
WindGustStrength = WindGustStrengthSlider.value;
WindGustStrength_text.text = WindGustStrengthSlider.value.ToString("F1");

WindGustiness = WindGustinessSlider.value;
WindGustiness_text.text = WindGustinessSlider.value.ToString("F3");
WindGustiness = WindGustinessSlider.value;
WindGustiness_text.text = WindGustinessSlider.value.ToString("F3");

WindTurbulanceScale = WindTurbulanceScaleSlider.value;
WindTurbulanceScale_text.text = WindTurbulanceScaleSlider.value.ToString("F5");
}
else
{
WindStrengthSlider.value = WindStrength;
WindGustStrengthSlider.value = WindGustStrength;
WindGustinessSlider.value = WindGustiness;
WindTurbulanceScaleSlider.value = WindTurbulanceScale;
}
WindTurbulanceScale = WindTurbulanceScaleSlider.value;
WindTurbulanceScale_text.text = WindTurbulanceScaleSlider.value.ToString("F5");
/* }
else
{
WindStrengthSlider.value = WindStrength;
WindGustStrengthSlider.value = WindGustStrength;
WindGustinessSlider.value = WindGustiness;
WindTurbulanceScaleSlider.value = WindTurbulanceScale;
} */
}
private void OnPickupUseDown()
{
Expand All @@ -77,7 +77,7 @@ public void ApplyWindDir()
Vector3 NewWindDir = (gameObject.transform.rotation * Vector3.forward) * WindStrength;
foreach (EngineController vehicle in VehicleEngines)
{
if (vehicle != null && localPlayer.IsOwner(vehicle.gameObject))
if (vehicle != null && (localPlayer == null || localPlayer.IsOwner(vehicle.gameObject)))
{
vehicle.Wind = NewWindDir;
vehicle.WindGustStrength = WindGustStrength;
Expand All @@ -86,15 +86,15 @@ public void ApplyWindDir()
}
}
}
/* private void OnPickup()
{
WindMenu.SetActive(true);
}
/* private void OnPickup()
{
WindMenu.SetActive(true);
}
private void OnOwnershipTransferred()
{
WindMenu.SetActive(false);
} */
private void OnOwnershipTransferred()
{
WindMenu.SetActive(false);
} */
private void Assert(bool condition, string message)
{
if (!condition)
Expand Down
40,832 changes: 20,556 additions & 20,276 deletions SaccFlightAndVehicles.prefab

Large diffs are not rendered by default.

Binary file modified Textures/Guide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Textures/Guide_J.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions Udon/EffectsController.asset
Original file line number Diff line number Diff line change
Expand Up @@ -2242,7 +2242,7 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: AileronLerper
Data: YawLerper
- Name: $v
Entry: 7
Data: 140|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Expand All @@ -2263,10 +2263,10 @@ MonoBehaviour:
Data: UnityEngineVector3
- Name: symbolOriginalName
Entry: 1
Data: AileronLerper
Data: YawLerper
- Name: symbolUniqueName
Entry: 1
Data: AileronLerper
Data: YawLerper
- Name: symbolDefaultValue
Entry: 6
Data:
Expand Down Expand Up @@ -2299,7 +2299,7 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: YawLerper
Data: RollLerper
- Name: $v
Entry: 7
Data: 143|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Expand All @@ -2320,10 +2320,10 @@ MonoBehaviour:
Data: UnityEngineVector3
- Name: symbolOriginalName
Entry: 1
Data: YawLerper
Data: RollLerper
- Name: symbolUniqueName
Entry: 1
Data: YawLerper
Data: RollLerper
- Name: symbolDefaultValue
Entry: 6
Data:
Expand Down
Loading

0 comments on commit 93707e2

Please sign in to comment.