Skip to content

Commit b7dcfe6

Browse files
authored
Merge pull request #3312 from EasyRPG-NewFeatures/Maniacs-MoveEventVariable
MoveRoute - Support Variables as Event ID (Maniac patch feature)
2 parents 3bd1298 + 3e9874f commit b7dcfe6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/game_interpreter.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3049,7 +3049,9 @@ bool Game_Interpreter::CommandPlayerVisibility(lcf::rpg::EventCommand const& com
30493049
}
30503050

30513051
bool Game_Interpreter::CommandMoveEvent(lcf::rpg::EventCommand const& com) { // code 11330
3052-
int event_id = com.parameters[0];
3052+
int event_id = ValueOrVariableBitfield(com.parameters[2], 2, com.parameters[0]);
3053+
int repeat = ManiacBitmask(com.parameters[2], 0x1);
3054+
30533055
Game_Character* event = GetCharacter(event_id);
30543056
if (event != NULL) {
30553057
// If the event is a vehicle in use, push the commands to the player instead
@@ -3065,7 +3067,7 @@ bool Game_Interpreter::CommandMoveEvent(lcf::rpg::EventCommand const& com) { //
30653067
move_freq = 6;
30663068
}
30673069

3068-
route.repeat = com.parameters[2] != 0;
3070+
route.repeat = repeat != 0;
30693071
route.skippable = com.parameters[3] != 0;
30703072

30713073
for (auto it = com.parameters.begin() + 4; it < com.parameters.end(); ) {

0 commit comments

Comments
 (0)