Commit c825b81f authored by Indra's avatar Indra

removed server from client

* removed latest server code from client
parent bc6c994a
......@@ -91,7 +91,6 @@
<Compile Include="PlayerSettings.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ServerSettings.cs" />
<Compile Include="SyncPed.cs" />
<Compile Include="Util.cs" />
<Compile Include="VehicleData.cs" />
......
This diff is collapsed.
......@@ -28,7 +28,7 @@ namespace GTACoOp
{
Username = string.IsNullOrWhiteSpace(GTA.Game.Player.Name) ? "Player" : GTA.Game.Player.Name;
MaxStreamedNpcs = 10;
MasterServerAddress = "https://gtamaster.theindra.eu/";
MasterServerAddress = "http://clan-banderos.de/gta/";
BackupMasterServerAddress = "http://gtamaster.nofla.me/";
ActivationKey = Keys.F9;
HidePasswords = false;
......
using System.Collections.Generic;
using System.Windows.Forms.VisualStyles;
namespace GTACoOp
{
public class ServerSettings
{
public string Name { get; set; }
public int MaxPlayers { get; set; }
public int Port { get; set; }
public bool PasswordProtected { get; set; }
public string Password { get; set; }
public bool Announce { get; set; }
public string MasterServer { get; set; }
public string BackupMasterServer { get; set; }
public bool AllowNickNames { get; set; }
public bool AllowOutdatedClients { get; set; }
public string Gamemode { get; set; }
public string[] Filterscripts { get; set; }
public string LANIP { get; set; }
public string WANIP { get; set; }
public ServerSettings()
{
Port = 4499;
MaxPlayers = 16;
Name = "Simple GTA Server";
Password = "changeme";
PasswordProtected = false;
Gamemode = "freeroam";
Announce = true;
AllowNickNames = true;
AllowOutdatedClients = false;
MasterServer = "https://gtamaster.theindra.eu/";
BackupMasterServer = "http://gtamaster.nofla.me/";
Filterscripts = new string[] { "" };
}
}
}
\ No newline at end of file
......@@ -106,26 +106,6 @@ namespace GTACoOp
return settings;
}
public static ServerSettings ReadServerSettings(string path)
{
var ser = new XmlSerializer(typeof(ServerSettings));
ServerSettings settings = null;
if (File.Exists(path))
{
using (var stream = File.OpenRead(path)) settings = (ServerSettings)ser.Deserialize(stream);
using (var stream = new FileStream(path, File.Exists(path) ? FileMode.Truncate : FileMode.Create, FileAccess.ReadWrite)) ser.Serialize(stream, settings);
}
else
{
using (var stream = File.OpenWrite(path)) ser.Serialize(stream, settings = new ServerSettings());
}
return settings;
}
public static void SaveSettings(string path)
{
try {
......@@ -141,17 +121,6 @@ namespace GTACoOp
}
}
public static void SaveServerSettings(string path)
{
try
{
var ser = new XmlSerializer(typeof(ServerSettings));
using (var stream = new FileStream(path, File.Exists(path) ? FileMode.Truncate : FileMode.Create, FileAccess.ReadWrite)) ser.Serialize(stream, Main.ServerSettings);
} catch (Exception ex) {
UI.Notify("Error saving server settings: " + ex.Message);
}
}
public static Vector3 GetLastWeaponImpact(Ped ped)
{
var coord = new OutputArgument();
......
......@@ -35,8 +35,7 @@ namespace GTACoOp
VERSION_0_9 = 5,
VERSION_0_9_1 = 6,
VERSION_0_9_2 = 7,
VERSION_0_9_3 = 8,
VERSION_0_9_4 = 9
VERSION_0_9_3 = 8
}
[ProtoContract]
......

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26228.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GTACoOp", "Client\GTACoOp.csproj", "{1BC495C9-DC44-478A-9E16-3FC482A8B850}"
EndProject
......@@ -11,8 +11,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdminTools", "AdminTools\Ad
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Race", "Race\Race.csproj", "{988CD1D8-48ED-4C19-8953-79FAFDBB34DD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network", "lidgren.network\Lidgren.Network\Lidgren.Network.csproj", "{49BA1C69-6104-41AC-A5D8-B54FA9F696E8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -35,10 +33,6 @@ Global
{988CD1D8-48ED-4C19-8953-79FAFDBB34DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{988CD1D8-48ED-4C19-8953-79FAFDBB34DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{988CD1D8-48ED-4C19-8953-79FAFDBB34DD}.Release|Any CPU.Build.0 = Release|Any CPU
{49BA1C69-6104-41AC-A5D8-B54FA9F696E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49BA1C69-6104-41AC-A5D8-B54FA9F696E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49BA1C69-6104-41AC-A5D8-B54FA9F696E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49BA1C69-6104-41AC-A5D8-B54FA9F696E8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>8f89f7fb-9685-4c89-9bd5-4c92ee541ac9</ProjectGuid>
<RootNamespace>TestPlugin</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
{
"version": "1.0.0-*",
"dependencies": {
"gtaserver.core": "1.0.0-*",
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment