Skip to content

Commit

Permalink
WIP10 v0.518
Browse files Browse the repository at this point in the history
  • Loading branch information
ozonexo3 committed May 8, 2018
1 parent 518840e commit a5b9505
Show file tree
Hide file tree
Showing 22 changed files with 1,067 additions and 179 deletions.
2 changes: 1 addition & 1 deletion Assembly-CSharp-Editor-firstpass.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Temp\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_1_0;UNITY_2018_1;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_IL2CPP;NET_4_6;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_3D;USE_KOPILUA;LUA_CORE;CATCH_EXCEPTIONS;ENABLE_MONO</DefineConstants>
<DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_1_0;UNITY_2018_1;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_3D;USE_KOPILUA;LUA_CORE;CATCH_EXCEPTIONS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn>
Expand Down
3 changes: 2 additions & 1 deletion Assets/Editor/BuildWithResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public static void BuildSettings64()

string[] levels = new string[] { "Assets/MapEditor.unity" };

PlayerSettings.SetScriptingBackend(BuildTargetGroup.Standalone, ScriptingImplementation.IL2CPP);
//PlayerSettings.SetScriptingBackend(BuildTargetGroup.Standalone, ScriptingImplementation.IL2CPP);
PlayerSettings.SetScriptingBackend(BuildTargetGroup.Standalone, ScriptingImplementation.Mono2x);
BuildPipeline.BuildPlayer(levels, path + "/FAForeverMapEditor.exe", BuildTarget.StandaloneWindows64, (BuildOptions.CompressWithLz4HC));

// Copy structure files
Expand Down
67 changes: 34 additions & 33 deletions Assets/MapEditor.unity
Original file line number Diff line number Diff line change
Expand Up @@ -37195,7 +37195,7 @@ Camera:
serializedVersion: 2
m_Bits: 2560
m_RenderingPath: 1
m_TargetTexture: {fileID: 918867212}
m_TargetTexture: {fileID: 1638597788}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
Expand Down Expand Up @@ -62016,37 +62016,6 @@ MonoBehaviour:
type: 2}
m_PrefabInternal: {fileID: 917032096}
m_Script: {fileID: 11500000, guid: 8c60df5520bfea740b1f3db0c3478272, type: 3}
--- !u!84 &918867212
RenderTexture:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_Width: 256
m_Height: 256
m_AntiAliasing: 1
m_DepthFormat: 1
m_ColorFormat: 0
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
--- !u!1 &920728585
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -89712,6 +89681,7 @@ MonoBehaviour:
SaveLuaHeader: {fileID: 4900000, guid: 5368258e2ff473249b819becae8bdd91, type: 3}
SaveLuaFooter: {fileID: 4900000, guid: b1332c5a2fe8f05459462cad7daf3b77, type: 3}
DefaultScript: {fileID: 4900000, guid: 72b107c7fd14a424890fc680054706ae, type: 3}
AdaptiveScript: {fileID: 4900000, guid: 2ade02f91319ce54487311f60f2e3c11, type: 3}
HeightmapControler: {fileID: 1334852568}
EditMenu: {fileID: 1559365572}
History: {fileID: 1917036355}
Expand All @@ -89720,7 +89690,7 @@ MonoBehaviour:
ScenarioFileName:
Background: {fileID: 1320305011}
InfoPopup: {fileID: 503630892}
ErrorPopup: {fileID: 0}
ErrorPopup: {fileID: 1845082475}
PropsMenu: {fileID: 703931132}
DecalsMenu: {fileID: 943940807}
MapCenterPoint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -110706,6 +110676,37 @@ RectTransform:
m_PrefabParentObject: {fileID: 224245749221985618, guid: b9c991c271c736249a3262b1b5a7d7d4,
type: 2}
m_PrefabInternal: {fileID: 1638252513}
--- !u!84 &1638597788
RenderTexture:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_Width: 256
m_Height: 256
m_AntiAliasing: 1
m_DepthFormat: 1
m_ColorFormat: 0
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
--- !u!1 &1642348278
GameObject:
m_ObjectHideFlags: 0
Expand Down
Binary file modified Assets/MapEditor/LightingData.asset
Binary file not shown.
15 changes: 12 additions & 3 deletions Assets/Scripts/Camera/CameraControler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void Awake(){
const float CameraMinOffset = 0.5f;

//float MaxY = 100;
public void RestartCam(){
public void RestartCam(bool NoRect = false){
if(!Terrain.activeTerrain) return;
Pos = Vector3.zero + Vector3.right * MapSize / 20.0f - Vector3.forward * MapSize / 20.0f;
Pos.y = Terrain.activeTerrain.SampleHeight(Pos);
Expand All @@ -58,13 +58,22 @@ public void RestartCam(){
PanOffsetX = Vector3.zero;
PanOffsetZ = Vector3.zero;

UpdateRect();
UpdateRect(NoRect);
}

public void UpdateRect()
public void UpdateRect(bool NoRect = false)
{
float RemoveCamPropHeight = 30f / (float)Screen.height;
float RemoveCamPropWidth = 309f / (float)Screen.width;

if (NoRect)
{
RemoveCamPropHeight = 0;
RemoveCamPropWidth = 0;
}



Cam.rect = new Rect(RemoveCamPropWidth, 0, 1 - RemoveCamPropWidth, 1 - RemoveCamPropHeight);

LastWidth = Screen.width;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ private void DrawDeferredDecals_Albedo(Camera cam)
}
}

public static int CutoffMultiplier = 1;

private void DrawDeferredDecals_AlbedoInstanced(Camera cam)
{
_bufferDeferred.SetRenderTarget(_albedoRenderTarget, BuiltinRenderTextureType.CameraTarget);
Expand Down Expand Up @@ -101,7 +103,7 @@ private void DrawDeferredDecals_AlbedoInstanced(Camera cam)
{
_matrices[n] = decal.tr.localToWorldMatrix;
_NearCutOffLODValues[n] = decal.NearCutOff;
_CutOffLODValues[n] = decal.CutOff;
_CutOffLODValues[n] = decal.CutOff * CutoffMultiplier;
++n;

if (n == 1023)
Expand Down Expand Up @@ -196,7 +198,7 @@ private void DrawDeferredDecals_Normal(Camera cam)
{
// Instanced drawing
_matrices[n] = decal.tr.localToWorldMatrix;
_CutOffLODValues[n] = decal.CutOff;
_CutOffLODValues[n] = decal.CutOff * CutoffMultiplier;
_NearCutOffLODValues[n] = decal.NearCutOff;
++n;

Expand Down Expand Up @@ -224,7 +226,7 @@ private void DrawDeferredDecals_Normal(Camera cam)

_bufferDeferred.SetRenderTarget(_normalRenderTarget, BuiltinRenderTextureType.CameraTarget);
_directBlock.Clear();
_directBlock.SetFloat("_NearCutOffLOD", decal.NearCutOff);
_directBlock.SetFloat("_NearCutOffLOD", decal.NearCutOff * CutoffMultiplier);
_directBlock.SetFloat("_CutOffLOD", decal.CutOff);

_bufferDeferred.DrawMesh(_cubeMesh, decal.tr.localToWorldMatrix, material, 0, 1, _directBlock);
Expand Down
6 changes: 1 addition & 5 deletions Assets/Scripts/HazardX SCMAP Code/Prop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public partial class Prop
public Vector3 RotationZ;
public Vector3 Scale;

private static Vector3 V1 = new Vector3(1f, 1f, 1f);
public void Load(BinaryReader Stream)
{
BlueprintPath = Stream.ReadStringNull();
Expand All @@ -26,7 +25,6 @@ public void Load(BinaryReader Stream)
RotationY = Stream.ReadVector3();
RotationZ = Stream.ReadVector3();
Scale = Stream.ReadVector3();
// scale (unused)
}

public void Save(BinaryWriter Stream)
Expand All @@ -36,8 +34,6 @@ public void Save(BinaryWriter Stream)
Stream.Write(RotationX);
Stream.Write(RotationY);
Stream.Write(RotationZ);
Stream.Write(V1);
// scale (unused)
Stream.Write(Scale);
}

}
5 changes: 0 additions & 5 deletions Assets/Scripts/HazardX SCMAP Code/Prop_Instance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ public void Bake()
if (!BlueprintPath.StartsWith("/"))
BlueprintPath = "/" + BlueprintPath;

//if (BlueprintPath.StartsWith("/maps"))
// BlueprintPath = BlueprintPath.Remove(0, 1);

//Debug.Log("PropPath: " + BlueprintPath);

Position = ScmapEditor.WorldPosToScmap(Obj.Tr.position);

RotationX = Vector3.zero;
Expand Down
Loading

0 comments on commit a5b9505

Please sign in to comment.