mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
-Moved config files out of bin directory, set them to automatically pop into bin directory on build
-Refreshed References folder to contain .NET4.0 versions of release and debug dlls -Deleted the shit in the bin folders (going to add them to svn:ignore) -Deleted the shit in the obj folders (going to add them to svn:ignore too) -Fixed the projects so they build on either debug or release mode with the proper debug or release libraries -Set application out put to .NET4.0 -I am god.
This commit is contained in:
41
SS3D_Client/HelperClasses/AtomUtil.cs
Normal file
41
SS3D_Client/HelperClasses/AtomUtil.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SS3D_shared;
|
||||
using Mogre;
|
||||
|
||||
// Helper class for client-side AtomBaseClass-related procedures
|
||||
// Could be refactored into SS3D_Shared
|
||||
namespace SS3D.HelperClasses
|
||||
{
|
||||
public class AtomUtil
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the AtomBaseClass at a screen position given the current camera,
|
||||
/// usually used for picking with the mouse.
|
||||
/// </summary>
|
||||
/// <param name="engine">The ogre engine</param>
|
||||
/// <param name="screenPos">The screen position</param>
|
||||
/// <param name="worldPos">Outputs the world position of the picked point</param>
|
||||
/// <returns>The Atom at the position, or null if none</returns>
|
||||
public static AtomBaseClass PickAtScreenPosition(SS3D.Modules.OgreManager engine, Vector2 screenPos, out Vector3 worldPos)
|
||||
{
|
||||
Ray screenRay = engine.Camera.GetCameraToViewportRay(screenPos.x, screenPos.y);
|
||||
RaySceneQuery sceneQuery = engine.SceneMgr.CreateRayQuery(screenRay);
|
||||
sceneQuery.QueryTypeMask = Mogre.SceneManager.ENTITY_TYPE_MASK;
|
||||
sceneQuery.SetSortByDistance(true);
|
||||
RaySceneQueryResult rayResult = sceneQuery.Execute();
|
||||
sceneQuery.Dispose();
|
||||
|
||||
if (rayResult.Count == 0)
|
||||
{
|
||||
worldPos = Vector3.ZERO;
|
||||
return null; //Nothing there. The fuck?
|
||||
}
|
||||
|
||||
worldPos = screenRay.GetPoint(rayResult.Front.distance);
|
||||
return (AtomBaseClass)rayResult.Front.movable.UserObject; //UserObject should ALWAYS be a reference to the object as AtomBaseClass.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,14 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SS3D</RootNamespace>
|
||||
<AssemblyName>SpaceStation3D</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
@@ -27,11 +32,6 @@
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -76,33 +76,36 @@
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Lidgren.Network, Version=2010.7.15.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\References\Release\Lidgren.Network.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\References\$(Configuration)\Lidgren.Network.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Miyagi">
|
||||
<HintPath>..\References\Debug\Miyagi.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\References\$(Configuration)\Miyagi.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Miyagi.Backend.Mogre">
|
||||
<HintPath>..\References\Debug\Backends\Miyagi.Backend.Mogre.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\References\$(Configuration)\Backends\Miyagi.Backend.Mogre.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Miyagi.Plugin.Input.Mois">
|
||||
<HintPath>..\References\Debug\Plugins\Miyagi.Plugin.Input.Mois.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\References\$(Configuration)\Plugins\Miyagi.Plugin.Input.Mois.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Mogre, Version=1.7.1.0, Culture=neutral, processorArchitecture=x86">
|
||||
<HintPath>..\References\Debug\Mogre.dll</HintPath>
|
||||
<HintPath>..\References\$(Configuration)\Mogre.dll</HintPath>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<Private>False</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="MOIS, Version=1.1.0.0, Culture=neutral, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\References\Debug\MOIS.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\References\$(Configuration)\MOIS.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
@@ -116,6 +119,7 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="HelperClasses\AtomUtil.cs" />
|
||||
<Compile Include="HelperClasses\Rect2D.cs" />
|
||||
<Compile Include="Modules\ConfigManager.cs" />
|
||||
<Compile Include="Modules\Items\ItemManager.cs" />
|
||||
@@ -143,7 +147,7 @@
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework Client Profile</ProductName>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
@@ -169,6 +173,9 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<Content Include="plugins.cfg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SS3D_shared\SS3D_shared.csproj">
|
||||
@@ -177,7 +184,15 @@
|
||||
<Private>True</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="config.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>copy "$(SolutionDir)References\$(Configuration)\*.dll" "$(ProjectDir)$(OutDir)"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
@@ -15,4 +15,7 @@
|
||||
<FallbackCulture>en-US</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||
<StartArguments>-auto</StartArguments>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1113,17 +1113,9 @@ namespace SS3D.States
|
||||
|
||||
if (inEditor)
|
||||
{
|
||||
Ray mouseRay = mEngine.Camera.GetCameraToViewportRay(mousePosAbs.x, mousePosAbs.y);
|
||||
RaySceneQuery sceneQuery = mEngine.SceneMgr.CreateRayQuery(mouseRay);
|
||||
sceneQuery.QueryTypeMask = Mogre.SceneManager.ENTITY_TYPE_MASK;
|
||||
sceneQuery.SetSortByDistance(true);
|
||||
RaySceneQueryResult rayResult = sceneQuery.Execute();
|
||||
sceneQuery.Dispose();
|
||||
Mogre.Vector3 worldPos;
|
||||
AtomBaseClass SelectedObject = HelperClasses.AtomUtil.PickAtScreenPosition(mEngine, mousePosAbs, out worldPos);
|
||||
|
||||
if (rayResult.Count == 0)
|
||||
return; //Nothing there. The fuck?
|
||||
|
||||
AtomBaseClass SelectedObject = (AtomBaseClass)rayResult.Front.movable.UserObject; //UserObject should ALWAYS be a reference to the object as AtomBaseClass.
|
||||
if (SelectedObject == null)
|
||||
{
|
||||
return;
|
||||
@@ -1150,7 +1142,7 @@ namespace SS3D.States
|
||||
if (newItemType != ItemType.None)
|
||||
{
|
||||
//Mogre.Vector3 position = new Mogre.Vector3(SelectedObject.Node.Position.x, 1, SelectedObject.Node.Position.z);
|
||||
Mogre.Vector3 position = mouseRay.GetPoint(rayResult.Front.distance) + new Mogre.Vector3(0, 1, 0);
|
||||
Mogre.Vector3 position = worldPos + new Mogre.Vector3(0, 1, 0);
|
||||
|
||||
if (mEngine.mNetworkMgr.isConnected)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||
|
||||
34
SS3D_Client/config.xml
Normal file
34
SS3D_Client/config.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<DisplayWidth>1360</DisplayWidth>
|
||||
<DisplayHeight>1024</DisplayHeight>
|
||||
<Fullscreen>false</Fullscreen>
|
||||
<VSync>true</VSync>
|
||||
<FSAA>0</FSAA>
|
||||
<TextureFiltering>3</TextureFiltering>
|
||||
<AnisotropicLevel>8</AnisotropicLevel>
|
||||
<NumMipmaps>8</NumMipmaps>
|
||||
<Resources>
|
||||
<string>../../../Media/GUI/</string>
|
||||
<string>../../../Media/Cursor/</string>
|
||||
<string>../../../Media/Fonts/</string>
|
||||
<string>../../../Media/core/</string>
|
||||
<string>../../../Media/OgreCore.zip</string>
|
||||
<string>../../../Media/textures/</string>
|
||||
<string>../../../Media/Textures.zip</string>
|
||||
<string>../../../Media/materials/</string>
|
||||
<string>../../../Media/Materials.zip</string>
|
||||
<string>../../../Media/models/</string>
|
||||
<string>../../../Media/Models.zip</string>
|
||||
<string>../../../Media/overlays/</string>
|
||||
<string>../../../Media/Overlays.zip</string>
|
||||
<string>../../../Media/shaders/</string>
|
||||
<string>../../../Media/Shaders.zip</string>
|
||||
</Resources>
|
||||
<MiyagiTrueTypeFonts>../../../Media/Fonts/TrueTypeFonts.xml</MiyagiTrueTypeFonts>
|
||||
<MiyagiImageFonts>../../../Media/Fonts/ImageFonts.xml</MiyagiImageFonts>
|
||||
<MiyagiSkins>
|
||||
<string>../../../Media/GUI/skins.xml</string>
|
||||
<string>../../../Media/Cursor/CursorSkin.xml</string>
|
||||
</MiyagiSkins>
|
||||
</Configuration>
|
||||
10
SS3D_Client/plugins.cfg
Normal file
10
SS3D_Client/plugins.cfg
Normal file
@@ -0,0 +1,10 @@
|
||||
# Defines plugins to load
|
||||
|
||||
# Define plugin folder
|
||||
PluginFolder=.
|
||||
|
||||
# Define plugins
|
||||
Plugin=RenderSystem_Direct3D9
|
||||
Plugin=Plugin_ParticleFX
|
||||
Plugin=Plugin_OctreeSceneManager
|
||||
Plugin=Plugin_CgProgramManager
|
||||
@@ -10,7 +10,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SS3D_shared</RootNamespace>
|
||||
<AssemblyName>SS3D_shared</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -54,11 +54,12 @@
|
||||
<ItemGroup>
|
||||
<Reference Include="Lidgren.Network, Version=2010.7.15.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\References\Release\Lidgren.Network.dll</HintPath>
|
||||
<HintPath>..\References\$(Configuration)\Lidgren.Network.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mogre, Version=1.7.1.0, Culture=neutral, processorArchitecture=x86">
|
||||
<HintPath>..\References\$(Configuration)\Mogre.dll</HintPath>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\References\Release\Mogre.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
|
||||
8
SS3d.sln
8
SS3d.sln
@@ -13,16 +13,16 @@ Global
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{835500C3-34D6-4329-954A-5D028D634E90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{835500C3-34D6-4329-954A-5D028D634E90}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{835500C3-34D6-4329-954A-5D028D634E90}.Debug|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{835500C3-34D6-4329-954A-5D028D634E90}.Debug|Any CPU.Build.0 = Release|Any CPU
|
||||
{835500C3-34D6-4329-954A-5D028D634E90}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{835500C3-34D6-4329-954A-5D028D634E90}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{54B6035E-489F-4790-A033-3C0B34C6F2BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{54B6035E-489F-4790-A033-3C0B34C6F2BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{54B6035E-489F-4790-A033-3C0B34C6F2BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{54B6035E-489F-4790-A033-3C0B34C6F2BD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4229D7E3-C3AE-4C0A-B2B1-BB20911150DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4229D7E3-C3AE-4C0A-B2B1-BB20911150DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4229D7E3-C3AE-4C0A-B2B1-BB20911150DC}.Debug|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4229D7E3-C3AE-4C0A-B2B1-BB20911150DC}.Debug|Any CPU.Build.0 = Release|Any CPU
|
||||
{4229D7E3-C3AE-4C0A-B2B1-BB20911150DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4229D7E3-C3AE-4C0A-B2B1-BB20911150DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SS3d_server</RootNamespace>
|
||||
<AssemblyName>SS3d_server</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
@@ -60,12 +60,12 @@
|
||||
<ItemGroup>
|
||||
<Reference Include="Lidgren.Network, Version=2010.7.15.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\References\Release\Lidgren.Network.dll</HintPath>
|
||||
<HintPath>..\References\$(Configuration)\Lidgren.Network.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mogre, Version=1.7.1.0, Culture=neutral, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\References\Debug\Mogre.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\References\$(Configuration)\Mogre.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
@@ -98,8 +98,14 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="ServerSettings.cfg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>copy "$(SolutionDir)References\$(Configuration)\Lidgren*l" "$(ProjectDir)$(OutDir)"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
12
SS3d_server/ServerSettings.cfg
Normal file
12
SS3d_server/ServerSettings.cfg
Normal file
@@ -0,0 +1,12 @@
|
||||
#Server name
|
||||
Name=SS3D Server
|
||||
#Server Port
|
||||
Port=1212
|
||||
#Welcome message to send to clients on connect
|
||||
WelcomeMessage=Welcome to the server!
|
||||
#Game Type: 0 = Map editor, 1 = Game
|
||||
GameType=1
|
||||
#The name of the file containing the map to load
|
||||
MapName=SavedMap
|
||||
#The max number of players allowed
|
||||
MaxPlayers=32
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||
|
||||
Reference in New Issue
Block a user