diff --git a/engine/source/game/marble/marble.cpp b/engine/source/game/marble/marble.cpp index a02db4d2..c4b1e694 100644 --- a/engine/source/game/marble/marble.cpp +++ b/engine/source/game/marble/marble.cpp @@ -2274,8 +2274,11 @@ ConsoleMethod(Marble, setPhysics, void, 3, 3, "(physics)") physicsStrings[Marble::XNA] = "XNA"; physicsFlags[Marble::XNA] = Marble::XNA; - physicsStrings[Marble::XNASlopes] = "XNASlopes"; - physicsFlags[Marble::XNASlopes] = Marble::XNASlopes; + physicsStrings[Marble::MBUSlopes] = "MBUSlopes"; + physicsFlags[Marble::MBUSlopes] = Marble::MBUSlopes; + + physicsStrings[Marble::MBGSlopes] = "MBGSlopes"; + physicsFlags[Marble::MBGSlopes] = Marble::MBGSlopes; S32 i = 0; while (dStricmp(physicsStrings[i], physics)) diff --git a/engine/source/game/marble/marble.h b/engine/source/game/marble/marble.h index 9324b672..63707886 100644 --- a/engine/source/game/marble/marble.h +++ b/engine/source/game/marble/marble.h @@ -71,7 +71,8 @@ class Marble : public ShapeBase MBU, MBG, XNA, - XNASlopes, + MBUSlopes, + MBGSlopes, MBPhysics_Count }; diff --git a/engine/source/game/marble/marblecollision.cpp b/engine/source/game/marble/marblecollision.cpp index 37982107..c75d317d 100644 --- a/engine/source/game/marble/marblecollision.cpp +++ b/engine/source/game/marble/marblecollision.cpp @@ -592,19 +592,19 @@ void Marble::findContacts(U32 contactMask, const Point3D* inPos, const F32* inRa if (PlaneD(vertPlane + vertex, vertex, vertex + plane).distToPlane(contactVert) >= 0.0) { if (PlaneD(lastVertex - vertPlane, lastVertex, lastVertex + plane).distToPlane(contactVert) >= 0.0) { - if (mPhysics == MBG) + if (mPhysics == MBG || mPhysics == MBGSlopes) finalContact = vertPlane.project(contactVert); else contactVert = vertPlane.project(contactVert); break; } - if (mPhysics == MBG) + if (mPhysics == MBG || mPhysics == MBGSlopes) finalContact = lastVertex; else contactVert = lastVertex; } else { - if (mPhysics == MBG) + if (mPhysics == MBG || mPhysics == MBGSlopes) finalContact = vertex; else contactVert = vertex; @@ -628,7 +628,7 @@ void Marble::findContacts(U32 contactMask, const Point3D* inPos, const F32* inRa U32 materialId = poly->material; Point3D delta; - if (mPhysics == MBG) + if (mPhysics == MBG || mPhysics == MBGSlopes) delta = *pos - finalContact; else delta = *pos - contactVert; @@ -655,7 +655,7 @@ void Marble::findContacts(U32 contactMask, const Point3D* inPos, const F32* inRa contact.restitution = restitution; contact.normal = normal; - if (mPhysics == MBG) + if (mPhysics == MBG || mPhysics == MBGSlopes) contact.position = finalContact; else contact.position = contactVert; diff --git a/engine/source/game/marble/marblephysics.cpp b/engine/source/game/marble/marblephysics.cpp index c0eefafd..0889e3d7 100644 --- a/engine/source/game/marble/marblephysics.cpp +++ b/engine/source/game/marble/marblephysics.cpp @@ -106,7 +106,7 @@ void Marble::applyContactForces(const Move* move, bool isCentered, Point3D& aCon } } - if (mPhysics != XNASlopes) + if (mPhysics != MBUSlopes && mPhysics != MBGSlopes) { for (S32 i = 0; i < mContacts.size(); i++) { @@ -265,7 +265,7 @@ bool Marble::computeMoveForces(Point3D& aControl, Point3D& desiredOmega, const M Point2F currentVelocity(mDot(sideDir, rollVelocity), mDot(motionDir, rollVelocity)); Point2F mv(move->x, move->y); - if (mPhysics != MBG) + if (mPhysics != MBG && mPhysics != MBGSlopes) { // Prevent increasing marble speed with diagonal movement (on the ground) mv *= 1.538461565971375; @@ -677,7 +677,7 @@ void Marble::advancePhysics(const Move* move, U32 timeDelta) } it++; - } while (mPhysics == MBG || it <= 10); + } while (mPhysics == MBG || mPhysics == MBGSlopes || it <= 10); for (S32 i = 0; i < smPathItrVec.size(); i++) smPathItrVec[i]->popTickState(); diff --git a/game/marble/data/missions/Multiplayer/Polysoup/polysoup.mis b/game/marble/data/missions/Multiplayer/Polysoup/polysoup.mis index 54745431..c9dd94e1 100644 --- a/game/marble/data/missions/Multiplayer/Polysoup/polysoup.mis +++ b/game/marble/data/missions/Multiplayer/Polysoup/polysoup.mis @@ -11,7 +11,7 @@ name = $Text::LevelNameMP26; difficulty = "4"; gameType = "MultiPlayer"; gameMode = "Scrum"; - physics = "XNASlopes"; + physics = "MBUSlopes"; time = "300000"; maxGemsPerGroup = "9"; desc = "A preview mission";