21 Commits

Author SHA1 Message Date
VIA256 ba9d5563df add semantic version class and make gameVersion use it 2025-10-27 16:41:30 -07:00
VIA256 7676f1c809 stop quarryCam from breaking when the quarry switches vehicles 2025-10-26 22:01:35 -07:00
VIA256 dc8598a5c9 rix rpc typo bug 2025-10-26 20:49:23 -07:00
VIA256 51c57cd932 fix Prebuild project to work when building solution for release in addition to debug 2025-10-26 20:26:19 -07:00
VIA256 a7db3817a6 remove ads from the game code 2025-10-26 19:55:24 -07:00
VIA256 200b6a9347 disable language filter for now 2025-10-26 19:54:59 -07:00
VIA256 ad5d84cc8b have MakeWindowUpdate point to the gitea releases instead of the discord 2025-10-26 19:46:19 -07:00
VIA256 9b181689d2 change the game version to 4.0
this needs to happen because we changed how certain RPC functions operate which will probably crash games now if two versions collide
2025-10-26 19:27:33 -07:00
VIA256 018cfa5846 make zorbBall more persistant. make it so bots sort of can drive with xorbs
zorbBalls now persist across vehicle switching and bot creation.
bots have very poor but sort of functional xorb driving logic
2025-10-26 19:19:45 -07:00
VIA256 42102b530b turn vehicle xorbs off if the server disables them 2025-10-26 18:31:11 -07:00
VIA256 8d1588757e fix the xorb size and color 2025-10-26 17:25:40 -07:00
VIA256 e8a9278fc3 fix entrypoint simple diamond 2025-10-26 15:07:14 -07:00
VIA256 56c8a48510 quarryveh: make 1st person nametags and vehicle stats corrospond to the vehicle being spectated 2025-10-25 22:02:37 -07:00
VIA256 00dcbfc9af idk lmao 2025-10-25 13:24:39 -07:00
VIA256 f3157ef0ea fix SeaData invalid cast 2025-10-25 13:14:32 -07:00
VIA256 5961a12aa7 fix jumppoint.cs invalid cast 2025-10-25 12:57:35 -07:00
VIA256 e2978eac60 Merge pull request #10 from VIA256/marsxplr-4.0
Continue onward to Marsxplr 4.0
2025-10-25 06:50:09 +00:00
VIA256 684b74e5a3 Update README.md to inform about the new build system 2025-10-25 06:49:00 +00:00
VIA256 e0151e558a Replace crappy build batch scripts with visual studio solution
this thing binds all the csharp projects together and sets the stage for creating the mars explorer.exe c++ project and the rest of the runtime stuff
2025-10-24 23:22:13 -07:00
VIA256 16db95b196 Merge branch 'main' into marsxplr-4.0 2025-10-24 17:32:57 -07:00
VIA256 b93d2c1f2a Add quarryCam
if toggled, tells Camera to follow Quarry instead of exclusively the Player
2025-10-23 17:22:57 -07:00
26 changed files with 555 additions and 375 deletions
+5
View File
@@ -39,3 +39,8 @@ UnityDomainLoad/obj/
UnityDomainLoad/bin/
UnityDomainLoad/.vs/
UnityDomainLoad/UnityDomainLoad.suo
MarsXPLR.suo
MarsXPLR.ncb
PreBuild/Debug
PreBuild/Release
PreBuild/PreBuild.vcproj.*
@@ -63,4 +63,7 @@
<Compile Include="WaterSimple.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(ProjectDir)bin\26998b3a9cbf54825a27e5f2d3cc4df1.dll" "$(SolutionDir)marsxplr_build\Mars Explorer_Data\Assembly - CSharp - first pass.dll"</PostBuildEvent>
</PropertyGroup>
</Project>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?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>
@@ -12,6 +12,7 @@
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<ProjectGuid>{23B280BD-8095-4FA3-B894-B77354BEF075}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -46,4 +47,9 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>copy "$(ProjectDir)bin\e36192721fc364533a8edf2aefd3b72c.dll" "$(SolutionDir)marsxplr_build\Mars Explorer_Data\Assembly - CSharp.dll"</PostBuildEvent>
</PropertyGroup>
</Project>
@@ -75,6 +75,7 @@
<Compile Include="RamoSphere.cs" />
<Compile Include="Rocket.cs" />
<Compile Include="SeaData.cs" />
<Compile Include="SemVer.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Skidmarks.cs" />
<Compile Include="SoundEffect.cs" />
@@ -100,4 +101,7 @@
<Compile Include="World.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(ProjectDir)bin\58cc2f0ae478d40e7a89c7ba576c3586.dll" "$(SolutionDir)marsxplr_build\Mars Explorer_Data\Assembly - UnityScript.dll"</PostBuildEvent>
</PropertyGroup>
</Project>
+9 -5
View File
@@ -9,7 +9,7 @@ public class BaseSimple : MonoBehaviour
public void Start()
{
mat = (Material)((MeshRenderer)this.GetComponent(typeof(MeshRenderer))).material;
mat = GetComponent<MeshRenderer>().material;
Vector3 mts = mat.mainTextureScale;
mts.x = 1;
mts.y = 0.1f;
@@ -22,7 +22,9 @@ public class BaseSimple : MonoBehaviour
0.5f,
Mathf.Min(
10,
Vector3.Distance(transform.position, Camera.main.transform.position) / 10f
Vector3.Distance(
transform.position,
Camera.main.transform.position) / 10f
)
);
@@ -44,10 +46,12 @@ public class BaseSimple : MonoBehaviour
if (upMode)
{
mto.y += Time.deltaTime * 0.1f;
if(mto.y < 0.4f)
{
upMode = true;
if (mto.y > 0.6f) upMode = false;
}
else
{
mto.y -= Time.deltaTime * 0.1f;
if (mto.y < 0.4f) upMode = true;
}
mat.mainTextureOffset = mto;
}
+46 -32
View File
@@ -23,6 +23,8 @@ public class CameraVehicle : MonoBehaviour
public GlowEffect glowEffect;
public ColorCorrectionEffect colorEffect;
public float worldTime;
public GameObject camTarget;
public Vehicle camTargetVeh;
public CameraVehicle()
{
@@ -56,6 +58,18 @@ public class CameraVehicle : MonoBehaviour
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
if (mb.enabled)
{
@@ -70,7 +84,7 @@ public class CameraVehicle : MonoBehaviour
if (Game.Settings.useHypersound == 1)
{
Game.Settings.gameMusic.pitch = Mathf.Clamp(
-0.5f + Game.Player.rigidbody.velocity.magnitude / 15f,
-0.5f + camTarget.rigidbody.velocity.magnitude / 15f,
0.8f,
1.5f
);
@@ -133,10 +147,10 @@ public class CameraVehicle : MonoBehaviour
arrow.rotation = Quaternion.Lerp(
arrow.rotation,
Quaternion.LookRotation(
((Game.PlayerVeh.isIt != 0 || !Game.QuarryVeh) ?
((camTargetVeh.isIt != 0 || !Game.QuarryVeh) ?
World.baseTF :
Game.QuarryVeh.gameObject.transform
).position - Game.Player.transform.position
).position - camTarget.transform.position
),
Time.deltaTime * 15f
);
@@ -192,7 +206,7 @@ public class CameraVehicle : MonoBehaviour
}
//Constants
float camDist = (float)Game.PlayerVeh.camOffset + Game.Settings.camDist;
float camDist = (float)camTargetVeh.camOffset + Game.Settings.camDist;
//World Entry Effect
if (worldTime < 7f)
@@ -200,11 +214,11 @@ public class CameraVehicle : MonoBehaviour
worldTime = Time.time - Game.Controller.worldLoadTime;
transform.position = Vector3.Lerp(
transform.position,
Game.Player.transform.position,
camTarget.transform.position,
Time.deltaTime * 1f
);
wr = Quaternion.LookRotation(
Game.Player.transform.position - transform.position,
camTarget.transform.position - transform.position,
Vector3.up
);
if (worldTime > 1f)
@@ -224,7 +238,7 @@ public class CameraVehicle : MonoBehaviour
(Input.GetButton("Snipe") && !Game.Messaging.chatting)
)
{
transform.position = Game.PlayerVeh.ridePos.position;
transform.position = camTargetVeh.ridePos.position;
if (Input.GetButtonDown("Fire2") || Input.GetKeyDown(KeyCode.Alpha1))
{
@@ -234,7 +248,7 @@ public class CameraVehicle : MonoBehaviour
{
gyroTation = Quaternion.Euler(
0f,
Game.PlayerVeh.ridePos.rotation.eulerAngles.y,
camTargetVeh.ridePos.rotation.eulerAngles.y,
0f
);
}
@@ -246,7 +260,7 @@ public class CameraVehicle : MonoBehaviour
}
else
{
transform.rotation = Game.PlayerVeh.ridePos.rotation;
transform.rotation = camTargetVeh.ridePos.rotation;
}
rotationX += Input.GetAxis("Mouse X") * (Input.GetButton("Snipe") ? 0.5f : 2f);
@@ -291,9 +305,9 @@ public class CameraVehicle : MonoBehaviour
{
transform.position = Vector3.Lerp(
transform.position,
Game.Player.transform.position - Vector3.Normalize(
Game.Player.transform.position - transform.position
) * camDist + Vector3.one * (Game.PlayerVeh.camSmooth ?
camTarget.transform.position - Vector3.Normalize(
camTarget.transform.position - transform.position
) * camDist + Vector3.one * (camTargetVeh.camSmooth ?
0f :
Mathf.Lerp(0f, 15f, camDist / 30f)
),
@@ -302,9 +316,9 @@ public class CameraVehicle : MonoBehaviour
transform.rotation = Quaternion.Slerp(
transform.rotation,
Quaternion.LookRotation(
Game.Player.transform.position - transform.position,
camTarget.transform.position - transform.position,
(Game.Settings.flightCam ?
Game.Player.transform.up :
camTarget.transform.up :
Vector3.up
)
),
@@ -329,15 +343,15 @@ public class CameraVehicle : MonoBehaviour
else if (Game.Settings.camChase == 1)
{
if (
(bool)Game.Player.transform.gameObject.rigidbody &&
Game.Player.transform.gameObject.rigidbody.velocity.sqrMagnitude > 0.1f &&
Game.Player.transform.gameObject.rigidbody.velocity.normalized.y < 0.8f &&
Game.Player.transform.gameObject.rigidbody.velocity.normalized.y > -0.8f
(bool)camTarget.transform.gameObject.rigidbody &&
camTarget.transform.gameObject.rigidbody.velocity.sqrMagnitude > 0.1f &&
camTarget.transform.gameObject.rigidbody.velocity.normalized.y < 0.8f &&
camTarget.transform.gameObject.rigidbody.velocity.normalized.y > -0.8f
)
{
lastDir = Vector3.Lerp(
lastDir,
Game.Player.transform.gameObject.rigidbody.velocity.normalized,
camTarget.transform.gameObject.rigidbody.velocity.normalized,
0.1f
);
}
@@ -350,12 +364,12 @@ public class CameraVehicle : MonoBehaviour
);
}
Vector3 newPos = (
Game.Player.transform.position +
camTarget.transform.position +
lastDir * -(camDist) +
Vector3.up * (camDist / 3f)
);
Vector3 tpos = transform.position;
float y = tpos.y + (Game.Player.transform.position.y - lastY) * Time.deltaTime;
float y = tpos.y + (camTarget.transform.position.y - lastY) * Time.deltaTime;
tpos.y = y;
transform.position = tpos;
transform.position = Vector3.Lerp(
@@ -363,13 +377,13 @@ public class CameraVehicle : MonoBehaviour
newPos,
Time.deltaTime * 4f
);
lastY = Game.Player.transform.position.y;
lastY = camTarget.transform.position.y;
transform.rotation = Quaternion.Slerp(
transform.rotation,
Quaternion.LookRotation(
Game.Player.transform.position - transform.position,
camTarget.transform.position - transform.position,
(Game.Settings.flightCam ?
Game.Player.transform.up :
camTarget.transform.up :
Vector3.up
)
),
@@ -395,13 +409,13 @@ public class CameraVehicle : MonoBehaviour
//Arcade
else if (
Game.Settings.camChase == 2 &&
Game.Player.transform.rigidbody.velocity.magnitude > 0f
camTarget.transform.rigidbody.velocity.magnitude > 0f
)
{
float heightDamping = 3f;
float rotationDamping = 3f;
float wantedRotationAngle = Quaternion.LookRotation(
Game.Player.transform.rigidbody.velocity
camTarget.transform.rigidbody.velocity
).eulerAngles.y;
wantedRotationAngle += Mathf.Lerp(
30f,
@@ -409,7 +423,7 @@ public class CameraVehicle : MonoBehaviour
camDist / 30f
) * Input.GetAxis("Horizontal");
float wantedHeight = (
Game.Player.transform.position.y +
camTarget.transform.position.y +
Mathf.Lerp(0.1f, 15f, camDist / 30f) +
heightBoost
);
@@ -432,7 +446,7 @@ public class CameraVehicle : MonoBehaviour
currentRotationAngle,
0f
);
Vector3 pos = Game.Player.transform.position;
Vector3 pos = camTarget.transform.position;
pos.y += targetHeight; //Look ABOVE the target
transform.position = pos;
transform.position -= currentRotation * Vector3.forward * camDist;
@@ -455,7 +469,7 @@ public class CameraVehicle : MonoBehaviour
{ //We are under terrain
Physics.Linecast( //Determine how far forward we need to go to be out of it
transform.position,
Game.Player.transform.position + Vector3.up * currentHeight,
camTarget.transform.position + Vector3.up * currentHeight,
out hit,
1 << 8
);
@@ -476,11 +490,11 @@ public class CameraVehicle : MonoBehaviour
{
transform.position = Vector3.Lerp(
transform.position,
Game.Player.transform.position + Vector3.up * 40f,
camTarget.transform.position + Vector3.up * 40f,
Time.deltaTime * 0.3f
);
wr = Quaternion.LookRotation(
Game.Player.transform.position - transform.position,
camTarget.transform.position - transform.position,
Vector3.up
);
transform.rotation = Quaternion.Slerp(
@@ -495,7 +509,7 @@ public class CameraVehicle : MonoBehaviour
{
transform.rotation = Quaternion.Slerp(
transform.rotation,
Quaternion.LookRotation(Game.Player.transform.position - transform.position),
Quaternion.LookRotation(camTarget.transform.position - transform.position),
Time.deltaTime * 1.5f
);
transform.Translate(new Vector3(
+2 -2
View File
@@ -8,9 +8,9 @@ public class EntryPoint : MonoBehaviour
{
public IEnumerator Start()
{
yield return new WaitForSeconds(15.0f);
yield return new WaitForSeconds(15f);
ParticleEmitter pe = (ParticleEmitter)GetComponent(typeof(ParticleEmitter));
ParticleEmitter pe = this.GetComponent<ParticleEmitter>();
pe.emit = true;
}
}
+19 -8
View File
@@ -289,7 +289,8 @@ public class Game : MonoBehaviour
0,
(isHost ? 1 : 0),
0,
0);
0,
false);
if (isHost)
{
@@ -1098,7 +1099,8 @@ public class Game : MonoBehaviour
veh.isBot ? 1 : 0,
veh.isIt,
veh.score,
veh.specialInput ? 1 : 0);
veh.specialInput ? 1 : 0,
veh.zorbBall);
veh.networkView.RPC(
"sC",
player,
@@ -1599,7 +1601,8 @@ public class Game : MonoBehaviour
1,
0,
0,
0);
0,
PlayerVeh.zorbBall);
}
public IEnumerator axeBot()
@@ -1635,6 +1638,7 @@ public class Game : MonoBehaviour
int score = PlayerVeh.score;
int specialInput = (PlayerVeh.specialInput ? 1 : 0);
string name = Player.name;
bool zorbBall = PlayerVeh.zorbBall;
Network.Destroy(Player.rigidbody.networkView.viewID);
networkView.RPC(
"iV",
@@ -1646,7 +1650,8 @@ public class Game : MonoBehaviour
0,
isIt,
score,
specialInput);
specialInput,
zorbBall);
}
[RPC]
@@ -1808,7 +1813,8 @@ public class Game : MonoBehaviour
int isBot,
int isIt,
int score,
int specialInput)
int specialInput,
bool zorbBall)
{
//while(worldLoaded == false) yield return null;
@@ -1867,8 +1873,10 @@ public class Game : MonoBehaviour
plyVeh.isIt = isIt;
plyVeh.score = score;
plyVeh.specialInput = (specialInput == 1);
plyVeh.zorbBall = zorbBall;
if (viewID.isMine && isBot == 0) Player = plyObj;
if (plyVeh.isIt == 1) QuarryVeh = plyVeh;
}
[RPC]
@@ -2048,7 +2056,7 @@ public class Game : MonoBehaviour
}
[RPC]
public void sSH(string sname, string sworld, string swelcome, string sblacklist, string spassword, float gVersion, bool shidden, NetworkMessageInfo info)
public void sSH(string sname, string sworld, string swelcome, string sblacklist, string spassword, SemVer gVersion, bool shidden, NetworkMessageInfo info)
{
serverName = sname;
Settings.serverWelcome = swelcome;
@@ -2140,9 +2148,12 @@ public class Game : MonoBehaviour
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);
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;
}
}
+2 -1
View File
@@ -4,7 +4,8 @@ using UnityEngine;
[Serializable]
public class GameData : MonoBehaviour
{
public static float gameVersion = 2.22f;
//public static float gameVersion = 4.0f;
public static SemVer gameVersion = new SemVer("4.0.1");
public static float serverVersion = 0.2f;
public static string gameName = "marsxplr";
public static string userName = "";
+14 -8
View File
@@ -17,21 +17,21 @@ public class JumpPoint : MonoBehaviour
{
return;
}
if ((bool)whirldObject.parameters["JumpTime"])
if (whirldObject.parameters["JumpTime"] != null)
{
time = (int)whirldObject.parameters["JumpTime"];
time = (int)float.Parse((String)whirldObject.parameters["JumpTime"]);
}
if ((bool)whirldObject.parameters["JumpRandMin"])
if (whirldObject.parameters["JumpRandMin"] != null)
{
randMin = (int)whirldObject.parameters["JumpRandMin"];
randMin = (int)float.Parse((String)whirldObject.parameters["JumpRandMin"]);
}
if ((bool)whirldObject.parameters["JumpRandMax"])
if (whirldObject.parameters["JumpRandMax"] != null)
{
randMax = (int)whirldObject.parameters["JumpRandMax"];
randMax = (int)float.Parse((String)whirldObject.parameters["JumpRandMax"]);
}
if ((bool)whirldObject.parameters["JumpVelocity"])
if (whirldObject.parameters["JumpVelocity"] != null)
{
velocity = (int)whirldObject.parameters["JumpVelocity"];
velocity = (int)float.Parse((String)whirldObject.parameters["JumpVelocity"]);
}
}
@@ -58,6 +58,12 @@ public class JumpPoint : MonoBehaviour
transform.up * velocity,
ForceMode.VelocityChange);
}
/*other.attachedRigidbody.AddExplosionForce(
UnityEngine.Random.Range(randMin, randMax),
transform.position,
0f,
2f,
ForceMode.VelocityChange);*/
}
}
+9 -140
View File
@@ -86,22 +86,6 @@ public class Lobby : MonoBehaviour
private bool dedicatedNAT;
// /*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()
{
QualitySettings.currentLevel = QualityLevel.Fantastic;
@@ -111,9 +95,6 @@ public class Lobby : MonoBehaviour
public IEnumerator Start()
{
String adBrightUrl = "";
String adSenseUrl = "";
userPassword = PlayerPrefs.GetString("userPassword", "");
userCode = PlayerPrefs.GetString("userCode", "");
userRemembered = (PlayerPrefs.GetInt("userRemembered", 0) == 1 ? true : false);
@@ -155,11 +136,8 @@ public class Lobby : MonoBehaviour
String[] val = tmp.ToArray();
if (
val[0] == "v" &&
float.Parse(
val[1],
CultureInfo.InvariantCulture.NumberFormat
) > (float)GameData.gameVersion)
val[0] == "sv" &&
SemVer.Parse(val[1]) > GameData.gameVersion)
{
outdated = val[1];
}
@@ -167,10 +145,6 @@ public class Lobby : MonoBehaviour
{
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] == "w")
{
@@ -228,14 +202,6 @@ public class Lobby : MonoBehaviour
{
GameData.networkMode = int.Parse(val[1]);
}
else if (val[0] == "adbr")
{
adBrightUrl = val[1];
}
else if (val[0] == "adsn")
{
adSenseUrl = val[1];
}
}
}
else
@@ -247,60 +213,6 @@ public class Lobby : MonoBehaviour
messages = msgs.ToArray();
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)
@@ -992,7 +904,7 @@ public class Lobby : MonoBehaviour
HostData[] data = MasterServer.PollHostList();
String[] serverData;
float gameVersion;
SemVer gameVersion;
float serverVersion;
//Precull Data
@@ -1007,13 +919,13 @@ public class Lobby : MonoBehaviour
if (filterNATHosts && element.useNat) continue;
serverData = element.comment.Split(";"[0]);
gameVersion = 0.0f;
gameVersion = new SemVer(0);
serverVersion = 0.0f;
foreach (String dat in serverData)
{
if (dat == "") continue;
vals = dat.Split("="[0]);
if (vals[0] == "v") gameVersion = float.Parse(vals[1]);
if (vals[0] == "v") gameVersion = SemVer.Parse(vals[1]);
if (vals[0] == "d") serverVersion = float.Parse(vals[1]);
}
@@ -1041,40 +953,12 @@ public class Lobby : MonoBehaviour
System.Array.Sort(data, sortHostArray);
int i = 0;
float adCounter = 0.000f;
int adTicker = 0;
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;
masterServerMessage = "";
serverData = element.comment.Split(";"[0]);
gameVersion = 0.0f;
gameVersion = new SemVer(0);
serverVersion = 0.0f;
String serverWorld = "";
String serverPlayers = "";
@@ -1086,7 +970,7 @@ public class Lobby : MonoBehaviour
{
if (dat == "") continue;
vals = dat.Split("="[0]);
if (vals[0] == "v") gameVersion = float.Parse(vals[1]);
if (vals[0] == "v") gameVersion = SemVer.Parse(vals[1]);
if (vals[0] == "d") serverVersion = float.Parse(vals[1]);
else if (vals[0] == "w") serverWorld = vals[1];
else if (vals[0] == "p") serverPlayers = vals[1];
@@ -1179,21 +1063,6 @@ public class Lobby : MonoBehaviour
(serverVersion != 0.0 ? " (» Dedicated Host Server)" : "");
}
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)
@@ -1532,12 +1401,12 @@ public class Lobby : MonoBehaviour
GUILayout.Label("A new Mars Explorer version is now available on the Discord Server:");
GUILayout.Space(10f);
if (
GUILayout.Button(">> Ask in the #marsxplr channel to Download Mars Explorer version " +
GUILayout.Button(">> Go to the Gitea Releases page to Download MarsXPLR version " +
outdated +
"! <<",
GUILayout.Height(40f)))
{
OpenURL("https://discord.gg/dxTFZRM");
OpenURL("https://gitea.moe/VIA256/marsxplr-decomp/releases");
}
GUILayout.Space(30f);
GUILayout.BeginHorizontal();
+4 -4
View File
@@ -130,10 +130,10 @@ public class Messaging : MonoBehaviour
RPCMode.All,
!Game.PlayerVeh.zorbBall);
Game.Controller.msg(
"XORB " + ((!Game.PlayerVeh.zorbBall) ?
"Deactivated" :
"Activated"),
2);
"XORB " + (Game.PlayerVeh.zorbBall ?
"Activated" :
"Deactivated"),
(int)chatOrigins.Server);
}
else
{
+1 -1
View File
@@ -39,7 +39,7 @@ public class SeaData : MonoBehaviour
whirldObject == null ||
whirldObject.parameters == null ||
seaObject == null ||
!(bool)whirldObject.parameters["Mode"])
whirldObject.parameters["Mode"] == null)
{
return;
}
+115
View File
@@ -0,0 +1,115 @@
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);
}
}
+15 -10
View File
@@ -71,6 +71,7 @@ public class Settings : MonoBehaviour
public float camDist = 0;
public bool flightCam = false;
public bool gyroCam = false;
public bool quarryCam = false;
public float worldGrav = -9.81f;
public float worldFog = 0.001f;
@@ -154,19 +155,17 @@ public class Settings : MonoBehaviour
renderViewCap = PlayerPrefs.GetFloat("viewCap", 1000f);
Application.targetFrameRate = (int)PlayerPrefs.GetFloat("targetFrameRate", 100f);
renderAutoAdjust = false;
showHints = ((PlayerPrefs.GetInt("showHints", 1) != 0) ? true : false);
showHints = PlayerPrefs.GetInt("showHints", 1) != 0;
useMusic = PlayerPrefs.GetInt("useMusic", 1);
useSfx = ((PlayerPrefs.GetInt("useSfx", 1) != 0) ? true : false);
useSfx = PlayerPrefs.GetInt("useSfx", 1) != 0;
useHypersound = PlayerPrefs.GetInt("useHypersound", 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);
useMinimap = PlayerPrefs.GetInt("useMinimap", 1) != 0;
camMode = PlayerPrefs.GetInt("cam", 1);
camChase = PlayerPrefs.GetInt("camChase", 1);
camDist = PlayerPrefs.GetFloat("camDist", 0.01f);
flightCam = ((PlayerPrefs.GetInt("flightCam", 0) != 0) ? true : false);
gyroCam = ((PlayerPrefs.GetInt("gyroCam", 0) != 0) ? true : false);
flightCam = PlayerPrefs.GetInt("flightCam", 0) != 0;
gyroCam = PlayerPrefs.GetInt("gyroCam", 0) != 0;
quarryCam = PlayerPrefs.GetInt("quarryCam", 0) != 0;
}
public void showDialogGame()
@@ -486,6 +485,12 @@ public class Settings : MonoBehaviour
PlayerPrefs.SetInt("flightCam", flightCam ? 1 : 0);
}
if (GUILayout.Toggle(quarryCam, "QuarryCam Enabled") != quarryCam)
{
quarryCam = !quarryCam;
PlayerPrefs.SetInt("quarryCam", quarryCam ? 1 : 0);
}
float cg;
if (camMode == 0)
{
@@ -926,7 +931,7 @@ public class Settings : MonoBehaviour
ramoSpheres != 0f,
"RORBs Enabled") != (ramoSpheres != 0f))
{
ramoSpheres = ((ramoSpheres == 0f) ? 0.5f : 0f);
ramoSpheres = ((ramoSpheres != 0f) ? 0f : 0.5f);
if (ramoSpheres != 0f)
{
zorbSpeed = 7f;
@@ -954,7 +959,7 @@ public class Settings : MonoBehaviour
zorbSpeed != 0f,
"XORBs Available") != (zorbSpeed != 0f))
{
zorbSpeed = ((zorbSpeed == 0f) ? 7 : 0);
zorbSpeed = ((zorbSpeed != 0f) ? 0 : 7);
updateServerPrefs();
}
+39 -25
View File
@@ -308,20 +308,28 @@ public class Vehicle : MonoBehaviour
GUI.depth = -1;
if (networkView.isMine && !isBot)
{
Rigidbody targetRigidbody = myRigidbody;
if (
Game.Settings.quarryCam &&
(bool)Game.QuarryVeh &&
(bool)Game.QuarryVeh.myRigidbody)
{
targetRigidbody = Game.QuarryVeh.myRigidbody;
}
GUI.Button(
new Rect(
(float)Screen.width * 0.5f - 75f,
(float)Screen.height - 30f,
150f,
20f),
(myRigidbody.velocity.magnitude < 0.05f ?
Mathf.RoundToInt(myRigidbody.velocity.magnitude * 2.23f) +
" MPH" :
"Static") +
(targetRigidbody.velocity.magnitude < 0.05f ?
"Static" :
Mathf.RoundToInt(targetRigidbody.velocity.magnitude * 2.23f) +
" MPH") +
" " +
Mathf.RoundToInt(myRigidbody.transform.position.y) +
Mathf.RoundToInt(targetRigidbody.transform.position.y) +
" ALT" +
((isIt != 0) ?
((isIt != 0 || Game.Settings.quarryCam) ?
"" :
(" " +
Mathf.RoundToInt(Game.Controller.quarryDist) +
@@ -330,21 +338,24 @@ public class Vehicle : MonoBehaviour
}
GUI.depth = 5;
Vector3 pos = Camera.main.WorldToScreenPoint(transform.position);
if (
(!networkView.isMine || isBot &&
Game.Settings.hideNames &&
(Vector3.Distance(
new Vector3(pos.x, pos.y, 0f),
Input.mousePosition) >= 40f ||
Physics.Linecast(
transform.position,
Camera.main.transform.position,
1 << 8))) ||
(pos.z <= 0f) &&
(!networkView.isMine || isBot))
bool mainTag = networkView.isMine && !isBot;
if(Game.Settings.quarryCam && (bool)Game.QuarryVeh)
{
return;
mainTag = (this == Game.QuarryVeh);
}
if (
mainTag ||
!Game.Settings.hideNames ||
(
Vector3.Distance(
new Vector3(pos.x, pos.y, 0),
Input.mousePosition) < 40 &&
!Physics.Linecast(
transform.position,
Camera.main.transform.position, 1 << 8)))
{
if (pos.z > 0 || mainTag)
{
if (pos.z < 0f)
{
pos.z = 0f;
@@ -359,7 +370,7 @@ public class Vehicle : MonoBehaviour
pos.z * 0.2f);
if (
(pos.z <= 1f || pos.y < sizeY * 1.9f) &&
networkView.isMine && !isBot)
mainTag)
{
if (pos.z <= 1f)
{
@@ -384,6 +395,8 @@ public class Vehicle : MonoBehaviour
"" :
"_it"));
}
}
}
public IEnumerator OnPrefsUpdated()
{
@@ -401,7 +414,7 @@ public class Vehicle : MonoBehaviour
transform.position,
transform.rotation);
ramoSphere.transform.parent = transform;
Collider[] colliders = (Collider[])vehObj.GetComponentsInChildren(typeof(Collider));
Collider[] colliders = (Collider[])vehObj.GetComponentsInChildren<Collider>();
foreach (Collider cldr in colliders)
{
Physics.IgnoreCollision(ramoSphere.collider, cldr);
@@ -410,15 +423,16 @@ 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
ramoSphereScale = (((Game.Settings.ramoSpheres) * 15) +
camOffset * 1);
zorbBall = Game.Settings.zorbSpeed != 0f ? zorbBall : false;
if (ramoSphere.collider.isTrigger == zorbBall)
{
ramoSphere.collider.isTrigger = !zorbBall;
ramoSphere.transform.localScale = Vector3.zero;
ramoSphere.active = true;
((RamoSphere)ramoSphere.GetComponent(typeof(RamoSphere)))
.colorSet(zorbBall);
ramoSphere.collider.active = true;
ramoSphere.SendMessage("colorSet", zorbBall); //ANOTHER UNITY BUG - for some reason, SendMessage isn't working like it should...
ramoSphere.GetComponent<RamoSphere>().colorSet(zorbBall);
}
else ramoSphere.active = true;
else ramoSphere.collider.active = true;
rigidbody.inertiaTensor = tnsor;
rigidbody.centerOfMass = cg;
}
+26
View File
@@ -217,4 +217,30 @@ 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);
}
}
}
+110
View File
@@ -0,0 +1,110 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly---UnityScript", "Assembly - UnityScript\Assembly---UnityScript.csproj", "{084E81A6-3376-4976-B642-4C6443C97C36}"
ProjectSection(ProjectDependencies) = postProject
{C67F4835-3976-49D0-AA05-3487C9FD57A2} = {C67F4835-3976-49D0-AA05-3487C9FD57A2}
{546DAF9B-0B6A-4800-922B-2F95A86DE45E} = {546DAF9B-0B6A-4800-922B-2F95A86DE45E}
{23B280BD-8095-4FA3-B894-B77354BEF075} = {23B280BD-8095-4FA3-B894-B77354BEF075}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly---CSharp---first-pass", "Assembly - CSHarp - first pass\Assembly---CSharp---first-pass.csproj", "{93A8D6B3-DD52-4C21-A101-AF360DAFC096}"
ProjectSection(ProjectDependencies) = postProject
{C67F4835-3976-49D0-AA05-3487C9FD57A2} = {C67F4835-3976-49D0-AA05-3487C9FD57A2}
{546DAF9B-0B6A-4800-922B-2F95A86DE45E} = {546DAF9B-0B6A-4800-922B-2F95A86DE45E}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly---CSharp", "Assembly - CSharp\Assembly---CSharp.csproj", "{23B280BD-8095-4FA3-B894-B77354BEF075}"
ProjectSection(ProjectDependencies) = postProject
{C67F4835-3976-49D0-AA05-3487C9FD57A2} = {C67F4835-3976-49D0-AA05-3487C9FD57A2}
{546DAF9B-0B6A-4800-922B-2F95A86DE45E} = {546DAF9B-0B6A-4800-922B-2F95A86DE45E}
{93A8D6B3-DD52-4C21-A101-AF360DAFC096} = {93A8D6B3-DD52-4C21-A101-AF360DAFC096}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEngine", "UnityEngine\UnityEngine.csproj", "{C67F4835-3976-49D0-AA05-3487C9FD57A2}"
ProjectSection(ProjectDependencies) = postProject
{546DAF9B-0B6A-4800-922B-2F95A86DE45E} = {546DAF9B-0B6A-4800-922B-2F95A86DE45E}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityDomainLoad", "UnityDomainLoad\UnityDomainLoad.csproj", "{9446C081-D322-4861-B4E4-DD57727ABD6D}"
ProjectSection(ProjectDependencies) = postProject
{546DAF9B-0B6A-4800-922B-2F95A86DE45E} = {546DAF9B-0B6A-4800-922B-2F95A86DE45E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PreBuild", "PreBuild\PreBuild.vcproj", "{546DAF9B-0B6A-4800-922B-2F95A86DE45E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{084E81A6-3376-4976-B642-4C6443C97C36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Debug|Win32.ActiveCfg = Debug|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Release|Any CPU.ActiveCfg = Release|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Release|Any CPU.Build.0 = Release|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Release|Win32.ActiveCfg = Release|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Debug|Any CPU.Build.0 = Debug|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Debug|Win32.ActiveCfg = Debug|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Release|Any CPU.ActiveCfg = Release|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Release|Any CPU.Build.0 = Release|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Release|Win32.ActiveCfg = Release|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Debug|Win32.ActiveCfg = Debug|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Release|Any CPU.Build.0 = Release|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Release|Win32.ActiveCfg = Release|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Debug|Win32.ActiveCfg = Debug|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Release|Any CPU.Build.0 = Release|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Release|Win32.ActiveCfg = Release|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Debug|Win32.ActiveCfg = Debug|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Release|Any CPU.Build.0 = Release|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Release|Win32.ActiveCfg = Release|Any CPU
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Debug|Any CPU.ActiveCfg = Debug|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Debug|Win32.ActiveCfg = Debug|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Debug|Win32.Build.0 = Debug|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Release|Any CPU.ActiveCfg = Release|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Release|Mixed Platforms.Build.0 = Release|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Release|Win32.ActiveCfg = Release|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
+65
View File
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="PreBuild"
ProjectGUID="{546DAF9B-0B6A-4800-922B-2F95A86DE45E}"
Keyword="MakeFileProj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="if exist &quot;$(SolutionDir)\marsxplr_build\Mars Explorer_Data\lib&quot; rd /S /Q &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data\lib&quot;&#x0D;&#x0A;if exist &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data&quot; rd /S /Q &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data&quot;&#x0D;&#x0A;md $(SolutionDir)marsxplr_build&#x0D;&#x0A;md &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data&quot;&#x0D;&#x0A;md &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data\lib&quot;"
ReBuildCommandLine=""
CleanCommandLine=""
Output=""
PreprocessorDefinitions="WIN32;_DEBUG"
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="if exist &quot;$(SolutionDir)\marsxplr_build\Mars Explorer_Data\lib&quot; rd /S /Q &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data\lib&quot;&#x0D;&#x0A;if exist &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data&quot; rd /S /Q &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data&quot;&#x0D;&#x0A;md $(SolutionDir)marsxplr_build&#x0D;&#x0A;md &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data&quot;&#x0D;&#x0A;md &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data\lib&quot;"
ReBuildCommandLine=""
CleanCommandLine=""
Output=""
PreprocessorDefinitions="WIN32;NDEBUG"
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
+4 -1
View File
@@ -12,6 +12,7 @@
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<ProjectGuid>{9446C081-D322-4861-B4E4-DD57727ABD6D}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -33,10 +34,12 @@
<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" />
<PropertyGroup>
<PostBuildEvent>copy "$(ProjectDir)bin\UnityDomainLoad.exe" "$(SolutionDir)marsxplr_build\Mars Explorer_Data\lib\UnityDomainLoad.exe"</PostBuildEvent>
</PropertyGroup>
</Project>
+3
View File
@@ -39,4 +39,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(ProjectDir)bin\UnityEngine.dll" "$(SolutionDir)marsxplr_build\Mars Explorer_Data\lib\UnityEngine.dll"</PostBuildEvent>
</PropertyGroup>
</Project>
+2 -1
View File
@@ -102,7 +102,8 @@ namespace UnityEngine
get;
}
[Obsolete("the active property is deprecated on components. Please use gameObject.active instead. If you meant to enable / disable a single component use enabled instead.")]
//I don't give a damn :3
//[Obsolete("the active property is deprecated on components. Please use gameObject.active instead. If you meant to enable / disable a single component use enabled instead.")]
public extern bool active
{
[MethodImpl(MethodImplOptions.InternalCall)]
-50
View File
@@ -1,50 +0,0 @@
@echo off
set "flags=/p:Configuration=Debug /p:Platform=Win32"
echo ----------------
echo BUILDING ALL
echo ----------------
msbuild %flags% "UnityEngine\UnityEngine.csproj"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild %flags% "Assembly - CSharp - first pass\Assembly---CSharp---first-pass.csproj"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild %flags% "Assembly - UnityScript\Assembly---UnityScript.csproj"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild %flags% "Assembly - CSharp\Assembly---CSharp.csproj"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild %flags% "UnityDomainLoad\UnityDomainLoad.csproj"
if %errorlevel% neq 0 exit /b %errorlevel%
echo -----------------
echo COPYING FILES
echo -----------------
if exist "marsxplr_build\Mars Explorer_Data\lib" rd /S /Q "marsxplr_build\Mars Explorer_Data\lib"
if %errorlevel% neq 0 exit /b %errorlevel%
if exist "marsxplr_build\Mars Explorer_Data" rd /S /Q "marsxplr_build\Mars Explorer_Data"
if %errorlevel% neq 0 exit /b %errorlevel%
if exist marsxplr_build rd /S /Q marsxplr_build
if %errorlevel% neq 0 exit /b %errorlevel%
md marsxplr_build
if %errorlevel% neq 0 exit /b %errorlevel%
md "marsxplr_build\Mars Explorer_Data"
if %errorlevel% neq 0 exit /b %errorlevel%
md "marsxplr_build\Mars Explorer_Data\lib"
if %errorlevel% neq 0 exit /b %errorlevel%
copy "Assembly - CSharp\bin\e36192721fc364533a8edf2aefd3b72c.dll" "marsxplr_build\Mars Explorer_Data\Assembly - CSharp.dll"
if %errorlevel% neq 0 exit /b %errorlevel%
copy "Assembly - CSharp - first pass\bin\26998b3a9cbf54825a27e5f2d3cc4df1.dll" "marsxplr_build\Mars Explorer_Data\Assembly - CSharp - first pass.dll"
if %errorlevel% neq 0 exit /b %errorlevel%
copy "Assembly - UnityScript\bin\58cc2f0ae478d40e7a89c7ba576c3586.dll" "marsxplr_build\Mars Explorer_Data\Assembly - UnityScript.dll"
if %errorlevel% neq 0 exit /b %errorlevel%
copy "UnityEngine\bin\UnityEngine.dll" "marsxplr_build\Mars Explorer_Data\lib\UnityEngine.dll"
if %errorlevel% neq 0 exit /b %errorlevel%
copy "UnityDomainLoad\bin\UnityDomainLoad.exe" "marsxplr_build\Mars Explorer_Data\lib\UnityDomainLoad.exe"
if %errorlevel% neq 0 exit /b %errorlevel%
echo -----------------
echo BUILD SUCCESS
echo -----------------
-16
View File
@@ -1,16 +0,0 @@
------------LISTING/DERIVED BUILD ORDER------------------
UnityEngine:
Assembly - CSharp - first pass:
UnityEngine
Assembly - UnityScript:
Assembly - CSharp - first pass
UnityEngine
Assembly - CSharp:
Assembly CSharp - first pass
UnityEngine
UnityDomainLoad:
-18
View File
@@ -1,18 +0,0 @@
@echo off
set "flags=/p:Configuration=Debug /p:Platform=Win32"
echo -------------------
echo CLEANING BUILDS
echo -------------------
msbuild /t:Clean %flags% "Assembly - CSharp\Assembly---CSharp.csproj"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild /t:Clean %flags% "Assembly - CSharp - first pass\Assembly---CSharp---first-pass.csproj"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild /t:Clean %flags% "Assembly - UnityScript\Assembly---UnityScript.csproj"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild /t:Clean %flags% "UnityEngine\UnityEngine.csproj"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild /t:Clean %flags% "UnityDomainLoad\UnityDomainLoad.csproj"
if %errorlevel% neq 0 exit /b %errorlevel%
+3 -4
View File
@@ -4,7 +4,6 @@ My amatuer attempt at decompiling Mars Explorer so that it can be improved to ru
<hr>
<h1>building</h1>
Pretty much all of the game in terms of functionality has compilable source now, but the platform specific code is still a work in progress.<br>
I have setup a quick and dirty build system for all said targets in the single build_all.cmd script (and clean_all.cmd).<br>
At the moment the way the project is built is compiling each targets's respective .csproj using Command Line For Visual Studio 2008<br>
If the build is successful, you should be able to find a bunch of dlls in the directory marsxplr_build\Mars Explorer_Data.<br>
To test the build, can copy the dlls from that directory into the Mars Explorer_Data directory of your own personal Mars Explorer install in place of the original files.<br>
For the time being, building the project requires visual studio 2008 and dotnet 3.5. inconvenient as it is, its necessary for as long as we rely on the original unity player runtime.<br>
If the build is successful, you should be able to find a bunch of dlls in the directory Game\marsxplr_build\Mars Explorer_Data.<br>
To test the build, can copy the contents of the built Mars Explorer_Data dir into the Mars Explorer_Data dir of your own personal Mars Explorer install in place of the original files.<br>