@@ -150,25 +150,28 @@ void Mod::performBattleChecks()
150
150
151
151
void walkThroughMostObjects ()
152
152
{
153
- if (! Cheat[WALK_THROUGH_WALLS].Active ||
154
- ! checkButtonComboEveryFrame (Cheat[WALK_THROUGH_WALLS].ButtonCombo ))
153
+ if (Cheat[WALK_THROUGH_WALLS].Active &&
154
+ checkButtonComboEveryFrame (Cheat[WALK_THROUGH_WALLS].ButtonCombo ))
155
155
{
156
- // Check to see if Mario's properties should be reset
157
- if (ResetMarioProperties)
156
+ ResetMarioProperties = true ;
157
+
158
+ // Set Mario's properties to be able to walk through most objects
159
+ ttyd::mario::Player *player = ttyd::mario::marioGetPtr ();
160
+ player->flags1 |= (1 << 10 ); // Turn on the 10 bit
161
+ }
162
+ else if (ResetMarioProperties)
163
+ {
164
+ ResetMarioProperties = false ;
165
+
166
+ // Don't reset the properties if Vivian is currently being used
167
+ ttyd::mario::Player *player = ttyd::mario::marioGetPtr ();
168
+ const uint32_t UsingVivian = 28 ;
169
+
170
+ if (player->currentMotionId != UsingVivian)
158
171
{
159
- ResetMarioProperties = false ;
160
-
161
- ttyd::mario::Player *player = ttyd::mario::marioGetPtr ();
162
172
player->flags1 &= ~(1 << 10 ); // Turn off the 10 bit
163
173
}
164
- return ;
165
174
}
166
-
167
- // Set Mario;s properties to be able to walk through most objects
168
- ResetMarioProperties = true ;
169
-
170
- ttyd::mario::Player *player = ttyd::mario::marioGetPtr ();
171
- player->flags1 |= (1 << 10 ); // Turn on the 10 bit
172
175
}
173
176
174
177
void saveMarioAndPartnerPositions ()
0 commit comments