Compare commits

..

No commits in common. "main" and "v4.0s2" have entirely different histories.
main ... v4.0s2

354 changed files with 782 additions and 834 deletions

3
.gitignore vendored
View File

@ -1,3 +0,0 @@
marsxplr_build/
waf*/
.lock-waf*

View File

@ -1,35 +0,0 @@
## Assembly - CSharp - first pass
import os
import shutil
def post(bld):
global outdir
global out
newout = os.path.join(outdir, 'Assembly - CSharp - first pass.dll')
if os.path.exists(out):
shutil.move(out, newout)
def build(bld):
level = bld.path.abspath()
SOURCES = \
os.path.join(level, 'Properties', 'AssemblyInfo.cs') + ' ' + \
os.path.join(level, '*.cs')
global outdir
outdir = os.path.join(bld.env.MBUILD, 'Mars Explorer_Data')
if not os.path.exists(outdir):
os.makedirs(outdir)
global out
out = os.path.join(outdir, '26998b3a9cbf54825a27e5f2d3cc4df1.dll')
bld.env.REF_AsmCSfp = out
bld(rule='\"${MCS}\" ' +
SOURCES +
' -out:\"' + out +
'\" -sdk:' + bld.env.MONOSDK +
' -langversion:' + bld.env.MONOLANGVERSION +
' -target:library'
' -reference:\"' + bld.env.REF_UnityEngine + '\"')
bld.add_post_fun(post)

View File

@ -1,35 +0,0 @@
## Assembly - CSharp
import os
import shutil
def post(bld):
global outdir
global out
newout = os.path.join(outdir, 'Assembly - CSharp.dll')
if os.path.exists(out):
shutil.move(out, newout)
def build(bld):
bld.add_post_fun(post)
level = bld.path.abspath()
SOURCES = \
os.path.join(level, 'Properties', 'AssemblyInfo.cs') + ' ' + \
os.path.join(level, '*.cs')
global outdir
outdir = os.path.join(bld.env.MBUILD, 'Mars Explorer_Data')
if not os.path.exists(outdir):
os.makedirs(outdir)
global out
out = os.path.join(outdir, 'e36192721fc364533a8edf2aefd3b72c.dll')
bld(rule='\"${MCS}\" ' +
SOURCES +
' -out:\"' + out +
'\" -sdk:' + bld.env.MONOSDK +
' -langversion:' + bld.env.MONOLANGVERSION +
' -target:library'
' -reference:\"' +
bld.env.REF_UnityEngine + '\",\"' + bld.env.REF_AsmCSfp + '\"')

View File

@ -1,115 +0,0 @@
using System;
public class SemVer
{
public byte maj;
public byte min;
public byte patch;
public SemVer(byte mj, byte mn, byte pt)
{
maj = mj;
min = mn;
patch = pt;
}
public SemVer(byte mj, byte mn)
{
maj = mj;
min = mn;
patch = 0;
}
public SemVer(byte mj)
{
maj = mj;
min = 0;
patch = 0;
}
public SemVer(String str)
{
SemVer sv = SemVer.Parse(str);
maj = sv.maj;
min = sv.min;
patch = sv.patch;
}
public static bool operator ==(SemVer a, SemVer b)
{
return (
a.maj == b.maj &&
a.min == b.min &&
a.patch == b.patch);
}
public static bool operator !=(SemVer a, SemVer b)
{
return (
a.maj != b.maj ||
a.min != b.min ||
a.patch != b.patch);
}
public static bool operator >(SemVer a, SemVer b)
{
return a.maj > b.maj ? true :
a.min > b.min ? true :
a.patch > b.patch ? true :
false;
}
public static bool operator >=(SemVer a, SemVer b)
{
return a.maj >= b.maj ? true :
a.min >= b.min ? true :
a.patch >= b.patch ? true :
false;
}
public static bool operator <=(SemVer a, SemVer b)
{
return b > a;
}
public static bool operator <(SemVer a, SemVer b)
{
return b >= a;
}
public override string ToString()
{
if (patch == 0) return maj.ToString() + "." + min.ToString();
return maj.ToString() + "." + min.ToString() + "." + patch.ToString();
}
public static SemVer Parse(String str)
{
String[] sv = str.Split("."[0]);
if (sv.Length == 3) return new SemVer(
byte.Parse(sv[0]),
byte.Parse(sv[1]),
byte.Parse(sv[2]));
if (sv.Length == 2) return new SemVer(
byte.Parse(sv[0]),
byte.Parse(sv[1]));
if (sv.Length == 1) return new SemVer(
byte.Parse(sv[0]));
throw new FormatException();
}
public override int GetHashCode()
{
return maj.GetHashCode() ^ (min.GetHashCode() << 2) ^ (patch.GetHashCode() >> 2);
}
public override bool Equals(object other)
{
if (!(other is SeaData)) return false;
SemVer osv = (SemVer)other;
return (
osv.maj == maj &&
osv.min == min &&
osv.patch == patch);
}
}

View File

@ -1,36 +0,0 @@
## Assembly - UnityScript
import os
import shutil
def post(bld):
global outdir
global out
newout = os.path.join(outdir, 'Assembly - UnityScript.dll')
if os.path.exists(out):
shutil.move(out, newout)
def build(bld):
level = bld.path.abspath()
SOURCES = \
os.path.join(level, 'Properties', 'AssemblyInfo.cs') + ' ' + \
os.path.join(level, 'CompilerGenerated', 'GUIAdaptor.cs') + ' ' + \
os.path.join(level, '*.cs')
global outdir
outdir = os.path.join(bld.env.MBUILD, 'Mars Explorer_Data')
if not os.path.exists(outdir):
os.makedirs(outdir)
global out
out = os.path.join(outdir, '58cc2f0ae478d40e7a89c7ba576c3586.dll')
bld(rule='\"${MCS}\" ' +
SOURCES +
' -out:\"' + out +
'\" -sdk:' + bld.env.MONOSDK +
' -langversion:' + bld.env.MONOLANGVERSION +
' -target:library'
' -reference:\"' +
bld.env.REF_UnityEngine + '\",\"' +
bld.env.REF_AsmCSfp + '\"',)
bld.add_post_fun(post)

41
Game/.gitignore vendored Normal file
View File

@ -0,0 +1,41 @@
Assembly - UnityScript/obj/
Assembly - UnityScript/bin/
Assembly - UnityScript/.vs/
Assembly - UnityScript/Assembly---UnityScript.suo
Assembly - CSharp - first pass/obj/
Assembly - CSharp - first pass/bin/
Assembly - CSharp - first pass/.vs/
Assembly - CSharp - first pass/Assembly---CSharp---first-pass.suo
Assembly - CSharp/obj/
Assembly - CSharp/bin/
Assembly - CSharp/.vs/
Assembly - CSharp/Assembly---CSharp.suo
Assembly - UnityScript - first pass/obj/
Assembly - UnityScript - first pass/bin/
Assembly - UnityScript - first pass/.vs/
Assembly - UnityScript - first pass/Assembly---UnityScript---first-pass.suo
Ionic.Zlib/obj/
Ionic.Zlib/bin/
Ionic.Zlib/.vs/
Ionic.Zlib/Ionic.Zlib.suo
TerrainControllerData/obj/
TerrainControllerData/bin/
TerrainControllerData/.vs/
TerrainControllerData/TerrainControllerData.suo
marsxplr_build/
UnityEngine/obj/
UnityEngine/bin/
UnityEngine/.vs/
UnityEngine/UnityEngine.suo
Boo.Lang/obj/
Boo.Lang/bin/
Boo.Lang/.vs/
Boo.Lang/Boo.Lang.suo
UnityScript.Lang/obj/
UnityScript.Lang/bin/
UnityScript.Lang/.vs/
UnityScript.Lang/UnityScript.Lang.suo
UnityDomainLoad/obj/
UnityDomainLoad/bin/
UnityDomainLoad/.vs/
UnityDomainLoad/UnityDomainLoad.suo

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Assembly - CSharp - first pass</RootNamespace>
<AssemblyName>26998b3a9cbf54825a27e5f2d3cc4df1</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<ProjectGuid>{93A8D6B3-DD52-4C21-A101-AF360DAFC096}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<OutputPath>bin</OutputPath>
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="UnityEngine">
<HintPath>..\UnityEngine\bin\UnityEngine.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ActivateTrigger.cs" />
<Compile Include="BlurEffect.cs" />
<Compile Include="ColorCorrectionEffect.cs" />
<Compile Include="CombineChildren.cs" />
<Compile Include="ContrastStretchEffect.cs" />
<Compile Include="EdgeDetectEffect.cs" />
<Compile Include="GlowEffect.cs" />
<Compile Include="GrayscaleEffect.cs" />
<Compile Include="ImageEffectBase.cs" />
<Compile Include="ImageEffects.cs" />
<Compile Include="MeshCombineUtility.cs" />
<Compile Include="MotionBlur.cs" />
<Compile Include="MouseLook.cs" />
<Compile Include="NoiseEffect.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SepiaToneEffect.cs" />
<Compile Include="SSAOEffect.cs" />
<Compile Include="TwirlEffect.cs" />
<Compile Include="VortexEffect.cs" />
<Compile Include="Water.cs" />
<Compile Include="WaterSimple.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Assembly - CSharp</RootNamespace>
<AssemblyName>e36192721fc364533a8edf2aefd3b72c</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<OutputPath>bin</OutputPath>
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="UnityEngine">
<HintPath>..\UnityEngine\bin\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="26998b3a9cbf54825a27e5f2d3cc4df1">
<HintPath>..\Assembly - CSharp - first pass\bin\26998b3a9cbf54825a27e5f2d3cc4df1.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="*.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Assembly - UnityScript</RootNamespace>
<AssemblyName>58cc2f0ae478d40e7a89c7ba576c3586</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<ProjectGuid>{084E81A6-3376-4976-B642-4C6443C97C36}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<OutputPath>bin</OutputPath>
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="UnityEngine">
<HintPath>..\UnityEngine\bin\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="26998b3a9cbf54825a27e5f2d3cc4df1">
<HintPath>..\Assembly - CSharp - first pass\bin\26998b3a9cbf54825a27e5f2d3cc4df1.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="BaseSimple.cs" />
<Compile Include="Buggy.cs" />
<Compile Include="CameraVehicle.cs" />
<Compile Include="ColliderAtach.cs" />
<Compile Include="CompilerGeneratedExtensions.cs" />
<Compile Include="CompilerGenerated\GUIAdaptor.cs" />
<Compile Include="CustomCursor.cs" />
<Compile Include="EntryPoint.cs" />
<Compile Include="FloorController.cs" />
<Compile Include="Game.cs" />
<Compile Include="GameData.cs" />
<Compile Include="GameWorldDesc.cs" />
<Compile Include="Hovercraft.cs" />
<Compile Include="HoverThrustClustOfDust.cs" />
<Compile Include="HoverThrustMoonOrBust.cs" />
<Compile Include="Init.cs" />
<Compile Include="Jet.cs" />
<Compile Include="JetThruster.cs" />
<Compile Include="JumpPoint.cs" />
<Compile Include="Lobby.cs" />
<Compile Include="LobbyDecor.cs" />
<Compile Include="LobbyStarfield.cs" />
<Compile Include="MeshSerializer.cs" />
<Compile Include="Messaging.cs" />
<Compile Include="MiniMap.cs" />
<Compile Include="MonoBehaviourScript.cs" />
<Compile Include="PrefabHere.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RamoSphere.cs" />
<Compile Include="Rocket.cs" />
<Compile Include="SeaData.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Skidmarks.cs" />
<Compile Include="SoundEffect.cs" />
<Compile Include="Tank.cs" />
<Compile Include="TankMe.cs" />
<Compile Include="TankTrack.cs" />
<Compile Include="TankTrackSimple.cs" />
<Compile Include="TerrainController.cs" />
<Compile Include="ThrustCone.cs" />
<Compile Include="Vehicle.cs" />
<Compile Include="VehicleBot.cs" />
<Compile Include="VehicleData.cs" />
<Compile Include="VehicleLocal.cs" />
<Compile Include="VehicleMe.cs" />
<Compile Include="VehicleNet.cs" />
<Compile Include="VehicleTrigger.cs" />
<Compile Include="WaterLightmapFog.cs" />
<Compile Include="WhirldData.cs" />
<Compile Include="WhirldIn.cs" />
<Compile Include="WhirldLibrary.cs" />
<Compile Include="WhirldLOD.cs" />
<Compile Include="WhirldObject.cs" />
<Compile Include="World.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -9,7 +9,7 @@ public class BaseSimple : MonoBehaviour
public void Start() public void Start()
{ {
mat = GetComponent<MeshRenderer>().material; mat = (Material)((MeshRenderer)this.GetComponent(typeof(MeshRenderer))).material;
Vector3 mts = mat.mainTextureScale; Vector3 mts = mat.mainTextureScale;
mts.x = 1; mts.x = 1;
mts.y = 0.1f; mts.y = 0.1f;
@ -22,9 +22,7 @@ public class BaseSimple : MonoBehaviour
0.5f, 0.5f,
Mathf.Min( Mathf.Min(
10, 10,
Vector3.Distance( Vector3.Distance(transform.position, Camera.main.transform.position) / 10f
transform.position,
Camera.main.transform.position) / 10f
) )
); );
@ -43,15 +41,13 @@ public class BaseSimple : MonoBehaviour
mto.x--; mto.x--;
} }
if (upMode) if(upMode)
{ {
mto.y += Time.deltaTime * 0.1f; mto.y += Time.deltaTime * 0.1f;
if (mto.y > 0.6f) upMode = false; if(mto.y < 0.4f)
}
else
{ {
mto.y -= Time.deltaTime * 0.1f; upMode = true;
if (mto.y < 0.4f) upMode = true; }
} }
mat.mainTextureOffset = mto; mat.mainTextureOffset = mto;
} }

View File

@ -35,7 +35,7 @@ public class Buggy : MonoBehaviour
private Transform[] bouyancyPoints; private Transform[] bouyancyPoints;
private float suspensionRange; private float suspensionRange;
private float friction; private float friction;
// /*UNUSED*/ private float[] realComp; private float[] realComp;
private float[] hitDistance; private float[] hitDistance;
private float[] hitCompress; private float[] hitCompress;
private float[] hitFriction; private float[] hitFriction;
@ -51,7 +51,7 @@ public class Buggy : MonoBehaviour
//Drivetrain Data //Drivetrain Data
private float motorTorque; private float motorTorque;
private float motorSpeed; private float motorSpeed;
// /*UNUSED*/ private float motorSpd; private float motorSpd;
private float motorInputSmoothed; private float motorInputSmoothed;
private float wheelRadius; private float wheelRadius;
private float wheelCircumference; private float wheelCircumference;
@ -66,7 +66,7 @@ public class Buggy : MonoBehaviour
wingState = 0f; wingState = 0f;
//wingFlaps = 0; //wingFlaps = 0;
isInverted = false; isInverted = false;
//realComp = new float[4]; realComp = new float[4];
hitDistance = new float[4]; hitDistance = new float[4];
hitCompress = new float[4]; hitCompress = new float[4];
hitFriction = new float[4]; hitFriction = new float[4];
@ -76,7 +76,7 @@ public class Buggy : MonoBehaviour
wheelMarkIndex = new int[4]; wheelMarkIndex = new int[4];
isDynamic = false; isDynamic = false;
motorSpeed = 0f; motorSpeed = 0f;
//motorSpd = 0f; motorSpd = 0f;
motorInputSmoothed = 0f; motorInputSmoothed = 0f;
wheelRadius = 0.3f; wheelRadius = 0.3f;
wheelCircumference = wheelRadius * (float)Math.PI * 2f; wheelCircumference = wheelRadius * (float)Math.PI * 2f;
@ -188,7 +188,7 @@ public class Buggy : MonoBehaviour
leftTrail.localPosition = localPosition; leftTrail.localPosition = localPosition;
localPosition = rightTrail.localPosition; localPosition = rightTrail.localPosition;
localPosition.x = 0; float num4 = (localPosition.x = 0);
rightTrail.localPosition = localPosition; rightTrail.localPosition = localPosition;
wingState = 0f; wingState = 0f;
@ -588,7 +588,7 @@ public class Buggy : MonoBehaviour
); );
//motorSpeed += -motorSpeed * motorDrag / motorTorque * Time.fixedDeltaTime; //motorSpeed += -motorSpeed * motorDrag / motorTorque * Time.fixedDeltaTime;
} }
//motorSpd = (frictionTotal - Game.Settings.buggyPower * 3) / (Game.Settings.buggyPower * 3 / Game.Settings.buggySpeed); motorSpd = (frictionTotal - Game.Settings.buggyPower * 3) / (Game.Settings.buggyPower * 3 / Game.Settings.buggySpeed);
wheelsAreTouchingGround = true; wheelsAreTouchingGround = true;
isDynamic = ( isDynamic = (

View File

@ -23,8 +23,6 @@ public class CameraVehicle : MonoBehaviour
public GlowEffect glowEffect; public GlowEffect glowEffect;
public ColorCorrectionEffect colorEffect; public ColorCorrectionEffect colorEffect;
public float worldTime; public float worldTime;
public GameObject camTarget;
public Vehicle camTargetVeh;
public CameraVehicle() public CameraVehicle()
{ {
@ -58,18 +56,6 @@ public class CameraVehicle : MonoBehaviour
return; return;
} }
//QuarryCam
camTarget = Game.Player;
camTargetVeh = Game.PlayerVeh;
if (
Game.Settings.quarryCam &&
(bool)Game.QuarryVeh &&
(bool)Game.QuarryVeh.ridePos)
{
camTarget = Game.QuarryVeh.gameObject;
camTargetVeh = Game.QuarryVeh;
}
//Blur //Blur
if (mb.enabled) if (mb.enabled)
{ {
@ -84,7 +70,7 @@ public class CameraVehicle : MonoBehaviour
if (Game.Settings.useHypersound == 1) if (Game.Settings.useHypersound == 1)
{ {
Game.Settings.gameMusic.pitch = Mathf.Clamp( Game.Settings.gameMusic.pitch = Mathf.Clamp(
-0.5f + camTarget.rigidbody.velocity.magnitude / 15f, -0.5f + Game.Player.rigidbody.velocity.magnitude / 15f,
0.8f, 0.8f,
1.5f 1.5f
); );
@ -147,10 +133,10 @@ public class CameraVehicle : MonoBehaviour
arrow.rotation = Quaternion.Lerp( arrow.rotation = Quaternion.Lerp(
arrow.rotation, arrow.rotation,
Quaternion.LookRotation( Quaternion.LookRotation(
((camTargetVeh.isIt != 0 || !Game.QuarryVeh) ? ((Game.PlayerVeh.isIt != 0 || !Game.QuarryVeh) ?
World.baseTF : World.baseTF :
Game.QuarryVeh.gameObject.transform Game.QuarryVeh.gameObject.transform
).position - camTarget.transform.position ).position - Game.Player.transform.position
), ),
Time.deltaTime * 15f Time.deltaTime * 15f
); );
@ -206,7 +192,7 @@ public class CameraVehicle : MonoBehaviour
} }
//Constants //Constants
float camDist = (float)camTargetVeh.camOffset + Game.Settings.camDist; float camDist = (float)Game.PlayerVeh.camOffset + Game.Settings.camDist;
//World Entry Effect //World Entry Effect
if (worldTime < 7f) if (worldTime < 7f)
@ -214,11 +200,11 @@ public class CameraVehicle : MonoBehaviour
worldTime = Time.time - Game.Controller.worldLoadTime; worldTime = Time.time - Game.Controller.worldLoadTime;
transform.position = Vector3.Lerp( transform.position = Vector3.Lerp(
transform.position, transform.position,
camTarget.transform.position, Game.Player.transform.position,
Time.deltaTime * 1f Time.deltaTime * 1f
); );
wr = Quaternion.LookRotation( wr = Quaternion.LookRotation(
camTarget.transform.position - transform.position, Game.Player.transform.position - transform.position,
Vector3.up Vector3.up
); );
if (worldTime > 1f) if (worldTime > 1f)
@ -238,7 +224,7 @@ public class CameraVehicle : MonoBehaviour
(Input.GetButton("Snipe") && !Game.Messaging.chatting) (Input.GetButton("Snipe") && !Game.Messaging.chatting)
) )
{ {
transform.position = camTargetVeh.ridePos.position; transform.position = Game.PlayerVeh.ridePos.position;
if (Input.GetButtonDown("Fire2") || Input.GetKeyDown(KeyCode.Alpha1)) if (Input.GetButtonDown("Fire2") || Input.GetKeyDown(KeyCode.Alpha1))
{ {
@ -248,7 +234,7 @@ public class CameraVehicle : MonoBehaviour
{ {
gyroTation = Quaternion.Euler( gyroTation = Quaternion.Euler(
0f, 0f,
camTargetVeh.ridePos.rotation.eulerAngles.y, Game.PlayerVeh.ridePos.rotation.eulerAngles.y,
0f 0f
); );
} }
@ -260,7 +246,7 @@ public class CameraVehicle : MonoBehaviour
} }
else else
{ {
transform.rotation = camTargetVeh.ridePos.rotation; transform.rotation = Game.PlayerVeh.ridePos.rotation;
} }
rotationX += Input.GetAxis("Mouse X") * (Input.GetButton("Snipe") ? 0.5f : 2f); rotationX += Input.GetAxis("Mouse X") * (Input.GetButton("Snipe") ? 0.5f : 2f);
@ -305,9 +291,9 @@ public class CameraVehicle : MonoBehaviour
{ {
transform.position = Vector3.Lerp( transform.position = Vector3.Lerp(
transform.position, transform.position,
camTarget.transform.position - Vector3.Normalize( Game.Player.transform.position - Vector3.Normalize(
camTarget.transform.position - transform.position Game.Player.transform.position - transform.position
) * camDist + Vector3.one * (camTargetVeh.camSmooth ? ) * camDist + Vector3.one * (Game.PlayerVeh.camSmooth ?
0f : 0f :
Mathf.Lerp(0f, 15f, camDist / 30f) Mathf.Lerp(0f, 15f, camDist / 30f)
), ),
@ -316,9 +302,9 @@ public class CameraVehicle : MonoBehaviour
transform.rotation = Quaternion.Slerp( transform.rotation = Quaternion.Slerp(
transform.rotation, transform.rotation,
Quaternion.LookRotation( Quaternion.LookRotation(
camTarget.transform.position - transform.position, Game.Player.transform.position - transform.position,
(Game.Settings.flightCam ? (Game.Settings.flightCam ?
camTarget.transform.up : Game.Player.transform.up :
Vector3.up Vector3.up
) )
), ),
@ -343,15 +329,15 @@ public class CameraVehicle : MonoBehaviour
else if (Game.Settings.camChase == 1) else if (Game.Settings.camChase == 1)
{ {
if ( if (
(bool)camTarget.transform.gameObject.rigidbody && (bool)Game.Player.transform.gameObject.rigidbody &&
camTarget.transform.gameObject.rigidbody.velocity.sqrMagnitude > 0.1f && Game.Player.transform.gameObject.rigidbody.velocity.sqrMagnitude > 0.1f &&
camTarget.transform.gameObject.rigidbody.velocity.normalized.y < 0.8f && Game.Player.transform.gameObject.rigidbody.velocity.normalized.y < 0.8f &&
camTarget.transform.gameObject.rigidbody.velocity.normalized.y > -0.8f Game.Player.transform.gameObject.rigidbody.velocity.normalized.y > -0.8f
) )
{ {
lastDir = Vector3.Lerp( lastDir = Vector3.Lerp(
lastDir, lastDir,
camTarget.transform.gameObject.rigidbody.velocity.normalized, Game.Player.transform.gameObject.rigidbody.velocity.normalized,
0.1f 0.1f
); );
} }
@ -364,12 +350,12 @@ public class CameraVehicle : MonoBehaviour
); );
} }
Vector3 newPos = ( Vector3 newPos = (
camTarget.transform.position + Game.Player.transform.position +
lastDir * -(camDist) + lastDir * -(camDist) +
Vector3.up * (camDist / 3f) Vector3.up * (camDist / 3f)
); );
Vector3 tpos = transform.position; Vector3 tpos = transform.position;
float y = tpos.y + (camTarget.transform.position.y - lastY) * Time.deltaTime; float y = tpos.y + (Game.Player.transform.position.y - lastY) * Time.deltaTime;
tpos.y = y; tpos.y = y;
transform.position = tpos; transform.position = tpos;
transform.position = Vector3.Lerp( transform.position = Vector3.Lerp(
@ -377,13 +363,13 @@ public class CameraVehicle : MonoBehaviour
newPos, newPos,
Time.deltaTime * 4f Time.deltaTime * 4f
); );
lastY = camTarget.transform.position.y; lastY = Game.Player.transform.position.y;
transform.rotation = Quaternion.Slerp( transform.rotation = Quaternion.Slerp(
transform.rotation, transform.rotation,
Quaternion.LookRotation( Quaternion.LookRotation(
camTarget.transform.position - transform.position, Game.Player.transform.position - transform.position,
(Game.Settings.flightCam ? (Game.Settings.flightCam ?
camTarget.transform.up : Game.Player.transform.up :
Vector3.up Vector3.up
) )
), ),
@ -409,13 +395,13 @@ public class CameraVehicle : MonoBehaviour
//Arcade //Arcade
else if ( else if (
Game.Settings.camChase == 2 && Game.Settings.camChase == 2 &&
camTarget.transform.rigidbody.velocity.magnitude > 0f Game.Player.transform.rigidbody.velocity.magnitude > 0f
) )
{ {
float heightDamping = 3f; float heightDamping = 3f;
float rotationDamping = 3f; float rotationDamping = 3f;
float wantedRotationAngle = Quaternion.LookRotation( float wantedRotationAngle = Quaternion.LookRotation(
camTarget.transform.rigidbody.velocity Game.Player.transform.rigidbody.velocity
).eulerAngles.y; ).eulerAngles.y;
wantedRotationAngle += Mathf.Lerp( wantedRotationAngle += Mathf.Lerp(
30f, 30f,
@ -423,7 +409,7 @@ public class CameraVehicle : MonoBehaviour
camDist / 30f camDist / 30f
) * Input.GetAxis("Horizontal"); ) * Input.GetAxis("Horizontal");
float wantedHeight = ( float wantedHeight = (
camTarget.transform.position.y + Game.Player.transform.position.y +
Mathf.Lerp(0.1f, 15f, camDist / 30f) + Mathf.Lerp(0.1f, 15f, camDist / 30f) +
heightBoost heightBoost
); );
@ -446,7 +432,7 @@ public class CameraVehicle : MonoBehaviour
currentRotationAngle, currentRotationAngle,
0f 0f
); );
Vector3 pos = camTarget.transform.position; Vector3 pos = Game.Player.transform.position;
pos.y += targetHeight; //Look ABOVE the target pos.y += targetHeight; //Look ABOVE the target
transform.position = pos; transform.position = pos;
transform.position -= currentRotation * Vector3.forward * camDist; transform.position -= currentRotation * Vector3.forward * camDist;
@ -469,7 +455,7 @@ public class CameraVehicle : MonoBehaviour
{ //We are under terrain { //We are under terrain
Physics.Linecast( //Determine how far forward we need to go to be out of it Physics.Linecast( //Determine how far forward we need to go to be out of it
transform.position, transform.position,
camTarget.transform.position + Vector3.up * currentHeight, Game.Player.transform.position + Vector3.up * currentHeight,
out hit, out hit,
1 << 8 1 << 8
); );
@ -490,11 +476,11 @@ public class CameraVehicle : MonoBehaviour
{ {
transform.position = Vector3.Lerp( transform.position = Vector3.Lerp(
transform.position, transform.position,
camTarget.transform.position + Vector3.up * 40f, Game.Player.transform.position + Vector3.up * 40f,
Time.deltaTime * 0.3f Time.deltaTime * 0.3f
); );
wr = Quaternion.LookRotation( wr = Quaternion.LookRotation(
camTarget.transform.position - transform.position, Game.Player.transform.position - transform.position,
Vector3.up Vector3.up
); );
transform.rotation = Quaternion.Slerp( transform.rotation = Quaternion.Slerp(
@ -509,7 +495,7 @@ public class CameraVehicle : MonoBehaviour
{ {
transform.rotation = Quaternion.Slerp( transform.rotation = Quaternion.Slerp(
transform.rotation, transform.rotation,
Quaternion.LookRotation(camTarget.transform.position - transform.position), Quaternion.LookRotation(Game.Player.transform.position - transform.position),
Time.deltaTime * 1.5f Time.deltaTime * 1.5f
); );
transform.Translate(new Vector3( transform.Translate(new Vector3(

View File

@ -1,8 +1,16 @@
using System; using System;
using CompilerGenerated; using CompilerGenerated;
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class
| AttributeTargets.Method)]
public sealed class ExtensionAttribute : Attribute { }
}
public static class CompilerGeneratedExtensions public static class CompilerGeneratedExtensions
{ {
//[Extension]
public static IAsyncResult BeginInvoke( public static IAsyncResult BeginInvoke(
this adaptableMethod self, this adaptableMethod self,
AsyncCallback callback AsyncCallback callback
@ -11,6 +19,7 @@ public static class CompilerGeneratedExtensions
return self.BeginInvoke(callback, null); return self.BeginInvoke(callback, null);
} }
//[Extension]
public static IAsyncResult BeginInvoke( public static IAsyncResult BeginInvoke(
this adaptableMethod self this adaptableMethod self
) )

View File

@ -8,9 +8,9 @@ public class EntryPoint : MonoBehaviour
{ {
public IEnumerator Start() public IEnumerator Start()
{ {
yield return new WaitForSeconds(15f); yield return new WaitForSeconds(15.0f);
ParticleEmitter pe = this.GetComponent<ParticleEmitter>(); ParticleEmitter pe = (ParticleEmitter)GetComponent(typeof(ParticleEmitter));
pe.emit = true; pe.emit = true;
} }
} }

View File

@ -111,7 +111,7 @@ public class Game : MonoBehaviour
public bool serverHidden = false; public bool serverHidden = false;
[NonSerialized] [NonSerialized]
public Hashtable authenticatedPlayers = new Hashtable(); public Hashtable authenticatedPlayers = new Hashtable();
//private ArrayList authenticatingPlayers = new ArrayList(); private ArrayList authenticatingPlayers = new ArrayList();
[NonSerialized] [NonSerialized]
public static Hashtable Players; public static Hashtable Players;
public List<unauthPlayer> unauthPlayers = new List<unauthPlayer>(); public List<unauthPlayer> unauthPlayers = new List<unauthPlayer>();
@ -289,8 +289,7 @@ public class Game : MonoBehaviour
0, 0,
(isHost ? 1 : 0), (isHost ? 1 : 0),
0, 0,
0, 0);
false);
if (isHost) if (isHost)
{ {
@ -1099,8 +1098,7 @@ public class Game : MonoBehaviour
veh.isBot ? 1 : 0, veh.isBot ? 1 : 0,
veh.isIt, veh.isIt,
veh.score, veh.score,
veh.specialInput ? 1 : 0, veh.specialInput ? 1 : 0);
veh.zorbBall);
veh.networkView.RPC( veh.networkView.RPC(
"sC", "sC",
player, player,
@ -1256,6 +1254,7 @@ public class Game : MonoBehaviour
": "; ": ";
try try
{ {
float boo = Convert.ToSingle(thread.Value);
threadList += threadList +=
Mathf.RoundToInt( Mathf.RoundToInt(
Convert.ToSingle(thread.Value) * Convert.ToSingle(thread.Value) *
@ -1600,8 +1599,7 @@ public class Game : MonoBehaviour
1, 1,
0, 0,
0, 0,
0, 0);
PlayerVeh.zorbBall);
} }
public IEnumerator axeBot() public IEnumerator axeBot()
@ -1637,7 +1635,6 @@ public class Game : MonoBehaviour
int score = PlayerVeh.score; int score = PlayerVeh.score;
int specialInput = (PlayerVeh.specialInput ? 1 : 0); int specialInput = (PlayerVeh.specialInput ? 1 : 0);
string name = Player.name; string name = Player.name;
bool zorbBall = PlayerVeh.zorbBall;
Network.Destroy(Player.rigidbody.networkView.viewID); Network.Destroy(Player.rigidbody.networkView.viewID);
networkView.RPC( networkView.RPC(
"iV", "iV",
@ -1649,8 +1646,7 @@ public class Game : MonoBehaviour
0, 0,
isIt, isIt,
score, score,
specialInput, specialInput);
zorbBall);
} }
[RPC] [RPC]
@ -1812,8 +1808,7 @@ public class Game : MonoBehaviour
int isBot, int isBot,
int isIt, int isIt,
int score, int score,
int specialInput, int specialInput)
bool zorbBall)
{ {
//while(worldLoaded == false) yield return null; //while(worldLoaded == false) yield return null;
@ -1872,10 +1867,8 @@ public class Game : MonoBehaviour
plyVeh.isIt = isIt; plyVeh.isIt = isIt;
plyVeh.score = score; plyVeh.score = score;
plyVeh.specialInput = (specialInput == 1); plyVeh.specialInput = (specialInput == 1);
plyVeh.zorbBall = zorbBall;
if (viewID.isMine && isBot == 0) Player = plyObj; if (viewID.isMine && isBot == 0) Player = plyObj;
if (plyVeh.isIt == 1) QuarryVeh = plyVeh;
} }
[RPC] [RPC]
@ -2055,7 +2048,7 @@ public class Game : MonoBehaviour
} }
[RPC] [RPC]
public void sSH(string sname, string sworld, string swelcome, string sblacklist, string spassword, SemVer gVersion, bool shidden, NetworkMessageInfo info) public void sSH(string sname, string sworld, string swelcome, string sblacklist, string spassword, float gVersion, bool shidden, NetworkMessageInfo info)
{ {
serverName = sname; serverName = sname;
Settings.serverWelcome = swelcome; Settings.serverWelcome = swelcome;
@ -2147,12 +2140,9 @@ public class Game : MonoBehaviour
public static string LanguageFilter(string str) public static string LanguageFilter(string str)
{ {
/*string patternMild = " crap | prawn |d4mn| damn | turd "; string patternMild = " crap | prawn |d4mn| damn | turd ";
str = Regex.Replace(str, patternMild, ".", RegexOptions.IgnoreCase); str = Regex.Replace(str, patternMild, ".", RegexOptions.IgnoreCase);
string pattern = "anus|ash0le|ash0les|asholes| ass |Ass Monkey|Assface|assh0le|assh0lez|bastard|bastards|bastardz|basterd|suka|asshole|assholes|assholz|asswipe|azzhole|bassterds|basterdz|Biatch|bitch|bitches|Blow Job|blowjob|in bed|butthole|buttwipe|c0ck|c0cks|c0k|Clit|cnts|cntz|cockhead| cock |cock-head|CockSucker|cock-sucker| cum |cunt|cunts|cuntz|dick|dild0|dild0s|dildo|dildos|dilld0|dilld0s|dominatricks|dominatrics|dominatrix|f.u.c.k|f u c k|f u c k e r|fag|fag1t|faget|fagg1t|faggit|faggot|fagit|fags|fagz|faig|faigs|fuck|fucker|fuckin|mother fucker|fucking|fucks|Fudge Packer|fuk|Fukah|Fuken|fuker|Fukin|Fukk|Fukkah|Fukken|Fukker|Fukkin|gay|gayboy|gaygirl|gays|gayz|God-dam|God dam|h00r|h0ar|h0re|jackoff|jerk-off|jizz|kunt|kunts|kuntz|Lesbian|Lezzian|Lipshits|Lipshitz|masochist|masokist|massterbait|masstrbait|masstrbate|masterbaiter|masterbate|masterbates|Motha Fucker|Motha Fuker|Motha Fukkah|Motha Fukker|Mother Fucker|Mother Fukah|Mother Fuker|Mother Fukkah|Mother Fukker|mother-fucker|Mutha Fucker|Mutha Fukah|Mutha Fuker|Mutha Fukkah|Mutha Fukker|orafis|orgasim|orgasm|orgasum|oriface|orifice|orifiss|packi|packie|packy|paki|pakie|peeenus|peeenusss|peenus|peinus|pen1s|penas|penis|penis-breath|penus|penuus|Phuc|Phuck|Phuk|Phuker|Phukker|polac|polack|polak|Poonani|pr1c|pr1ck|pr1k|pusse|pussee|pussy|puuke|puuker|queer|queers|queerz|qweers|qweerz|qweir|recktum|rectum|retard|sadist|scank|schlong|screwing| sex |sh1t|sh1ter|sh1ts|sh1tter|sh1tz|shit|shits|shitter|Shitty|Shity|shitz|Shyt|Shyte|Shytty|Shyty|skanck|skank|skankee| sob |skankey|skanks|Skanky|slut|sluts|Slutty|slutz|son-of-a-bitch|va1jina|vag1na|vagiina|vagina|vaj1na|vajina|vullva|vulva|xxx|b!+ch|bitch|blowjob|clit|arschloch|fuck|shit|asshole|b!tch|b17ch|b1tch|bastard|bi+ch|boiolas|buceta|c0ck|cawk|chink|clits|cunt|dildo|dirsa|ejakulate|fatass|fcuk|fuk|fux0r|l3itch|lesbian|masturbate|masterbat*|motherfucker|s.o.b.|mofo|nigga|nigger|n1gr|nigur|niiger|niigr|nutsack|phuck|blue balls|blue_balls|blueballs|pussy|scrotum|shemale|sh!t|slut|smut|teets|tits|boobs|b00bs|testical|testicle|titt|jackoff|whoar|whore|fuck|shit|arse|bi7ch|bitch|bollock|breasts|cunt|dick|fag |feces|fuk|futkretzn|gay|jizz|masturbat*|piss|poop|porn|p0rn|pr0n|shiz|splooge|b00b|testicle|titt|wank"; string pattern = "anus|ash0le|ash0les|asholes| ass |Ass Monkey|Assface|assh0le|assh0lez|bastard|bastards|bastardz|basterd|suka|asshole|assholes|assholz|asswipe|azzhole|bassterds|basterdz|Biatch|bitch|bitches|Blow Job|blowjob|in bed|butthole|buttwipe|c0ck|c0cks|c0k|Clit|cnts|cntz|cockhead| cock |cock-head|CockSucker|cock-sucker| cum |cunt|cunts|cuntz|dick|dild0|dild0s|dildo|dildos|dilld0|dilld0s|dominatricks|dominatrics|dominatrix|f.u.c.k|f u c k|f u c k e r|fag|fag1t|faget|fagg1t|faggit|faggot|fagit|fags|fagz|faig|faigs|fuck|fucker|fuckin|mother fucker|fucking|fucks|Fudge Packer|fuk|Fukah|Fuken|fuker|Fukin|Fukk|Fukkah|Fukken|Fukker|Fukkin|gay|gayboy|gaygirl|gays|gayz|God-dam|God dam|h00r|h0ar|h0re|jackoff|jerk-off|jizz|kunt|kunts|kuntz|Lesbian|Lezzian|Lipshits|Lipshitz|masochist|masokist|massterbait|masstrbait|masstrbate|masterbaiter|masterbate|masterbates|Motha Fucker|Motha Fuker|Motha Fukkah|Motha Fukker|Mother Fucker|Mother Fukah|Mother Fuker|Mother Fukkah|Mother Fukker|mother-fucker|Mutha Fucker|Mutha Fukah|Mutha Fuker|Mutha Fukkah|Mutha Fukker|orafis|orgasim|orgasm|orgasum|oriface|orifice|orifiss|packi|packie|packy|paki|pakie|peeenus|peeenusss|peenus|peinus|pen1s|penas|penis|penis-breath|penus|penuus|Phuc|Phuck|Phuk|Phuker|Phukker|polac|polack|polak|Poonani|pr1c|pr1ck|pr1k|pusse|pussee|pussy|puuke|puuker|queer|queers|queerz|qweers|qweerz|qweir|recktum|rectum|retard|sadist|scank|schlong|screwing| sex |sh1t|sh1ter|sh1ts|sh1tter|sh1tz|shit|shits|shitter|Shitty|Shity|shitz|Shyt|Shyte|Shytty|Shyty|skanck|skank|skankee| sob |skankey|skanks|Skanky|slut|sluts|Slutty|slutz|son-of-a-bitch|va1jina|vag1na|vagiina|vagina|vaj1na|vajina|vullva|vulva|xxx|b!+ch|bitch|blowjob|clit|arschloch|fuck|shit|asshole|b!tch|b17ch|b1tch|bastard|bi+ch|boiolas|buceta|c0ck|cawk|chink|clits|cunt|dildo|dirsa|ejakulate|fatass|fcuk|fuk|fux0r|l3itch|lesbian|masturbate|masterbat*|motherfucker|s.o.b.|mofo|nigga|nigger|n1gr|nigur|niiger|niigr|nutsack|phuck|blue balls|blue_balls|blueballs|pussy|scrotum|shemale|sh!t|slut|smut|teets|tits|boobs|b00bs|testical|testicle|titt|jackoff|whoar|whore|fuck|shit|arse|bi7ch|bitch|bollock|breasts|cunt|dick|fag |feces|fuk|futkretzn|gay|jizz|masturbat*|piss|poop|porn|p0rn|pr0n|shiz|splooge|b00b|testicle|titt|wank";
return Regex.Replace(str, pattern, "#", RegexOptions.IgnoreCase);*/ return Regex.Replace(str, pattern, "#", RegexOptions.IgnoreCase);
// the kids that played this game back then are no longer kids. little need to babysit them anymore
return str;
} }
} }

View File

@ -4,8 +4,7 @@ using UnityEngine;
[Serializable] [Serializable]
public class GameData : MonoBehaviour public class GameData : MonoBehaviour
{ {
//public static float gameVersion = 4.0f; public static float gameVersion = 2.22f;
public static SemVer gameVersion = new SemVer("4.0.1");
public static float serverVersion = 0.2f; public static float serverVersion = 0.2f;
public static string gameName = "marsxplr"; public static string gameName = "marsxplr";
public static string userName = ""; public static string userName = "";

View File

@ -17,21 +17,21 @@ public class JumpPoint : MonoBehaviour
{ {
return; return;
} }
if (whirldObject.parameters["JumpTime"] != null) if ((bool)whirldObject.parameters["JumpTime"])
{ {
time = (int)float.Parse((String)whirldObject.parameters["JumpTime"]); time = (int)whirldObject.parameters["JumpTime"];
} }
if (whirldObject.parameters["JumpRandMin"] != null) if ((bool)whirldObject.parameters["JumpRandMin"])
{ {
randMin = (int)float.Parse((String)whirldObject.parameters["JumpRandMin"]); randMin = (int)whirldObject.parameters["JumpRandMin"];
} }
if (whirldObject.parameters["JumpRandMax"] != null) if ((bool)whirldObject.parameters["JumpRandMax"])
{ {
randMax = (int)float.Parse((String)whirldObject.parameters["JumpRandMax"]); randMax = (int)whirldObject.parameters["JumpRandMax"];
} }
if (whirldObject.parameters["JumpVelocity"] != null) if ((bool)whirldObject.parameters["JumpVelocity"])
{ {
velocity = (int)float.Parse((String)whirldObject.parameters["JumpVelocity"]); velocity = (int)whirldObject.parameters["JumpVelocity"];
} }
} }
@ -58,12 +58,6 @@ public class JumpPoint : MonoBehaviour
transform.up * velocity, transform.up * velocity,
ForceMode.VelocityChange); ForceMode.VelocityChange);
} }
/*other.attachedRigidbody.AddExplosionForce(
UnityEngine.Random.Range(randMin, randMax),
transform.position,
0f,
2f,
ForceMode.VelocityChange);*/
} }
} }

View File

@ -86,6 +86,22 @@ public class Lobby : MonoBehaviour
private bool dedicatedNAT; private bool dedicatedNAT;
// /*UNUSED*/ private int dedicatedHostAttempts; // /*UNUSED*/ private int dedicatedHostAttempts;
private bool showAds = false;
adDesc[] gameAds;
class adDesc : UnityEngine.Object
{
public String url = "";
public String title = "";
public String desc = "";
public adDesc(String u, String t, String d)
{
this.url = u;
this.title = t;
this.desc = d;
}
}
public void Awake() public void Awake()
{ {
QualitySettings.currentLevel = QualityLevel.Fantastic; QualitySettings.currentLevel = QualityLevel.Fantastic;
@ -95,6 +111,9 @@ public class Lobby : MonoBehaviour
public IEnumerator Start() public IEnumerator Start()
{ {
String adBrightUrl = "";
String adSenseUrl = "";
userPassword = PlayerPrefs.GetString("userPassword", ""); userPassword = PlayerPrefs.GetString("userPassword", "");
userCode = PlayerPrefs.GetString("userCode", ""); userCode = PlayerPrefs.GetString("userCode", "");
userRemembered = (PlayerPrefs.GetInt("userRemembered", 0) == 1 ? true : false); userRemembered = (PlayerPrefs.GetInt("userRemembered", 0) == 1 ? true : false);
@ -136,8 +155,11 @@ public class Lobby : MonoBehaviour
String[] val = tmp.ToArray(); String[] val = tmp.ToArray();
if ( if (
val[0] == "sv" && val[0] == "v" &&
SemVer.Parse(val[1]) > GameData.gameVersion) float.Parse(
val[1],
CultureInfo.InvariantCulture.NumberFormat
) > (float)GameData.gameVersion)
{ {
outdated = val[1]; outdated = val[1];
} }
@ -145,6 +167,10 @@ public class Lobby : MonoBehaviour
{ {
hostDedicated = (val[1] == "1" || val[1] == "true"); hostDedicated = (val[1] == "1" || val[1] == "true");
} }
else if (val[0] == "a")
{
showAds = (val[1] == "1" || val[1] == "true");
}
else if (val[0] == "m") msgs.Add(val[1]); else if (val[0] == "m") msgs.Add(val[1]);
else if (val[0] == "w") else if (val[0] == "w")
{ {
@ -202,6 +228,14 @@ public class Lobby : MonoBehaviour
{ {
GameData.networkMode = int.Parse(val[1]); GameData.networkMode = int.Parse(val[1]);
} }
else if (val[0] == "adbr")
{
adBrightUrl = val[1];
}
else if (val[0] == "adsn")
{
adSenseUrl = val[1];
}
} }
} }
else else
@ -213,6 +247,60 @@ public class Lobby : MonoBehaviour
messages = msgs.ToArray(); messages = msgs.ToArray();
MasterServer.RequestHostList(gameName); MasterServer.RequestHostList(gameName);
if (showAds)
{
List<adDesc> ads = new List<adDesc>();
//Adbrite
www = new WWW(adBrightUrl);
yield return www;
if (www.error == null)
{
MatchCollection matches = Regex.Matches(
www.data.Replace(
"\\\"",
"\""),
"<a[^>]*?class=\\\"adHeadline\\\"[^>]*?href=\\\"(.*?)\\\"[^>]*?>(.*?)</a>[^.]*?<a[^>]*?class=\\\"adText\\\"[^>]*?>(.*?)</a>");
foreach (Match match in matches)
{
adDesc ad = new adDesc(
match.Groups[1].ToString(),
htmlDecode(match.Groups[2].ToString()),
htmlDecode(match.Groups[3].ToString()));
if (UnityEngine.Random.value > .5) ads.Add(ad);
else ads.Insert(0, ad);
}
}
//Adsense
www = new WWW(adSenseUrl);
yield return www;
if (www.error == null)
{
MatchCollection matches = Regex.Matches(
www.data.Replace(
"\\\"",
"\""),
"<a[^>]*?class=adt[^>]*?href=\\\"(.*?)\\\"[^>]*?>(.*?)</a>[^.]*?<div[^>]*?class=adb[^>]*?>(.*?)</div>");
foreach (Match match in matches)
{
adDesc ad = new adDesc(
"http://googleads.g.doubleclick.net" +
match.Groups[1].ToString(),
htmlDecode(match.Groups[2].ToString()),
htmlDecode(match.Groups[3].ToString()));
if (ad.url.IndexOf("&nh=1") == -1) ad.url += "&nh=1";
ads.Insert(0, ad);
}
}
//Tally
if (ads.Count > 0)
{
gameAds = ads.ToArray();
}
}
} }
public void OnFailedToConnectToMasterServer(NetworkConnectionError info) public void OnFailedToConnectToMasterServer(NetworkConnectionError info)
@ -904,7 +992,7 @@ public class Lobby : MonoBehaviour
HostData[] data = MasterServer.PollHostList(); HostData[] data = MasterServer.PollHostList();
String[] serverData; String[] serverData;
SemVer gameVersion; float gameVersion;
float serverVersion; float serverVersion;
//Precull Data //Precull Data
@ -919,13 +1007,13 @@ public class Lobby : MonoBehaviour
if (filterNATHosts && element.useNat) continue; if (filterNATHosts && element.useNat) continue;
serverData = element.comment.Split(";"[0]); serverData = element.comment.Split(";"[0]);
gameVersion = new SemVer(0); gameVersion = 0.0f;
serverVersion = 0.0f; serverVersion = 0.0f;
foreach (String dat in serverData) foreach (String dat in serverData)
{ {
if (dat == "") continue; if (dat == "") continue;
vals = dat.Split("="[0]); vals = dat.Split("="[0]);
if (vals[0] == "v") gameVersion = SemVer.Parse(vals[1]); if (vals[0] == "v") gameVersion = float.Parse(vals[1]);
if (vals[0] == "d") serverVersion = float.Parse(vals[1]); if (vals[0] == "d") serverVersion = float.Parse(vals[1]);
} }
@ -953,16 +1041,44 @@ public class Lobby : MonoBehaviour
System.Array.Sort(data, sortHostArray); System.Array.Sort(data, sortHostArray);
int i = 0; int i = 0;
float adCounter = 0.000f;
int adTicker = 0;
foreach (HostData element in data) foreach (HostData element in data)
{ {
//Ads
if (showAds)
{
adCounter += (float)gameAds.Length / (float)data.Length;
if ((float)adTicker < adCounter && adTicker < gameAds.Length)
{
if (
GUILayout.Button(
gameAds[adTicker].title +
" ~ " +
gameAds[adTicker].desc,
"lobbyAd"))
{
OpenURL(gameAds[adTicker].url);
}
if (
Event.current.type != EventType.Layout &&
mouseInServerList &&
GUILayoutUtility.GetLastRect().Contains(Event.current.mousePosition))
{
serverDetails = "This advertisement helps bring Mars Explorer to you for free!\n\nIf you are interested in one of our sponsor's offers,\nplease be sure to check it out.";
}
adTicker++;
}
}
masterServerConFailures = 0; masterServerConFailures = 0;
masterServerMessage = ""; masterServerMessage = "";
serverData = element.comment.Split(";"[0]); serverData = element.comment.Split(";"[0]);
gameVersion = new SemVer(0); gameVersion = 0.0f;
serverVersion = 0.0f; serverVersion = 0.0f;
String serverWorld = ""; String serverWorld = "";
String serverPlayers = ""; String serverPlayers = "";
// /*UNUSED*/ String serverWorldURL = ""; String serverWorldURL = "";
String bannedIPs = ""; String bannedIPs = "";
String serverLag = ""; String serverLag = "";
bool isLocked = false; bool isLocked = false;
@ -970,11 +1086,11 @@ public class Lobby : MonoBehaviour
{ {
if (dat == "") continue; if (dat == "") continue;
vals = dat.Split("="[0]); vals = dat.Split("="[0]);
if (vals[0] == "v") gameVersion = SemVer.Parse(vals[1]); if (vals[0] == "v") gameVersion = float.Parse(vals[1]);
if (vals[0] == "d") serverVersion = float.Parse(vals[1]); if (vals[0] == "d") serverVersion = float.Parse(vals[1]);
else if (vals[0] == "w") serverWorld = vals[1]; else if (vals[0] == "w") serverWorld = vals[1];
else if (vals[0] == "p") serverPlayers = vals[1]; else if (vals[0] == "p") serverPlayers = vals[1];
//else if (vals[0] == "u") serverWorldURL = vals[1]; else if (vals[0] == "u") serverWorldURL = vals[1];
else if (vals[0] == "b") bannedIPs = vals[1]; else if (vals[0] == "b") bannedIPs = vals[1];
else if (vals[0] == "s") serverLag = vals[1]; else if (vals[0] == "s") serverLag = vals[1];
else if (vals[0] == "l") isLocked = true; else if (vals[0] == "l") isLocked = true;
@ -1063,6 +1179,21 @@ public class Lobby : MonoBehaviour
(serverVersion != 0.0 ? " (» Dedicated Host Server)" : ""); (serverVersion != 0.0 ? " (» Dedicated Host Server)" : "");
} }
i++; i++;
//"Advertise Here" Ad
if (showAds && i == data.Length)
{
if (GUILayout.Button("» Advertise on Mars Explorer! «", "lobbyAd"))
{
OpenURL("http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1509409&&nr=1");
}
if (Event.current.type != EventType.Layout &&
mouseInServerList &&
GUILayoutUtility.GetLastRect().Contains(Event.current.mousePosition))
{
serverDetails = "That's right - you can bid directly to advertise inside Mars Explorer!\n\nPresent YOUR message to an audience\nof friendly Martians everywhere.";
}
}
} }
} }
if (activePlayersVisible == 0) if (activePlayersVisible == 0)
@ -1401,12 +1532,12 @@ public class Lobby : MonoBehaviour
GUILayout.Label("A new Mars Explorer version is now available on the Discord Server:"); GUILayout.Label("A new Mars Explorer version is now available on the Discord Server:");
GUILayout.Space(10f); GUILayout.Space(10f);
if ( if (
GUILayout.Button(">> Go to the Gitea Releases page to Download MarsXPLR version " + GUILayout.Button(">> Ask in the #marsxplr channel to Download Mars Explorer version " +
outdated + outdated +
"! <<", "! <<",
GUILayout.Height(40f))) GUILayout.Height(40f)))
{ {
OpenURL("https://gitea.moe/VIA256/marsxplr-decomp/releases"); OpenURL("https://discord.gg/dxTFZRM");
} }
GUILayout.Space(30f); GUILayout.Space(30f);
GUILayout.BeginHorizontal(); GUILayout.BeginHorizontal();

View File

@ -284,7 +284,7 @@ public class MeshSerializer : MonoBehaviour
float xx = ((float)(int)ix - 128f) / 127f; float xx = ((float)(int)ix - 128f) / 127f;
float yy = ((float)(int)iy - 128f) / 127f; float yy = ((float)(int)iy - 128f) / 127f;
float zz = ((float)(int)iz - 128f) / 127f; float zz = ((float)(int)iz - 128f) / 127f;
float ww = ((float)(int)iw - 128f) / 127f; float ww = ((float)(int)iz - 128f) / 127f;
arr[i] = new Vector4(xx, yy, zz, ww); arr[i] = new Vector4(xx, yy, zz, ww);
} }
} }
@ -297,7 +297,7 @@ public class MeshSerializer : MonoBehaviour
byte ix = (byte)Mathf.Clamp(v.x * 127f + 128f, 0f, 255f); byte ix = (byte)Mathf.Clamp(v.x * 127f + 128f, 0f, 255f);
byte iy = (byte)Mathf.Clamp(v.y * 127f + 128f, 0f, 255f); byte iy = (byte)Mathf.Clamp(v.y * 127f + 128f, 0f, 255f);
byte iz = (byte)Mathf.Clamp(v.z * 127f + 128f, 0f, 255f); byte iz = (byte)Mathf.Clamp(v.z * 127f + 128f, 0f, 255f);
byte iw = (byte)Mathf.Clamp(v.w * 127f + 128f, 0f, 255f); byte iw = (byte)Mathf.Clamp(v.z * 127f + 128f, 0f, 255f);
buf.Write(ix); buf.Write(ix);
buf.Write(iy); buf.Write(iy);
buf.Write(iz); buf.Write(iz);

View File

@ -130,10 +130,10 @@ public class Messaging : MonoBehaviour
RPCMode.All, RPCMode.All,
!Game.PlayerVeh.zorbBall); !Game.PlayerVeh.zorbBall);
Game.Controller.msg( Game.Controller.msg(
"XORB " + (Game.PlayerVeh.zorbBall ? "XORB " + ((!Game.PlayerVeh.zorbBall) ?
"Activated" : "Deactivated" :
"Deactivated"), "Activated"),
(int)chatOrigins.Server); 2);
} }
else else
{ {

View File

@ -39,7 +39,7 @@ public class SeaData : MonoBehaviour
whirldObject == null || whirldObject == null ||
whirldObject.parameters == null || whirldObject.parameters == null ||
seaObject == null || seaObject == null ||
whirldObject.parameters["Mode"] == null) !(bool)whirldObject.parameters["Mode"])
{ {
return; return;
} }

View File

@ -71,7 +71,6 @@ public class Settings : MonoBehaviour
public float camDist = 0; public float camDist = 0;
public bool flightCam = false; public bool flightCam = false;
public bool gyroCam = false; public bool gyroCam = false;
public bool quarryCam = false;
public float worldGrav = -9.81f; public float worldGrav = -9.81f;
public float worldFog = 0.001f; public float worldFog = 0.001f;
@ -155,17 +154,19 @@ public class Settings : MonoBehaviour
renderViewCap = PlayerPrefs.GetFloat("viewCap", 1000f); renderViewCap = PlayerPrefs.GetFloat("viewCap", 1000f);
Application.targetFrameRate = (int)PlayerPrefs.GetFloat("targetFrameRate", 100f); Application.targetFrameRate = (int)PlayerPrefs.GetFloat("targetFrameRate", 100f);
renderAutoAdjust = false; renderAutoAdjust = false;
showHints = PlayerPrefs.GetInt("showHints", 1) != 0; showHints = ((PlayerPrefs.GetInt("showHints", 1) != 0) ? true : false);
useMusic = PlayerPrefs.GetInt("useMusic", 1); useMusic = PlayerPrefs.GetInt("useMusic", 1);
useSfx = PlayerPrefs.GetInt("useSfx", 1) != 0; useSfx = ((PlayerPrefs.GetInt("useSfx", 1) != 0) ? true : false);
useHypersound = PlayerPrefs.GetInt("useHypersound", 0); useHypersound = PlayerPrefs.GetInt("useHypersound", 0);
useMinimap = PlayerPrefs.GetInt("useMinimap", 1) != 0; useMinimap = ((PlayerPrefs.GetInt("useMinimap", 1) != 0) ? true : false);
bool flag = ((PlayerPrefs.GetInt("superCam", 1) != 0) ? true : false);
flightCam = ((PlayerPrefs.GetInt("flightCam", 1) != 0) ? true : false);
gyroCam = ((PlayerPrefs.GetInt("gyroCam", 0) != 0) ? true : false);
camMode = PlayerPrefs.GetInt("cam", 1); camMode = PlayerPrefs.GetInt("cam", 1);
camChase = PlayerPrefs.GetInt("camChase", 1); camChase = PlayerPrefs.GetInt("camChase", 1);
camDist = PlayerPrefs.GetFloat("camDist", 0.01f); camDist = PlayerPrefs.GetFloat("camDist", 0.01f);
flightCam = PlayerPrefs.GetInt("flightCam", 0) != 0; flightCam = ((PlayerPrefs.GetInt("flightCam", 0) != 0) ? true : false);
gyroCam = PlayerPrefs.GetInt("gyroCam", 0) != 0; gyroCam = ((PlayerPrefs.GetInt("gyroCam", 0) != 0) ? true : false);
quarryCam = PlayerPrefs.GetInt("quarryCam", 0) != 0;
} }
public void showDialogGame() public void showDialogGame()
@ -485,12 +486,6 @@ public class Settings : MonoBehaviour
PlayerPrefs.SetInt("flightCam", flightCam ? 1 : 0); PlayerPrefs.SetInt("flightCam", flightCam ? 1 : 0);
} }
if (GUILayout.Toggle(quarryCam, "QuarryCam Enabled") != quarryCam)
{
quarryCam = !quarryCam;
PlayerPrefs.SetInt("quarryCam", quarryCam ? 1 : 0);
}
float cg; float cg;
if (camMode == 0) if (camMode == 0)
{ {
@ -931,7 +926,7 @@ public class Settings : MonoBehaviour
ramoSpheres != 0f, ramoSpheres != 0f,
"RORBs Enabled") != (ramoSpheres != 0f)) "RORBs Enabled") != (ramoSpheres != 0f))
{ {
ramoSpheres = ((ramoSpheres != 0f) ? 0f : 0.5f); ramoSpheres = ((ramoSpheres == 0f) ? 0.5f : 0f);
if (ramoSpheres != 0f) if (ramoSpheres != 0f)
{ {
zorbSpeed = 7f; zorbSpeed = 7f;
@ -959,7 +954,7 @@ public class Settings : MonoBehaviour
zorbSpeed != 0f, zorbSpeed != 0f,
"XORBs Available") != (zorbSpeed != 0f)) "XORBs Available") != (zorbSpeed != 0f))
{ {
zorbSpeed = ((zorbSpeed != 0f) ? 0 : 7); zorbSpeed = ((zorbSpeed == 0f) ? 7 : 0);
updateServerPrefs(); updateServerPrefs();
} }

View File

@ -123,7 +123,7 @@ public class TerrainController : MonoBehaviour
if (trnAlt < seaLevel) if (trnAlt < seaLevel)
{ {
submerged = true; submerged = true;
// /*UNUSED*/ float depth = seaLevel + trnAlt; float depth = seaLevel + trnAlt;
} }
//Update AlphaMap Array //Update AlphaMap Array

View File

@ -308,28 +308,20 @@ public class Vehicle : MonoBehaviour
GUI.depth = -1; GUI.depth = -1;
if (networkView.isMine && !isBot) if (networkView.isMine && !isBot)
{ {
Rigidbody targetRigidbody = myRigidbody;
if (
Game.Settings.quarryCam &&
(bool)Game.QuarryVeh &&
(bool)Game.QuarryVeh.myRigidbody)
{
targetRigidbody = Game.QuarryVeh.myRigidbody;
}
GUI.Button( GUI.Button(
new Rect( new Rect(
(float)Screen.width * 0.5f - 75f, (float)Screen.width * 0.5f - 75f,
(float)Screen.height - 30f, (float)Screen.height - 30f,
150f, 150f,
20f), 20f),
(targetRigidbody.velocity.magnitude < 0.05f ? (myRigidbody.velocity.magnitude < 0.05f ?
"Static" : Mathf.RoundToInt(myRigidbody.velocity.magnitude * 2.23f) +
Mathf.RoundToInt(targetRigidbody.velocity.magnitude * 2.23f) + " MPH" :
" MPH") + "Static") +
" " + " " +
Mathf.RoundToInt(targetRigidbody.transform.position.y) + Mathf.RoundToInt(myRigidbody.transform.position.y) +
" ALT" + " ALT" +
((isIt != 0 || Game.Settings.quarryCam) ? ((isIt != 0) ?
"" : "" :
(" " + (" " +
Mathf.RoundToInt(Game.Controller.quarryDist) + Mathf.RoundToInt(Game.Controller.quarryDist) +
@ -338,24 +330,21 @@ public class Vehicle : MonoBehaviour
} }
GUI.depth = 5; GUI.depth = 5;
Vector3 pos = Camera.main.WorldToScreenPoint(transform.position); Vector3 pos = Camera.main.WorldToScreenPoint(transform.position);
bool mainTag = networkView.isMine && !isBot;
if(Game.Settings.quarryCam && (bool)Game.QuarryVeh)
{
mainTag = (this == Game.QuarryVeh);
}
if ( if (
mainTag || (!networkView.isMine || isBot &&
!Game.Settings.hideNames || Game.Settings.hideNames &&
( (Vector3.Distance(
Vector3.Distance( new Vector3(pos.x, pos.y, 0f),
new Vector3(pos.x, pos.y, 0), Input.mousePosition) >= 40f ||
Input.mousePosition) < 40 && Physics.Linecast(
!Physics.Linecast(
transform.position, transform.position,
Camera.main.transform.position, 1 << 8))) Camera.main.transform.position,
{ 1 << 8))) ||
if (pos.z > 0 || mainTag) (pos.z <= 0f) &&
(!networkView.isMine || isBot))
{ {
return;
}
if (pos.z < 0f) if (pos.z < 0f)
{ {
pos.z = 0f; pos.z = 0f;
@ -370,7 +359,7 @@ public class Vehicle : MonoBehaviour
pos.z * 0.2f); pos.z * 0.2f);
if ( if (
(pos.z <= 1f || pos.y < sizeY * 1.9f) && (pos.z <= 1f || pos.y < sizeY * 1.9f) &&
mainTag) networkView.isMine && !isBot)
{ {
if (pos.z <= 1f) if (pos.z <= 1f)
{ {
@ -395,8 +384,6 @@ public class Vehicle : MonoBehaviour
"" : "" :
"_it")); "_it"));
} }
}
}
public IEnumerator OnPrefsUpdated() public IEnumerator OnPrefsUpdated()
{ {
@ -414,7 +401,7 @@ public class Vehicle : MonoBehaviour
transform.position, transform.position,
transform.rotation); transform.rotation);
ramoSphere.transform.parent = transform; ramoSphere.transform.parent = transform;
Collider[] colliders = (Collider[])vehObj.GetComponentsInChildren<Collider>(); Collider[] colliders = (Collider[])vehObj.GetComponentsInChildren(typeof(Collider));
foreach (Collider cldr in colliders) foreach (Collider cldr in colliders)
{ {
Physics.IgnoreCollision(ramoSphere.collider, cldr); Physics.IgnoreCollision(ramoSphere.collider, cldr);
@ -423,16 +410,15 @@ public class Vehicle : MonoBehaviour
ramoSphere.active = false; //DRAGONHERE - MAJOR UNITY BUG: We need to set this all the time, as colliders that are instantiated using a prefab and are then thrown inside of rightbodies are not properly initialized until some of their settings are toggled ramoSphere.active = false; //DRAGONHERE - MAJOR UNITY BUG: We need to set this all the time, as colliders that are instantiated using a prefab and are then thrown inside of rightbodies are not properly initialized until some of their settings are toggled
ramoSphereScale = (((Game.Settings.ramoSpheres) * 15) + ramoSphereScale = (((Game.Settings.ramoSpheres) * 15) +
camOffset * 1); camOffset * 1);
zorbBall = Game.Settings.zorbSpeed != 0f ? zorbBall : false;
if (ramoSphere.collider.isTrigger == zorbBall) if (ramoSphere.collider.isTrigger == zorbBall)
{ {
ramoSphere.collider.isTrigger = !zorbBall; ramoSphere.collider.isTrigger = !zorbBall;
ramoSphere.transform.localScale = Vector3.zero; ramoSphere.transform.localScale = Vector3.zero;
ramoSphere.collider.active = true; ramoSphere.active = true;
ramoSphere.SendMessage("colorSet", zorbBall); //ANOTHER UNITY BUG - for some reason, SendMessage isn't working like it should... ((RamoSphere)ramoSphere.GetComponent(typeof(RamoSphere)))
ramoSphere.GetComponent<RamoSphere>().colorSet(zorbBall); .colorSet(zorbBall);
} }
else ramoSphere.collider.active = true; else ramoSphere.active = true;
rigidbody.inertiaTensor = tnsor; rigidbody.inertiaTensor = tnsor;
rigidbody.centerOfMass = cg; rigidbody.centerOfMass = cg;
} }

View File

@ -217,30 +217,4 @@ public class VehicleBot : MonoBehaviour
} }
} }
} }
public void FixedUpdate()
{
if (
(bool)vehicle.ramoSphere &&
vehicle.zorbBall &&
(vehicle.input.y != 0f || vehicle.input.x != 0f))
{
rigidbody.AddForce(
Vector3.Scale(
new Vector3(1f, 0f, 1f),
Camera.main.transform.TransformDirection(new Vector3(
vehicle.input.x * Mathf.Max(
0f,
Game.Settings.zorbSpeed + Game.Settings.zorbAgility),
0f,
vehicle.input.y * Game.Settings.zorbSpeed))),
ForceMode.Acceleration);
rigidbody.AddTorque(
Camera.main.transform.TransformDirection(new Vector3(
vehicle.input.y,
0f,
vehicle.input.x * -1f)) * Game.Settings.zorbSpeed,
ForceMode.Acceleration);
}
}
} }

View File

@ -841,7 +841,7 @@ public class WhirldIn : System.Object
String tSpmp = null; String tSpmp = null;
String tSpmp2 = null; String tSpmp2 = null;
String[] tTxts = null; String[] tTxts = null;
// /*UNUSED*/ String tDtmp = null; String tDtmp = null;
for (int i2 = 1; i2 < vS2.Length; i2++) for (int i2 = 1; i2 < vS2.Length; i2++)
{ {
@ -852,7 +852,7 @@ public class WhirldIn : System.Object
else if (str[0] == "s") tSpmp = GetURL(str[1]); else if (str[0] == "s") tSpmp = GetURL(str[1]);
else if (str[0] == "s2") tSpmp2 = GetURL(str[1]); else if (str[0] == "s2") tSpmp2 = GetURL(str[1]);
else if (str[0] == "t") tTxts = str[1].Split(","[0]); else if (str[0] == "t") tTxts = str[1].Split(","[0]);
//else if (str[0] == "d") tDtmp = GetURL(str[1]); else if (str[0] == "d") tDtmp = GetURL(str[1]);
} }
String thread = tName; String thread = tName;

47
Game/README.md Normal file
View File

@ -0,0 +1,47 @@
<details closed>
<summary><h2>Assembly - UnityScript</h2></summary>
<h3>About</h3>
<ul>
<li>(almost) all of the games compiled unityscripts</li>
<li>Used ILSpy to decompile dll from marsxplr 2.22 win32 into C#</li>
<li>Updated upd3 address (Lobby.cs)</li>
<li>Updated game version from 2.22 to 2.3 (GameData.cs)</li>
<li>changed max bots from 10 to 25</li>
</ul>
</details>
<hr>
<details closed>
<summary><h2>Assembly - CSharp</h2></summary>
<h3>About</h3>
<ul>
<li>(almost) all of the games compiled C# scripts</li>
<li>decompiled with ilspy</li>
</ul>
</details>
<hr>
<details closed>
<summary><h2>Assembly - CSharp - first pass</h2></summary>
<h3>About</h3>
<ul>
<li>some of the games compiled C# scripts</li>
<li>decompiled with ilspy</li>
</ul>
</details>
<hr>
<details closed>
<summary><h2>UnityEngine</h2></summary>
<h3>About</h3>
<ul>
<li>Unity Engine functionality</li>
<li>decomipled with ilspy</li>
</ul>
</details>
<hr>
<details closed>
<summary><h2>UnityDomainLoad</h2></summary>
<h3>About</h3>
<ul>
<li>UnityDomainLoad.exe</li>
<li>decompiled with ilspy</li>
</ul>
</details>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>UnityDomainLoad</RootNamespace>
<AssemblyName>UnityDomainLoad</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<OutputPath>bin</OutputPath>
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="UnityEngine\UnityDomainLoad.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>UnityEngine</RootNamespace>
<AssemblyName>UnityEngine</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<ProjectGuid>{C67F4835-3976-49D0-AA05-3487C9FD57A2}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<OutputPath>bin</OutputPath>
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="UnityEngine\*.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

Some files were not shown because too many files have changed in this diff Show More