Added gLevelValues.fixCollisionBugsPickBestWall

This commit is contained in:
MysterD 2023-06-22 20:18:10 -07:00
parent 3fa5823578
commit 2842803362
6 changed files with 7 additions and 2 deletions

View file

@ -653,6 +653,7 @@
--- @field public fixCollisionBugs integer
--- @field public fixCollisionBugsFalseLedgeGrab integer
--- @field public fixCollisionBugsGroundPoundBonks integer
--- @field public fixCollisionBugsPickBestWall integer
--- @field public fixCollisionBugsRoundedCorners integer
--- @field public fixVanishFloors integer
--- @field public floatingStarDance integer

View file

@ -959,6 +959,7 @@
| fixCollisionBugs | `integer` | |
| fixCollisionBugsFalseLedgeGrab | `integer` | |
| fixCollisionBugsGroundPoundBonks | `integer` | |
| fixCollisionBugsPickBestWall | `integer` | |
| fixCollisionBugsRoundedCorners | `integer` | |
| fixVanishFloors | `integer` | |
| floatingStarDance | `integer` | |

View file

@ -46,6 +46,7 @@ struct LevelValues gDefaultLevelValues = {
.fixCollisionBugsRoundedCorners = 1,
.fixCollisionBugsFalseLedgeGrab = 1,
.fixCollisionBugsGroundPoundBonks = 1,
.fixCollisionBugsPickBestWall = 1,
.fixVanishFloors = 0,
.hudCapTimer = 0,
.hudRedCoinsRadar = 0,

View file

@ -44,6 +44,7 @@ struct LevelValues {
u8 fixCollisionBugsRoundedCorners;
u8 fixCollisionBugsFalseLedgeGrab;
u8 fixCollisionBugsGroundPoundBonks;
u8 fixCollisionBugsPickBestWall;
u8 wingCapLookUpReq;
u8 fixVanishFloors;
u8 hudCapTimer;

View file

@ -2385,7 +2385,7 @@ void set_mario_particle_flags(struct MarioState* m, u32 flags, u8 clear) {
void mario_update_wall(struct MarioState* m, struct WallCollisionData* wcd) {
if (!m || !wcd) { return; }
if (gLevelValues.fixCollisionBugs) {
if (gLevelValues.fixCollisionBugs && gLevelValues.fixCollisionBugsPickBestWall) {
// turn face angle into a direction vector
Vec3f faceAngle;
faceAngle[0] = coss(m->faceAngle[0]) * sins(m->faceAngle[1]);

View file

@ -743,7 +743,7 @@ static struct LuaObjectField sLakituStateFields[LUA_LAKITU_STATE_FIELD_COUNT] =
{ "yaw", LVT_S16, offsetof(struct LakituState, yaw), false, LOT_NONE },
};
#define LUA_LEVEL_VALUES_FIELD_COUNT 41
#define LUA_LEVEL_VALUES_FIELD_COUNT 42
static struct LuaObjectField sLevelValuesFields[LUA_LEVEL_VALUES_FIELD_COUNT] = {
{ "cellHeightLimit", LVT_S16, offsetof(struct LevelValues, cellHeightLimit), false, LOT_NONE },
{ "coinsRequiredForCoinStar", LVT_S16, offsetof(struct LevelValues, coinsRequiredForCoinStar), false, LOT_NONE },
@ -756,6 +756,7 @@ static struct LuaObjectField sLevelValuesFields[LUA_LEVEL_VALUES_FIELD_COUNT] =
{ "fixCollisionBugs", LVT_U8, offsetof(struct LevelValues, fixCollisionBugs), false, LOT_NONE },
{ "fixCollisionBugsFalseLedgeGrab", LVT_U8, offsetof(struct LevelValues, fixCollisionBugsFalseLedgeGrab), false, LOT_NONE },
{ "fixCollisionBugsGroundPoundBonks", LVT_U8, offsetof(struct LevelValues, fixCollisionBugsGroundPoundBonks), false, LOT_NONE },
{ "fixCollisionBugsPickBestWall", LVT_U8, offsetof(struct LevelValues, fixCollisionBugsPickBestWall), false, LOT_NONE },
{ "fixCollisionBugsRoundedCorners", LVT_U8, offsetof(struct LevelValues, fixCollisionBugsRoundedCorners), false, LOT_NONE },
{ "fixVanishFloors", LVT_U8, offsetof(struct LevelValues, fixVanishFloors), false, LOT_NONE },
{ "floatingStarDance", LVT_U8, offsetof(struct LevelValues, floatingStarDance), false, LOT_NONE },