From bce83703f9caeb10906d11944de47478529cfb92 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 22 Mar 2016 16:42:13 -0600 Subject: [PATCH 01/98] Fix collisions not being detected when one item is inactive --- Core/Game/Effects/EffectManager.cs | 6 +++++- Core/Simulation/Physics/Core/CollisionPair.cs | 2 +- Core/Simulation/Physics/Core/LSBody.cs | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Core/Game/Effects/EffectManager.cs b/Core/Game/Effects/EffectManager.cs index 44379cd8..62a5aca1 100644 --- a/Core/Game/Effects/EffectManager.cs +++ b/Core/Game/Effects/EffectManager.cs @@ -119,7 +119,11 @@ private static int GenerateID() private static LSEffect GenEffect(string effectCode, int id = -1) { - FastStack pool = EffectPool [effectCode]; + FastStack pool; + + if (!EffectPool.TryGetValue(effectCode, out pool)) { + return null; + } LSEffect effect = null; if (pool.Count > 0) { diff --git a/Core/Simulation/Physics/Core/CollisionPair.cs b/Core/Simulation/Physics/Core/CollisionPair.cs index 13843b3a..fad9dd59 100644 --- a/Core/Simulation/Physics/Core/CollisionPair.cs +++ b/Core/Simulation/Physics/Core/CollisionPair.cs @@ -294,7 +294,7 @@ public bool CheckHeight() public bool CheckCollision() { - if ((Body1.PositionChanged || Body2.PositionChanged /*|| Body1.PositionChangedBuffer || Body2.PositionChangedBuffer*/) == false) + if ((Body1.PositionChanged || Body2.PositionChanged || Body1.PositionChangedBuffer || Body2.PositionChangedBuffer) == false) { return IsColliding; } diff --git a/Core/Simulation/Physics/Core/LSBody.cs b/Core/Simulation/Physics/Core/LSBody.cs index 04266981..e8d14195 100644 --- a/Core/Simulation/Physics/Core/LSBody.cs +++ b/Core/Simulation/Physics/Core/LSBody.cs @@ -299,7 +299,6 @@ public bool CanSetVisualRotation public void Setup(LSAgent agent) { - FastRadius = Radius * Radius; if (Shape == ColliderType.Polygon) { @@ -308,7 +307,6 @@ public void Setup(LSAgent agent) { GeneratePoints(); GenerateBounds(); - } Agent = agent; Setted = true; @@ -359,6 +357,7 @@ public void GenerateBounds() } } _radius = FixedMath.Sqrt(BiggestSqrRadius); + FastRadius = this.Radius * this.Radius; } } From ecadb84ed6d0e99b090a49a6b156926bae49f71e Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 23 Mar 2016 10:25:19 -0600 Subject: [PATCH 02/98] Add onSetup and onInitialize events --- Core/Game/Managers/LockstepManager.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Core/Game/Managers/LockstepManager.cs b/Core/Game/Managers/LockstepManager.cs index c94486cd..eef504b3 100644 --- a/Core/Game/Managers/LockstepManager.cs +++ b/Core/Game/Managers/LockstepManager.cs @@ -26,6 +26,7 @@ //using Lockstep.Integration; using Lockstep.Data; +using System; namespace Lockstep { @@ -58,6 +59,9 @@ public static class LockstepManager private static GameManager _mainGameManager; + public static event Action onSetup; + public static event Action onInitialize; + public static GameManager MainGameManager { get @@ -103,6 +107,8 @@ internal static void Setup() DefaultMessageRaiser.LateSetup(); + if (onSetup != null) + onSetup (); } internal static void Initialize(GameManager gameManager) @@ -159,6 +165,8 @@ internal static void Initialize(GameManager gameManager) MainGameManager.MainInterfacingHelper.LateInitialize(); BehaviourHelperManager.LateInitialize(); + if (onInitialize != null) + onInitialize (); } static void InitializeHelpers() From 1a87759170cb3faeea96a9526e1a461605cd7f73 Mon Sep 17 00:00:00 2001 From: GCat Date: Thu, 24 Mar 2016 22:51:39 +0200 Subject: [PATCH 03/98] Ignore collision of a destroyed immovable agent --- Core/Simulation/Physics/Core/CollisionPair.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Simulation/Physics/Core/CollisionPair.cs b/Core/Simulation/Physics/Core/CollisionPair.cs index fad9dd59..d5866158 100644 --- a/Core/Simulation/Physics/Core/CollisionPair.cs +++ b/Core/Simulation/Physics/Core/CollisionPair.cs @@ -154,7 +154,7 @@ private void DistributeCollision() const bool applyVelocity = false; //Resolving collision - if (Body1.Immovable || (Body2.Immovable == false && Body1.Priority > Body2.Priority)) + if (Body1.Immovable && Body1.Agent.IsActive || (Body2.Immovable == false && Body1.Priority > Body2.Priority)) { Body2._position.x -= DistX; Body2._position.y -= DistY; From 96faa81f4aa8fd72bb9a80d37743a05fed34e713 Mon Sep 17 00:00:00 2001 From: GCat Date: Thu, 24 Mar 2016 23:27:47 +0200 Subject: [PATCH 04/98] Update CollisionPair.cs --- Core/Simulation/Physics/Core/CollisionPair.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Simulation/Physics/Core/CollisionPair.cs b/Core/Simulation/Physics/Core/CollisionPair.cs index d5866158..688bd8f8 100644 --- a/Core/Simulation/Physics/Core/CollisionPair.cs +++ b/Core/Simulation/Physics/Core/CollisionPair.cs @@ -154,7 +154,7 @@ private void DistributeCollision() const bool applyVelocity = false; //Resolving collision - if (Body1.Immovable && Body1.Agent.IsActive || (Body2.Immovable == false && Body1.Priority > Body2.Priority)) + if (Body1.Immovable && Body1.isActiveAndEnabled || (Body2.Immovable == false && Body1.Priority > Body2.Priority)) { Body2._position.x -= DistX; Body2._position.y -= DistY; From db8eb8847b07c8ed7c04d1f73a01be39b3c655a6 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 29 Mar 2016 09:01:28 -0600 Subject: [PATCH 05/98] Fix HeightSet _bonusHeight being serialized as normal integer. Clean up SelectionRingProto. --- Core/Game/Abilities/Essential/HeightSet.cs | 2 +- .../SelectionRing/SelectionRingProto.prefab | 27 ++++++++----------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/Core/Game/Abilities/Essential/HeightSet.cs b/Core/Game/Abilities/Essential/HeightSet.cs index e4f1fda1..5eb3324e 100644 --- a/Core/Game/Abilities/Essential/HeightSet.cs +++ b/Core/Game/Abilities/Essential/HeightSet.cs @@ -10,7 +10,7 @@ public class HeightSet : Ability public int MapIndex { get { return _mapIndex; } } - [SerializeField] + [SerializeField, FixedNumber] private long _bonusHeight; private long _offset; diff --git a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingProto.prefab b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingProto.prefab index 4a80d93a..8517ea87 100644 --- a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingProto.prefab +++ b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingProto.prefab @@ -9,7 +9,6 @@ GameObject: m_Component: - 4: {fileID: 445380} - 33: {fileID: 3355900} - - 64: {fileID: 6486984} - 23: {fileID: 2300754} - 114: {fileID: 11424612} m_Layer: 0 @@ -38,8 +37,8 @@ MeshRenderer: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 129936} m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 m_Materials: - {fileID: 2100000, guid: 02282df78f03942a8bc741704e59723f, type: 2} m_SubsetIndices: @@ -64,18 +63,6 @@ MeshFilter: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 129936} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} ---- !u!64 &6486984 -MeshCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 129936} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Convex: 0 - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!114 &11424612 MonoBehaviour: m_ObjectHideFlags: 1 @@ -96,7 +83,15 @@ Prefab: serializedVersion: 2 m_Modification: m_TransformParent: {fileID: 0} - m_Modifications: [] + m_Modifications: + - target: {fileID: 0} + propertyPath: m_ReceiveShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_CastShadows + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 0} m_RootGameObject: {fileID: 129936} From 3387e8b227821e19e6c9c2296e0690b5a7597ad6 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 29 Mar 2016 09:12:54 -0600 Subject: [PATCH 06/98] Sync --- Core/Game/Agents/Visuals/Materials/Ring4.mat | 138 +++++++++++++++++ .../Agents/Visuals/Materials/Ring4.mat.meta | 8 + Core/Game/Agents/Visuals/Materials/Ring5.mat | 138 +++++++++++++++++ .../Agents/Visuals/Materials/Ring5.mat.meta | 8 + Core/Game/Agents/Visuals/Materials/Ring7.mat | 139 ++++++++++++++++++ .../Agents/Visuals/Materials/Ring7.mat.meta | 8 + Core/Game/Agents/Visuals/Materials/Ring8.mat | 139 ++++++++++++++++++ .../Agents/Visuals/Materials/Ring8.mat.meta | 8 + 8 files changed, 586 insertions(+) create mode 100644 Core/Game/Agents/Visuals/Materials/Ring4.mat create mode 100644 Core/Game/Agents/Visuals/Materials/Ring4.mat.meta create mode 100644 Core/Game/Agents/Visuals/Materials/Ring5.mat create mode 100644 Core/Game/Agents/Visuals/Materials/Ring5.mat.meta create mode 100644 Core/Game/Agents/Visuals/Materials/Ring7.mat create mode 100644 Core/Game/Agents/Visuals/Materials/Ring7.mat.meta create mode 100644 Core/Game/Agents/Visuals/Materials/Ring8.mat create mode 100644 Core/Game/Agents/Visuals/Materials/Ring8.mat.meta diff --git a/Core/Game/Agents/Visuals/Materials/Ring4.mat b/Core/Game/Agents/Visuals/Materials/Ring4.mat new file mode 100644 index 00000000..e176dc66 --- /dev/null +++ b/Core/Game/Agents/Visuals/Materials/Ring4.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Ring4 + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 2800000, guid: a13719c637ab449cca1454b52251f754, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: 0.5 + data: + first: + name: _Parallax + second: 0.02 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: 0.5 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} diff --git a/Core/Game/Agents/Visuals/Materials/Ring4.mat.meta b/Core/Game/Agents/Visuals/Materials/Ring4.mat.meta new file mode 100644 index 00000000..3a75f511 --- /dev/null +++ b/Core/Game/Agents/Visuals/Materials/Ring4.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d1b30db4cb33a4de988fee444a1764c3 +timeCreated: 1459264256 +licenseType: Pro +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Core/Game/Agents/Visuals/Materials/Ring5.mat b/Core/Game/Agents/Visuals/Materials/Ring5.mat new file mode 100644 index 00000000..242f02f4 --- /dev/null +++ b/Core/Game/Agents/Visuals/Materials/Ring5.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Ring5 + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 2800000, guid: 2b0359d4c89134cf087784efa35ccfd8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: 0.5 + data: + first: + name: _Parallax + second: 0.02 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: 0.5 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} diff --git a/Core/Game/Agents/Visuals/Materials/Ring5.mat.meta b/Core/Game/Agents/Visuals/Materials/Ring5.mat.meta new file mode 100644 index 00000000..9d1474f4 --- /dev/null +++ b/Core/Game/Agents/Visuals/Materials/Ring5.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2c5b05ddbe9514461987c27752cccfbc +timeCreated: 1459264260 +licenseType: Pro +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Core/Game/Agents/Visuals/Materials/Ring7.mat b/Core/Game/Agents/Visuals/Materials/Ring7.mat new file mode 100644 index 00000000..c3f876bb --- /dev/null +++ b/Core/Game/Agents/Visuals/Materials/Ring7.mat @@ -0,0 +1,139 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Ring7 + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _ALPHABLEND_ON + m_LightmapFlags: 5 + m_CustomRenderQueue: 3000 + stringTagMap: + RenderType: Transparent + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 2800000, guid: fc4ab1a35abf849659ebb22ff768aff7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 5 + data: + first: + name: _DstBlend + second: 10 + data: + first: + name: _Cutoff + second: 0.5 + data: + first: + name: _Parallax + second: 0.02 + data: + first: + name: _ZWrite + second: 0 + data: + first: + name: _Glossiness + second: 0.5 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 2 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} diff --git a/Core/Game/Agents/Visuals/Materials/Ring7.mat.meta b/Core/Game/Agents/Visuals/Materials/Ring7.mat.meta new file mode 100644 index 00000000..b9c5d932 --- /dev/null +++ b/Core/Game/Agents/Visuals/Materials/Ring7.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aef7dd5c6420d4ca7a02688215459c44 +timeCreated: 1459264241 +licenseType: Pro +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Core/Game/Agents/Visuals/Materials/Ring8.mat b/Core/Game/Agents/Visuals/Materials/Ring8.mat new file mode 100644 index 00000000..95143834 --- /dev/null +++ b/Core/Game/Agents/Visuals/Materials/Ring8.mat @@ -0,0 +1,139 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Ring8 + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _ALPHABLEND_ON + m_LightmapFlags: 5 + m_CustomRenderQueue: 3000 + stringTagMap: + RenderType: Transparent + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 2800000, guid: 225175bc0dc8d41c0a09ed790446b7f5, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 5 + data: + first: + name: _DstBlend + second: 10 + data: + first: + name: _Cutoff + second: 0.5 + data: + first: + name: _Parallax + second: 0.02 + data: + first: + name: _ZWrite + second: 0 + data: + first: + name: _Glossiness + second: 0.5 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 2 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} diff --git a/Core/Game/Agents/Visuals/Materials/Ring8.mat.meta b/Core/Game/Agents/Visuals/Materials/Ring8.mat.meta new file mode 100644 index 00000000..91699c9f --- /dev/null +++ b/Core/Game/Agents/Visuals/Materials/Ring8.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 181d1c02375914a6eb853d7ec066d98d +timeCreated: 1459264262 +licenseType: Pro +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: From 7b9d162293112b03c67581c6c7fa2de62445081a Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 29 Mar 2016 17:47:04 -0600 Subject: [PATCH 07/98] Implement positional projectiles --- Core/Game/Projectiles/LSProjectile.cs | 209 ++++++++++++++----------- Core/Game/Projectiles/TargetingType.cs | 3 +- 2 files changed, 121 insertions(+), 91 deletions(-) diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index 40c39ba7..910c5b69 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -39,7 +39,7 @@ public sealed class LSProjectile : CerealBehaviour public long _speed; private int CountDown; - + public Vector3d Velocity { get; private set; } private Vector3d Direction { get; set; } @@ -107,11 +107,11 @@ public sealed class LSProjectile : CerealBehaviour public HitType HitBehavior { get { return _hitBehavior; } } - [FixedNumberAngle, SerializeField] - private long _angle = FixedMath.TenDegrees; + [FixedNumberAngle, SerializeField] + private long _angle = FixedMath.TenDegrees; - [FixedNumber, SerializeField] - private long _radius = FixedMath.Create(1); + [FixedNumber, SerializeField] + private long _radius = FixedMath.Create(1); // // Properties @@ -125,11 +125,11 @@ public int AliveTime private set; } - public long Angle - { - get { return _angle; } - set { _angle = value; } - } + public long Angle + { + get { return _angle; } + set { _angle = value; } + } public long Damage{ get; set; } @@ -187,11 +187,11 @@ public string MyProjCode private set; } - public long Radius - { - get { return _radius; } - set { _radius = value; } - } + public long Radius + { + get { return _radius; } + set { _radius = value; } + } public long Speed { get; set; } @@ -226,7 +226,7 @@ private uint TargetVersion set; } - public Vector2d Forward {get; set;} + public Vector2d Forward { get; set; } private Action HitEffect { get; set; } @@ -240,42 +240,42 @@ public int GetStateHash() // // Static Methods // - private void ApplyArea(Vector2d center, long radius) - { - long num = radius * radius; - foreach (LSAgent agent in Scan(center, radius)) - { - if (agent.Body._position.FastDistance(center.x, center.y) < num) - { - this.HitEffect(agent); - } - } - } - - private void ApplyCone(Vector3d center3d, Vector2d forward, long radius, long angle, Action apply, PlatformType targetPlatform) - { - Vector2d center = center3d.ToVector2d(); - long fastRange = radius * radius; - - foreach (LSAgent agent in Scan(center, radius)) - { - LSProjectile.agentPos = agent.Body._position; - LSProjectile.difference = LSProjectile.agentPos - center; - - if (LSProjectile.difference.FastMagnitude() > fastRange) - continue; - - if (forward.Dot(difference) <= 0) - continue; + private void ApplyArea(Vector2d center, long radius) + { + long num = radius * radius; + foreach (LSAgent agent in Scan(center, radius)) + { + if (agent.Body._position.FastDistance(center.x, center.y) < num) + { + this.HitEffect(agent); + } + } + } + + private void ApplyCone(Vector3d center3d, Vector2d forward, long radius, long angle, Action apply, PlatformType targetPlatform) + { + Vector2d center = center3d.ToVector2d(); + long fastRange = radius * radius; + + foreach (LSAgent agent in Scan(center, radius)) + { + LSProjectile.agentPos = agent.Body._position; + LSProjectile.difference = LSProjectile.agentPos - center; + + if (LSProjectile.difference.FastMagnitude() > fastRange) + continue; + + if (forward.Dot(difference) <= 0) + continue; - LSProjectile.difference.Normalize(); + LSProjectile.difference.Normalize(); - if (forward.Cross(difference).Abs() > angle) - continue; + if (forward.Cross(difference).Abs() > angle) + continue; - apply(agent); - } - } + apply(agent); + } + } private bool CheckCollision() { @@ -288,24 +288,23 @@ private bool CheckCollision(LSBody target) } - private IEnumerable Scan(Vector2d center, long radius) + private IEnumerable Scan(Vector2d center, long radius) { foreach (LSAgent agent in InfluenceManager.ScanAll ( center, radius, this.AgentConditional, - this.BucketConditional) - ) + this.BucketConditional)) { yield return agent; } } - + private void SetupCachedActions() { } - + internal void Deactivate() { SpawnVersion = 0; @@ -364,9 +363,12 @@ private void Hit() ProjectileManager.EndProjectile(this); } - public Func BucketConditional {get; private set;} - public Func AgentConditional {get; private set;} - public bool Deterministic {get; private set;} + public Func BucketConditional { get; private set; } + + public Func AgentConditional { get; private set; } + + public bool Deterministic { get; private set; } + internal void Prepare(int id, Vector3d projectilePosition, Func agentConditional, Func bucketConditional, Action hitEffect, bool deterministic) { this.Deterministic = deterministic; @@ -388,7 +390,7 @@ internal void Prepare(int id, Vector3d projectilePosition, Func ag Forward = Vector2d.up; } - Vector3 bindPositionShift = new Vector3(0, 2, 0); + Vector3 bindPositionShift = new Vector3(0, 2, 0); public void InitializeHoming(LSAgent target) { @@ -406,7 +408,9 @@ public void InitializeTimed(int frameTime) { this.Delay = frameTime; } + Func BodyConditional; + public void InitializeFree(Vector3d direction, Func bodyConditional, bool useGravity = false) { this.BodyConditional = bodyConditional; @@ -416,6 +420,12 @@ public void InitializeFree(Vector3d direction, Func bodyConditional this.cachedTransform.rotation = Quaternion.LookRotation(direction.ToVector3()); } + public void InitializePositional(Vector3d position) + { + this.TargetPosition = position.ToVector2d(); + this.TargetHeight = position.z; + } + public void LateInit() { @@ -439,14 +449,16 @@ public void LateInit() this.CountDown = this.Delay; } break; + case TargetingType.Positional: case TargetingType.Homing: long f = this.Position.ToVector2d().Distance(this.TargetPosition); long timeToHit = f.Div(this.Speed); - if (this._visualArc) { + if (this._visualArc) + { this.arcStartHeight = this.Position.z; this.arcStartVerticalSpeed = (this.TargetHeight - this.Position.z).Div(timeToHit) + timeToHit.Mul(Gravity); - } - else { + } else + { this.linearHeightSpeed = (this.TargetHeight - Position.z).Div(timeToHit).Abs(); } @@ -467,7 +479,7 @@ public void LateInit() this.onInitialize.Invoke(); } - if (UseEffects) + if (UseEffects) EffectManager.LazyCreateEffect(this.StartEffect, this.Position.ToVector3(), this.cachedTransform.rotation); } @@ -486,6 +498,10 @@ private void OnHit() switch (this.HitBehavior) { case HitType.Single: + if (Target == null) + { + throw new System.Exception("Cannot use single hit effect without target"); + } this.HitEffect(Target); break; case HitType.Area: @@ -571,43 +587,55 @@ public void Simulate() } break; case TargetingType.Homing: - if (this._visualArc) { - long progress = FixedMath.Create(this.AliveTime) / 32; - long height = this.arcStartHeight + this.arcStartVerticalSpeed.Mul(progress) - Gravity.Mul(progress.Mul(progress)); - this.Position.z = height; - } - else { - this.TargetHeight = this.Target.Body.HeightPos + Target.Body.Height / 2; - this.Position.z = FixedMath.MoveTowards(this.Position.z,TargetHeight,this.linearHeightSpeed); - } if (this.CheckCollision()) { this.TargetPosition = this.Target.Body._position; this.Hit(); } else { - LSProjectile.tempDirection = this.Target.Body._position - this.Position.ToVector2d(); - if (LSProjectile.tempDirection.Dot(this.lastDirection.x, this.lastDirection.y) < 0L) - { - this.TargetPosition = this.Target.Body._position; - this.Hit(); - } else - { - LSProjectile.tempDirection.Normalize(); - Forward = tempDirection; - this.lastDirection = LSProjectile.tempDirection; - LSProjectile.tempDirection *= this.speedPerFrame; - this.Position.Add(LSProjectile.tempDirection.ToVector3d()); - } + TargetPosition = Target.Body.Position; + this.TargetHeight = this.Target.Body.HeightPos + Target.Body.Height / 2; + + MoveToTargetPosition(); } break; case TargetingType.Free: - RaycastMove (this.Velocity); + RaycastMove(this.Velocity); + break; + case TargetingType.Positional: + MoveToTargetPosition (); break; } } - - public void RaycastMove (Vector3d delta) { + + void MoveToTargetPosition() + { + if (this._visualArc) + { + long progress = FixedMath.Create(this.AliveTime) / 32; + long height = this.arcStartHeight + this.arcStartVerticalSpeed.Mul(progress) - Gravity.Mul(progress.Mul(progress)); + this.Position.z = height; + } else + { + this.Position.z = FixedMath.MoveTowards(this.Position.z, TargetHeight, this.linearHeightSpeed); + } + + LSProjectile.tempDirection = TargetPosition - this.Position.ToVector2d(); + if (LSProjectile.tempDirection.Dot(this.lastDirection.x, this.lastDirection.y) < 0L) + { + this.Hit(); + } else + { + LSProjectile.tempDirection.Normalize(); + Forward = tempDirection; + this.lastDirection = LSProjectile.tempDirection; + LSProjectile.tempDirection *= this.speedPerFrame; + this.Position.Add(LSProjectile.tempDirection.ToVector3d()); + } + } + + public void RaycastMove(Vector3d delta) + { #if true Vector3d nextPosition = this.Position; nextPosition.Add(ref delta); @@ -624,7 +652,7 @@ public void RaycastMove (Vector3d delta) { this.Position = nextPosition; #endif } - + public void Visualize() { if (this.IsActive) @@ -632,10 +660,11 @@ public void Visualize() if (this.CanVisualize) { - LSProjectile.newPos = this.Position.ToVector3(); + LSProjectile.newPos = this.Position.ToVector3(); Vector3 shiftVelocity = LSProjectile.newPos - this.cachedTransform.position; this.cachedTransform.position = LSProjectile.newPos; - if (shiftVelocity.sqrMagnitude > 0) { + if (shiftVelocity.sqrMagnitude > 0) + { this.cachedTransform.rotation = Quaternion.LookRotation(shiftVelocity); } } diff --git a/Core/Game/Projectiles/TargetingType.cs b/Core/Game/Projectiles/TargetingType.cs index 2b15271c..26aae575 100644 --- a/Core/Game/Projectiles/TargetingType.cs +++ b/Core/Game/Projectiles/TargetingType.cs @@ -5,6 +5,7 @@ public enum TargetingType { Timed, Homing, - Free + Free, + Positional } } From c95248bcfc89afe35f95d1e317c12e7614835fdc Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 29 Mar 2016 18:03:23 -0600 Subject: [PATCH 08/98] Add Speed and VisualArc settings to Positional projectiles --- Integration/Editor/EditorLSProjectile.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Integration/Editor/EditorLSProjectile.cs b/Integration/Editor/EditorLSProjectile.cs index e2443990..0cc020e2 100644 --- a/Integration/Editor/EditorLSProjectile.cs +++ b/Integration/Editor/EditorLSProjectile.cs @@ -20,6 +20,7 @@ public override void OnInspectorGUI() case TargetingType.Free: so.PropertyField("_speed"); break; + case TargetingType.Positional: case TargetingType.Homing: so.PropertyField("_speed"); so.PropertyField("_visualArc"); From f6d1fdde38097f0fac3a0e8ba21caaaab08f65b2 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 30 Mar 2016 09:04:08 -0600 Subject: [PATCH 09/98] Add special attack animation capacity to default LSAnimator --- Core/Game/Agents/LSAnimator.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Core/Game/Agents/LSAnimator.cs b/Core/Game/Agents/LSAnimator.cs index 619e43f3..f4fadbbd 100644 --- a/Core/Game/Agents/LSAnimator.cs +++ b/Core/Game/Agents/LSAnimator.cs @@ -22,11 +22,16 @@ public class LSAnimator : LSAnimatorBase [Space(10f), SerializeField] private string fire = "fire"; + [SerializeField] + private string specialAttack = "specialAttack"; + private AnimationClip idlingClip; private AnimationClip movingClip; private AnimationClip engagingClip; private AnimationClip dyingClip; + private AnimationClip fireClip; + private AnimationClip specialAttackClip; private Animation animator; @@ -51,6 +56,7 @@ public override void Initialize() dyingClip = animator.GetClip(dying); //Impulses fireClip = animator.GetClip(fire); + specialAttackClip = animator.GetClip(specialAttack); } Play(AnimState.Idling); } @@ -121,7 +127,8 @@ public string GetImpulseName(AnimImpulse impulse) { case AnimImpulse.Fire: return fire; - + case AnimImpulse.SpecialAttack: + return specialAttack; } return idling; } @@ -132,7 +139,8 @@ private AnimationClip GetImpulseClip(AnimImpulse impulse) { case AnimImpulse.Fire: return fireClip; - + case AnimImpulse.SpecialAttack: + return specialAttackClip; } return idlingClip; } From abb1bed742d687f7222bd3244fcf5477bad78d9c Mon Sep 17 00:00:00 2001 From: SnpM Date: Thu, 31 Mar 2016 09:22:37 -0600 Subject: [PATCH 10/98] Implement cooldown; Refactor --- Core/Game/Abilities/Ability.cs | 6 ++++++ Core/Game/Abilities/ActiveAbility.cs | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Core/Game/Abilities/Ability.cs b/Core/Game/Abilities/Ability.cs index a0113691..ccb95a8d 100644 --- a/Core/Game/Abilities/Ability.cs +++ b/Core/Game/Abilities/Ability.cs @@ -123,6 +123,8 @@ protected virtual void OnInitialize() internal void Simulate() { + TemplateSimulate (); + OnSimulate(); if (isCasting) { @@ -130,6 +132,10 @@ internal void Simulate() } } + protected virtual void TemplateSimulate () { + + } + protected virtual void OnSimulate() { } diff --git a/Core/Game/Abilities/ActiveAbility.cs b/Core/Game/Abilities/ActiveAbility.cs index 82cd5f85..2be5276e 100644 --- a/Core/Game/Abilities/ActiveAbility.cs +++ b/Core/Game/Abilities/ActiveAbility.cs @@ -3,15 +3,31 @@ namespace Lockstep { public abstract class ActiveAbility : Ability { + [SerializeField,FrameCount] + private int _cooldown; + public int Cooldown {get {return _cooldown;}} + public ushort ListenInput {get; private set;} + private int _heat; + public int Heat {get {return _heat;}private set {_heat = value;}} + protected sealed override void TemplateSetup () { ListenInput = Data.ListenInputID; } public void Execute(Command com) { - OnExecute(com); + + if (Heat <= 0) { + OnExecute(com); + Heat = Cooldown; + } + } + + protected override void TemplateSimulate() + { + Heat--; } protected virtual void OnExecute(Command com) {} From 7b283df6ebcdcd53b17de6472d0a3431f3a26b47 Mon Sep 17 00:00:00 2001 From: SnpM Date: Thu, 31 Mar 2016 09:52:57 -0600 Subject: [PATCH 11/98] Implement long GetRandom --- Core/Utility/LSUtility.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Utility/LSUtility.cs b/Core/Utility/LSUtility.cs index fad572a4..68185abb 100644 --- a/Core/Utility/LSUtility.cs +++ b/Core/Utility/LSUtility.cs @@ -38,7 +38,7 @@ public static void Initialize (uint seed) return ((0xFFFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)))) % Count); }*/ - public static int GetRandom (int Count) + public static int GetRandom (int Count = int.MaxValue) { uint t = (Seed ^ (Seed << 11)); Seed = y; @@ -47,7 +47,7 @@ public static int GetRandom (int Count) return (int)((0x7FFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)))) % Count); } - public static int PeekRandom (int Count) + public static int PeekRandom (int Count = int.MaxValue) { uint cSeed = Seed; uint cY = y; From 396511b0bd8d526c4b9b496b50998963a6cf409e Mon Sep 17 00:00:00 2001 From: SnpM Date: Fri, 1 Apr 2016 11:53:21 -0600 Subject: [PATCH 12/98] Add all agents of type --- Core/Game/Agents/AgentController.cs | 31 +++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/Core/Game/Agents/AgentController.cs b/Core/Game/Agents/AgentController.cs index 4aaab032..f4062344 100644 --- a/Core/Game/Agents/AgentController.cs +++ b/Core/Game/Agents/AgentController.cs @@ -24,6 +24,9 @@ public sealed class AgentController private static readonly Dictionary CodeInterfacerMap = new Dictionary(); public static IAgentData[] AgentData; + public static Dictionary> TypeAgentsActive = new Dictionary>(); + public static Dictionary> TypeAgents = new Dictionary>(); + public static void Setup() { IAgentDataProvider database; @@ -163,9 +166,13 @@ public static void DestroyAgent(LSAgent agent, bool Immediate = false) leController.LocalAgentActive [agent.LocalID] = false; leController.OpenLocalIDs.Add(agent.LocalID); OpenGlobalIDs.Add(agent.GlobalID); - + agent.Deactivate(Immediate); - + + ushort agentCodeID = AgentController.GetAgentCodeIndex (agent.MyAgentCode); + + TypeAgentsActive[agentCodeID][agent.TypeIndex] = false; + } public static void CacheAgent(LSAgent agent) @@ -330,15 +337,35 @@ public LSAgent CreateAgent( FastStack cache = CachedAgents [agentCode]; LSAgent curAgent = null; + ushort agentCodeID = AgentController.GetAgentCodeIndex(agentCode); + if (cache.IsNotNull() && cache.Count > 0) { curAgent = cache.Pop(); + + TypeAgentsActive[agentCodeID][curAgent.TypeIndex] = true; } else { IAgentData interfacer = AgentController.CodeInterfacerMap [agentCode]; curAgent = GameObject.Instantiate(interfacer.GetAgent().gameObject).GetComponent(); curAgent.Setup(interfacer); + + + FastList typeActive; + if (!AgentController.TypeAgentsActive.TryGetValue(agentCodeID, out typeActive)) { + typeActive = new FastList(); + TypeAgentsActive.Add(agentCodeID, typeActive); + } + FastList typeAgents; + if (!TypeAgents.TryGetValue(agentCodeID,out typeAgents)) { + typeAgents = new FastList(); + TypeAgents.Add(agentCodeID, typeAgents); + } + + curAgent.TypeIndex = (ushort)typeAgents.Count; + typeAgents.Add (curAgent); + typeActive.Add (true); } InitializeAgent(curAgent, pos, rot); return curAgent; From 259dc90a3190e71192973f221dc37050f5679213 Mon Sep 17 00:00:00 2001 From: SnpM Date: Fri, 1 Apr 2016 11:53:48 -0600 Subject: [PATCH 13/98] Update --- Core/Game/Agents/LSAgent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index 4fc2ffca..3d2aa5d6 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -77,7 +77,7 @@ public LSBusStop BusStop { public bool Selectable {get; set;} public bool CanSelect {get {return Selectable && IsVisible;}} - + public ushort TypeIndex; public Vector2 Position2 {get{return new Vector2(CachedTransform.position.x, CachedTransform.position.z);}} public FastList Interfacers {get {return abilityManager.Interfacers;}} From 77916aa0621efc9b7390d7a593e5db4e860f2e2a Mon Sep 17 00:00:00 2001 From: SnpM Date: Fri, 1 Apr 2016 12:07:50 -0600 Subject: [PATCH 14/98] Fix circle-box collision resolution --- Core/Simulation/Physics/Core/CollisionPair.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/Simulation/Physics/Core/CollisionPair.cs b/Core/Simulation/Physics/Core/CollisionPair.cs index 688bd8f8..a379aa31 100644 --- a/Core/Simulation/Physics/Core/CollisionPair.cs +++ b/Core/Simulation/Physics/Core/CollisionPair.cs @@ -570,8 +570,14 @@ public void DistributeCircle_Box(LSBody box, LSBody circle) yAbs = PenetrationY < 0 ? -PenetrationY : PenetrationY; if (xAbs <= circle.Radius && yAbs <= circle.Radius) { + if (xAbs > yAbs) + { + PenetrationX = 0;//FixedMath.Mul (PenetrationX, FixedMath.One * 1 / 4); + } else + { - } else + PenetrationY = 0;//FixedMath.Mul (PenetrationX, FixedMath.One * 1 / 4); + } } else { if (xAbs > yAbs) { From 0b3005ba8532495909028278b40b471b25a3bafe Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 4 Apr 2016 11:35:01 -0600 Subject: [PATCH 15/98] Implement removal of grid mapping when DynamicBlocker is deactivated --- Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs b/Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs index 06fada77..42ee6d8c 100644 --- a/Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs +++ b/Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs @@ -50,5 +50,9 @@ protected override void OnLateSimulate() } } + protected override void OnDeactivate() + { + RemoveLastCoordinates (); + } } } \ No newline at end of file From afd0fc5e2c0a41bffc0d05824f386c6c6b7c07b3 Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 4 Apr 2016 13:19:38 -0600 Subject: [PATCH 16/98] Refactor --- Core/Game/Abilities/Essential/Scan.cs | 167 ++++++++++++++------------ 1 file changed, 87 insertions(+), 80 deletions(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index f6cbcd3e..d01ca94d 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -101,7 +101,7 @@ protected virtual PlatformType TargetPlatform //PlatformType of the target #endregion - public int Windup {get {return _windup;}} + public int Windup { get { return _windup; } } public long EnergyCost { get { return _energyCost; } } @@ -181,10 +181,14 @@ protected override void OnSimulate() BehaveWithNoTarget(); } } - [Lockstep (true)] - bool IsWindingUp {get; set;} + + [Lockstep(true)] + bool IsWindingUp { get; set; } + int windupCount; - void StartWindup () { + + void StartWindup() + { windupCount = this.Windup; IsWindingUp = true; Agent.ApplyImpulse(AnimImpulse.Fire); @@ -198,90 +202,92 @@ void BehaveWithTarget() BehaveWithNoTarget(); return; } - if (IsWindingUp) { + if (IsWindingUp) + { windupCount--; - if (windupCount < 0) { - Fire (); + if (windupCount < 0) + { + Fire(); this.attackCount = this.attackFrameCount - this.Windup; IsWindingUp = false; } - } - else { - Vector2d targetDirection = Target.Body._position - cachedBody._position; - long fastMag = targetDirection.FastMagnitude(); - - if (fastMag <= fastRangeToTarget) + } else { - if (!inRange) - { - if (CanMove) - cachedMove.StopMove(); - } - Agent.SetState(AnimState.Engaging); - long mag; - targetDirection.Normalize (out mag); - bool withinTurn = TrackAttackAngle == false || - (fastMag != 0 && - cachedBody.Forward.Dot(targetDirection.x, targetDirection.y) > 0 - && cachedBody.Forward.Cross(targetDirection.x, targetDirection.y).Abs() <= AttackAngle); - bool needTurn = mag != 0 && !withinTurn; - if (needTurn) - { - if (CanTurn) - { - cachedTurn.StartTurnDirection(targetDirection); - } - else { + Vector2d targetDirection = Target.Body._position - cachedBody._position; + long fastMag = targetDirection.FastMagnitude(); - } - } else + if (fastMag <= fastRangeToTarget) { - if (attackCount <= 0) + if (!inRange) { - StartWindup (); + if (CanMove) + cachedMove.StopMove(); } - } - - if (inRange == false) - { - inRange = true; - } - } else - { - if (CanMove) - { - if (cachedMove.IsMoving == false) + Agent.SetState(AnimState.Engaging); + long mag; + targetDirection.Normalize(out mag); + bool withinTurn = TrackAttackAngle == false || + (fastMag != 0 && + cachedBody.Forward.Dot(targetDirection.x, targetDirection.y) > 0 + && cachedBody.Forward.Cross(targetDirection.x, targetDirection.y).Abs() <= AttackAngle); + bool needTurn = mag != 0 && !withinTurn; + if (needTurn) { - cachedMove.StartMove(Target.Body._position); - cachedBody.Priority = basePriority; + if (CanTurn) + { + cachedTurn.StartTurnDirection(targetDirection); + } else + { + + } } else { - if (Target.Body.PositionChanged || inRange) + if (attackCount <= 0) { - cachedMove.Destination = Target.Body._position; + StartWindup(); } } - } - - if (isAttackMoving || isFocused == false) + + if (inRange == false) + { + inRange = true; + } + } else { - searchCount -= 1; - if (searchCount <= 0) + if (CanMove) { - searchCount = SearchRate; - if (ScanAndEngage()) + if (cachedMove.IsMoving == false) { + cachedMove.StartMove(Target.Body._position); + cachedBody.Priority = basePriority; } else { + if (Target.Body.PositionChanged || inRange) + { + cachedMove.Destination = Target.Body._position; + } } } - } - if (inRange == true) - { - inRange = false; - } - } + if (isAttackMoving || isFocused == false) + { + searchCount -= 1; + if (searchCount <= 0) + { + searchCount = SearchRate; + if (ScanAndEngage()) + { + } else + { + } + } + } + if (inRange == true) + { + inRange = false; + } + + } } } @@ -311,12 +317,12 @@ void BehaveWithNoTarget() public void Fire() { - if (CanMove) - { - cachedMove.StopMove(); - } - cachedBody.Priority = basePriority + 1; - OnFire(); + if (CanMove) + { + cachedMove.StopMove(); + } + cachedBody.Priority = basePriority + 1; + OnFire(); } @@ -325,12 +331,12 @@ protected virtual void OnFire() long appliedDamage = Damage; Health healther = Agent.GetAbility(); LSProjectile projectile = ProjectileManager.Create( - ProjCode, - this.Agent, - this.ProjectileOffset, - this.TargetAllegiance, - (other) => healther.IsNotNull() && healther.HealthAmount > 0, - (agent) => healther.TakeRawDamage(appliedDamage)); + ProjCode, + this.Agent, + this.ProjectileOffset, + this.TargetAllegiance, + (other) => healther.IsNotNull() && healther.HealthAmount > 0, + (agent) => healther.TakeRawDamage(appliedDamage)); projectile.InitializeHoming(this.Target); projectile.TargetPlatform = TargetPlatform; ProjectileManager.Fire(projectile); @@ -413,7 +419,7 @@ protected override void OnExecute(Command com) isAttackMoving = true; isFocused = false; - } else if (com.TryGetData (out target) && target.Is(DataType.UShort)) + } else if (com.TryGetData(out target) && target.Is(DataType.UShort)) { isFocused = true; isAttackMoving = false; @@ -443,7 +449,7 @@ void HandleMoveGroupProcessed() private bool ScanAndEngage() { - LSAgent agent = DoScan (); + LSAgent agent = DoScan(); if (agent == null || HasTarget && agent == Target) { return false; @@ -454,7 +460,8 @@ private bool ScanAndEngage() } } - private LSAgent DoScan () { + private LSAgent DoScan() + { return InfluenceManager.Scan( this.cachedBody.Position, this.Sight, From aa72e8188cafbbed5b2a25bc599a878e590809b4 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 5 Apr 2016 10:54:45 -0600 Subject: [PATCH 17/98] Fix multi-edit bug --- Core/Game/Abilities/Ability.cs | 2 +- Core/Game/Abilities/Essential/Scan.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Core/Game/Abilities/Ability.cs b/Core/Game/Abilities/Ability.cs index ccb95a8d..255dc3be 100644 --- a/Core/Game/Abilities/Ability.cs +++ b/Core/Game/Abilities/Ability.cs @@ -9,7 +9,7 @@ namespace Lockstep { - public abstract class Ability : CerealBehaviour + public abstract class Ability : MonoBehaviour//CerealBehaviour { private bool isCasting; diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index d01ca94d..a0be5e38 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -486,6 +486,7 @@ public bool ScanWithinRangeAndEngage() [SerializeField, Visualize] private Vector3 _projectileOrigin = Vector3.forward; + /* protected override void OnAfterSerialize() { if (transform.position != Vector3.zero) @@ -496,7 +497,7 @@ protected override void OnAfterSerialize() Vector3 temp = (base.transform.InverseTransformPoint(_projectileOrigin)); temp *= base.transform.localScale.x; _projectileOffset = new Vector3d(temp); - } + }*/ void OnDrawGizmos() { From 2a7d3439e78274e6f0a046ee6aca58f8d3c6c9b1 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 5 Apr 2016 12:50:56 -0600 Subject: [PATCH 18/98] Add automated selection sizes --- Core/Game/Agents/LSAgent.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index 3d2aa5d6..9dc6e21d 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -172,8 +172,8 @@ public AllegianceType GetAllegiance(LSAgent other) { public readonly AbilityManager abilityManager = new AbilityManager(); [SerializeField] - private float _selectionRadius = 1f; - public float SelectionRadius {get {return _selectionRadius;}} + private float _selectionRadius = -1f; + public float SelectionRadius {get {return _selectionRadius < 0 ? this.Body.Radius + .5f : _selectionRadius;}} [SerializeField] private Transform _visualCenter; public Transform VisualCenter {get {return _visualCenter;}} From e5c6c609a8b6a914c6a6b86f07a32e54e1889bd0 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 5 Apr 2016 12:55:11 -0600 Subject: [PATCH 19/98] Clean up serialization of LSAgent --- Core/Game/Agents/LSAgent.cs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index 9dc6e21d..8d381110 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -19,7 +19,7 @@ namespace Lockstep { /// /// LSAgents manage abilities and interpret commands. /// - public class LSAgent : CerealBehaviour, IMousable { + public class LSAgent : MonoBehaviour, IMousable { Vector3 IMousable.WorldPosition { get {return this.Body._visualPosition;} @@ -82,23 +82,23 @@ public LSBusStop BusStop { public Vector2 Position2 {get{return new Vector2(CachedTransform.position.x, CachedTransform.position.z);}} public FastList Interfacers {get {return abilityManager.Interfacers;}} - #region Pre-runtime generated - [SerializeField] + #region Pre-runtime generated (maybe not) + //[SerializeField] private Ability[] _attachedAbilities; public Ability[] AttachedAbilities {get {return _attachedAbilities;}} - [SerializeField] + //[SerializeField] private LSBody _body; public LSBody Body { get {return _body;} } - [SerializeField] + //[SerializeField] private LSTrigger[] _triggers; public LSTrigger[] Triggers {get {return _triggers;}} - [SerializeField] + //[SerializeField] private LSAnimatorBase _animator; public LSAnimatorBase Animator { get {return _animator;} } - [SerializeField] + //[SerializeField] private Transform _cachedTransform; public Transform CachedTransform {get{return _cachedTransform;}} - [SerializeField] + //[SerializeField] private GameObject _cachedGameObject; public GameObject CachedGameObject {get {return _cachedGameObject;}} #endregion @@ -173,7 +173,7 @@ public AllegianceType GetAllegiance(LSAgent other) { [SerializeField] private float _selectionRadius = -1f; - public float SelectionRadius {get {return _selectionRadius < 0 ? this.Body.Radius + .5f : _selectionRadius;}} + public float SelectionRadius {get {return _selectionRadius <= 0 ? this.Body.Radius + .5f : _selectionRadius;}} [SerializeField] private Transform _visualCenter; public Transform VisualCenter {get {return _visualCenter;}} @@ -410,7 +410,8 @@ public void RefreshComponents () { so.Update (); so.ApplyModifiedProperties (); } - public override bool GetSerializedFieldNames(List output) + + /*public override bool GetSerializedFieldNames(List output) { return false; base.GetSerializedFieldNames(output); @@ -423,7 +424,7 @@ public override bool GetSerializedFieldNames(List output) output.Add("_globalID"); //output.Add("_myAgentCode"); return true; - } + }*/ /*protected override bool OnSerialize () { LSEditorUtility.FrameCountField ("Death Time", ref _deathTime); From 2483c762a2f341cc24173de7ab8f19e32e188293 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 5 Apr 2016 13:23:38 -0600 Subject: [PATCH 20/98] Tweak and add visual ring size offset --- .../Extra/SelectionRing/SelectionRingController.cs | 8 +++++++- Core/Game/Agents/LSAgent.cs | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs index 6effd39e..835e5bb4 100644 --- a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs +++ b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs @@ -8,16 +8,22 @@ public class SelectionRingController : Ability [SerializeField] private SelectionRing _ringTemplate; + [SerializeField] + private float _ringRadiusOffset = -2; + SelectionRing RingTemplate { get { return _ringTemplate; } } SelectionRing RingObject; + + protected override void OnSetup() { Agent.onSelectedChange += HandleSelectedChange; Agent.onHighlightedChange += HandleHighlightedChange; RingObject = GameObject.Instantiate(_ringTemplate.gameObject).GetComponent(); - RingObject.Setup((Agent.Body.Radius * 2).ToFloat()); + RingObject.Setup((Agent.SelectionRadius + _ringRadiusOffset) * 2); + RingObject.transform.parent = this.transform; RingObject.transform.localPosition = Vector3.zero; } diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index 8d381110..e6363eb2 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -173,7 +173,7 @@ public AllegianceType GetAllegiance(LSAgent other) { [SerializeField] private float _selectionRadius = -1f; - public float SelectionRadius {get {return _selectionRadius <= 0 ? this.Body.Radius + .5f : _selectionRadius;}} + public float SelectionRadius {get {return _selectionRadius <= 0 ? this.Body.Radius.ToFloat() + 2f : _selectionRadius;}} [SerializeField] private Transform _visualCenter; public Transform VisualCenter {get {return _visualCenter;}} @@ -213,7 +213,7 @@ public void Setup(IAgentData interfacer) { Influencer.Setup(this); Body.Setup(this); - SelectionRadiusSquared = _selectionRadius * _selectionRadius; + SelectionRadiusSquared = SelectionRadius * SelectionRadius; this.RegisterLockstep(); @@ -437,7 +437,7 @@ public void RefreshComponents () { return true; }*/ void Reset () { - _selectionRadius = 1f; + _selectionRadius = -1f; _visualCenter = transform; } From 86dbf086dfdd5795f909a1b6102a2139af1467f5 Mon Sep 17 00:00:00 2001 From: GladFox <9006003@gmail.com> Date: Wed, 6 Apr 2016 03:50:45 +0600 Subject: [PATCH 21/98] public access for set Speed --- Core/Game/Abilities/Essential/Move.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Core/Game/Abilities/Essential/Move.cs b/Core/Game/Abilities/Essential/Move.cs index aeaf7bd2..6afee8e0 100644 --- a/Core/Game/Abilities/Essential/Move.cs +++ b/Core/Game/Abilities/Essential/Move.cs @@ -120,12 +120,19 @@ public bool CanMove { get { return _canMove; } } - [SerializeField] - private bool _canTurn = true; - public bool CanTurn {get; private set;} - [SerializeField, FixedNumber] - private long _speed = FixedMath.One * 4; - public long Speed {get {return _speed;}} + [SerializeField] + private bool _canTurn = true; + public bool CanTurn {get; private set;} + + [SerializeField, FixedNumber] + private long _speed = FixedMath.One * 4; + + public long Speed + { + get { return _speed; } + set { _speed = value; } + } + [SerializeField, FixedNumber] private long _acceleration = FixedMath.One; public long Acceleration {get {return _acceleration;}} From 2e9859ed67cb11a405499e83bd422092a5f7ed5a Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 6 Apr 2016 09:22:54 -0600 Subject: [PATCH 22/98] Refactor --- Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs b/Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs index 42ee6d8c..c7367987 100644 --- a/Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs +++ b/Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs @@ -3,6 +3,8 @@ namespace Lockstep { + [DisallowMultipleComponent] + public class DynamicBlocker : Ability { static readonly FastList bufferCoordinates = new FastList(); From 5df9c5c2877cb40cf19a4e751743b86e9ccc01ff Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 6 Apr 2016 09:39:44 -0600 Subject: [PATCH 23/98] Force Immovable on all shapes except circle --- Core/Game/Abilities/Essential/Move.cs | 1 + Core/Simulation/Physics/Core/LSBody.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/Game/Abilities/Essential/Move.cs b/Core/Game/Abilities/Essential/Move.cs index da3f8959..89715d2f 100644 --- a/Core/Game/Abilities/Essential/Move.cs +++ b/Core/Game/Abilities/Essential/Move.cs @@ -205,6 +205,7 @@ protected override void OnSimulate() { if (viableDestination) { + Debug.Log("asdf"); if (Pathfinder.GetPathNode(cachedBody._position.x, cachedBody._position.y, out currentNode)) { if (straightPath) diff --git a/Core/Simulation/Physics/Core/LSBody.cs b/Core/Simulation/Physics/Core/LSBody.cs index e8d14195..791315e9 100644 --- a/Core/Simulation/Physics/Core/LSBody.cs +++ b/Core/Simulation/Physics/Core/LSBody.cs @@ -237,7 +237,7 @@ private void RemoveChild(LSBody child) [SerializeField] private bool _immovable; - public bool Immovable { get { return _immovable; } } + public bool Immovable { get { return _immovable || this.Shape != ColliderType.Circle; } } [SerializeField, FormerlySerializedAs("_priority")] private int _basePriority; From 1d6083f920c3bb57ce61617f55783aed3ccec170 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 6 Apr 2016 11:26:57 -0600 Subject: [PATCH 24/98] Fix circle collisions on AABox corners --- Core/Game/Abilities/Essential/Move.cs | 10 +-- Core/Simulation/Grid/Core/GridNode.cs | 2 +- Core/Simulation/Pathfinding/Pathfinder.cs | 8 +- Core/Simulation/Physics/Core/CollisionPair.cs | 73 +++++++++++-------- 4 files changed, 54 insertions(+), 39 deletions(-) diff --git a/Core/Game/Abilities/Essential/Move.cs b/Core/Game/Abilities/Essential/Move.cs index 89715d2f..c6811e10 100644 --- a/Core/Game/Abilities/Essential/Move.cs +++ b/Core/Game/Abilities/Essential/Move.cs @@ -9,7 +9,7 @@ public class Move : ActiveAbility public const long GroupDirectStop = FixedMath.One; public const long DirectStop = FixedMath.One / 8; private const int MinimumOtherStopTime = (int)(LockstepManager.FrameRate / 4); - private const int repathRate = (int)LockstepManager.FrameRate * 4 / 4; + private const int repathRate = (int)LockstepManager.FrameRate; private const int CollisionStopCount = LockstepManager.FrameRate * 2; private const long CollisionStopTreshold = FixedMath.One / 2; @@ -26,7 +26,7 @@ public class Move : ActiveAbility private int RepathRate { - get { return LSUtility.GetRandom(FixedMath.Create(repathRate).Div(this.Speed).CeilToInt()); } + get { return FixedMath.Create(repathRate).Div(this.Speed).CeilToInt(); } } private const int straightRepathRate = repathRate * 4; @@ -201,11 +201,10 @@ protected override void OnSimulate() { if (CanPathfind) { - if (repathCount <= 0) + if (repathCount <= 0) { if (viableDestination) { - Debug.Log("asdf"); if (Pathfinder.GetPathNode(cachedBody._position.x, cachedBody._position.y, out currentNode)) { if (straightPath) @@ -257,6 +256,7 @@ protected override void OnSimulate() } } else { + } } else { @@ -275,7 +275,7 @@ protected override void OnSimulate() repathCount--; } else { - repathCount--; + repathCount-= 2; } } diff --git a/Core/Simulation/Grid/Core/GridNode.cs b/Core/Simulation/Grid/Core/GridNode.cs index 02f839c1..ba47bca3 100644 --- a/Core/Simulation/Grid/Core/GridNode.cs +++ b/Core/Simulation/Grid/Core/GridNode.cs @@ -169,7 +169,7 @@ public bool Unpassable() { if (this._unwalkable) return true; - if (CachedSize == 1) + if (CachedSize <= 2) { return false; } diff --git a/Core/Simulation/Pathfinding/Pathfinder.cs b/Core/Simulation/Pathfinding/Pathfinder.cs index 7f35b3fd..051e7efc 100644 --- a/Core/Simulation/Pathfinding/Pathfinder.cs +++ b/Core/Simulation/Pathfinding/Pathfinder.cs @@ -63,7 +63,6 @@ public static bool FindPath (Vector2d Start, Vector2d End, FastList ou public static bool FindPath (Vector2d End, GridNode startNode, GridNode endNode, FastList outputVectorPath, int unitSize = 1) { - if (startNode.Unwalkable || endNode.Unwalkable) return false; if (FindPath (startNode, endNode, OutputPath, unitSize)) { outputVectorPath.FastClear (); length = OutputPath.Count - 1; @@ -178,6 +177,7 @@ public static bool FindPath (GridNode _startNode, GridNode _endNode, FastList returnNode.WorldPos.x ? 1 : -1; ySign = Y > returnNode.WorldPos.y ? 1 : -1; - currentNode = GridManager.GetNode (returnNode.gridX + xSign, returnNode.gridY + ySign); + currentNode = GridManager.GetNode (returnNode.gridX + xSign, returnNode.gridY); if (currentNode == null || currentNode.Unwalkable) { - currentNode = GridManager.GetNode (returnNode.gridX + xSign, returnNode.gridY); + currentNode = GridManager.GetNode (returnNode.gridX, returnNode.gridY + ySign); if (currentNode == null || currentNode.Unwalkable) { - currentNode = GridManager.GetNode (returnNode.gridX, returnNode.gridY + ySign); + currentNode = GridManager.GetNode (returnNode.gridX + xSign, returnNode.gridY + ySign); if (currentNode == null || currentNode.Unwalkable) { return false; diff --git a/Core/Simulation/Physics/Core/CollisionPair.cs b/Core/Simulation/Physics/Core/CollisionPair.cs index a379aa31..b0793fa7 100644 --- a/Core/Simulation/Physics/Core/CollisionPair.cs +++ b/Core/Simulation/Physics/Core/CollisionPair.cs @@ -120,8 +120,8 @@ private void DistributeCollision() Body2.OnContact(Body1); } - if (Body1.IsTrigger || Body2.IsTrigger) - return; + if (Body1.IsTrigger || Body2.IsTrigger) + return; switch (LeCollisionType) { @@ -214,11 +214,12 @@ private void DistributeCollision() break; case CollisionType.Circle_Polygon: - if (Body1.Shape == ColliderType.Circle) { - this.DistributeCircle_Poly(Body1,Body2); - } - else { - this.DistributeCircle_Poly(Body2,Body1); + if (Body1.Shape == ColliderType.Circle) + { + this.DistributeCircle_Poly(Body1, Body2); + } else + { + this.DistributeCircle_Poly(Body2, Body1); } break; } @@ -229,7 +230,7 @@ private void DistributeCollision() void DistributeCircle_Poly(LSBody circle, LSBody poly) { Vector2d edgeAxis = ClosestAxis.rotatedRight; - long horProjection = circle._position.Dot(edgeAxis.x,edgeAxis.y); + long horProjection = circle._position.Dot(edgeAxis.x, edgeAxis.y); long verProjection = ClosestAxisProjection + ClosestDist; Vector2d newPos = ClosestAxis * verProjection + edgeAxis * horProjection; circle._position = newPos; @@ -494,9 +495,11 @@ public static bool CheckBox_Poly(LSBody box, LSBody poly) } return false; } + private static Vector2d ClosestAxis; private static long ClosestDist; private static long ClosestAxisProjection; + public static bool CheckCircle_Poly(LSBody circle, LSBody poly) { int EdgeCount = poly.EdgeNorms.Length; @@ -512,24 +515,26 @@ public static bool CheckCircle_Poly(LSBody circle, LSBody poly) long PolyMax; ProjectPolygon(axis.x, axis.y, poly, out PolyMin, out PolyMax); //TODO: Cache PolyMin and PolyMax? - if (CheckOverlap (CircleMin, CircleMax, PolyMin, PolyMax)) + if (CheckOverlap(CircleMin, CircleMax, PolyMin, PolyMax)) { long dist1 = PolyMax - CircleMin; long dist2 = CircleMax - PolyMin; long localCloseDist = 0; - if (dist1 <= dist2) { + if (dist1 <= dist2) + { localCloseDist = dist1; - } - else { + } else + { localCloseDist = -dist2; } - if (localCloseDist.Abs() < ClosestDist.Abs()) { + if (localCloseDist.Abs() < ClosestDist.Abs()) + { ClosestDist = localCloseDist; ClosestAxis = axis; ClosestAxisProjection = CircleProjection; } - } - else { + } else + { return false; } } @@ -565,32 +570,42 @@ public void DistributeCircle_Box(LSBody box, LSBody circle) PenetrationY = (circle.YMax - box.YMin); } - + //PenetrationX = PenetrationX + circle.Velocity.x; + //PenetrationY = PenetrationY + circle.Velocity.y; xAbs = PenetrationX < 0 ? -PenetrationX : PenetrationX; yAbs = PenetrationY < 0 ? -PenetrationY : PenetrationY; - if (xAbs <= circle.Radius && yAbs <= circle.Radius) + + if ((xAbs <= circle.Radius && yAbs <= circle.Radius)) { - if (xAbs > yAbs) - { - PenetrationX = 0;//FixedMath.Mul (PenetrationX, FixedMath.One * 1 / 4); - } else - { + Vector2d corner; + corner.x = xMore ? box.Position.x + box.HalfWidth : box.Position.x - box.HalfWidth; + corner.y = yMore ? box.Position.y + box.HalfHeight : box.Position.y - box.HalfHeight; + Vector2d dir = circle.Position - corner; + dir.Normalize(); - PenetrationY = 0;//FixedMath.Mul (PenetrationX, FixedMath.One * 1 / 4); - } } else + circle.Position = corner + dir * circle.Radius; + } else { if (xAbs > yAbs) { - PenetrationX = 0;//FixedMath.Mul (PenetrationX, FixedMath.One * 1 / 4); + PenetrationX = 0; + if (yAbs < circle.Radius) + PenetrationY = PenetrationY * yAbs / circle.Radius; + } else { + PenetrationY = 0; + if (xAbs < circle.Radius) + PenetrationX = PenetrationX * xAbs / circle.Radius; - PenetrationY = 0;//FixedMath.Mul (PenetrationX, FixedMath.One * 1 / 4); } + //Resolving + circle._position.x -= PenetrationX; + circle._position.y -= PenetrationY; } - //Resolving - circle._position.x -= PenetrationX;//(PenetrationX * Multiplier) >> FixedMath.SHIFT_AMOUNT; - circle._position.y -= PenetrationY;//(PenetrationY * Multiplier) >> FixedMath.SHIFT_AMOUNT; + + + circle.PositionChanged = true; circle.BuildBounds(); From 1005b7e3550a6bf295ec0dfd5a16879845faf8df Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 6 Apr 2016 11:29:45 -0600 Subject: [PATCH 25/98] Fix side collisions on AABox --- Core/Simulation/Physics/Core/CollisionPair.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Core/Simulation/Physics/Core/CollisionPair.cs b/Core/Simulation/Physics/Core/CollisionPair.cs index b0793fa7..f46f8a24 100644 --- a/Core/Simulation/Physics/Core/CollisionPair.cs +++ b/Core/Simulation/Physics/Core/CollisionPair.cs @@ -589,14 +589,12 @@ public void DistributeCircle_Box(LSBody box, LSBody circle) if (xAbs > yAbs) { PenetrationX = 0; - if (yAbs < circle.Radius) - PenetrationY = PenetrationY * yAbs / circle.Radius; + //if (yAbs < circle.Radius) PenetrationY = PenetrationY * yAbs / circle.Radius; } else { PenetrationY = 0; - if (xAbs < circle.Radius) - PenetrationX = PenetrationX * xAbs / circle.Radius; + //if (xAbs < circle.Radius) PenetrationX = PenetrationX * xAbs / circle.Radius; } //Resolving From f750eeb6c9555d948827f3e92ae9250d6abe5ef7 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 6 Apr 2016 12:05:27 -0600 Subject: [PATCH 26/98] Add onDeactivate event to agents --- Core/Game/Agents/LSAgent.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index e6363eb2..3470f74a 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -108,6 +108,8 @@ public LSBusStop BusStop { public bool IsActive { get; private set;} + public event Action onDeactivate; + public AgentTag Tag; From 5ae4e824b3805b263e57167c5e1c647cdb2ecd40 Mon Sep 17 00:00:00 2001 From: SnpM Date: Thu, 7 Apr 2016 10:11:19 -0600 Subject: [PATCH 27/98] Disallow multiple HeightSets --- Core/Game/Abilities/Essential/HeightSet.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/Game/Abilities/Essential/HeightSet.cs b/Core/Game/Abilities/Essential/HeightSet.cs index 5eb3324e..012cd3a1 100644 --- a/Core/Game/Abilities/Essential/HeightSet.cs +++ b/Core/Game/Abilities/Essential/HeightSet.cs @@ -3,6 +3,7 @@ namespace Lockstep { + [UnityEngine.DisallowMultipleComponent] public class HeightSet : Ability { [SerializeField] From a11fe68ecfb0f32b1e5ab085511ab7cc142a79a2 Mon Sep 17 00:00:00 2001 From: SnpM Date: Thu, 7 Apr 2016 10:56:49 -0600 Subject: [PATCH 28/98] Fix onDeactivate not being called. --- Core/Game/Agents/LSAgent.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index 3470f74a..a3ffefa3 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -338,6 +338,8 @@ public void Die (bool immediate = false) { } public void Deactivate(bool Immediate = false) { + if (onDeactivate != null) + this.onDeactivate(this); _Deactivate (); if (Immediate == false) { CoroutineManager.StartCoroutine(PoolDelayer()); From 1ab5436582c9ba6d53e92dafc3fdbd2f349598bf Mon Sep 17 00:00:00 2001 From: SnpM Date: Thu, 7 Apr 2016 11:07:33 -0600 Subject: [PATCH 29/98] Expose Size of selection ring --- .../Abilities/Extra/SelectionRing/SelectionRingController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs index 835e5bb4..b7fd914e 100644 --- a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs +++ b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs @@ -15,14 +15,15 @@ public class SelectionRingController : Ability SelectionRing RingObject; - + public float Size {get; private set;} protected override void OnSetup() { Agent.onSelectedChange += HandleSelectedChange; Agent.onHighlightedChange += HandleHighlightedChange; RingObject = GameObject.Instantiate(_ringTemplate.gameObject).GetComponent(); - RingObject.Setup((Agent.SelectionRadius + _ringRadiusOffset) * 2); + Size = (Agent.SelectionRadius + _ringRadiusOffset) * 2; + RingObject.Setup(Size); RingObject.transform.parent = this.transform; RingObject.transform.localPosition = Vector3.zero; From 5094f5fce84bee86dd729a519ab1c26f5785bb68 Mon Sep 17 00:00:00 2001 From: SnpM Date: Fri, 8 Apr 2016 09:35:45 -0600 Subject: [PATCH 30/98] Fix Scan user taking damage --- Core/Game/Abilities/Essential/Scan.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index a0be5e38..fef283cc 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -329,14 +329,14 @@ public void Fire() protected virtual void OnFire() { long appliedDamage = Damage; - Health healther = Agent.GetAbility(); + Health healther = Target.GetAbility(); LSProjectile projectile = ProjectileManager.Create( ProjCode, this.Agent, this.ProjectileOffset, this.TargetAllegiance, (other) => healther.IsNotNull() && healther.HealthAmount > 0, - (agent) => healther.TakeRawDamage(appliedDamage)); + (other) => healther.TakeRawDamage(appliedDamage)); projectile.InitializeHoming(this.Target); projectile.TargetPlatform = TargetPlatform; ProjectileManager.Fire(projectile); From 2590027f7e58a06ff483d1a8480bafee2f243a6f Mon Sep 17 00:00:00 2001 From: SnpM Date: Fri, 8 Apr 2016 09:58:17 -0600 Subject: [PATCH 31/98] Fix modulus by 0 when generating random number. --- Core/Utility/LSUtility.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/Utility/LSUtility.cs b/Core/Utility/LSUtility.cs index 68185abb..85bcb716 100644 --- a/Core/Utility/LSUtility.cs +++ b/Core/Utility/LSUtility.cs @@ -40,6 +40,8 @@ public static void Initialize (uint seed) public static int GetRandom (int Count = int.MaxValue) { + if (Count == 0) + return 0; uint t = (Seed ^ (Seed << 11)); Seed = y; y = z; From f93e2b31bd4f31e6e03b78fe79dc0dd5f960525f Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 11 Apr 2016 09:18:03 -0600 Subject: [PATCH 32/98] Remove .DS_Store files --- .DS_Store | Bin 6148 -> 0 bytes Core/.DS_Store | Bin 6148 -> 0 bytes Core/Game/.DS_Store | Bin 6148 -> 0 bytes Core/Game/Abilities/.DS_Store | Bin 6148 -> 0 bytes Core/Game/Abilities/Essential/.DS_Store | Bin 6148 -> 0 bytes Core/Game/Player/.DS_Store | Bin 6148 -> 0 bytes Core/Game/Player/UI/.DS_Store | Bin 6148 -> 0 bytes Core/Simulation/.DS_Store | Bin 6148 -> 0 bytes Core/Utility/.DS_Store | Bin 6148 -> 0 bytes Core/Utility/MessageSystem/.DS_Store | Bin 6148 -> 0 bytes Database/.DS_Store | Bin 6148 -> 0 bytes Database/Editor/.DS_Store | Bin 6148 -> 0 bytes Database/Scripts/.DS_Store | Bin 6148 -> 0 bytes Example/.DS_Store | Bin 6148 -> 0 bytes Integration/.DS_Store | Bin 6148 -> 0 bytes Integration/Editor/.DS_Store | Bin 6148 -> 0 bytes .../Editor/CustomPropertyDrawers/.DS_Store | Bin 6148 -> 0 bytes 17 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store delete mode 100644 Core/.DS_Store delete mode 100644 Core/Game/.DS_Store delete mode 100644 Core/Game/Abilities/.DS_Store delete mode 100644 Core/Game/Abilities/Essential/.DS_Store delete mode 100644 Core/Game/Player/.DS_Store delete mode 100644 Core/Game/Player/UI/.DS_Store delete mode 100644 Core/Simulation/.DS_Store delete mode 100644 Core/Utility/.DS_Store delete mode 100644 Core/Utility/MessageSystem/.DS_Store delete mode 100644 Database/.DS_Store delete mode 100644 Database/Editor/.DS_Store delete mode 100644 Database/Scripts/.DS_Store delete mode 100644 Example/.DS_Store delete mode 100644 Integration/.DS_Store delete mode 100644 Integration/Editor/.DS_Store delete mode 100644 Integration/Editor/CustomPropertyDrawers/.DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index a679ea481574ca317ecaab86dc9e865cdd394e51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKOG-mQ5UkdKfo!tOa<1SFhLD^f7f=&jMIwmc@~v_%k7o4;F}!3I+(QsA!@_y(M}6<+`V diff --git a/Core/.DS_Store b/Core/.DS_Store deleted file mode 100644 index 077fd4d6a57626b3ddd5a6d34dd295b2a581217b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}T>S5Z}DBbyguxf8FLt87ARuQhUN>wIO?3_j0cgccSx49 zD}R*q{ctXu9Dk7kT)S0v4C^LY2s&H8*oVlg-w$PymP#)?x0GLAS+#7t0MAB~^2SGH}z({Z-O<7%Z^6qRyqQWWD_tyC1%N^LT+tnHo3?qNF` zU*Fu`-9J1&Y2rD2qe|8dPT?7hPaIq}2T>SD7Z90NO|uD!0b+m{SbPS|&Sn)Be=0Ns zVt^Rmuj@E$WVH#ZcnMhCx8>5RJ?sU-%8fsYI<>8^w4|H1e7|Bpq~BL;|pf5iaL z?>G1BFeP)g&P@)_S^;_vih_BW##sp%>L`X>Jc_qKm4IKM0q7dcG=c|&egqT^)DQ!| G%D@{#a$YS5Z-O8Ch8%gg5YJZLJt)y)myCfC=?*N3~j_0DuK>O95Nd5+a6av^8c5VFrY%P(T$*b%{Y$ zIQW@fXKTz9s&GPe@j>;Msjg6{{5tH< LfE_aMrwn`mLc?FC diff --git a/Core/Game/Abilities/.DS_Store b/Core/Game/Abilities/.DS_Store deleted file mode 100644 index 6766e4a5c5407238d85b1cd986d3215a3b66bde4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKJ8HvF5S&e1IHYmu@?9Y}co_QxzCZ#FCSVlEuU6%Agl{J#6dt}0_hI?ovJh9^AW@Ufj#Urspp1{=Kcdi>6R z84l0GK2N?(RaOc}0VyB_q<|Fog#zAtY4h7eMJXT!q`*l5|2{OjV=o*NR+`j)_T!)$n2UWUC3q;^{oUMLDb|DoOz< zaIV00ZWrGFH}oIo|8tUdQa}p)D+O$}-mX`CrRuGdm-AlR==XH5`J}sX9TbLW$HZvI h+;}@)Mp4!^U-N!1920}ie9(#d8E{=>QsA!@_yW?g6?y;w diff --git a/Core/Game/Abilities/Essential/.DS_Store b/Core/Game/Abilities/Essential/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0ss|F6e=yEQg_*f2A18@-CCp+_Uu!L|IZ=% z5Wa~=XOdWy>PZkOGhy;gCYdbx0+}7g7_avHb;fMQm<5WMD?;~;;5_P>-@A%lL)UfhkN)Rj@t{SwOJVs z?JLV#UEAI{IO+^9uWxSe?jIhXp7m95JUz;ShEe}AvdAC?hyh|?5*aYBpEWm$hodtQ z1H{0u7{K>IfFe2uGmYx$fKHVFfCX?X0UK)xj1dMMgPBH{0pU6nP=|6;VsIS}eqq)* z1~ZL1oN-fpaPwtuDip514*LtWoN-4Z^~3-%@RfnQ9@?1y_kXVczXs8W7$62FiUD5O ztM66eNG7+A9S(D?06ham!F8F&Q3x0+6~kIg#Vepnz%S4MbPQ%1!2?1+0*VIeh=D(4 F;2oE0UuggU diff --git a/Core/Game/Player/UI/.DS_Store b/Core/Game/Player/UI/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T04)x;*FFyfD>?)qZ-LRi*0nMSMDk?Dk2sj1?68I{C E2Mi7pod5s; diff --git a/Core/Utility/.DS_Store b/Core/Utility/.DS_Store deleted file mode 100644 index 65f2608e7f64160a9a02ea1672ba26b7ea2655e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK&2G~`5S~o~wG~wuiAv?RH!eA(GSDMdC?|vz$*4U53btakE1BKOb{e%&B)jhOL zz+4G?4s3vmza|XTUSCRt)IwqyW z0I-X&5%{{7&^6p);;^-dD-dQ&fwq*n7K7Px#JS5$9JUs1IWgCKFn4F>IuvH^j`_Js zCze?B)-&K4_?ZFS`#~ao{=fKh|8J7K@eFtd{!a#2cR$@9;@#ZYy7HF#tmV-6P%S#I nwRlqk#~j7T)kpCT)Cl5SJHW(YYY`EM|07^%@WwOnPZ{_D!Vqdg diff --git a/Core/Utility/MessageSystem/.DS_Store b/Core/Utility/MessageSystem/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0W|Vzwij)N-^hSG zyBaze;{gTso?k96#+HAPCdqhRjDXkP+lww~$3OnjpUpPj556_K^|NBwU9XCq_7QHe z!UQ?TCLVcrGc1u|z_E#h^AXlqFk;DjmzW-7Q$|kc@s>=ZK0GPz5#dJ13woA}o3LWR z+;ditZa%N8d2?C{jX1+4YY(*BGkrPc%(>Fe6HL`tkVC22+~kw99R|6=>#)K)S219R z0ftoRZek1=1IEB181P?T)K3o4%z79D#=xIqK)w$VRWJ@%delz`2R#B1t2C?dT7DTN zCkhw`EIragaXyvkQ(ZV>IG;{?6yoB5rAMC*7Y-jTbavr{;H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0V5wJECI~vj`;8}H9vQs*iB`ONar1|IO2dFTf9xGuP24tgdoOK%m#8QOq<|FoR=~dxjqcbL4vF#U zV2BZbIAc1D>zE~o%@f3~a7bi^W=SO`)oR4Bq%+^Dt}7f8lMbul!|KUa6N<&td4G#? zSeK|M1*E`Of!o|Jz5lQ2Kg|DQl6F!+3j8YtY}Rl36*VFU*Eaei-D^JSZd?b2 nA=)u9+A%lYj_;!=>zc25-W3jsL1#YbMEwl7E;1?b*9v?AWgZtK diff --git a/Integration/.DS_Store b/Integration/.DS_Store deleted file mode 100644 index 5991aa463fa46c782cef40be447a2bbe3945b0a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK&2G~`5S~p#amWE9fz;mi#wCY@KtfNoQuo9ql2LmA6ztk+R&sVD+ew6?NIv$? z|9ilTaN-HL@(RrU6vYjt7lbOKIM^iCZ=w2yNWW|w zQZqf$Nz@nuvS^V{qf|s2(YC`fU>Ue>49K;+4Tlf|g957S_ggegSzff;UrBANeq;Nl z(`YpDx!rsbjKv}-!eW*W!t9xPV{sB0dl(kubNi_f=}$Y1j##o7xpxl)FG9wXY%TTq zG2^jV48)Ab`N+LD%#t}q4?~_Dv7ALLWyPyT!@+0d?kty&`n?wI?zLAfy6pGcE&8zA zTdf>t_kMT($uVEPe)IO-`wt&KY03%iP)hC?JcrL{R2WE4JHd&VOjQ8!cQ5)U!uR7@ zaRTsV`29>pRq`hy{;hvHUK_urrm5u5gN&zwpW?{!H#f059OhV`4C}*T0txD3ZJ)j7 zb?Q9EIz8y^{ee1N!o>x~R7tG5k^!?KoaU90Ho!7q8Tj8AkoyD0CebrkYE)YXDs=@w ztYfzlwB=nw=1_y4!BQi7P>4=N)TzW=F^Epbern=8gQZ5D4#ZqOh?$v~8wydgpC z1MxIkZ5gl(R2kUPudY1*4==y}SCj0UWxz78nu5I!buD%V3)AVJ!VTNV!vT*TcfIO^1)22>(31?1Y@h65;}0D#~>@=G#yf#}OgAuO+5sI?thxvO|V{sChco2%wJbuS{ z`a2GzLzYxSck6&>B4k;T-=cmvVp+_qJ}yI(QA; zo#}MH+iTPA%UPRFd%aGZzUc1HW{&fGxBKeNQ8xYj2&GgMPpV(c-G|A0Li-JW?z4!*?Lr$L^jJUcsDC-^QoNHDo@hR%_?9O_$La;{efbU=ozdvs;vW^N&yfX*sKg=nM+6xHRu_v zHR2sKqN#|QN=%ADG#%Ti>E{`&HEKE#lY9^}GBFtnQKRGYsp<~I(`da_z$$Q8fpuMV z<@x{m;r#zD$=0j_R)POY0n+dTzmKnE&enyOlV>f(@(GJH*{{~9DCo>_tO9uyKf|I7 a?@<{bdIoEa*n(z%1e6TcSq1*80>1zT^_(;S diff --git a/Integration/Editor/CustomPropertyDrawers/.DS_Store b/Integration/Editor/CustomPropertyDrawers/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Mon, 11 Apr 2016 09:26:58 -0600 Subject: [PATCH 33/98] Update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 09fe2551..4e3a1bb4 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ *.userprefs *.pidb *.booproj +*.DS_Store # Unity3D generated meta files *.pidb.meta From cd361fbcf0d75b0cb831f7e92c40b946366cac74 Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 11 Apr 2016 09:50:33 -0600 Subject: [PATCH 34/98] Add adjustable priority increase --- Core/Game/Abilities/Essential/Scan.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index fef283cc..fe6108ca 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -103,7 +103,9 @@ protected virtual PlatformType TargetPlatform //PlatformType of the target public int Windup { get { return _windup; } } - public long EnergyCost { get { return _energyCost; } } + [SerializeField] + protected int _priorityIncrease; + public virtual int PriorityIncrease {get {return _priorityIncrease;}} //Stuff for the logic private bool inRange; @@ -117,6 +119,7 @@ protected virtual PlatformType TargetPlatform //PlatformType of the target private LSBody cachedBody { get { return Agent.Body; } } private int basePriority; + private int firingPriority; private Health cachedTargetHealth; private uint targetVersion; private int searchCount; @@ -135,7 +138,7 @@ protected override void OnSetup() fastRange = (Range * Range); attackFrameCount = AttackRate; basePriority = cachedBody.Priority; - + firingPriority = basePriority + PriorityIncrease; CanMove = cachedMove.IsNotNull(); if (CanMove) { @@ -321,7 +324,7 @@ public void Fire() { cachedMove.StopMove(); } - cachedBody.Priority = basePriority + 1; + cachedBody.Priority = firingPriority; OnFire(); } From c47c3141d8a1df10a8b5eb10db8a5a1375d3526e Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 11 Apr 2016 09:56:44 -0600 Subject: [PATCH 35/98] Refactor --- Core/Game/Abilities/Essential/Scan.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index fe6108ca..93b258e5 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -104,8 +104,8 @@ protected virtual PlatformType TargetPlatform //PlatformType of the target public int Windup { get { return _windup; } } [SerializeField] - protected int _priorityIncrease; - public virtual int PriorityIncrease {get {return _priorityIncrease;}} + protected bool _increasePriority; + public virtual bool IncreasePriority {get {return _increasePriority;}} //Stuff for the logic private bool inRange; @@ -119,7 +119,6 @@ protected virtual PlatformType TargetPlatform //PlatformType of the target private LSBody cachedBody { get { return Agent.Body; } } private int basePriority; - private int firingPriority; private Health cachedTargetHealth; private uint targetVersion; private int searchCount; @@ -138,7 +137,6 @@ protected override void OnSetup() fastRange = (Range * Range); attackFrameCount = AttackRate; basePriority = cachedBody.Priority; - firingPriority = basePriority + PriorityIncrease; CanMove = cachedMove.IsNotNull(); if (CanMove) { @@ -324,7 +322,7 @@ public void Fire() { cachedMove.StopMove(); } - cachedBody.Priority = firingPriority; + cachedBody.Priority = IncreasePriority ? basePriority + 1 : basePriority;; OnFire(); } From abf5adca497fdcf56cf27deb80b9d9e1596293d6 Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 11 Apr 2016 10:00:17 -0600 Subject: [PATCH 36/98] Add default value for Scan.IncreasePriority --- Core/Game/Abilities/Essential/Scan.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index 93b258e5..20ed8e37 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -104,7 +104,7 @@ protected virtual PlatformType TargetPlatform //PlatformType of the target public int Windup { get { return _windup; } } [SerializeField] - protected bool _increasePriority; + protected bool _increasePriority = true; public virtual bool IncreasePriority {get {return _increasePriority;}} //Stuff for the logic From ac0a2ffe978015bfa1c1db2f43151093bfdec3ec Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 11 Apr 2016 16:10:07 -0600 Subject: [PATCH 37/98] Test --- Core/Game/Abilities/Essential/Scan.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index 20ed8e37..486904cd 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -107,6 +107,7 @@ protected virtual PlatformType TargetPlatform //PlatformType of the target protected bool _increasePriority = true; public virtual bool IncreasePriority {get {return _increasePriority;}} + //Stuff for the logic private bool inRange; private long fastRange; From 3949f092da37792afd6bffad4b61f2e094a05d72 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 12 Apr 2016 11:31:48 -0600 Subject: [PATCH 38/98] Fix VectorRotation inspector; Refactor --- Core/Game/Abilities/Essential/Health.cs | 7 +++-- Core/Game/Projectiles/LSProjectile.cs | 30 +++++++++++++------ .../CustomPropertyDrawers.cs | 10 ++++++- 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/Core/Game/Abilities/Essential/Health.cs b/Core/Game/Abilities/Essential/Health.cs index 92acd32c..b80f0c45 100644 --- a/Core/Game/Abilities/Essential/Health.cs +++ b/Core/Game/Abilities/Essential/Health.cs @@ -16,13 +16,14 @@ public long MaxHealth } public event Action onHealthChange; - private long _healthAmount; + [SerializeField, FixedNumber] + private long _currentHealth; public long HealthAmount { get { - return _healthAmount; + return _currentHealth; } set { - _healthAmount = value; + _currentHealth = value; if (onHealthChange != null) onHealthChange (); } diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index 910c5b69..95eea271 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -256,24 +256,29 @@ private void ApplyCone(Vector3d center3d, Vector2d forward, long radius, long an { Vector2d center = center3d.ToVector2d(); long fastRange = radius * radius; - foreach (LSAgent agent in Scan(center, radius)) { - LSProjectile.agentPos = agent.Body._position; - LSProjectile.difference = LSProjectile.agentPos - center; + Vector2d agentPos = agent.Body._position; + Vector2d difference = agentPos - center; - if (LSProjectile.difference.FastMagnitude() > fastRange) + if (difference.FastMagnitude() > fastRange) + { continue; - - if (forward.Dot(difference) <= 0) + } + if (forward.Dot(difference) < 0) + { continue; - LSProjectile.difference.Normalize(); + } + difference.Normalize(); - if (forward.Cross(difference).Abs() > angle) + long cross = forward.Cross(difference).Abs(); + if (cross > angle) + { continue; - + } apply(agent); + } } @@ -406,6 +411,7 @@ public void InitializeHoming(LSAgent target) public void InitializeTimed(int frameTime) { + this.Delay = frameTime; } @@ -426,8 +432,14 @@ public void InitializePositional(Vector3d position) this.TargetHeight = position.z; } + public void UpdatePosition () { + cachedTransform.rotation = Quaternion.LookRotation(Forward.ToVector3()); + cachedTransform.position = this.Position.ToVector3(); + } + public void LateInit() { + this.UpdatePosition(); if (this.TargetingBehavior != TargetingType.Timed) { diff --git a/Integration/Editor/CustomPropertyDrawers/CustomPropertyDrawers.cs b/Integration/Editor/CustomPropertyDrawers/CustomPropertyDrawers.cs index a9e48bf0..ab6a9728 100644 --- a/Integration/Editor/CustomPropertyDrawers/CustomPropertyDrawers.cs +++ b/Integration/Editor/CustomPropertyDrawers/CustomPropertyDrawers.cs @@ -81,6 +81,12 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten [CustomPropertyDrawer(typeof(VectorRotationAttribute))] public class EditorVectorRotation : PropertyDrawer { + float height = 0f; + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + float h = height; + return h; + } public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { VectorRotationAttribute at = this.attribute as VectorRotationAttribute; @@ -92,7 +98,9 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten double angleInRadians = Math.Atan2(y.longValue.ToDouble(),x.longValue.ToDouble()); double angleInDegrees = (angleInRadians * 180d / Math.PI) * scale; - angleInDegrees = (EditorGUILayout.DoubleField("Angle", angleInDegrees)) / scale; + height = 15f; + position.height = height; + angleInDegrees = (EditorGUI.DoubleField(position, "Angle", angleInDegrees)) / scale; double newAngleInRadians = angleInDegrees * Math.PI / 180d; if (Math.Abs(newAngleInRadians - angleInRadians) >= .001f) { From be1acdcf24cc4df5995dc2c36d1df8a6a9791241 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 12 Apr 2016 11:47:13 -0600 Subject: [PATCH 39/98] Refactor --- Core/Game/Abilities/Essential/Scan.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index 486904cd..2693d546 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -117,7 +117,7 @@ protected virtual PlatformType TargetPlatform //PlatformType of the target private Move cachedMove; private Turn cachedTurn; - private LSBody cachedBody { get { return Agent.Body; } } + protected LSBody cachedBody { get { return Agent.Body; } } private int basePriority; private Health cachedTargetHealth; @@ -462,7 +462,7 @@ private bool ScanAndEngage() } } - private LSAgent DoScan() + protected virtual LSAgent DoScan() { return InfluenceManager.Scan( this.cachedBody.Position, From 3149da5307733d12e68ed7976d6fdbae6a2d2d25 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 12 Apr 2016 11:50:07 -0600 Subject: [PATCH 40/98] Remove Application.targetFrameRate --- Core/Game/Managers/LockstepManager.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Core/Game/Managers/LockstepManager.cs b/Core/Game/Managers/LockstepManager.cs index eef504b3..a299d501 100644 --- a/Core/Game/Managers/LockstepManager.cs +++ b/Core/Game/Managers/LockstepManager.cs @@ -100,7 +100,6 @@ internal static void Setup() PhysicsManager.Setup(); ClientManager.Setup(); - Application.targetFrameRate = 60; Time.fixedDeltaTime = BaseDeltaTime; Time.maximumDeltaTime = Time.fixedDeltaTime * 2; InputCodeManager.Setup(); @@ -113,7 +112,6 @@ internal static void Setup() internal static void Initialize(GameManager gameManager) { - Application.targetFrameRate = 30; MainGameManager = gameManager; if (!Loaded) From 15f2feb2fbe51b69985d19b520a59b39cfe58f07 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 12 Apr 2016 12:59:44 -0600 Subject: [PATCH 41/98] Fixed timed projectiles with standard Scan --- Core/Game/Abilities/Essential/Scan.cs | 31 +++++++++++++++++++++------ Core/Game/Projectiles/LSProjectile.cs | 3 +-- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index 2693d546..701a358b 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -105,7 +105,8 @@ protected virtual PlatformType TargetPlatform //PlatformType of the target [SerializeField] protected bool _increasePriority = true; - public virtual bool IncreasePriority {get {return _increasePriority;}} + + public virtual bool IncreasePriority { get { return _increasePriority; } } //Stuff for the logic @@ -229,9 +230,9 @@ void BehaveWithTarget() long mag; targetDirection.Normalize(out mag); bool withinTurn = TrackAttackAngle == false || - (fastMag != 0 && - cachedBody.Forward.Dot(targetDirection.x, targetDirection.y) > 0 - && cachedBody.Forward.Cross(targetDirection.x, targetDirection.y).Abs() <= AttackAngle); + (fastMag != 0 && + cachedBody.Forward.Dot(targetDirection.x, targetDirection.y) > 0 + && cachedBody.Forward.Cross(targetDirection.x, targetDirection.y).Abs() <= AttackAngle); bool needTurn = mag != 0 && !withinTurn; if (needTurn) { @@ -323,7 +324,8 @@ public void Fire() { cachedMove.StopMove(); } - cachedBody.Priority = IncreasePriority ? basePriority + 1 : basePriority;; + cachedBody.Priority = IncreasePriority ? basePriority + 1 : basePriority; + ; OnFire(); } @@ -339,7 +341,24 @@ protected virtual void OnFire() this.TargetAllegiance, (other) => healther.IsNotNull() && healther.HealthAmount > 0, (other) => healther.TakeRawDamage(appliedDamage)); - projectile.InitializeHoming(this.Target); + + + switch (projectile.TargetingBehavior) + { + case TargetingType.Homing: + projectile.InitializeHoming(this.Target); + break; + case TargetingType.Timed: + projectile.InitializeTimed(); + break; + case TargetingType.Positional: + projectile.InitializePositional(Target.Body.Position.ToVector3d(Target.Body.HeightPos)); + break; + case TargetingType.Free: + //TODO + throw new System.Exception("Not implemented yet."); + break; + } projectile.TargetPlatform = TargetPlatform; ProjectileManager.Fire(projectile); } diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index 95eea271..05e26164 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -409,10 +409,9 @@ public void InitializeHoming(LSAgent target) this.cachedTransform.rotation = Quaternion.LookRotation(target.CachedTransform.position - this.Position.ToVector3()); } - public void InitializeTimed(int frameTime) + public void InitializeTimed() { - this.Delay = frameTime; } Func BodyConditional; From 446fc760c8b0c8bfcdd03d8efadb89fe847b2d51 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 13 Apr 2016 09:30:44 -0600 Subject: [PATCH 42/98] Apply rotation to projectile effects --- Core/Game/Projectiles/LSProjectile.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index 05e26164..b0b3647d 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -356,6 +356,7 @@ private void Hit() LSEffect lSEffect = EffectManager.CreateEffect(this.EndEffect); lSEffect.CachedTransform.parent = this.Target.VisualCenter; lSEffect.CachedTransform.localPosition = Vector3.up; + lSEffect.CachedTransform.rotation = this.cachedTransform.rotation; lSEffect.Initialize(); } else { @@ -392,7 +393,6 @@ internal void Prepare(int id, Vector3d projectilePosition, Func ag this.BucketConditional = bucketConditional; this.AgentConditional = agentConditional; - Forward = Vector2d.up; } Vector3 bindPositionShift = new Vector3(0, 2, 0); @@ -407,6 +407,8 @@ public void InitializeHoming(LSAgent target) this.TargetHeight = this.Target.Body.HeightPos + this.Target.Body.Height / 2; this.cachedTransform.rotation = Quaternion.LookRotation(target.CachedTransform.position - this.Position.ToVector3()); + + } public void InitializeTimed() @@ -429,6 +431,7 @@ public void InitializePositional(Vector3d position) { this.TargetPosition = position.ToVector2d(); this.TargetHeight = position.z; + } public void UpdatePosition () { @@ -472,7 +475,8 @@ public void LateInit() { this.linearHeightSpeed = (this.TargetHeight - Position.z).Div(timeToHit).Abs(); } - + Forward = TargetPosition - this.Position; + Forward.Normalize(); break; case TargetingType.Free: @@ -483,6 +487,7 @@ public void LateInit() { this.cachedTransform.LookAt(this.Forward.ToVector3()); } + break; } if (this.onInitialize.IsNotNull()) From 0a54fdadb60abc603a80c1e2539cda995627d06a Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 13 Apr 2016 09:33:10 -0600 Subject: [PATCH 43/98] Fix first rotation update --- Core/Game/Projectiles/LSProjectile.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index b0b3647d..4152c9f1 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -434,14 +434,13 @@ public void InitializePositional(Vector3d position) } - public void UpdatePosition () { + public void UpdateVisuals () { cachedTransform.rotation = Quaternion.LookRotation(Forward.ToVector3()); cachedTransform.position = this.Position.ToVector3(); } public void LateInit() { - this.UpdatePosition(); if (this.TargetingBehavior != TargetingType.Timed) { @@ -475,7 +474,7 @@ public void LateInit() { this.linearHeightSpeed = (this.TargetHeight - Position.z).Div(timeToHit).Abs(); } - Forward = TargetPosition - this.Position; + Forward = TargetPosition - this.Position.ToVector2d(); Forward.Normalize(); break; case TargetingType.Free: @@ -490,6 +489,8 @@ public void LateInit() break; } + this.UpdateVisuals(); + if (this.onInitialize.IsNotNull()) { this.onInitialize.Invoke(); From b9bc7d75da1cb6c40c96b96fa70e6ac966498522 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 13 Apr 2016 10:03:42 -0600 Subject: [PATCH 44/98] Fix animation initialization order --- Core/Game/Agents/LSAgent.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index a3ffefa3..eb6bc195 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -279,12 +279,12 @@ public void Initialize( Influencer.Initialize(); } + + + abilityManager.Initialize(); if (Animator .IsNotNull ()) { Animator.Initialize(); } - - abilityManager.Initialize(); - } public void Simulate() { From 3166ab57abb96bf9cd8d1e70c94d4e081ef79825 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 13 Apr 2016 10:25:04 -0600 Subject: [PATCH 45/98] Refactor; Add Tint for selection ring --- .../Extra/SelectionRing/SelectionRing.cs | 18 ++++++++++++++++++ .../SelectionRing/SelectionRingController.cs | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Core/Game/Abilities/Extra/SelectionRing/SelectionRing.cs b/Core/Game/Abilities/Extra/SelectionRing/SelectionRing.cs index 9e47f49e..6323f1c3 100644 --- a/Core/Game/Abilities/Extra/SelectionRing/SelectionRing.cs +++ b/Core/Game/Abilities/Extra/SelectionRing/SelectionRing.cs @@ -27,6 +27,21 @@ public void Setup (float size) { protected virtual void OnSetup () { cachedRenderer = GetComponent (); } + + private Color _tint; + public Color Tint { + get { + return _tint; + } + set { + if (_tint != value) { + _tint = value; + SetState (lastState); + } + } + } + + SelectionRingState lastState; public void SetState (SelectionRingState state) { Color setColor = default(Color); switch (state) { @@ -40,7 +55,10 @@ public void SetState (SelectionRingState state) { setColor = NoneColor; break; } + if (Tint != Color.clear) + setColor = setColor / 4 + Tint; SetColor (setColor); + lastState = state; } public virtual void SetColor (Color color) { diff --git a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs index b7fd914e..01f531b5 100644 --- a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs +++ b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs @@ -13,7 +13,7 @@ public class SelectionRingController : Ability SelectionRing RingTemplate { get { return _ringTemplate; } } - SelectionRing RingObject; + public SelectionRing RingObject {get; private set;} public float Size {get; private set;} From a42e082a3edccafbab3d6eabc885ae59149ce45c Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 13 Apr 2016 10:33:23 -0600 Subject: [PATCH 46/98] Increase space between buildings; Fix SquareSize --- Core/Simulation/Physics/Core/LSBody.cs | 4 +++- Extra/BuildSystem/BuildGrid/BuildGridAPI.cs | 2 +- Extra/BuildSystem/BuildGrid/GridBuilder.cs | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Core/Simulation/Physics/Core/LSBody.cs b/Core/Simulation/Physics/Core/LSBody.cs index 791315e9..a293b302 100644 --- a/Core/Simulation/Physics/Core/LSBody.cs +++ b/Core/Simulation/Physics/Core/LSBody.cs @@ -880,8 +880,10 @@ public long SquareSize return this.Radius; break; case ColliderType.AABox: - if (this.HalfWidth == HalfHeight) + if (this.HalfWidth > this.HalfHeight) return HalfWidth; + else + return HalfHeight; break; } return 0; diff --git a/Extra/BuildSystem/BuildGrid/BuildGridAPI.cs b/Extra/BuildSystem/BuildGrid/BuildGridAPI.cs index 0bc9fece..81533332 100644 --- a/Extra/BuildSystem/BuildGrid/BuildGridAPI.cs +++ b/Extra/BuildSystem/BuildGrid/BuildGridAPI.cs @@ -9,7 +9,7 @@ namespace Lockstep.Abilities{} namespace Lockstep.Agents {} public static class BuildGridAPI { const int defaultGridLength = 256; - const int defaultBuildSpacing = 1; + const int defaultBuildSpacing = 3; const int defaultGridOffset = -128; public static BuildGridManager MainBuildGrid {get; private set;} public static int GridOffset {get; private set;} diff --git a/Extra/BuildSystem/BuildGrid/GridBuilder.cs b/Extra/BuildSystem/BuildGrid/GridBuilder.cs index d3bb0701..5c15e870 100644 --- a/Extra/BuildSystem/BuildGrid/GridBuilder.cs +++ b/Extra/BuildSystem/BuildGrid/GridBuilder.cs @@ -14,6 +14,7 @@ public static void Initialize () { BuildGridAPI.Initialize(); Reset (); } + public static void Reset () { ClearTarget (); IsMovingBuilding = false; From 1e4c8f50f4b2934f210133f7f650a569ba938375 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 13 Apr 2016 15:10:28 -0600 Subject: [PATCH 47/98] Refactor --- Core/Game/Abilities/Essential/Scan.cs | 3 ++- Core/Game/Projectiles/LSProjectile.cs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index 701a358b..1963f119 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -175,6 +175,7 @@ protected override void OnInitialize() protected override void OnSimulate() { + attackCount--; if (HasTarget) { @@ -333,6 +334,7 @@ public void Fire() protected virtual void OnFire() { long appliedDamage = Damage; + Health healther = Target.GetAbility(); LSProjectile projectile = ProjectileManager.Create( ProjCode, @@ -342,7 +344,6 @@ protected virtual void OnFire() (other) => healther.IsNotNull() && healther.HealthAmount > 0, (other) => healther.TakeRawDamage(appliedDamage)); - switch (projectile.TargetingBehavior) { case TargetingType.Homing: diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index 4152c9f1..23598b1d 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -497,7 +497,9 @@ public void LateInit() } if (UseEffects) + { EffectManager.LazyCreateEffect(this.StartEffect, this.Position.ToVector3(), this.cachedTransform.rotation); + } } private void OnHit() From c3137e6e1743a8957fe29a89239768535ffcb501 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 13 Apr 2016 15:44:13 -0600 Subject: [PATCH 48/98] Add handling for DataCode --- Database/Editor/EditorDataCode.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Database/Editor/EditorDataCode.cs b/Database/Editor/EditorDataCode.cs index 26273330..623cf916 100644 --- a/Database/Editor/EditorDataCode.cs +++ b/Database/Editor/EditorDataCode.cs @@ -28,8 +28,10 @@ public override void OnGUI (Rect position, SerializedProperty property, GUIConte } } else { DataHelper helper; - EditorLSDatabaseWindow.Window.DatabaseEditor.DataHelpers.TryGetValue (dca.TargetDataName, out helper); - if (helper != null) { + if (!EditorLSDatabaseWindow.Window.DatabaseEditor.DataHelpers.TryGetValue (dca.TargetDataName, out helper)) { + Debug.LogError("Data code '" + dca.TargetDataName + "' was not found in the current database"); + } + else { DataItem[] data = helper.Data; GUIContent[] dataContents = new GUIContent[data.Length]; if (property.isArray && property.type != "string") { From 6e7507972c845f671c8ddea4840443e69333f3c2 Mon Sep 17 00:00:00 2001 From: SnpM Date: Thu, 14 Apr 2016 13:51:52 -0600 Subject: [PATCH 49/98] Fix linear projectile height movement --- Core/Game/Abilities/Essential/Scan.cs | 1 + Core/Game/Projectiles/LSProjectile.cs | 4 ++-- Core/Game/Projectiles/ProjectileManager.cs | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index 1963f119..0252db35 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -4,6 +4,7 @@ namespace Lockstep { + [UnityEngine.DisallowMultipleComponent] public class Scan : ActiveAbility { private const int SearchRate = (int)(LockstepManager.FrameRate / 2); diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index 23598b1d..fd715351 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -392,7 +392,6 @@ internal void Prepare(int id, Vector3d projectilePosition, Func ag this.BucketConditional = bucketConditional; this.AgentConditional = agentConditional; - } Vector3 bindPositionShift = new Vector3(0, 2, 0); @@ -472,7 +471,8 @@ public void LateInit() this.arcStartVerticalSpeed = (this.TargetHeight - this.Position.z).Div(timeToHit) + timeToHit.Mul(Gravity); } else { - this.linearHeightSpeed = (this.TargetHeight - Position.z).Div(timeToHit).Abs(); + this.linearHeightSpeed = (this.TargetHeight - Position.z).Div(timeToHit).Abs() / LockstepManager.FrameRate; + } Forward = TargetPosition - this.Position.ToVector2d(); Forward.Normalize(); diff --git a/Core/Game/Projectiles/ProjectileManager.cs b/Core/Game/Projectiles/ProjectileManager.cs index 363dfc8d..e1cbb122 100644 --- a/Core/Game/Projectiles/ProjectileManager.cs +++ b/Core/Game/Projectiles/ProjectileManager.cs @@ -100,6 +100,7 @@ public static LSProjectile Create (string projCode, LSAgent source, Vector3d off Vector2d worldPos = relativePos.Rotated(source.Body.Rotation); Vector3d pos = new Vector3d(worldPos.x,worldPos.y,offset.z + source.Body.HeightPos); pos.Add(ref source.Body._position); + return Create (projCode,pos,agentConditional,(bite) => ((source.Controller.GetAllegiance(bite) & targetAllegiance) != 0),hitEffect); } public static LSProjectile Create (string projCode, Vector3d position, Func agentConditional, Func bucketConditional, Action hitEffect) From 6e482df465d6b18f693d73a9464ba1c196aa56af Mon Sep 17 00:00:00 2001 From: SnpM Date: Fri, 15 Apr 2016 15:23:36 -0600 Subject: [PATCH 50/98] Implement lasting projectiles --- Core/Game/Abilities/Essential/Health.cs | 9 +++- Core/Game/Abilities/Essential/Scan.cs | 2 +- Core/Game/Agents/LSAgent.cs | 15 ++++++ Core/Game/Buffs.meta | 9 ++++ Core/Game/Buffs/Buff.cs | 47 +++++++++++++++++ Core/Game/Buffs/Buff.cs.meta | 12 +++++ Core/Game/Projectiles/LSProjectile.cs | 65 ++++++++++++++++-------- Integration/Editor/EditorLSProjectile.cs | 1 + 8 files changed, 135 insertions(+), 25 deletions(-) create mode 100644 Core/Game/Buffs.meta create mode 100644 Core/Game/Buffs/Buff.cs create mode 100644 Core/Game/Buffs/Buff.cs.meta diff --git a/Core/Game/Abilities/Essential/Health.cs b/Core/Game/Abilities/Essential/Health.cs index b80f0c45..863b25d4 100644 --- a/Core/Game/Abilities/Essential/Health.cs +++ b/Core/Game/Abilities/Essential/Health.cs @@ -15,6 +15,10 @@ public long MaxHealth set { _maxHealth = value; } } + public long DamageMultiplier { + get; set; + } + public event Action onHealthChange; [SerializeField, FixedNumber] private long _currentHealth; @@ -47,11 +51,12 @@ public void TakeProjectile(LSProjectile projectile) { OnTakeProjectile (projectile); } - TakeRawDamage (projectile.CheckExclusiveDamage (Agent.Tag)); + TakeDamage (projectile.CheckExclusiveDamage (Agent.Tag)); } } - public void TakeRawDamage (long damage) { + public void TakeDamage (long damage) { + damage.Mul(DamageMultiplier); HealthAmount -= damage; // don't let the health go below zero if (HealthAmount <= 0) { diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index 0252db35..9ac2e2fe 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -343,7 +343,7 @@ protected virtual void OnFire() this.ProjectileOffset, this.TargetAllegiance, (other) => healther.IsNotNull() && healther.HealthAmount > 0, - (other) => healther.TakeRawDamage(appliedDamage)); + (other) => healther.TakeDamage(appliedDamage)); switch (projectile.TargetingBehavior) { diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index eb6bc195..4d5ac18f 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -181,6 +181,15 @@ public AllegianceType GetAllegiance(LSAgent other) { public Transform VisualCenter {get {return _visualCenter;}} public float SelectionRadiusSquared {get; private set;} + public FastBucket Buffs = new FastBucket(); + + internal void AddBuff (Buff buff) { + buff.ID = Buffs.Add(buff); + } + internal void RemoveBuff (Buff buff) { + Buffs.RemoveAt(buff.ID); + } + public IAgentData Data {get; private set;} private readonly FastList TrackedLockstepTickets = new FastList(); void Awake () { @@ -299,9 +308,15 @@ public void Simulate() { SetState (AnimState.Idling); } + } public void LateSimulate () { abilityManager.LateSimulate (); + for (int i = 0; i < this.Buffs.PeakCount; i++) { + if (this.Buffs.arrayAllocation[i]) { + this.Buffs[i].Simulate(); + } + } } [HideInInspector] public bool VisualPositionChanged; diff --git a/Core/Game/Buffs.meta b/Core/Game/Buffs.meta new file mode 100644 index 00000000..a3f86918 --- /dev/null +++ b/Core/Game/Buffs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d7b72474113ae48099144bafc7b58cb3 +folderAsset: yes +timeCreated: 1460748088 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Core/Game/Buffs/Buff.cs b/Core/Game/Buffs/Buff.cs new file mode 100644 index 00000000..0f2ac444 --- /dev/null +++ b/Core/Game/Buffs/Buff.cs @@ -0,0 +1,47 @@ +using UnityEngine; +using System.Collections; +using System; +namespace Lockstep +{ + public class Buff + { + + protected int Duration; + protected int Timer; + protected LSAgent Target; + internal int ID {get; set;} + public bool Active {get; private set;} + public void Initialize (int duration, LSAgent target) { + Duration = duration; + Timer = 0; + Target = target; + + Target.AddBuff(this); + Active = true; + } + + protected virtual void OnInitialize () { + + } + + public void Simulate () { + Timer++; + OnSimulate (); + if (Timer > Duration) { + Deactivate (); + } + } + + protected virtual void OnSimulate () { + + } + + public void Deactivate () { + Target.RemoveBuff(this); + Active = false; + } + protected virtual void OnDeactivate () { + + } + } +} \ No newline at end of file diff --git a/Core/Game/Buffs/Buff.cs.meta b/Core/Game/Buffs/Buff.cs.meta new file mode 100644 index 00000000..e3cad012 --- /dev/null +++ b/Core/Game/Buffs/Buff.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8a1102fc28a234183ab58e4fe44c63c6 +timeCreated: 1460748099 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index fd715351..d3b14c4e 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -13,6 +13,7 @@ namespace Lockstep public sealed class LSProjectile : CerealBehaviour { private const long Gravity = FixedMath.One * 98 / 10; + public const int TickRate = LockstepManager.FrameRate / 4; // // Static Fields // @@ -88,8 +89,6 @@ public sealed class LSProjectile : CerealBehaviour public bool CanVisualize { get { return _canVisualize; } } - [SerializeField] - private long _interpolationRate = FixedMath.One * 8; [SerializeField] private AgentTag _exclusiveTargetType; @@ -113,6 +112,10 @@ public sealed class LSProjectile : CerealBehaviour [FixedNumber, SerializeField] private long _radius = FixedMath.Create(1); + + [SerializeField, FrameCount] + private int _lastingDuration; + // // Properties // @@ -135,6 +138,8 @@ public long Angle public int Delay{ get; set; } + public int LastingDuration { get; set; } + public Vector3 EndPoint { get @@ -177,7 +182,8 @@ private int MaxDuration { get { - return (256 <= this.Delay) ? this.Delay : 256; + int minTime = this.Delay + this.LastingDuration; + return (LockstepManager.FrameRate * 16 <= minTime) ? minTime : LockstepManager.FrameRate * 16; } } @@ -337,7 +343,7 @@ public long CheckExclusiveDamage(AgentTag AgentTag) return IsExclusiveTarget(AgentTag) ? Damage.Mul(this.ExclusiveDamageModifier) : Damage; } - private void Hit() + private void Hit(bool destroy = true) { if (this.TargetingBehavior == TargetingType.Homing && this.HitBehavior == HitType.Single && this.Target.SpawnVersion != this.TargetVersion) { @@ -347,7 +353,7 @@ private void Hit() this.OnHit(); if (this.onHit.IsNotNull()) { - this.onHit.Invoke(); + this.onHit(this); } if (this.UseEffects) { @@ -366,7 +372,9 @@ private void Hit() } } } - ProjectileManager.EndProjectile(this); + + if (destroy) + ProjectileManager.EndProjectile(this); } public Func BucketConditional { get; private set; } @@ -389,6 +397,8 @@ internal void Prepare(int id, Vector3d projectilePosition, Func ag this.ID = id; this.AliveTime = 0; + this.IsLasting = false; + this.BucketConditional = bucketConditional; this.AgentConditional = agentConditional; @@ -433,11 +443,15 @@ public void InitializePositional(Vector3d position) } - public void UpdateVisuals () { + public void UpdateVisuals() + { cachedTransform.rotation = Quaternion.LookRotation(Forward.ToVector3()); cachedTransform.position = this.Position.ToVector3(); } + private bool IsLasting; + private int tickTimer; + public void LateInit() { @@ -452,14 +466,8 @@ public void LateInit() switch (this.TargetingBehavior) { case TargetingType.Timed: - if (this.Delay == 0) - { - this.CountDown--; - this.Hit(); - } else - { - this.CountDown = this.Delay; - } + this.CountDown = this.Delay; + break; case TargetingType.Positional: case TargetingType.Homing: @@ -502,7 +510,7 @@ public void LateInit() } } - private void OnHit() + private void OnHit () { if (this.TargetingBehavior == TargetingType.Free) { @@ -524,7 +532,7 @@ private void OnHit() this.HitEffect(Target); break; case HitType.Area: - ApplyArea(this.TargetPosition, this.Radius); + ApplyArea(this.Position.ToVector2d(), this.Radius); break; case HitType.Cone: ApplyCone(this.Position, this.Forward, this.Radius, this.Angle, this.HitEffect, this.TargetPlatform); @@ -553,11 +561,11 @@ private void ResetTargeting() { this.Delay = this._delay; this.Speed = this._speed; + this.LastingDuration = this._lastingDuration; } private void ResetTrajectory() { - this.InterpolationRate = this._interpolationRate; } private void ResetVariables() @@ -600,9 +608,22 @@ public void Simulate() { case TargetingType.Timed: this.CountDown--; - if (this.CountDown == 0) + + if (!IsLasting) { + if (this.CountDown <= 0) + { + IsLasting = true; + tickTimer = 0; + } + } + if (IsLasting) { - this.Hit(); + tickTimer--; + if (tickTimer <= 0) + { + tickTimer = TickRate; + this.Hit((this.AliveTime + TickRate - this.Delay) >= this.LastingDuration); + } } break; case TargetingType.Homing: @@ -622,7 +643,7 @@ public void Simulate() RaycastMove(this.Velocity); break; case TargetingType.Positional: - MoveToTargetPosition (); + MoveToTargetPosition(); break; } } @@ -702,7 +723,7 @@ public void Visualize() // public event Action onDeactivate; - public event Action onHit; + public event Action onHit; public event Action onInitialize; diff --git a/Integration/Editor/EditorLSProjectile.cs b/Integration/Editor/EditorLSProjectile.cs index 0cc020e2..cdfc10f7 100644 --- a/Integration/Editor/EditorLSProjectile.cs +++ b/Integration/Editor/EditorLSProjectile.cs @@ -27,6 +27,7 @@ public override void OnInspectorGUI() break; case TargetingType.Timed: so.PropertyField("_delay"); + so.PropertyField ("_lastingDuration"); break; } EditorGUILayout.Space (); From eada89044267183aaf540d20057d00a8484ac189 Mon Sep 17 00:00:00 2001 From: GladFox <9006003@gmail.com> Date: Mon, 18 Apr 2016 04:47:04 +0600 Subject: [PATCH 51/98] HeightPosChanged never false; is needed HeightPosChanged or enough PositionChanged? --- Core/Simulation/Physics/Core/LSBody.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/Simulation/Physics/Core/LSBody.cs b/Core/Simulation/Physics/Core/LSBody.cs index a293b302..2ec8cb5e 100644 --- a/Core/Simulation/Physics/Core/LSBody.cs +++ b/Core/Simulation/Physics/Core/LSBody.cs @@ -591,6 +591,7 @@ public void BuildChangedValues() PositionChangedBuffer = true; PositionChanged = false; this.SetVisualPosition = true; + this.HeightPosChanged = false; } else { PositionChangedBuffer = false; From 2b050becff48beb2a488acdbf632b0b3ac4ceabf Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 18 Apr 2016 09:22:48 -0600 Subject: [PATCH 52/98] Fix friendly targeting --- Core/Game/Abilities/Essential/Scan.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index 9ac2e2fe..553f4bb8 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -485,12 +485,20 @@ private bool ScanAndEngage() protected virtual LSAgent DoScan() { - return InfluenceManager.Scan( + + LSAgent agent = InfluenceManager.Scan( this.cachedBody.Position, this.Sight, - (other) => other.GetAbility().IsNotNull(), - (bite) => ((this.Agent.Controller.GetAllegiance(bite) & this.TargetAllegiance) != 0) + (other) => other.GetAbility().IsNotNull() && other.GlobalID != this.Agent.GlobalID, + (bite) => + { + return ((this.Agent.Controller.GetAllegiance(bite) & this.TargetAllegiance) != 0); + + } ); + if (this.Agent.name.Contains("Medic")) + Debug.Log(agent); + return agent; } public bool ScanWithinRangeAndEngage() From fb1992638215b7346bf06c292efa6f3941de0109 Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 18 Apr 2016 10:16:37 -0600 Subject: [PATCH 53/98] Fix delay value --- Core/Game/Projectiles/LSProjectile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index d3b14c4e..96ddd3cc 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -60,7 +60,7 @@ public sealed class LSProjectile : CerealBehaviour [SerializeField] private bool _visualArc; - [SerializeField] + [SerializeField,FrameCount] private int _delay; [SerializeField] From 7d6772af2985c28be6ac050199f9e9e2c7541336 Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 18 Apr 2016 10:26:01 -0600 Subject: [PATCH 54/98] Remove debug log --- Core/Game/Abilities/Essential/Scan.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index 553f4bb8..b2d553b0 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -496,8 +496,7 @@ protected virtual LSAgent DoScan() } ); - if (this.Agent.name.Contains("Medic")) - Debug.Log(agent); + return agent; } From dfeb811718a7606023637673bd6dadfb22a22ab7 Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 18 Apr 2016 14:06:48 -0600 Subject: [PATCH 55/98] Fix negative damage (healing) healing above max health --- Core/Game/Abilities/Essential/Health.cs | 139 ++++++++++++++---------- 1 file changed, 81 insertions(+), 58 deletions(-) diff --git a/Core/Game/Abilities/Essential/Health.cs b/Core/Game/Abilities/Essential/Health.cs index 863b25d4..2db1e9c3 100644 --- a/Core/Game/Abilities/Essential/Health.cs +++ b/Core/Game/Abilities/Essential/Health.cs @@ -4,87 +4,110 @@ namespace Lockstep { - public class Health : Ability - { - [SerializeField, FixedNumber] - private long _maxHealth = FixedMath.One * 100; - - public long MaxHealth - { - get { return _maxHealth; } - set { _maxHealth = value; } - } - - public long DamageMultiplier { - get; set; + public class Health : Ability + { + [SerializeField, FixedNumber] + private long _maxHealth = FixedMath.One * 100; + + public long MaxHealth + { + get { return _maxHealth; } + set { _maxHealth = value; } + } + + public long DamageMultiplier + { + get; + set; } public event Action onHealthChange; + [SerializeField, FixedNumber] private long _currentHealth; - public long HealthAmount { - get { + + public long HealthAmount + { + get + { return _currentHealth; } - set { + set + { _currentHealth = value; if (onHealthChange != null) - onHealthChange (); + onHealthChange(); } } - protected override void OnSetup() - { - } - - protected override void OnInitialize() - { - HealthAmount = MaxHealth; - OnTakeProjectile = null; - } - - public void TakeProjectile(LSProjectile projectile) - { - if (Agent.IsActive && HealthAmount >= 0) { - if (OnTakeProjectile .IsNotNull ()) - { - OnTakeProjectile (projectile); - } - TakeDamage (projectile.CheckExclusiveDamage (Agent.Tag)); - } - } - - public void TakeDamage (long damage) { - damage.Mul(DamageMultiplier); - HealthAmount -= damage; - // don't let the health go below zero - if (HealthAmount <= 0) { - HealthAmount = 0; - - if (HealthAmount <= 0) { - Die (); - return; - } - } + protected override void OnSetup() + { + } + + protected override void OnInitialize() + { + HealthAmount = MaxHealth; + OnTakeProjectile = null; + } + public void TakeProjectile(LSProjectile projectile) + { + if (Agent.IsActive && HealthAmount >= 0) + { + if (OnTakeProjectile.IsNotNull()) + { + OnTakeProjectile(projectile); + } + TakeDamage(projectile.CheckExclusiveDamage(Agent.Tag)); + } + } + + public void TakeDamage(long damage) + { + if (damage >= 0) + { + damage.Mul(DamageMultiplier); + HealthAmount -= damage; + // don't let the health go below zero + if (HealthAmount <= 0) + { + HealthAmount = 0; + + if (HealthAmount <= 0) + { + Die(); + return; + } + } + } + else { + HealthAmount -= damage; + if (HealthAmount >= this.MaxHealth) { + HealthAmount = MaxHealth + } + } - } + } - public void Die () { + public void Die() + { AgentController.DestroyAgent(Agent); - if (Agent.Animator.IsNotNull ()) { + if (Agent.Animator.IsNotNull()) + { Agent.SetState(AnimState.Dying); Agent.Animator.Visualize(); } } - protected override void OnDeactivate() { - OnTakeProjectile = null; - } + protected override void OnDeactivate() + { + OnTakeProjectile = null; + } + + public event Action OnTakeProjectile; - public event Action OnTakeProjectile; - public int shieldIndex {get; set;} + public int shieldIndex { get; set; } } From 9e7e9f773a92eadf39de3145a3a0ff1b2d98db55 Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 18 Apr 2016 14:07:47 -0600 Subject: [PATCH 56/98] Fix syntax error --- Core/Game/Abilities/Essential/Health.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Game/Abilities/Essential/Health.cs b/Core/Game/Abilities/Essential/Health.cs index 2db1e9c3..61fc73cc 100644 --- a/Core/Game/Abilities/Essential/Health.cs +++ b/Core/Game/Abilities/Essential/Health.cs @@ -84,7 +84,7 @@ public void TakeDamage(long damage) else { HealthAmount -= damage; if (HealthAmount >= this.MaxHealth) { - HealthAmount = MaxHealth + HealthAmount = MaxHealth; } } From 5b12271337b3f4cee875295cc7adf01a3b781096 Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 18 Apr 2016 14:38:56 -0600 Subject: [PATCH 57/98] Fix targeting conditionals --- Core/Game/Abilities/Essential/Health.cs | 11 +++++++++++ Core/Game/Abilities/Essential/Scan.cs | 25 +++++++++++++++++++------ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/Core/Game/Abilities/Essential/Health.cs b/Core/Game/Abilities/Essential/Health.cs index 61fc73cc..f5848c96 100644 --- a/Core/Game/Abilities/Essential/Health.cs +++ b/Core/Game/Abilities/Essential/Health.cs @@ -23,6 +23,17 @@ public long DamageMultiplier public event Action onHealthChange; + public bool CanLose { + get { + return HealthAmount > 0; + } + } + public bool CanGain { + get { + return HealthAmount < MaxHealth; + } + } + [SerializeField, FixedNumber] private long _currentHealth; diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index b2d553b0..73cb2431 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -485,17 +485,30 @@ private bool ScanAndEngage() protected virtual LSAgent DoScan() { - + + Func agentConditional = null; + if (this._damage >= 0) { + agentConditional = (other) => { + Health health = other.GetAbility (); + return Agent.GlobalID != other.GlobalID && health != null && health.CanLose; + }; + } + else { + agentConditional = (other) => { + Health health = other.GetAbility (); + return Agent.GlobalID != other.GlobalID && health != null && health.CanGain; + }; + } LSAgent agent = InfluenceManager.Scan( - this.cachedBody.Position, - this.Sight, - (other) => other.GetAbility().IsNotNull() && other.GlobalID != this.Agent.GlobalID, - (bite) => + this.cachedBody.Position, + this.Sight, + agentConditional, + (bite) => { return ((this.Agent.Controller.GetAllegiance(bite) & this.TargetAllegiance) != 0); } - ); + ); return agent; } From 3e86554f812a7eece0c1d7a1704cf3a79bdd18c2 Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 18 Apr 2016 14:51:05 -0600 Subject: [PATCH 58/98] Fix Move not turning optimally --- Core/Game/Abilities/Essential/Move.cs | 2 +- Core/Simulation/Pathfinding/Pathfinder.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Core/Game/Abilities/Essential/Move.cs b/Core/Game/Abilities/Essential/Move.cs index c6811e10..f952b8f1 100644 --- a/Core/Game/Abilities/Essential/Move.cs +++ b/Core/Game/Abilities/Essential/Move.cs @@ -312,7 +312,7 @@ protected override void OnSimulate() if (distance > closingDistance || movingToWaypoint) { desiredVelocity = (movementDirection); - if (movementDirection.Cross(lastMovementDirection.x, lastMovementDirection.y).AbsMoreThan(FixedMath.Half)) + if (movementDirection.Cross(lastMovementDirection.x, lastMovementDirection.y).AbsMoreThan(FixedMath.One / 4)) { lastMovementDirection = movementDirection; if (CanTurn) diff --git a/Core/Simulation/Pathfinding/Pathfinder.cs b/Core/Simulation/Pathfinding/Pathfinder.cs index 051e7efc..e462a24e 100644 --- a/Core/Simulation/Pathfinding/Pathfinder.cs +++ b/Core/Simulation/Pathfinding/Pathfinder.cs @@ -177,7 +177,6 @@ public static bool FindPath (GridNode _startNode, GridNode _endNode, FastList Date: Tue, 19 Apr 2016 11:01:42 -0600 Subject: [PATCH 59/98] Expose Unbuild --- Extra/BuildSystem/BuildGrid/GridBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extra/BuildSystem/BuildGrid/GridBuilder.cs b/Extra/BuildSystem/BuildGrid/GridBuilder.cs index 5c15e870..f8921d16 100644 --- a/Extra/BuildSystem/BuildGrid/GridBuilder.cs +++ b/Extra/BuildSystem/BuildGrid/GridBuilder.cs @@ -98,7 +98,7 @@ public static PlacementResult EndMove () { #endregion #region Unbuilding - private static void Unbuild (IBuildable buildable) { + public static void Unbuild (IBuildable buildable) { BuildGridAPI.Unbuild (buildable.GridPosition,buildable); } #endregion From b0d9490d197cbf7527ee3efe39a04a8bfb7c2592 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 19 Apr 2016 11:43:59 -0600 Subject: [PATCH 60/98] Fix UnpassableLarge --- Core/Simulation/Grid/Core/GridManager.cs | 4 ++-- Core/Simulation/Grid/Core/GridNode.cs | 16 +++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Core/Simulation/Grid/Core/GridManager.cs b/Core/Simulation/Grid/Core/GridManager.cs index 5f59e23b..7f64ab86 100644 --- a/Core/Simulation/Grid/Core/GridManager.cs +++ b/Core/Simulation/Grid/Core/GridManager.cs @@ -150,8 +150,8 @@ public static void Initialize () public static GridNode GetNode (int xGrid, int yGrid) { - //if (xGrid < 0 || xGrid >= NodeCount || yGrid < 0 || yGrid >= NodeCount) return null; - + if (xGrid < 0 || xGrid >= Grid.Length || yGrid < 0 || yGrid >= Grid.Length) + Debug.Log(xGrid + ", " + yGrid); return Grid [GetGridIndex (xGrid, yGrid)]; } diff --git a/Core/Simulation/Grid/Core/GridNode.cs b/Core/Simulation/Grid/Core/GridNode.cs index ba47bca3..a0edb66a 100644 --- a/Core/Simulation/Grid/Core/GridNode.cs +++ b/Core/Simulation/Grid/Core/GridNode.cs @@ -148,12 +148,9 @@ public void RemoveObstacle() static int CachedSize; static Func CachedUnpassableFunction; - static int CachedLargeDeltaCount; public static void PrepareUnpassableCheck(int size) { CachedSize = size; - //TODO: Get rid of delta counts - CachedLargeDeltaCount = GridManager.GenerateDeltaCount((CachedSize + 1) / 2); /*if (CachedSize == 1) CachedUnpassableFunction = () => false; @@ -208,12 +205,13 @@ public bool UnpassableMedium() public bool UnpassableLarge() { - for (_i = 1; _i < CachedLargeDeltaCount; _i++) - { - GridNode node = GridManager.GetNode(DeltaCache.CacheX [_i] + this.gridX, DeltaCache.CacheY [_i] + this.gridY); - if (node.Unwalkable) - return true; - + int half = (CachedSize + 1) / 2; + for (int x = -half; x <= half; x++) { + for (int y = -half; y <= half; y++) { + if (GridManager.Grid[GridManager.GetGridIndex(gridX + x, gridY + y)].Unwalkable) { + return true; + } + } } return false; } From c5e03ab46dbd6d5c652befbeece7e7df4644c531 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 19 Apr 2016 12:23:50 -0600 Subject: [PATCH 61/98] Add GetAbility with name --- Core/Game/Abilities/AbilityManager.cs | 9 +++++++++ Core/Game/Agents/LSAgent.cs | 3 +++ 2 files changed, 12 insertions(+) diff --git a/Core/Game/Abilities/AbilityManager.cs b/Core/Game/Abilities/AbilityManager.cs index 99edaef5..91e07eb0 100644 --- a/Core/Game/Abilities/AbilityManager.cs +++ b/Core/Game/Abilities/AbilityManager.cs @@ -95,6 +95,15 @@ public void Deactivate() { Abilitys[k].Deactivate(); } } + public Ability GetAbility (string name) { + for (var k = 0; k < Abilitys.Length; k++) { + var ability = Abilitys[k]; + if (ability.name == name) { + return ability; + } + } + return null; + } public T GetAbility() where T : Ability { for (var k = 0; k < Abilitys.Length; k++) { var ability = Abilitys[k] as T; diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index 4d5ac18f..b2179ee3 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -402,6 +402,9 @@ public void ApplyImpulse(AnimImpulse animImpulse, int rate = 0) { public T GetAbility() where T : Ability{ return abilityManager.GetAbility(); } + public Ability GetAbility (string name) { + return abilityManager.GetAbility (name); + } public long GetStateHash () { long hash = 3; From 66015ad08081b3cc2175313be24e11a7a319a84c Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 19 Apr 2016 13:05:05 -0600 Subject: [PATCH 62/98] Fix GetAbility (string) --- Core/Game/Abilities/Ability.cs | 1 - Core/Game/Abilities/AbilityManager.cs | 3 ++- Core/Game/Abilities/ActiveAbility.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/Game/Abilities/Ability.cs b/Core/Game/Abilities/Ability.cs index 255dc3be..89a2301f 100644 --- a/Core/Game/Abilities/Ability.cs +++ b/Core/Game/Abilities/Ability.cs @@ -75,7 +75,6 @@ internal void Setup(LSAgent agent, int id) mainType = mainType.BaseType; } Data = AbilityDataItem.FindInterfacer(mainType); - if (Data == null) { throw new System.ArgumentException("The Ability of type " + mainType + " has not been registered in database"); diff --git a/Core/Game/Abilities/AbilityManager.cs b/Core/Game/Abilities/AbilityManager.cs index 91e07eb0..9e461191 100644 --- a/Core/Game/Abilities/AbilityManager.cs +++ b/Core/Game/Abilities/AbilityManager.cs @@ -98,7 +98,8 @@ public void Deactivate() { public Ability GetAbility (string name) { for (var k = 0; k < Abilitys.Length; k++) { var ability = Abilitys[k]; - if (ability.name == name) { + if (ability.Data != null) + if (ability.Data.Name == name) { return ability; } } diff --git a/Core/Game/Abilities/ActiveAbility.cs b/Core/Game/Abilities/ActiveAbility.cs index 2be5276e..0fc54b1e 100644 --- a/Core/Game/Abilities/ActiveAbility.cs +++ b/Core/Game/Abilities/ActiveAbility.cs @@ -4,7 +4,7 @@ namespace Lockstep { public abstract class ActiveAbility : Ability { [SerializeField,FrameCount] - private int _cooldown; + protected int _cooldown; public int Cooldown {get {return _cooldown;}} public ushort ListenInput {get; private set;} From 2c72a947763fcc15964bbbadf91f65e8dd81c961 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 20 Apr 2016 09:46:41 -0600 Subject: [PATCH 63/98] Refactor projectiles --- Core/Game/Projectiles/LSProjectile.cs | 18 +++++++++--------- Integration/Editor/EditorLSProjectile.cs | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index 96ddd3cc..910340af 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -68,17 +68,17 @@ public sealed class LSProjectile : CerealBehaviour public bool AttachEndEffectToTarget { get { return _attachEndEffectToTarget; } } - [SerializeField,DataCode("Effects")] - private string _endEffect; + [SerializeField,DataCode("Effects"),UnityEngine.Serialization.FormerlySerializedAs("_endEffect")] + private string _hitFX; - public string EndEffect { get { return _endEffect; } } + public string HitFX { get { return _hitFX; } } public bool CanRotate = true; - [SerializeField,DataCode("Effects")] - private string _startEffect; + [SerializeField,DataCode("Effects"),UnityEngine.Serialization.FormerlySerializedAs("_startEffect")] + private string _startFX; - public string StartEffect { get { return _startEffect; } } + public string StartFX { get { return _startFX; } } public bool IsActive; @@ -359,7 +359,7 @@ private void Hit(bool destroy = true) { if (this.AttachEndEffectToTarget) { - LSEffect lSEffect = EffectManager.CreateEffect(this.EndEffect); + LSEffect lSEffect = EffectManager.CreateEffect(this.HitFX); lSEffect.CachedTransform.parent = this.Target.VisualCenter; lSEffect.CachedTransform.localPosition = Vector3.up; lSEffect.CachedTransform.rotation = this.cachedTransform.rotation; @@ -368,7 +368,7 @@ private void Hit(bool destroy = true) { { - EffectManager.LazyCreateEffect(this.EndEffect, this.cachedTransform.position, this.cachedTransform.rotation); + EffectManager.LazyCreateEffect(this.HitFX, this.cachedTransform.position, this.cachedTransform.rotation); } } } @@ -506,7 +506,7 @@ public void LateInit() if (UseEffects) { - EffectManager.LazyCreateEffect(this.StartEffect, this.Position.ToVector3(), this.cachedTransform.rotation); + EffectManager.LazyCreateEffect(this.StartFX, this.Position.ToVector3(), this.cachedTransform.rotation); } } diff --git a/Integration/Editor/EditorLSProjectile.cs b/Integration/Editor/EditorLSProjectile.cs index cdfc10f7..4d2b58cc 100644 --- a/Integration/Editor/EditorLSProjectile.cs +++ b/Integration/Editor/EditorLSProjectile.cs @@ -65,8 +65,8 @@ public override void OnInspectorGUI() if (useEffectProp.boolValue) { - so.PropertyField("_startEffect"); - so.PropertyField("_endEffect"); + so.PropertyField("_startFX"); + so.PropertyField("_hitFX"); so.PropertyField("_attachEndEffectToTarget"); } From af3ed3b87190a62c65282c595597a9922384b389 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 20 Apr 2016 10:32:13 -0600 Subject: [PATCH 64/98] Implement use of RotationTransform and PositionalTransform --- Core/Simulation/Physics/Core/LSBody.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Core/Simulation/Physics/Core/LSBody.cs b/Core/Simulation/Physics/Core/LSBody.cs index 2ec8cb5e..6aebc81f 100644 --- a/Core/Simulation/Physics/Core/LSBody.cs +++ b/Core/Simulation/Physics/Core/LSBody.cs @@ -270,7 +270,7 @@ public bool CanSetVisualPosition } set { - _canSetVisualPosition = value && _positionalTransform != null; + _canSetVisualPosition = value && PositionalTransform != null; } } @@ -289,7 +289,7 @@ public bool CanSetVisualRotation } set { - _canSetVisualRotation = value && _rotationalTransform; + _canSetVisualRotation = value && RotationalTransform; } } @@ -408,22 +408,22 @@ public void Initialize(Vector2dHeight StartPosition, Vector2d StartRotation) ID = PhysicsManager.Assimilate(this); Partition.PartitionObject(this); - if (_positionalTransform != null) + if (PositionalTransform != null) { CanSetVisualPosition = true; _visualPosition = _position.ToVector3(HeightPos.ToFloat()); lastVisualPos = _visualPosition; - _positionalTransform.position = _visualPosition; + PositionalTransform.position = _visualPosition; } else { CanSetVisualPosition = false; } - if (_rotationalTransform != null) + if (RotationalTransform != null) { CanSetVisualRotation = true; visualRot = Quaternion.LookRotation(Forward.ToVector3(0f)); lastVisualRot = visualRot; - _rotationalTransform.rotation = visualRot; + RotationalTransform.rotation = visualRot; } else { CanSetVisualRotation = false; @@ -675,7 +675,7 @@ public void Visualize() //Interpolates between the current position and the interpolation between the last lockstep position and the current lockstep position //LerpTime = time passed since last simulation frame //LerpDamping = special value calculated based on Time.deltaTime for the extra layer of interpolation - _positionalTransform.position = + PositionalTransform.position = Vector3.Lerp(lastVisualPos, _visualPosition, PhysicsManager.LerpTime); } @@ -685,7 +685,7 @@ public void Visualize() { if (SetRotationBuffer) { - _rotationalTransform.rotation = + RotationalTransform.rotation = Quaternion.Lerp(lastVisualRot, visualRot, PhysicsManager.LerpTime); SetRotationBuffer = PhysicsManager.LerpTime < 1f; @@ -701,7 +701,7 @@ public void LerpOverReset() { if (SetRotationBuffer) { - _rotationalTransform.rotation = visualRot; + RotationalTransform.rotation = visualRot; SetRotationBuffer = false; } } @@ -709,7 +709,7 @@ public void LerpOverReset() { if (this.SetPositionBuffer) { - _positionalTransform.position = this._visualPosition; + PositionalTransform.position = this._visualPosition; SetPositionBuffer = false; } } From fe4a59186cea232c6c23c62de6dfa22d411c7261 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 20 Apr 2016 10:40:24 -0600 Subject: [PATCH 65/98] Fix AttachEndEffectToTarget --- Core/Game/Projectiles/LSProjectile.cs | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index 910340af..8c4219dc 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -253,12 +253,23 @@ private void ApplyArea(Vector2d center, long radius) { if (agent.Body._position.FastDistance(center.x, center.y) < num) { - this.HitEffect(agent); + HitAgent(agent); } } } - private void ApplyCone(Vector3d center3d, Vector2d forward, long radius, long angle, Action apply, PlatformType targetPlatform) + void HitAgent (LSAgent agent) { + if (this.UseEffects && this.AttachEndEffectToTarget) { + LSEffect lSEffect = EffectManager.CreateEffect(this.HitFX); + lSEffect.CachedTransform.parent = agent.VisualCenter; + lSEffect.CachedTransform.localPosition = Vector3.up; + lSEffect.CachedTransform.rotation = this.cachedTransform.rotation; + lSEffect.Initialize(); + } + this.HitEffect(agent); + } + + private void ApplyCone(Vector3d center3d, Vector2d forward, long radius, long angle) { Vector2d center = center3d.ToVector2d(); long fastRange = radius * radius; @@ -283,7 +294,7 @@ private void ApplyCone(Vector3d center3d, Vector2d forward, long radius, long an { continue; } - apply(agent); + HitAgent(agent); } } @@ -359,11 +370,13 @@ private void Hit(bool destroy = true) { if (this.AttachEndEffectToTarget) { + /* LSEffect lSEffect = EffectManager.CreateEffect(this.HitFX); lSEffect.CachedTransform.parent = this.Target.VisualCenter; lSEffect.CachedTransform.localPosition = Vector3.up; lSEffect.CachedTransform.rotation = this.cachedTransform.rotation; lSEffect.Initialize(); + */ } else { @@ -529,13 +542,13 @@ private void OnHit () { throw new System.Exception("Cannot use single hit effect without target"); } - this.HitEffect(Target); + this.HitAgent(Target); break; case HitType.Area: ApplyArea(this.Position.ToVector2d(), this.Radius); break; case HitType.Cone: - ApplyCone(this.Position, this.Forward, this.Radius, this.Angle, this.HitEffect, this.TargetPlatform); + ApplyCone(this.Position, this.Forward, this.Radius, this.Angle); break; } } From d6ead2664862e79436a6366b9064e57b7a33e3d7 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 20 Apr 2016 15:56:27 -0600 Subject: [PATCH 66/98] Add Injector; Refactor --- Core/Game/Abilities/Essential/Health.cs | 1 - Core/Utility/Serialization/Editor.meta | 9 ++++ Core/Utility/Serialization/Editor/Injector.cs | 54 +++++++++++++++++++ .../Serialization/Editor/Injector.cs.meta | 12 +++++ 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 Core/Utility/Serialization/Editor.meta create mode 100644 Core/Utility/Serialization/Editor/Injector.cs create mode 100644 Core/Utility/Serialization/Editor/Injector.cs.meta diff --git a/Core/Game/Abilities/Essential/Health.cs b/Core/Game/Abilities/Essential/Health.cs index f5848c96..cb282bde 100644 --- a/Core/Game/Abilities/Essential/Health.cs +++ b/Core/Game/Abilities/Essential/Health.cs @@ -12,7 +12,6 @@ public class Health : Ability public long MaxHealth { get { return _maxHealth; } - set { _maxHealth = value; } } public long DamageMultiplier diff --git a/Core/Utility/Serialization/Editor.meta b/Core/Utility/Serialization/Editor.meta new file mode 100644 index 00000000..d1374489 --- /dev/null +++ b/Core/Utility/Serialization/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 82b30fc94556042989708831f69a9fd3 +folderAsset: yes +timeCreated: 1461187112 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Core/Utility/Serialization/Editor/Injector.cs b/Core/Utility/Serialization/Editor/Injector.cs new file mode 100644 index 00000000..97830423 --- /dev/null +++ b/Core/Utility/Serialization/Editor/Injector.cs @@ -0,0 +1,54 @@ +using UnityEngine; +using System.Collections; +using UnityEditor; +namespace Lockstep +{ + public static class Injector + { + public static void SetTarget (UnityEngine.Object target) { + Target = target; + } + + public static Object Target{ get; private set;} + + public static void SetField (string name, float value, FieldType fieldType) { + SerializedObject so = new SerializedObject (Target); + SerializedProperty prop = so.FindProperty(name); + switch (fieldType) { + case FieldType.FixedNumber: + prop.longValue = FixedMath.Create(value); + break; + case FieldType.Interval: + prop.intValue = Mathf.RoundToInt(value * LockstepManager.FrameRate); + break; + case FieldType.Rate: + prop.intValue = Mathf.RoundToInt((1 / value) * LockstepManager.FrameRate); + break; + } + } + + public static float GetField (string name, FieldType fieldType) { + SerializedObject so = new SerializedObject (Target); + SerializedProperty prop = so.FindProperty(name); + switch (fieldType) { + case FieldType.FixedNumber: + return prop.longValue.ToFloat(); + break; + case FieldType.Interval: + return prop.intValue / (float) LockstepManager.FrameRate; + break; + case FieldType.Rate: + return 1 / (prop.intValue / (float)LockstepManager.FrameRate); + break; + } + return 0; + } + + } + public enum FieldType { + FixedNumber, + Interval, + Rate, + + } +} \ No newline at end of file diff --git a/Core/Utility/Serialization/Editor/Injector.cs.meta b/Core/Utility/Serialization/Editor/Injector.cs.meta new file mode 100644 index 00000000..e022f3d5 --- /dev/null +++ b/Core/Utility/Serialization/Editor/Injector.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 893933b518f4447a69e6826dd1467690 +timeCreated: 1461184945 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 9705838bb8aa37e1c95fffdd2eadd3587c15f420 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 20 Apr 2016 16:01:54 -0600 Subject: [PATCH 67/98] Add GetProperty --- Core/Utility/Serialization/Editor/Injector.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Core/Utility/Serialization/Editor/Injector.cs b/Core/Utility/Serialization/Editor/Injector.cs index 97830423..666947a6 100644 --- a/Core/Utility/Serialization/Editor/Injector.cs +++ b/Core/Utility/Serialization/Editor/Injector.cs @@ -10,10 +10,13 @@ public static void SetTarget (UnityEngine.Object target) { } public static Object Target{ get; private set;} - - public static void SetField (string name, float value, FieldType fieldType) { + public static SerializedProperty GetProperty (string name) { SerializedObject so = new SerializedObject (Target); SerializedProperty prop = so.FindProperty(name); + return prop; + } + public static void SetField (string name, float value, FieldType fieldType) { + SerializedProperty prop = GetProperty (name); switch (fieldType) { case FieldType.FixedNumber: prop.longValue = FixedMath.Create(value); @@ -28,8 +31,7 @@ public static void SetField (string name, float value, FieldType fieldType) { } public static float GetField (string name, FieldType fieldType) { - SerializedObject so = new SerializedObject (Target); - SerializedProperty prop = so.FindProperty(name); + SerializedProperty prop = GetProperty (name); switch (fieldType) { case FieldType.FixedNumber: return prop.longValue.ToFloat(); From e4c414a99d362d93eed30949727a719f05387bbc Mon Sep 17 00:00:00 2001 From: SnpM Date: Thu, 21 Apr 2016 09:00:07 -0600 Subject: [PATCH 68/98] Fix Injector saving --- Core/Utility/Serialization/Editor/Injector.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/Utility/Serialization/Editor/Injector.cs b/Core/Utility/Serialization/Editor/Injector.cs index 666947a6..8e4bb7f2 100644 --- a/Core/Utility/Serialization/Editor/Injector.cs +++ b/Core/Utility/Serialization/Editor/Injector.cs @@ -10,8 +10,9 @@ public static void SetTarget (UnityEngine.Object target) { } public static Object Target{ get; private set;} + static SerializedObject so; public static SerializedProperty GetProperty (string name) { - SerializedObject so = new SerializedObject (Target); + so = new SerializedObject (Target); SerializedProperty prop = so.FindProperty(name); return prop; } @@ -28,6 +29,8 @@ public static void SetField (string name, float value, FieldType fieldType) { prop.intValue = Mathf.RoundToInt((1 / value) * LockstepManager.FrameRate); break; } + so.ApplyModifiedProperties(); + EditorUtility.SetDirty(Target); } public static float GetField (string name, FieldType fieldType) { From 3f394068c82a9c134e53b1e069e498fb1a5f6fc6 Mon Sep 17 00:00:00 2001 From: SnpM Date: Thu, 21 Apr 2016 09:18:53 -0600 Subject: [PATCH 69/98] Add AgentValid --- Core/Game/Abilities/Essential/Scan.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index 73cb2431..139fb88b 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -482,7 +482,9 @@ private bool ScanAndEngage() return true; } } - + protected virtual bool AgentValid (LSAgent agent) { + return true; + } protected virtual LSAgent DoScan() { @@ -490,13 +492,13 @@ protected virtual LSAgent DoScan() if (this._damage >= 0) { agentConditional = (other) => { Health health = other.GetAbility (); - return Agent.GlobalID != other.GlobalID && health != null && health.CanLose; + return Agent.GlobalID != other.GlobalID && health != null && health.CanLose && AgentValid (other); }; } else { agentConditional = (other) => { Health health = other.GetAbility (); - return Agent.GlobalID != other.GlobalID && health != null && health.CanGain; + return Agent.GlobalID != other.GlobalID && health != null && health.CanGain && AgentValid (other); }; } LSAgent agent = InfluenceManager.Scan( From ce93f835df46fb163cf7e55fcbf0f211d9212170 Mon Sep 17 00:00:00 2001 From: SnpM Date: Thu, 21 Apr 2016 09:24:11 -0600 Subject: [PATCH 70/98] Add Injector.Get/SetVector3 --- Core/Utility/Serialization/Editor/Injector.cs | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Core/Utility/Serialization/Editor/Injector.cs b/Core/Utility/Serialization/Editor/Injector.cs index 8e4bb7f2..3c19e2bf 100644 --- a/Core/Utility/Serialization/Editor/Injector.cs +++ b/Core/Utility/Serialization/Editor/Injector.cs @@ -16,6 +16,10 @@ public static SerializedProperty GetProperty (string name) { SerializedProperty prop = so.FindProperty(name); return prop; } + public static void Apply () { + so.ApplyModifiedProperties(); + EditorUtility.SetDirty(Target); + } public static void SetField (string name, float value, FieldType fieldType) { SerializedProperty prop = GetProperty (name); switch (fieldType) { @@ -29,8 +33,7 @@ public static void SetField (string name, float value, FieldType fieldType) { prop.intValue = Mathf.RoundToInt((1 / value) * LockstepManager.FrameRate); break; } - so.ApplyModifiedProperties(); - EditorUtility.SetDirty(Target); + Apply (); } public static float GetField (string name, FieldType fieldType) { @@ -48,6 +51,23 @@ public static float GetField (string name, FieldType fieldType) { } return 0; } + public static void SetVector3 (string name, Vector3 value) { + SerializedProperty prop = GetProperty (name); + Vector3d vec = new Vector3d(value); + prop.FindPropertyRelative("x").longValue = vec.x; + prop.FindPropertyRelative("y").longValue = vec.y; + prop.FindPropertyRelative("z").longValue = vec.z; + Apply (); + } + + public static Vector3 GetVector3 (string name) { + SerializedProperty prop = GetProperty (name); + Vector3d vec = new Vector3d( + prop.FindPropertyRelative("x").longValue, + prop.FindPropertyRelative("y").longValue, + prop.FindPropertyRelative("z").longValue); + return vec.ToVector3(); + } } public enum FieldType { From ca3ade06a4d00ab277a1a2bb169da3dfd30155d4 Mon Sep 17 00:00:00 2001 From: GladFox <9006003@gmail.com> Date: Fri, 22 Apr 2016 15:37:50 +0600 Subject: [PATCH 71/98] remove unused variable --- Core/Game/Projectiles/LSProjectile.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index 8c4219dc..cdaf21af 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -417,8 +417,6 @@ internal void Prepare(int id, Vector3d projectilePosition, Func ag this.AgentConditional = agentConditional; } - Vector3 bindPositionShift = new Vector3(0, 2, 0); - public void InitializeHoming(LSAgent target) { this.HeightReached = false; From 67eccad251132b54ab162bbc778adb3bb8021678 Mon Sep 17 00:00:00 2001 From: SnpM Date: Fri, 22 Apr 2016 09:29:19 -0600 Subject: [PATCH 72/98] Fix UnpassableLarge index out of range --- Core/Simulation/Grid/Core/GridNode.cs | 41 ++++++++++++++++----------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/Core/Simulation/Grid/Core/GridNode.cs b/Core/Simulation/Grid/Core/GridNode.cs index a0edb66a..0cbd0e03 100644 --- a/Core/Simulation/Grid/Core/GridNode.cs +++ b/Core/Simulation/Grid/Core/GridNode.cs @@ -148,6 +148,7 @@ public void RemoveObstacle() static int CachedSize; static Func CachedUnpassableFunction; + public static void PrepareUnpassableCheck(int size) { CachedSize = size; @@ -191,6 +192,7 @@ public bool UnpassableNormal() } GridNode _node; + public bool UnpassableMedium() { for (_i = 0; _i < 8; _i++) @@ -206,10 +208,17 @@ public bool UnpassableMedium() public bool UnpassableLarge() { int half = (CachedSize + 1) / 2; - for (int x = -half; x <= half; x++) { - for (int y = -half; y <= half; y++) { - if (GridManager.Grid[GridManager.GetGridIndex(gridX + x, gridY + y)].Unwalkable) { - return true; + for (int x = -half; x <= half; x++) + { + for (int y = -half; y <= half; y++) + { + int index = GridManager.GetGridIndex(gridX + x, gridY + y); + if (GridManager.ValidateIndex(index)) + { + if (GridManager.Grid [index].Unwalkable) + { + return true; + } } } } @@ -238,16 +247,16 @@ private void GenerateNeighbors() if (GridManager.ValidateCoordinates(checkX, checkY)) { int neighborIndex; - if ((i != 0 && j != 0)) + if ((i != 0 && j != 0)) { //Diagonal - if (GridManager.UseDiagonalConnections) { + if (GridManager.UseDiagonalConnections) + { neighborIndex = diagonalIndex++; - } - else - continue; - } - else { + } else + continue; + } else + { neighborIndex = sideIndex++; } GridNode checkNode = GridManager.Grid [GridManager.GetGridIndex(checkX, checkY)]; @@ -258,7 +267,7 @@ private void GenerateNeighbors() } - + static int dstX; static int dstY; public static int HeuristicTargetX; @@ -267,10 +276,10 @@ private void GenerateNeighbors() public void CalculateHeuristic() { - //Euclidian - dstX = HeuristicTargetX - gridX; - dstY = HeuristicTargetY - gridY; - hCost = (dstX * dstX + dstY * dstY); + //Euclidian + dstX = HeuristicTargetX - gridX; + dstY = HeuristicTargetY - gridY; + hCost = (dstX * dstX + dstY * dstY); /* From a7594521f2a1c7b35fb735074f0cac40851865e8 Mon Sep 17 00:00:00 2001 From: SnpM Date: Fri, 22 Apr 2016 09:37:20 -0600 Subject: [PATCH 73/98] Refactor --- Example/ExampleSpawner.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Example/ExampleSpawner.cs b/Example/ExampleSpawner.cs index c6bb6cd9..67269a91 100644 --- a/Example/ExampleSpawner.cs +++ b/Example/ExampleSpawner.cs @@ -13,18 +13,22 @@ public override ushort ListenInput { protected FastList bufferSpawnedAgents = new FastList(); + + protected ushort cacheTarget; + protected ushort cacheCount; + protected string cacheAgentCode; protected override void OnExecute (Command com) { byte conID = com.ControllerID; Vector2d pos = com.GetData(); - ushort target = (ushort)com.GetData(0).Value; - ushort count = (ushort)com.GetData(1).Value; + cacheTarget = (ushort)com.GetData(0).Value; + cacheCount = (ushort)com.GetData(1).Value; AgentController ac = AgentController.InstanceManagers [conID]; - string agentCode = AgentController.GetAgentCode (target); + cacheAgentCode = AgentController.GetAgentCode (cacheTarget); bufferSpawnedAgents.FastClear(); - for (int i = 0; i < count; i++) { - LSAgent agent = ac.CreateAgent (agentCode, pos); + for (int i = 0; i < cacheCount; i++) { + LSAgent agent = ac.CreateAgent (cacheAgentCode, pos); bufferSpawnedAgents.Add(agent); } } From 17ee9a3ca6a153996f2ad2e0c6c49e68be38a512 Mon Sep 17 00:00:00 2001 From: SnpM Date: Fri, 22 Apr 2016 11:20:52 -0600 Subject: [PATCH 74/98] Refactor and remove PlatformType --- Core/Game/Abilities/Essential/Scan.cs | 54 +++++++++++-------- Core/Game/Agents/LSAgent.cs | 4 -- Core/Game/Projectiles/LSProjectile.cs | 8 --- .../Simulation/Grid/Influence/LSInfluencer.cs | 8 +-- Core/Simulation/Physics/Core/LSBody.cs | 6 +-- 5 files changed, 38 insertions(+), 42 deletions(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index 139fb88b..d610c0f5 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -65,10 +65,6 @@ protected virtual AllegianceType TargetAllegiance //Allegiance to the target get { return this._targetAllegiance; } } - protected virtual PlatformType TargetPlatform //PlatformType of the target - { - get { return this._targetPlatform; } - } public Vector3d ProjectileOffset { get { return _projectileOffset; } } //Offset of projectile @@ -87,8 +83,7 @@ protected virtual PlatformType TargetPlatform //PlatformType of the target protected int _attackRate = 1 * LockstepManager.FrameRate; [SerializeField, EnumMask] protected AllegianceType _targetAllegiance = AllegianceType.Enemy; - [SerializeField, EnumMask] - protected PlatformType _targetPlatform = PlatformType.Ground; + [SerializeField] protected bool _trackAttackAngle = true; [FixedNumberAngle, SerializeField] @@ -148,7 +143,7 @@ protected override void OnSetup() } CanTurn = cachedTurn.IsNotNull(); - + CachedOnHit = OnHit; } private void HandleOnArrive() @@ -319,6 +314,14 @@ void BehaveWithNoTarget() } } + protected virtual void OnHit(LSAgent agent) + { + Health healther = agent.GetAbility(); + healther.TakeDamage(_damage); + } + + private Action CachedOnHit; + public void Fire() { @@ -336,14 +339,18 @@ protected virtual void OnFire() { long appliedDamage = Damage; - Health healther = Target.GetAbility(); LSProjectile projectile = ProjectileManager.Create( ProjCode, this.Agent, this.ProjectileOffset, this.TargetAllegiance, - (other) => healther.IsNotNull() && healther.HealthAmount > 0, - (other) => healther.TakeDamage(appliedDamage)); + (other) => + { + Health healther = other.GetAbility(); + return healther.IsNotNull() && healther.HealthAmount > 0; + + }, + CachedOnHit); switch (projectile.TargetingBehavior) { @@ -361,7 +368,6 @@ protected virtual void OnFire() throw new System.Exception("Not implemented yet."); break; } - projectile.TargetPlatform = TargetPlatform; ProjectileManager.Fire(projectile); } @@ -482,23 +488,29 @@ private bool ScanAndEngage() return true; } } - protected virtual bool AgentValid (LSAgent agent) { + + protected virtual bool AgentValid(LSAgent agent) + { return true; } + protected virtual LSAgent DoScan() { Func agentConditional = null; - if (this._damage >= 0) { - agentConditional = (other) => { - Health health = other.GetAbility (); - return Agent.GlobalID != other.GlobalID && health != null && health.CanLose && AgentValid (other); + if (this._damage >= 0) + { + agentConditional = (other) => + { + Health health = other.GetAbility(); + return Agent.GlobalID != other.GlobalID && health != null && health.CanLose && AgentValid(other); }; - } - else { - agentConditional = (other) => { - Health health = other.GetAbility (); - return Agent.GlobalID != other.GlobalID && health != null && health.CanGain && AgentValid (other); + } else + { + agentConditional = (other) => + { + Health health = other.GetAbility(); + return Agent.GlobalID != other.GlobalID && health != null && health.CanGain && AgentValid(other); }; } LSAgent agent = InfluenceManager.Scan( diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index b2179ee3..8ff36c31 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -121,10 +121,6 @@ public bool IsCasting { } - public PlatformType Platform { - get { return CachedGameObject.layer == LayerMask.NameToLayer("Air") ? PlatformType.Air : PlatformType.Ground; } - } - public uint SpawnVersion { get; private set; } public AgentController Controller { get; private set; } diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index cdaf21af..4cf38c2e 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -98,8 +98,6 @@ public sealed class LSProjectile : CerealBehaviour public TargetingType TargetingBehavior { get { return _targetingBehavior; } } - [SerializeField] - public PlatformType _targetPlatform; [SerializeField] private HitType _hitBehavior; @@ -214,11 +212,6 @@ public long TargetHeight set; } - public PlatformType TargetPlatform - { - get; - set; - } public Vector2d TargetPosition { @@ -555,7 +548,6 @@ private void OnHit () private void ResetHit() { this.ExclusiveTargetType = this._exclusiveTargetType; - this.TargetPlatform = this._targetPlatform; } private void ResetEffects() diff --git a/Core/Simulation/Grid/Influence/LSInfluencer.cs b/Core/Simulation/Grid/Influence/LSInfluencer.cs index 32cfe83a..2ddf41e4 100644 --- a/Core/Simulation/Grid/Influence/LSInfluencer.cs +++ b/Core/Simulation/Grid/Influence/LSInfluencer.cs @@ -48,6 +48,7 @@ public void Simulate () return; if (System.Object.ReferenceEquals (tempNode, LocatedNode) == false) { + if (LocatedNode != null) LocatedNode.Remove (this); tempNode.Add (this); LocatedNode = tempNode; @@ -62,13 +63,8 @@ public void Deactivate () } - const PlatformType AllPlatforms = (PlatformType)~0; const AllegianceType AllAllegiance = (AllegianceType)~0; } - public enum PlatformType - { - Air = 1 << 1, - Ground = 1 << 2 - } + } \ No newline at end of file diff --git a/Core/Simulation/Physics/Core/LSBody.cs b/Core/Simulation/Physics/Core/LSBody.cs index 6aebc81f..596e2f62 100644 --- a/Core/Simulation/Physics/Core/LSBody.cs +++ b/Core/Simulation/Physics/Core/LSBody.cs @@ -285,11 +285,11 @@ public bool CanSetVisualRotation { get { - return _canSetVisualRotation; + return _canSetVisualRotation && RotationalTransform != null; } set { - _canSetVisualRotation = value && RotationalTransform; + _canSetVisualRotation = value; } } @@ -681,7 +681,7 @@ public void Visualize() } } const float rotationLerpDamping = 1f; - if (CanSetVisualRotation) + if (CanSetVisualRotation && RotationalTransform != null) { if (SetRotationBuffer) { From afd131ae8749fbc71059ceca6156d3623794017f Mon Sep 17 00:00:00 2001 From: SnpM Date: Fri, 22 Apr 2016 14:49:03 -0600 Subject: [PATCH 75/98] Optimize AgentValid --- Core/Game/Abilities/Essential/Scan.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index d610c0f5..db35697c 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -144,6 +144,7 @@ protected override void OnSetup() CanTurn = cachedTurn.IsNotNull(); CachedOnHit = OnHit; + CachedAgentValid = this.AgentValid; } private void HandleOnArrive() @@ -493,7 +494,7 @@ protected virtual bool AgentValid(LSAgent agent) { return true; } - + private Func CachedAgentValid; protected virtual LSAgent DoScan() { @@ -503,14 +504,14 @@ protected virtual LSAgent DoScan() agentConditional = (other) => { Health health = other.GetAbility(); - return Agent.GlobalID != other.GlobalID && health != null && health.CanLose && AgentValid(other); + return Agent.GlobalID != other.GlobalID && health != null && health.CanLose && CachedAgentValid(other); }; } else { agentConditional = (other) => { Health health = other.GetAbility(); - return Agent.GlobalID != other.GlobalID && health != null && health.CanGain && AgentValid(other); + return Agent.GlobalID != other.GlobalID && health != null && health.CanGain && CachedAgentValid(other); }; } LSAgent agent = InfluenceManager.Scan( From 23f7442143b934740196a295d84f60938844f2d1 Mon Sep 17 00:00:00 2001 From: SnpM Date: Fri, 22 Apr 2016 16:10:31 -0600 Subject: [PATCH 76/98] Add OnStartWindup --- Core/Game/Abilities/Essential/Scan.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index db35697c..3a0388b3 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -193,6 +193,11 @@ void StartWindup() windupCount = this.Windup; IsWindingUp = true; Agent.ApplyImpulse(AnimImpulse.Fire); + OnStartWindup (); + } + + protected virtual void OnStartWindup () { + } void BehaveWithTarget() From 378c90de5db3df3be609b322ab5f51f4737f6d0d Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 25 Apr 2016 11:08:18 -0600 Subject: [PATCH 77/98] Add LastCommand --- Core/Game/Abilities/Essential/Move.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/Game/Abilities/Essential/Move.cs b/Core/Game/Abilities/Essential/Move.cs index f952b8f1..055f81fc 100644 --- a/Core/Game/Abilities/Essential/Move.cs +++ b/Core/Game/Abilities/Essential/Move.cs @@ -358,9 +358,11 @@ protected override void OnSimulate() } } + public Command LastCommand; + protected override void OnExecute(Command com) { - + LastCommand = com; if (com.ContainsData ()) { Agent.StopCast(ID); From 0488c39b9489353fd71b6166e1cbe6b299e79ccb Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 25 Apr 2016 13:43:47 -0600 Subject: [PATCH 78/98] Fix null reference --- .../Simulation/Grid/Influence/LSInfluencer.cs | 99 ++++++++++--------- 1 file changed, 55 insertions(+), 44 deletions(-) diff --git a/Core/Simulation/Grid/Influence/LSInfluencer.cs b/Core/Simulation/Grid/Influence/LSInfluencer.cs index 2ddf41e4..840950a4 100644 --- a/Core/Simulation/Grid/Influence/LSInfluencer.cs +++ b/Core/Simulation/Grid/Influence/LSInfluencer.cs @@ -4,67 +4,78 @@ namespace Lockstep { - public class LSInfluencer - { - #region Static Helpers - static LSAgent tempAgent; - static GridNode tempNode; - #endregion - - #region Collection Helper - [NonSerialized] - public int bucketIndex = -1; - #endregion + public class LSInfluencer + { + #region Static Helpers + + static LSAgent tempAgent; + static GridNode tempNode; + + #endregion + + #region Collection Helper + + [NonSerialized] + public int bucketIndex = -1; + + #endregion #region ScanNode Helper + public int NodeTicket; + #endregion - public GridNode LocatedNode { get; private set;} + public GridNode LocatedNode { get; private set; } - public LSBody Body { get; private set; } + public LSBody Body { get; private set; } - public LSAgent Agent { get; private set; } + public LSAgent Agent { get; private set; } - public void Setup (LSAgent agent) - { - Agent = agent; - Body = agent.Body; - } + public void Setup(LSAgent agent) + { + Agent = agent; + Body = agent.Body; + } - public void Initialize () - { - LocatedNode = GridManager.GetNode (Body._position.x, Body._position.y); - LocatedNode.Add (this); - } + public void Initialize() + { + LocatedNode = GridManager.GetNode(Body._position.x, Body._position.y); + LocatedNode.Add(this); + } - public void Simulate () - { + public void Simulate() + { - if (Body.PositionChangedBuffer) { - tempNode = GridManager.GetNode (Body._position.x, Body._position.y); + if (Body.PositionChangedBuffer) + { + tempNode = GridManager.GetNode(Body._position.x, Body._position.y); - if (tempNode.IsNull()) - return; + if (tempNode.IsNull()) + return; - if (System.Object.ReferenceEquals (tempNode, LocatedNode) == false) { + if (System.Object.ReferenceEquals(tempNode, LocatedNode) == false) + { if (LocatedNode != null) - LocatedNode.Remove (this); - tempNode.Add (this); - LocatedNode = tempNode; - } - } - } - - public void Deactivate () - { - LocatedNode.Remove (this); - LocatedNode = null; - } + LocatedNode.Remove(this); + tempNode.Add(this); + LocatedNode = tempNode; + } + } + } + + public void Deactivate() + { + if (LocatedNode != null) + { + LocatedNode.Remove(this); + LocatedNode = null; + } + } const AllegianceType AllAllegiance = (AllegianceType)~0; - } + } } \ No newline at end of file From 3a23b6b2ac8a940c20dfdcaf8695c6f98348bb46 Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 25 Apr 2016 13:53:16 -0600 Subject: [PATCH 79/98] Refactor --- Core/Game/Abilities/Essential/Scan.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index 3a0388b3..6494fa64 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -184,7 +184,7 @@ protected override void OnSimulate() } [Lockstep(true)] - bool IsWindingUp { get; set; } + public bool IsWindingUp { get; set; } int windupCount; From df3c6076b625fa1a5c06e68622ce522e5eeffbd7 Mon Sep 17 00:00:00 2001 From: SnpM Date: Mon, 25 Apr 2016 14:41:46 -0600 Subject: [PATCH 80/98] Refactor --- Core/Game/Abilities/Essential/HeightSet.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/Game/Abilities/Essential/HeightSet.cs b/Core/Game/Abilities/Essential/HeightSet.cs index 012cd3a1..7962bb93 100644 --- a/Core/Game/Abilities/Essential/HeightSet.cs +++ b/Core/Game/Abilities/Essential/HeightSet.cs @@ -13,6 +13,7 @@ public class HeightSet : Ability [SerializeField, FixedNumber] private long _bonusHeight; + public long BonusHeight {get {return _bonusHeight;}} private long _offset; From 8a21820d8a91a37bdbacf3f95ab27048ea924236 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 26 Apr 2016 11:01:21 -0600 Subject: [PATCH 81/98] Fix functions not being called --- Core/Game/Buffs/Buff.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/Game/Buffs/Buff.cs b/Core/Game/Buffs/Buff.cs index 0f2ac444..c4ee3793 100644 --- a/Core/Game/Buffs/Buff.cs +++ b/Core/Game/Buffs/Buff.cs @@ -18,6 +18,7 @@ public void Initialize (int duration, LSAgent target) { Target.AddBuff(this); Active = true; + this.OnInitialize(); } protected virtual void OnInitialize () { @@ -39,6 +40,7 @@ protected virtual void OnSimulate () { public void Deactivate () { Target.RemoveBuff(this); Active = false; + this.OnDeactivate(); } protected virtual void OnDeactivate () { From 184f2c227cced3eeb3781c9892017bdefe8db60e Mon Sep 17 00:00:00 2001 From: GladFox <9006003@gmail.com> Date: Wed, 27 Apr 2016 01:24:29 +0600 Subject: [PATCH 82/98] clear instance --- Core/Game/Managers/GameManager/GameManager.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/Game/Managers/GameManager/GameManager.cs b/Core/Game/Managers/GameManager/GameManager.cs index da267eb5..4b97fc53 100644 --- a/Core/Game/Managers/GameManager/GameManager.cs +++ b/Core/Game/Managers/GameManager/GameManager.cs @@ -138,12 +138,14 @@ protected virtual void OnGameStart() bool Quited = false; void OnDisable () { + Instance = null; if (Quited) return; LockstepManager.Deactivate(); } void OnApplicationQuit() { + Instance = null; Quited = true; LockstepManager.Quit(); } From f8f9c67a091242c02923c4e0de37301e4098237f Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 27 Apr 2016 09:09:40 -0600 Subject: [PATCH 83/98] Fix invalid quaternions for timed projectiles --- Core/Game/Projectiles/LSProjectile.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index 4cf38c2e..8b55db9d 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -408,6 +408,9 @@ internal void Prepare(int id, Vector3d projectilePosition, Func ag this.BucketConditional = bucketConditional; this.AgentConditional = agentConditional; + + Forward = Vector2d.up; + Position = new Vector3d(); } public void InitializeHoming(LSAgent target) From 233a5fb125f50156eec8fd92da345246682cbc04 Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 27 Apr 2016 09:55:11 -0600 Subject: [PATCH 84/98] Fix projectile position initialization --- Core/Game/Agents/LSAgent.cs | 17 ++++++++++++++++- Core/Game/Projectiles/LSProjectile.cs | 1 - 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index 8ff36c31..331e10e5 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -116,10 +116,25 @@ public LSBusStop BusStop { public bool CheckCasting { get; set; } public bool IsCasting { get { + if (Stunned) + return true; return abilityManager.CheckCasting(); } } - + private bool _stunned; + public bool Stunned { + get { + return _stunned; + } + set { + if (value != _stunned) { + _stunned = value; + if (_stunned) { + this.StopCast(); + } + } + } + } public uint SpawnVersion { get; private set; } diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index 8b55db9d..25bbde84 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -410,7 +410,6 @@ internal void Prepare(int id, Vector3d projectilePosition, Func ag this.AgentConditional = agentConditional; Forward = Vector2d.up; - Position = new Vector3d(); } public void InitializeHoming(LSAgent target) From ef3ddb359e4464629b5a94230eefbf408cabd225 Mon Sep 17 00:00:00 2001 From: SnpM Date: Thu, 28 Apr 2016 09:05:41 -0600 Subject: [PATCH 85/98] Add SpecialEngaging and refactor Scan --- Core/Game/Abilities/Essential/Scan.cs | 6 ++++-- Core/Game/Agents/LSAnimator.cs | 9 +++++++++ Core/Game/Agents/LSAnimatorBase.cs | 3 ++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs index 6494fa64..2ea84cd7 100644 --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -199,7 +199,9 @@ void StartWindup() protected virtual void OnStartWindup () { } - + protected virtual AnimState EngagingAnimState { + get { return AnimState.Engaging;} + } void BehaveWithTarget() { if (Target.IsActive == false || Target.SpawnVersion != targetVersion) @@ -229,7 +231,7 @@ void BehaveWithTarget() if (CanMove) cachedMove.StopMove(); } - Agent.SetState(AnimState.Engaging); + Agent.SetState(EngagingAnimState); long mag; targetDirection.Normalize(out mag); bool withinTurn = TrackAttackAngle == false || diff --git a/Core/Game/Agents/LSAnimator.cs b/Core/Game/Agents/LSAnimator.cs index f4fadbbd..9c1c8ed7 100644 --- a/Core/Game/Agents/LSAnimator.cs +++ b/Core/Game/Agents/LSAnimator.cs @@ -16,6 +16,9 @@ public class LSAnimator : LSAnimatorBase [SerializeField] private string engaging = "engaging"; + [SerializeField] + private string specialEngaging = "specialEngaging"; + [SerializeField] private string dying = "dying"; @@ -29,6 +32,7 @@ public class LSAnimator : LSAnimatorBase private AnimationClip movingClip; private AnimationClip engagingClip; private AnimationClip dyingClip; + private AnimationClip specialEngagingClip; private AnimationClip fireClip; private AnimationClip specialAttackClip; @@ -54,6 +58,7 @@ public override void Initialize() movingClip = animator.GetClip(moving); engagingClip = animator.GetClip(engaging); dyingClip = animator.GetClip(dying); + specialEngagingClip = animator.GetClip(this.specialEngaging); //Impulses fireClip = animator.GetClip(fire); specialAttackClip = animator.GetClip(specialAttack); @@ -101,6 +106,8 @@ private AnimationClip GetStateClip(AnimState state) return engagingClip; case AnimState.Dying: return dyingClip; + case AnimState.SpecialEngaging: + return this.specialEngagingClip; } return idlingClip; } @@ -117,6 +124,8 @@ public string GetStateName(AnimState state) return engaging; case AnimState.Dying: return dying; + case AnimState.SpecialEngaging: + return this.specialEngaging; } return idling; } diff --git a/Core/Game/Agents/LSAnimatorBase.cs b/Core/Game/Agents/LSAnimatorBase.cs index 86222e74..94c4a26e 100644 --- a/Core/Game/Agents/LSAnimatorBase.cs +++ b/Core/Game/Agents/LSAnimatorBase.cs @@ -81,7 +81,8 @@ public enum AnimState Idling, Moving, Dying, - Engaging + Engaging, + SpecialEngaging } public enum AnimImpulse From f768e1014ae5ffae26e0c7dfda57c69d659988c7 Mon Sep 17 00:00:00 2001 From: SnpM Date: Fri, 29 Apr 2016 09:08:11 -0600 Subject: [PATCH 86/98] Add setter for Forward --- Core/Simulation/Physics/Core/LSBody.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Core/Simulation/Physics/Core/LSBody.cs b/Core/Simulation/Physics/Core/LSBody.cs index 596e2f62..8cc25cf4 100644 --- a/Core/Simulation/Physics/Core/LSBody.cs +++ b/Core/Simulation/Physics/Core/LSBody.cs @@ -34,12 +34,10 @@ public Vector2d Forward { get { - if (ForwardNeedsSet) - { - _forward = _rotation.ToDirection(); - ForwardNeedsSet = false; - } - return _forward; + return Rotation.ToDirection(); + } + set { + Rotation = value.ToRotation(); } } From 407bf1b90a780f2080d349ec29b5385202057fc7 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 3 May 2016 09:26:27 -0600 Subject: [PATCH 87/98] Big changes to GameManager and InterfacingHelper! GameManager is now just something to communicate Unity events (Start, Update, etc.) to LockstepManager. InterfacingHelper is redundant with BehaviourHelper so has been removed (RTSInterfacingHelper still works the same way but inherits from BehaviourHelper). --- Core/Game/Managers/GameManager/GameManager.cs | 58 ++----------------- Core/Game/Managers/LockstepManager.cs | 6 -- Example/ExampleGameManager.cs | 25 -------- 3 files changed, 5 insertions(+), 84 deletions(-) diff --git a/Core/Game/Managers/GameManager/GameManager.cs b/Core/Game/Managers/GameManager/GameManager.cs index 4b97fc53..068ef780 100644 --- a/Core/Game/Managers/GameManager/GameManager.cs +++ b/Core/Game/Managers/GameManager/GameManager.cs @@ -17,18 +17,6 @@ public class GameManager : MonoBehaviour public static GameManager Instance { get; private set; } - /// - /// If true, LS will run in headless mode and only frames will be processed. Disables all physics, abilities, etc.. - /// - /// true if headless; otherwise, false. - public virtual bool Headless - { - get - { - return false; - } - } - private NetworkHelper _mainNetworkHelper; public virtual NetworkHelper MainNetworkHelper @@ -49,30 +37,13 @@ public virtual NetworkHelper MainNetworkHelper } - private static InterfacingHelper _defaultHelper; - - public virtual InterfacingHelper MainInterfacingHelper - { - get - { - if (_defaultHelper.IsNull()) { - _defaultHelper = this.GetComponent (); - if (_defaultHelper == null) { - Debug.Log("InterfacingHelper not found. Defaulting to RTSInterfacingHelper."); - _defaultHelper = base.gameObject.AddComponent(); - } - } - return _defaultHelper; - } - } - public void ScanForHelpers() { //Currently deterministic but not guaranteed by Unity _helpers = this.gameObject.GetComponents(); } - public virtual void GetBehaviourHelpers(FastList output) + public void GetBehaviourHelpers(FastList output) { //if (Helpers == null) ScanForHelpers(); @@ -89,14 +60,8 @@ protected void Start() { Instance = this; LockstepManager.Initialize(this); - this.Startup(); } - - protected virtual void Startup() - { - - } - + protected virtual void FixedUpdate() { @@ -113,28 +78,15 @@ protected virtual void Update() timeToNextSimulate = LockstepManager.BaseDeltaTime; } LockstepManager.Visualize(); - CheckInput(); - } - - protected virtual void CheckInput() - { - } - protected virtual void LateUpdate() - { - LockstepManager.LateVisualize(); - } - public static void GameStart() - { - Instance.OnGameStart(); - } - protected virtual void OnGameStart() + protected void LateUpdate() { - //When the game starts (first simulation frame) + LockstepManager.LateVisualize(); } + bool Quited = false; void OnDisable () { diff --git a/Core/Game/Managers/LockstepManager.cs b/Core/Game/Managers/LockstepManager.cs index a299d501..1dc6e15c 100644 --- a/Core/Game/Managers/LockstepManager.cs +++ b/Core/Game/Managers/LockstepManager.cs @@ -135,7 +135,6 @@ internal static void Initialize(GameManager gameManager) FrameCount = 0; InfluenceFrameCount = 0; - MainGameManager.MainInterfacingHelper.Initialize(); ClientManager.Initialize(MainGameManager.MainNetworkHelper); @@ -160,7 +159,6 @@ internal static void Initialize(GameManager gameManager) ProjectileManager.Initialize(); DefaultMessageRaiser.LateInitialize(); - MainGameManager.MainInterfacingHelper.LateInitialize(); BehaviourHelperManager.LateInitialize(); if (onInitialize != null) @@ -205,7 +203,6 @@ internal static void Simulate() return; } - MainGameManager.MainInterfacingHelper.Simulate(); BehaviourHelperManager.Simulate(); AgentController.Simulate(); @@ -224,7 +221,6 @@ internal static void Simulate() private static void GameStart() { - GameManager.GameStart(); BehaviourHelperManager.GameStart(); GameStarted = true; @@ -265,7 +261,6 @@ internal static void Visualize() if (!GameStarted) return; DefaultMessageRaiser.EarlyVisualize(); PlayerManager.Visualize(); - MainGameManager.MainInterfacingHelper.Visualize(); BehaviourHelperManager.Visualize(); PhysicsManager.Visualize(); AgentController.Visualize(); @@ -294,7 +289,6 @@ internal static void Deactivate() return; Selector.Clear(); AgentController.Deactivate(); - MainGameManager.MainInterfacingHelper.Deactivate(); BehaviourHelperManager.Deactivate(); ProjectileManager.Deactivate(); EffectManager.Deactivate(); diff --git a/Example/ExampleGameManager.cs b/Example/ExampleGameManager.cs index 5bcdabdd..ba4d56ed 100644 --- a/Example/ExampleGameManager.cs +++ b/Example/ExampleGameManager.cs @@ -5,31 +5,6 @@ using System; namespace Lockstep.Example { public class ExampleGameManager : GameManager { - - [SerializeField,DataCode ("Agents")] - private string _spawnCode; - [SerializeField] - private int _spawnAmount; - - protected FastList spawnedAgents = new FastList(); - - public override void GetBehaviourHelpers (FastList output) { - base.GetBehaviourHelpers(output); - var go = new GameObject("BehaviourHandlers"); - - } - - - - protected override void OnGameStart () { - AgentController ac = AgentController.Create(); - PlayerManager.AddController (ac); - - for (int i = 0; i < _spawnAmount; i++) { - spawnedAgents.Add (ac.CreateAgent (_spawnCode,Vector2d.zero)); - } - } - Replay LastSave = new Replay(); void OnGUI () { From bee0f4c907a196b4ab5e2e509bf408c0b6eb9636 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 3 May 2016 09:26:50 -0600 Subject: [PATCH 88/98] asdf --- Core/Game/Player/InterfacingHelper.cs | 56 ---------------------- Core/Game/Player/InterfacingHelper.cs.meta | 12 ----- Core/Game/Player/RTSInterfacingHelper.cs | 2 +- 3 files changed, 1 insertion(+), 69 deletions(-) delete mode 100644 Core/Game/Player/InterfacingHelper.cs delete mode 100644 Core/Game/Player/InterfacingHelper.cs.meta diff --git a/Core/Game/Player/InterfacingHelper.cs b/Core/Game/Player/InterfacingHelper.cs deleted file mode 100644 index 6168e594..00000000 --- a/Core/Game/Player/InterfacingHelper.cs +++ /dev/null @@ -1,56 +0,0 @@ -using UnityEngine; -using System.Collections; - -namespace Lockstep -{ - public abstract class InterfacingHelper : MonoBehaviour - { - public void Initialize() - { - this.OnInitialize(); - } - - protected virtual void OnInitialize() - { - - } - - public void LateInitialize() - { - this.OnLateInitialize(); - } - - protected virtual void OnLateInitialize() - { - - } - - public void Simulate() - { - this.OnSimulate(); - } - - protected virtual void OnSimulate() - { - - } - - public void Visualize() - { - this.OnVisualize(); - } - - protected virtual void OnVisualize() - { - } - - public void Deactivate() - { - this.OnDeactivate(); - } - - protected virtual void OnDeactivate() - { - } - } -} \ No newline at end of file diff --git a/Core/Game/Player/InterfacingHelper.cs.meta b/Core/Game/Player/InterfacingHelper.cs.meta deleted file mode 100644 index 3a4f05d0..00000000 --- a/Core/Game/Player/InterfacingHelper.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2237aefeb81354479a7c35a4692b1dca -timeCreated: 1451423936 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Core/Game/Player/RTSInterfacingHelper.cs b/Core/Game/Player/RTSInterfacingHelper.cs index 8d4a1704..b0cb649b 100644 --- a/Core/Game/Player/RTSInterfacingHelper.cs +++ b/Core/Game/Player/RTSInterfacingHelper.cs @@ -5,7 +5,7 @@ namespace Lockstep { - public class RTSInterfacingHelper : InterfacingHelper + public class RTSInterfacingHelper : BehaviourHelper { public static GUIManager GUIManager; From 3423692299fc4f3b93bb81622f39652b1501fcd2 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 3 May 2016 10:03:04 -0600 Subject: [PATCH 89/98] Add LockstepManager.Reset () --- Core/Game/Managers/LockstepManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Core/Game/Managers/LockstepManager.cs b/Core/Game/Managers/LockstepManager.cs index 1dc6e15c..69423802 100644 --- a/Core/Game/Managers/LockstepManager.cs +++ b/Core/Game/Managers/LockstepManager.cs @@ -76,6 +76,12 @@ private set } } + public static void Reset () { + LockstepManager.Deactivate(); + GameObject copy = GameObject.Instantiate(MainGameManager.gameObject); + GameObject.Destroy(MainGameManager.gameObject); + } + internal static void Setup() { DefaultMessageRaiser.EarlySetup(); From 3bd5390651aaadd8f94b05ab1d378e0ee59b4e85 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 3 May 2016 13:17:49 -0600 Subject: [PATCH 90/98] Refactor for ChangeController --- Core/Game/Agents/AgentController.cs | 48 ++++++++++++++--------------- Core/Game/Agents/LSAgent.cs | 13 ++++---- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/Core/Game/Agents/AgentController.cs b/Core/Game/Agents/AgentController.cs index f4062344..02c0d88a 100644 --- a/Core/Game/Agents/AgentController.cs +++ b/Core/Game/Agents/AgentController.cs @@ -157,15 +157,19 @@ public static void Visualize() } } } + public static void ChangeController (LSAgent agent, AgentController newCont) { + + if (newCont == null) { + agent.InitializeController(null,0,0); + } + else { + newCont.AddAgent(agent); + } + } public static void DestroyAgent(LSAgent agent, bool Immediate = false) { - GlobalAgentActive [agent.GlobalID] = false; - - AgentController leController = agent.Controller; - leController.LocalAgentActive [agent.LocalID] = false; - leController.OpenLocalIDs.Add(agent.LocalID); - OpenGlobalIDs.Add(agent.GlobalID); + agent.Deactivate(Immediate); @@ -173,6 +177,8 @@ public static void DestroyAgent(LSAgent agent, bool Immediate = false) TypeAgentsActive[agentCodeID][agent.TypeIndex] = false; + ChangeController (agent, null); + } public static void CacheAgent(LSAgent agent) @@ -318,7 +324,17 @@ public static Command GenerateSpawnCommand(AgentController cont, string agentCod { return Lockstep.Example.ExampleSpawner.GenerateSpawnCommand(cont, agentCode, count, position); } + public void AddAgent (LSAgent agent) { + ushort localID = GenerateLocalID(); + LocalAgents [localID] = agent; + LocalAgentActive [localID] = true; + ushort globalID = GenerateGlobalID(); + GlobalAgentActive [globalID] = true; + GlobalAgents [globalID] = agent; + + agent.InitializeController(this,localID, globalID); + } public LSAgent CreateAgent( string agentCode, Vector2d? position = null, //nullable position @@ -370,29 +386,13 @@ public LSAgent CreateAgent( InitializeAgent(curAgent, pos, rot); return curAgent; } - /* - //Create agent from pre-existing template - public LSAgent CreateAgent(GameObject agentObject, - Vector2d position = default(Vector2d)) { - curAgent = GameObject.Instantiate(agentObject).GetComponent(); - curAgent.Setup(this, default(AgentCode)); - InitializeAgent (curAgent, position); - - return curAgent; - }*/ private void InitializeAgent(LSAgent agent, Vector2d position, Vector2d rotation) { - ushort localID = GenerateLocalID(); - LocalAgents [localID] = agent; - LocalAgentActive [localID] = true; - - ushort globalID = GenerateGlobalID(); - GlobalAgentActive [globalID] = true; - GlobalAgents [globalID] = agent; - agent.Initialize(this, localID, globalID, position, rotation); + AddAgent (agent); + agent.Initialize(position, rotation); } private ushort GenerateLocalID() diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index 331e10e5..4c77b898 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -268,16 +268,17 @@ public void SessionReset () { this.SpawnVersion = 0; } + internal void InitializeController (AgentController controller, ushort localID, ushort globalID) { + this.Controller = controller; + this.LocalID = localID; + this.GlobalID = globalID; + } + public void Initialize( - AgentController controller, - ushort localID, - ushort globalID, Vector2d position = default (Vector2d), Vector2d rotation = default (Vector2d)) { - LocalID = localID; - GlobalID = globalID; - Controller = controller; + IsActive = true; CheckCasting = true; From e9bb1aeba283643f3ff081a6b6e82b66bf598735 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 3 May 2016 14:07:47 -0600 Subject: [PATCH 91/98] Fix ChangeController --- Core/Game/Agents/AgentController.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Core/Game/Agents/AgentController.cs b/Core/Game/Agents/AgentController.cs index 02c0d88a..942376a4 100644 --- a/Core/Game/Agents/AgentController.cs +++ b/Core/Game/Agents/AgentController.cs @@ -158,7 +158,13 @@ public static void Visualize() } } public static void ChangeController (LSAgent agent, AgentController newCont) { - + + agent.Influencer.Deactivate(); + + AgentController leController = agent.Controller; + leController.LocalAgentActive [agent.LocalID] = false; + leController.OpenLocalIDs.Add(agent.LocalID); + OpenGlobalIDs.Add(agent.GlobalID); if (newCont == null) { agent.InitializeController(null,0,0); @@ -166,6 +172,9 @@ public static void ChangeController (LSAgent agent, AgentController newCont) { else { newCont.AddAgent(agent); } + + agent.Influencer.Initialize(); + } public static void DestroyAgent(LSAgent agent, bool Immediate = false) { From 6af0c834f1f2904127acce1e7738507d055f7413 Mon Sep 17 00:00:00 2001 From: SnpM Date: Tue, 3 May 2016 16:07:24 -0600 Subject: [PATCH 92/98] Fix FixedNumber multi-editing --- .../Editor/CustomPropertyDrawers/CustomPropertyDrawers.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Integration/Editor/CustomPropertyDrawers/CustomPropertyDrawers.cs b/Integration/Editor/CustomPropertyDrawers/CustomPropertyDrawers.cs index ab6a9728..ba32559a 100644 --- a/Integration/Editor/CustomPropertyDrawers/CustomPropertyDrawers.cs +++ b/Integration/Editor/CustomPropertyDrawers/CustomPropertyDrawers.cs @@ -19,7 +19,8 @@ public class EditorFixedNumber : PropertyDrawer public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { FixedNumberAttribute a = ((FixedNumberAttribute)this.attribute); - long value = property.longValue; + long orgValue = property.longValue; + long value = orgValue; LSEditorUtility.DoubleField( position, label, @@ -32,6 +33,7 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten else if (value < a.Min) value = a.Min; } + if (orgValue != value) property.longValue = value; } } From 8ebae46318283df67edcef5b27136fd6cac76e4b Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 4 May 2016 11:33:35 -0600 Subject: [PATCH 93/98] Fix bugs --- Core/Game/Agents/AgentController.cs | 7 +++++-- Core/Game/Agents/LSAgent.cs | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/Game/Agents/AgentController.cs b/Core/Game/Agents/AgentController.cs index 942376a4..749db71f 100644 --- a/Core/Game/Agents/AgentController.cs +++ b/Core/Game/Agents/AgentController.cs @@ -159,10 +159,10 @@ public static void Visualize() } public static void ChangeController (LSAgent agent, AgentController newCont) { - agent.Influencer.Deactivate(); AgentController leController = agent.Controller; leController.LocalAgentActive [agent.LocalID] = false; + GlobalAgentActive[agent.GlobalID] = false; leController.OpenLocalIDs.Add(agent.LocalID); OpenGlobalIDs.Add(agent.GlobalID); @@ -170,10 +170,13 @@ public static void ChangeController (LSAgent agent, AgentController newCont) { agent.InitializeController(null,0,0); } else { + agent.Influencer.Deactivate(); + newCont.AddAgent(agent); + agent.Influencer.Initialize(); + } - agent.Influencer.Initialize(); } public static void DestroyAgent(LSAgent agent, bool Immediate = false) diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index 4c77b898..2e4f03fe 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -360,6 +360,7 @@ public void Die (bool immediate = false) { if (Animator .IsNotNull ()) { SetState (AnimState.Dying); + Animator.Visualize (); } } From 7f351db4c2774108108ef2e64ef273ee6d23b9a9 Mon Sep 17 00:00:00 2001 From: GladFox <9006003@gmail.com> Date: Wed, 11 May 2016 01:45:50 +0600 Subject: [PATCH 94/98] HitFX rotation flag --- Core/Game/Projectiles/LSProjectile.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs index 25bbde84..811e4c8e 100644 --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -83,6 +83,8 @@ public sealed class LSProjectile : CerealBehaviour public bool IsActive; public bool UseEffects; + + public bool RotateHitFX = true; [SerializeField] private bool _canVisualize = true; @@ -372,10 +374,10 @@ private void Hit(bool destroy = true) */ } else { - - { - EffectManager.LazyCreateEffect(this.HitFX, this.cachedTransform.position, this.cachedTransform.rotation); - } + if (RotateHitFX) + EffectManager.LazyCreateEffect(this.HitFX, this.cachedTransform.position, this.cachedTransform.rotation); + else + EffectManager.LazyCreateEffect(this.HitFX, this.cachedTransform.position); } } From dcdc015b7a64df01fdbbe2ac1b99a584ef660a74 Mon Sep 17 00:00:00 2001 From: GladFox <9006003@gmail.com> Date: Wed, 11 May 2016 02:01:01 +0600 Subject: [PATCH 95/98] Rotate HitFX --- Integration/Editor/EditorLSProjectile.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Integration/Editor/EditorLSProjectile.cs b/Integration/Editor/EditorLSProjectile.cs index 4d2b58cc..d89585ec 100644 --- a/Integration/Editor/EditorLSProjectile.cs +++ b/Integration/Editor/EditorLSProjectile.cs @@ -65,9 +65,11 @@ public override void OnInspectorGUI() if (useEffectProp.boolValue) { + so.PropertyField("RotateHitFX"); so.PropertyField("_startFX"); so.PropertyField("_hitFX"); so.PropertyField("_attachEndEffectToTarget"); + } if (EditorGUI.EndChangeCheck ()) { From 026c1a35e4f13bd391a3b4adc5b1297b4a9ca4a3 Mon Sep 17 00:00:00 2001 From: Benjamin Berman Date: Fri, 10 Jun 2016 18:34:52 -0400 Subject: [PATCH 96/98] Fixing example scene with latest Develop - Add an `ExampleCreateTestAgent` class which spawns two test agents on start - Clean up the ExampleScene to remove the broken reference to the Manager prefab - Add the `RTSInterfacingHelper` class to the game manager in the example scene so that click around works - Moving the terrain down so that people can actually see the units moving around --- Example/ExampleCreateTestAgent.cs | 35 ++ Example/ExampleCreateTestAgent.cs.meta | 12 + Example/ExampleScene.unity | 819 +++++++++++++++++-------- 3 files changed, 619 insertions(+), 247 deletions(-) create mode 100644 Example/ExampleCreateTestAgent.cs create mode 100644 Example/ExampleCreateTestAgent.cs.meta diff --git a/Example/ExampleCreateTestAgent.cs b/Example/ExampleCreateTestAgent.cs new file mode 100644 index 00000000..9da0918f --- /dev/null +++ b/Example/ExampleCreateTestAgent.cs @@ -0,0 +1,35 @@ +using UnityEngine; +using System.Collections; +using Lockstep; + +namespace Lockstep.Example +{ + public class ExampleCreateTestAgent : BehaviourHelper + { + protected FastList spawnedAgents = new FastList (); + public string agentName = "TestAgent"; + public int agentsToSpawn = 2; + + // Use this for initialization + void Start () + { + + } + + // Update is called once per frame + void Update () + { + + } + + protected override void OnGameStart () + { + AgentController ac = AgentController.Create (); + PlayerManager.AddController (ac); + + for (int i = 0; i < agentsToSpawn; i++) { + spawnedAgents.Add (ac.CreateAgent (agentName, Vector2d.zero)); + } + } + } +} \ No newline at end of file diff --git a/Example/ExampleCreateTestAgent.cs.meta b/Example/ExampleCreateTestAgent.cs.meta new file mode 100644 index 00000000..97d5686a --- /dev/null +++ b/Example/ExampleCreateTestAgent.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5c68e21cf0b8c42e2bf806d584987570 +timeCreated: 1465594009 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Example/ExampleScene.unity b/Example/ExampleScene.unity index f3f8ca06..29c69f98 100644 --- a/Example/ExampleScene.unity +++ b/Example/ExampleScene.unity @@ -131,9 +131,324 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.01, y: 0.98, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 2 +--- !u!1 &499926451 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 143428, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} + m_PrefabInternal: {fileID: 1659204528} + serializedVersion: 4 + m_Component: + - 4: {fileID: 499926452} + - 33: {fileID: 499926455} + - 65: {fileID: 499926454} + - 23: {fileID: 499926453} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &499926452 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 422538, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 499926451} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0.48} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.6} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1558950263} + m_RootOrder: 0 +--- !u!23 &499926453 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2347950, guid: 7adf26d256267454bb6f9b55470051d7, + type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 499926451} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 2100000, guid: b30447a543b0c4e6b9494c581702fd8c, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!65 &499926454 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6514166, guid: 7adf26d256267454bb6f9b55470051d7, + type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 499926451} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &499926455 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3365602, guid: 7adf26d256267454bb6f9b55470051d7, + type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 499926451} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &642488360 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 642488370} + - 114: {fileID: 642488369} + - 114: {fileID: 642488368} + - 114: {fileID: 642488367} + - 114: {fileID: 642488366} + - 114: {fileID: 642488365} + - 114: {fileID: 642488364} + - 114: {fileID: 642488363} + - 114: {fileID: 642488362} + - 114: {fileID: 642488361} + - 114: {fileID: 642488371} + m_Layer: 0 + m_Name: Manager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &642488361 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 642488360} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5c68e21cf0b8c42e2bf806d584987570, type: 3} + m_Name: + m_EditorClassIdentifier: + agentName: TestAgent + agentsToSpawn: 2 +--- !u!114 &642488362 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 642488360} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fbe97dbe0f420441287190b44c9fab15, type: 3} + m_Name: + m_EditorClassIdentifier: + _size: + x: 6553600 + y: 6553600 + _heightBounds: + x: 0 + y: 3276800 + _bottomLeft: + x: -3276800 + y: -3276800 + _interval: 32768 + _maps: + - _scanLayers: + serializedVersion: 2 + m_Bits: 256 + _map: + _width: 200 + _height: 200 + _innerArray: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + _show: 0 +--- !u!114 &642488363 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 642488360} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6bd63e17efd3d4a0ab163adbad18defc, type: 3} + m_Name: + m_EditorClassIdentifier: + Show: 0 + LeGridType: 0 + LeHeight: 0 + NodeSize: 0.5 +--- !u!114 &642488364 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 642488360} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da6c5ce8a0a0c4891b9f8fe26f885f34, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &642488365 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 642488360} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 000d295d6162e4e5194b36e39cea7b07, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &642488366 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 642488360} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0d542151ddc4cc34bb08012015d24a5a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &642488367 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 642488360} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b0b21df5198d64e3ab298987b2d7ae5f, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &642488368 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 642488360} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f93a029202d4d4c998b30cb5eac761a9, type: 3} + m_Name: + m_EditorClassIdentifier: + _saverObject: {fileID: 357143948} + _savers: + - {fileID: 357143949} +--- !u!114 &642488369 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 642488360} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 465e861767b9e445eafba76f21bd0dd4, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &642488370 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 642488360} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.37670994, y: -4.7579446, z: 2.9696765} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 +--- !u!114 &642488371 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 642488360} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0d644c12a0a174ba8ad093abcd70b9b2, type: 3} + m_Name: + m_EditorClassIdentifier: + _boxStyle: + m_Name: + m_Normal: + m_Background: {fileID: 0} + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 0 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 --- !u!1 &705538422 GameObject: m_ObjectHideFlags: 0 @@ -161,6 +476,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0.5, z: 3.57} m_LocalScale: {x: 4, y: 1, z: 5} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1198412249} m_RootOrder: 0 @@ -267,6 +583,7 @@ Transform: m_LocalRotation: {x: -0.25000006, y: 0.24999964, z: -0.06698721, w: -0.9330128} m_LocalPosition: {x: -2.48, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 30, y: -30, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -353,9 +670,203 @@ Transform: m_LocalRotation: {x: 0.5735765, y: 0, z: 0, w: 0.819152} m_LocalPosition: {x: 0, y: 40, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 70, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 +--- !u!1 &1137758149 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100310, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} + m_PrefabInternal: {fileID: 1659204528} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1137758157} + - 114: {fileID: 1137758156} + - 114: {fileID: 1137758155} + - 114: {fileID: 1137758154} + - 114: {fileID: 1137758153} + - 114: {fileID: 1137758152} + - 114: {fileID: 1137758151} + - 114: {fileID: 1137758150} + m_Layer: 0 + m_Name: TestAgent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1137758150 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11447240, guid: 7adf26d256267454bb6f9b55470051d7, + type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 1137758149} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cc61d323ede6e5c4e934b394d3ec5080, type: 3} + m_Name: + m_EditorClassIdentifier: + _maxHealth: 65536000 + _currentHealth: 0 +--- !u!114 &1137758151 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11479720, guid: 7adf26d256267454bb6f9b55470051d7, + type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 1137758149} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4525e3f8c8889d43a4d23626ea32d54, type: 3} + m_Name: + m_EditorClassIdentifier: + _cooldown: 0 + _projectileCode: TestBullet + _range: 786432 + _sight: 655360 + _damage: 65536 + _attackRate: 32 + _targetAllegiance: 4 + _trackAttackAngle: 1 + _attackAngle: 11380 + _projectileOffset: + x: 0 + y: 0 + z: 0 + _energyCost: 0 + _windup: 0 + _increasePriority: 1 + _projectileOrigin: {x: 0, y: 0, z: 1.273089} +--- !u!114 &1137758152 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11406140, guid: 7adf26d256267454bb6f9b55470051d7, + type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 1137758149} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f42d52091a614957912ec7da50c9027, type: 3} + m_Name: + m_EditorClassIdentifier: + _mapIndex: 0 + _bonusHeight: 0 +--- !u!114 &1137758153 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11425566, guid: 7adf26d256267454bb6f9b55470051d7, + type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 1137758149} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a7cc9ef18533c9f4c943ac00aab4efd7, type: 3} + m_Name: + m_EditorClassIdentifier: + _cooldown: 0 + Destination: + x: 0 + y: 0 + _canMove: 1 + _canTurn: 1 + _speed: 131072 + _acceleration: 65536 + _canPathfind: 0 + DrawPath: 1 +--- !u!114 &1137758154 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11439568, guid: 7adf26d256267454bb6f9b55470051d7, + type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 1137758149} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5573488627c5d4e2989d3c77cde5bfb6, type: 3} + m_Name: + m_EditorClassIdentifier: + _turnRate: + x: 64276 + y: 12785 +--- !u!114 &1137758155 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11485440, guid: 7adf26d256267454bb6f9b55470051d7, + type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 1137758149} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: db60e16922dd049ceb3f90f627871a31, type: 3} + m_Name: + m_EditorClassIdentifier: + _deathTime: 64 + _agentType: 0 + _globalID: 0 + _boxPriority: 0 + _selectionPriority: 0 + TypeIndex: 0 + Tag: 0 + _selectionRadius: 1 + _visualCenter: {fileID: 1137758157} + VisualPositionChanged: 0 +--- !u!114 &1137758156 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11487560, guid: 7adf26d256267454bb6f9b55470051d7, + type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 1137758149} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 53047ee8fe7aa8f429746c6b0e2b416a, type: 3} + m_Name: + m_EditorClassIdentifier: + _position: + x: 0 + y: 0 + _rotation: + x: 0 + y: 65536 + _heightPos: 0 + _velocity: + x: 0 + y: 0 + RealPoints: [] + Edges: [] + EdgeNorms: [] + PastGridXMin: 0 + PastGridXMax: 0 + PastGridYMin: 0 + PastGridYMax: 0 + _shape: 1 + _isTrigger: 0 + _layer: 0 + _halfWidth: 0 + _halfHeight: 0 + _radius: 32768 + _immovable: 0 + _basePriority: 0 + _vertices: [] + _height: 65536 + _positionalTransform: {fileID: 1137758157} + _rotationalTransform: {fileID: 1137758157} +--- !u!4 &1137758157 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 465378, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 1137758149} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1558950263} + m_Father: {fileID: 0} + m_RootOrder: 7 --- !u!1 &1198412247 GameObject: m_ObjectHideFlags: 0 @@ -429,37 +940,77 @@ Transform: m_LocalRotation: {x: 0, y: 0.38888282, z: 0, w: 0.92128724} m_LocalPosition: {x: 7.03, y: 0, z: -0.77} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 45.77, z: 0} m_Children: - {fileID: 705538423} m_Father: {fileID: 0} - m_RootOrder: 8 ---- !u!1 &1217231139 + m_RootOrder: 5 +--- !u!1 &1558950262 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabParentObject: {fileID: 137230, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} + m_PrefabInternal: {fileID: 1659204528} serializedVersion: 4 m_Component: - - 4: {fileID: 1217231140} + - 4: {fileID: 1558950263} + - 33: {fileID: 1558950265} + - 23: {fileID: 1558950264} m_Layer: 0 - m_Name: GameObject + m_Name: Sphere m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &1217231140 +--- !u!4 &1558950263 Transform: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1217231139} + m_PrefabParentObject: {fileID: 450234, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 1558950262} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -1.3439194, y: -2.9479918, z: 2.953869} + m_LocalPosition: {x: 0, y: 0.6, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 499926452} + m_Father: {fileID: 1137758157} + m_RootOrder: 0 +--- !u!23 &1558950264 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2300012, guid: 7adf26d256267454bb6f9b55470051d7, + type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 1558950262} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 2100000, guid: b30447a543b0c4e6b9494c581702fd8c, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!33 &1558950265 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3360344, guid: 7adf26d256267454bb6f9b55470051d7, + type: 2} + m_PrefabInternal: {fileID: 1659204528} + m_GameObject: {fileID: 1558950262} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1001 &1659204528 Prefab: m_ObjectHideFlags: 0 @@ -501,6 +1052,7 @@ Prefab: objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} + m_RootGameObject: {fileID: 1137758149} m_IsPrefabParent: 0 --- !u!1 &1766741197 GameObject: @@ -574,166 +1126,10 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -50, y: 28.802422, z: -50} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 5 ---- !u!1 &1811928835 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 184014, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - m_PrefabInternal: {fileID: 2144495884} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1811928844} - - 114: {fileID: 1811928842} - - 114: {fileID: 1811928841} - - 114: {fileID: 1811928840} - - 114: {fileID: 1811928839} - - 114: {fileID: 1811928838} - - 114: {fileID: 1811928837} - - 114: {fileID: 1811928836} - - 114: {fileID: 1811928845} - m_Layer: 0 - m_Name: Manager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1811928836 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11453164, guid: 4314638711d1a4b3e897b98c105b4ed4, - type: 2} - m_PrefabInternal: {fileID: 2144495884} - m_GameObject: {fileID: 1811928835} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6bd63e17efd3d4a0ab163adbad18defc, type: 3} - m_Name: - m_EditorClassIdentifier: - Show: 0 - LeGridType: 0 - LeHeight: 0 - NodeSize: 0.5 ---- !u!114 &1811928837 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11476570, guid: 4314638711d1a4b3e897b98c105b4ed4, - type: 2} - m_PrefabInternal: {fileID: 2144495884} - m_GameObject: {fileID: 1811928835} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: da6c5ce8a0a0c4891b9f8fe26f885f34, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1811928838 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11428644, guid: 4314638711d1a4b3e897b98c105b4ed4, - type: 2} - m_PrefabInternal: {fileID: 2144495884} - m_GameObject: {fileID: 1811928835} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 000d295d6162e4e5194b36e39cea7b07, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1811928839 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11420808, guid: 4314638711d1a4b3e897b98c105b4ed4, - type: 2} - m_PrefabInternal: {fileID: 2144495884} - m_GameObject: {fileID: 1811928835} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0d542151ddc4cc34bb08012015d24a5a, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1811928840 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11431742, guid: 4314638711d1a4b3e897b98c105b4ed4, - type: 2} - m_PrefabInternal: {fileID: 2144495884} - m_GameObject: {fileID: 1811928835} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b0b21df5198d64e3ab298987b2d7ae5f, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1811928841 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11420564, guid: 4314638711d1a4b3e897b98c105b4ed4, - type: 2} - m_PrefabInternal: {fileID: 2144495884} - m_GameObject: {fileID: 1811928835} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f93a029202d4d4c998b30cb5eac761a9, type: 3} - m_Name: - m_EditorClassIdentifier: - _saverObject: {fileID: 357143948} - _savers: - - {fileID: 357143949} ---- !u!114 &1811928842 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11455526, guid: 4314638711d1a4b3e897b98c105b4ed4, - type: 2} - m_PrefabInternal: {fileID: 2144495884} - m_GameObject: {fileID: 1811928835} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 465e861767b9e445eafba76f21bd0dd4, type: 3} - m_Name: - m_EditorClassIdentifier: - _spawnCode: TestAgent - _spawnAmount: 2 ---- !u!4 &1811928844 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 456926, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - m_PrefabInternal: {fileID: 2144495884} - m_GameObject: {fileID: 1811928835} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 ---- !u!114 &1811928845 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1811928835} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbe97dbe0f420441287190b44c9fab15, type: 3} - m_Name: - m_EditorClassIdentifier: - _size: - x: 6553600 - y: 6553600 - _heightBounds: - x: 0 - y: 3276800 - _bottomLeft: - x: -3276800 - y: -3276800 - _interval: 32768 - _maps: - - _scanLayers: - serializedVersion: 2 - m_Bits: 256 - _map: - _width: 200 - _height: 200 - _innerArray: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + m_RootOrder: 3 --- !u!1 &2073655911 GameObject: m_ObjectHideFlags: 0 @@ -799,80 +1195,9 @@ Transform: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 2073655911} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -50, y: 0, z: -50} + m_LocalPosition: {x: -50, y: -2.22, z: -50} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 6 ---- !u!1001 &2144495884 -Prefab: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 456926, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 456926, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 456926, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 456926, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 456926, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 456926, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 456926, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 456926, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 11491364, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: _orderMarker - value: - objectReference: {fileID: 1217231139} - - target: {fileID: 184014, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: m_StaticEditorFlags - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 184014, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 11491364, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: selectionBoxStyle.m_Normal.m_Background - value: - objectReference: {fileID: 2800000, guid: cf288909315184c4fbbcba9dc5ecf697, type: 3} - - target: {fileID: 11420564, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: _saverObject - value: - objectReference: {fileID: 357143948} - - target: {fileID: 11420564, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: _savers.Array.data[0] - value: - objectReference: {fileID: 357143949} - - target: {fileID: 11455526, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - propertyPath: _spawnAmount - value: 2 - objectReference: {fileID: 0} - m_RemovedComponents: - - {fileID: 11491364, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - - {fileID: 0} - m_ParentPrefab: {fileID: 100100000, guid: 4314638711d1a4b3e897b98c105b4ed4, type: 2} - m_IsPrefabParent: 0 + m_RootOrder: 4 From 65fbcc602048c239f7258a0df197f80bb47eab51 Mon Sep 17 00:00:00 2001 From: Benjamin Berman Date: Fri, 10 Jun 2016 18:56:12 -0400 Subject: [PATCH 97/98] Fix effects for example --- Core/Game/Effects/EffectManager.cs | 1 + Database/Resources/Empty.prefab | 3 +- Database/Resources/EmptyEffect.prefab | 54 +++++++++++++++++++ Database/Resources/EmptyEffect.prefab.meta | 8 +++ .../ExampleDatabase/Example_Database.asset | 6 ++- Example/TestBullet.prefab | 13 +++-- 6 files changed, 79 insertions(+), 6 deletions(-) create mode 100644 Database/Resources/EmptyEffect.prefab create mode 100644 Database/Resources/EmptyEffect.prefab.meta diff --git a/Core/Game/Effects/EffectManager.cs b/Core/Game/Effects/EffectManager.cs index 62a5aca1..1b56ff1c 100644 --- a/Core/Game/Effects/EffectManager.cs +++ b/Core/Game/Effects/EffectManager.cs @@ -122,6 +122,7 @@ private static LSEffect GenEffect(string effectCode, int id = -1) FastStack pool; if (!EffectPool.TryGetValue(effectCode, out pool)) { + Debug.LogError(string.Format("Effect not found with code {0} in pool. Did you remember to add it to the Lockstep Database?", effectCode)); return null; } LSEffect effect = null; diff --git a/Database/Resources/Empty.prefab b/Database/Resources/Empty.prefab index 4a6291a8..8df04543 100644 --- a/Database/Resources/Empty.prefab +++ b/Database/Resources/Empty.prefab @@ -22,8 +22,9 @@ Transform: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 152766} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: .00999999978, y: .980000019, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 diff --git a/Database/Resources/EmptyEffect.prefab b/Database/Resources/EmptyEffect.prefab new file mode 100644 index 00000000..798ebe21 --- /dev/null +++ b/Database/Resources/EmptyEffect.prefab @@ -0,0 +1,54 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &152766 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 480028} + - 114: {fileID: 11423720} + m_Layer: 0 + m_Name: EmptyEffect + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &480028 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152766} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!114 &11423720 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152766} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1099df356bef4426908b9e979ad9339, type: 3} + m_Name: + m_EditorClassIdentifier: + defaultDuration: 0 +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 152766} + m_IsPrefabParent: 1 diff --git a/Database/Resources/EmptyEffect.prefab.meta b/Database/Resources/EmptyEffect.prefab.meta new file mode 100644 index 00000000..c4224e65 --- /dev/null +++ b/Database/Resources/EmptyEffect.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 375e2715adad54b21ba75951c35ebf8f +timeCreated: 1465599310 +licenseType: Pro +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Example/ExampleDatabase/Example_Database.asset b/Example/ExampleDatabase/Example_Database.asset index 876aea4e..83afabc9 100644 --- a/Example/ExampleDatabase/Example_Database.asset +++ b/Example/ExampleDatabase/Example_Database.asset @@ -34,7 +34,11 @@ MonoBehaviour: _description: _icon: {fileID: 0} _prefab: {fileID: 167620, guid: 479c1b29b5d8046428adaddf16b43ce8, type: 2} - _effectData: [] + _effectData: + - _name: Muzzle Ball + _description: + _icon: {fileID: 0} + _prefab: {fileID: 152766, guid: 375e2715adad54b21ba75951c35ebf8f, type: 2} _abilityData: - _name: Move _description: diff --git a/Example/TestBullet.prefab b/Example/TestBullet.prefab index 88f0b97f..13c5c420 100644 --- a/Example/TestBullet.prefab +++ b/Example/TestBullet.prefab @@ -27,6 +27,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 15.286378, y: -4.2496395, z: -15.54683} m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -74,23 +75,27 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 14e14365092354525b827ca9117ed940, type: 3} m_Name: m_EditorClassIdentifier: + Position: + x: 0 + y: 0 + z: 0 _speed: 1048576 _visualArc: 1 _delay: 0 _attachEndEffectToTarget: 0 - _endEffect: + _hitFX: CanRotate: 1 - _startEffect: Muzzle Ball + _startFX: Muzzle Ball IsActive: 0 UseEffects: 1 + RotateHitFX: 1 _canVisualize: 1 - _interpolationRate: 8 _exclusiveTargetType: 0 _targetingBehavior: 1 - _targetPlatform: 0 _hitBehavior: 0 _angle: 32768 _radius: 131072 + _lastingDuration: 0 --- !u!1001 &100100000 Prefab: m_ObjectHideFlags: 1 From 802b90cac97c9d6c780beaa39fe42b4f212022f5 Mon Sep 17 00:00:00 2001 From: Benjamin Berman Date: Fri, 10 Jun 2016 19:01:43 -0400 Subject: [PATCH 98/98] Deleting spurious cube in ExampleScene --- Example/ExampleScene.unity | 421 +------------------------------------ 1 file changed, 3 insertions(+), 418 deletions(-) diff --git a/Example/ExampleScene.unity b/Example/ExampleScene.unity index 29c69f98..701c12c2 100644 --- a/Example/ExampleScene.unity +++ b/Example/ExampleScene.unity @@ -135,85 +135,6 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 ---- !u!1 &499926451 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 143428, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} - m_PrefabInternal: {fileID: 1659204528} - serializedVersion: 4 - m_Component: - - 4: {fileID: 499926452} - - 33: {fileID: 499926455} - - 65: {fileID: 499926454} - - 23: {fileID: 499926453} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &499926452 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 422538, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 499926451} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.48} - m_LocalScale: {x: 0.5, y: 0.5, z: 0.6} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_Children: [] - m_Father: {fileID: 1558950263} - m_RootOrder: 0 ---- !u!23 &499926453 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 2347950, guid: 7adf26d256267454bb6f9b55470051d7, - type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 499926451} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: b30447a543b0c4e6b9494c581702fd8c, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &499926454 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 6514166, guid: 7adf26d256267454bb6f9b55470051d7, - type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 499926451} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &499926455 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 3365602, guid: 7adf26d256267454bb6f9b55470051d7, - type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 499926451} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &642488360 GameObject: m_ObjectHideFlags: 0 @@ -378,7 +299,7 @@ Transform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 5 --- !u!114 &642488371 MonoBehaviour: m_ObjectHideFlags: 0 @@ -674,199 +595,6 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 ---- !u!1 &1137758149 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 100310, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} - m_PrefabInternal: {fileID: 1659204528} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1137758157} - - 114: {fileID: 1137758156} - - 114: {fileID: 1137758155} - - 114: {fileID: 1137758154} - - 114: {fileID: 1137758153} - - 114: {fileID: 1137758152} - - 114: {fileID: 1137758151} - - 114: {fileID: 1137758150} - m_Layer: 0 - m_Name: TestAgent - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1137758150 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11447240, guid: 7adf26d256267454bb6f9b55470051d7, - type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 1137758149} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: cc61d323ede6e5c4e934b394d3ec5080, type: 3} - m_Name: - m_EditorClassIdentifier: - _maxHealth: 65536000 - _currentHealth: 0 ---- !u!114 &1137758151 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11479720, guid: 7adf26d256267454bb6f9b55470051d7, - type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 1137758149} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4525e3f8c8889d43a4d23626ea32d54, type: 3} - m_Name: - m_EditorClassIdentifier: - _cooldown: 0 - _projectileCode: TestBullet - _range: 786432 - _sight: 655360 - _damage: 65536 - _attackRate: 32 - _targetAllegiance: 4 - _trackAttackAngle: 1 - _attackAngle: 11380 - _projectileOffset: - x: 0 - y: 0 - z: 0 - _energyCost: 0 - _windup: 0 - _increasePriority: 1 - _projectileOrigin: {x: 0, y: 0, z: 1.273089} ---- !u!114 &1137758152 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11406140, guid: 7adf26d256267454bb6f9b55470051d7, - type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 1137758149} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f42d52091a614957912ec7da50c9027, type: 3} - m_Name: - m_EditorClassIdentifier: - _mapIndex: 0 - _bonusHeight: 0 ---- !u!114 &1137758153 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11425566, guid: 7adf26d256267454bb6f9b55470051d7, - type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 1137758149} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a7cc9ef18533c9f4c943ac00aab4efd7, type: 3} - m_Name: - m_EditorClassIdentifier: - _cooldown: 0 - Destination: - x: 0 - y: 0 - _canMove: 1 - _canTurn: 1 - _speed: 131072 - _acceleration: 65536 - _canPathfind: 0 - DrawPath: 1 ---- !u!114 &1137758154 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11439568, guid: 7adf26d256267454bb6f9b55470051d7, - type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 1137758149} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5573488627c5d4e2989d3c77cde5bfb6, type: 3} - m_Name: - m_EditorClassIdentifier: - _turnRate: - x: 64276 - y: 12785 ---- !u!114 &1137758155 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11485440, guid: 7adf26d256267454bb6f9b55470051d7, - type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 1137758149} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: db60e16922dd049ceb3f90f627871a31, type: 3} - m_Name: - m_EditorClassIdentifier: - _deathTime: 64 - _agentType: 0 - _globalID: 0 - _boxPriority: 0 - _selectionPriority: 0 - TypeIndex: 0 - Tag: 0 - _selectionRadius: 1 - _visualCenter: {fileID: 1137758157} - VisualPositionChanged: 0 ---- !u!114 &1137758156 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11487560, guid: 7adf26d256267454bb6f9b55470051d7, - type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 1137758149} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 53047ee8fe7aa8f429746c6b0e2b416a, type: 3} - m_Name: - m_EditorClassIdentifier: - _position: - x: 0 - y: 0 - _rotation: - x: 0 - y: 65536 - _heightPos: 0 - _velocity: - x: 0 - y: 0 - RealPoints: [] - Edges: [] - EdgeNorms: [] - PastGridXMin: 0 - PastGridXMax: 0 - PastGridYMin: 0 - PastGridYMax: 0 - _shape: 1 - _isTrigger: 0 - _layer: 0 - _halfWidth: 0 - _halfHeight: 0 - _radius: 32768 - _immovable: 0 - _basePriority: 0 - _vertices: [] - _height: 65536 - _positionalTransform: {fileID: 1137758157} - _rotationalTransform: {fileID: 1137758157} ---- !u!4 &1137758157 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 465378, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 1137758149} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_Children: - - {fileID: 1558950263} - m_Father: {fileID: 0} - m_RootOrder: 7 --- !u!1 &1198412247 GameObject: m_ObjectHideFlags: 0 @@ -944,73 +672,7 @@ Transform: m_Children: - {fileID: 705538423} m_Father: {fileID: 0} - m_RootOrder: 5 ---- !u!1 &1558950262 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 137230, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} - m_PrefabInternal: {fileID: 1659204528} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1558950263} - - 33: {fileID: 1558950265} - - 23: {fileID: 1558950264} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1558950263 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 450234, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 1558950262} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.6, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_Children: - - {fileID: 499926452} - m_Father: {fileID: 1137758157} - m_RootOrder: 0 ---- !u!23 &1558950264 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 2300012, guid: 7adf26d256267454bb6f9b55470051d7, - type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 1558950262} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: b30447a543b0c4e6b9494c581702fd8c, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &1558950265 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 3360344, guid: 7adf26d256267454bb6f9b55470051d7, - type: 2} - m_PrefabInternal: {fileID: 1659204528} - m_GameObject: {fileID: 1558950262} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} + m_RootOrder: 4 --- !u!1001 &1659204528 Prefab: m_ObjectHideFlags: 0 @@ -1052,84 +714,7 @@ Prefab: objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 7adf26d256267454bb6f9b55470051d7, type: 2} - m_RootGameObject: {fileID: 1137758149} m_IsPrefabParent: 0 ---- !u!1 &1766741197 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1766741201} - - 33: {fileID: 1766741200} - - 65: {fileID: 1766741199} - - 23: {fileID: 1766741198} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1766741198 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1766741197} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &1766741199 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1766741197} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1766741200 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1766741197} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1766741201 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1766741197} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -50, y: 28.802422, z: -50} - m_LocalScale: {x: 1, y: 1, z: 1} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 --- !u!1 &2073655911 GameObject: m_ObjectHideFlags: 0 @@ -1200,4 +785,4 @@ Transform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 3