Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charset animation frame not set to "Middle" when a Jump happens or "Stop Animation" is used #1289

Closed
Ghabry opened this Issue Oct 21, 2017 · 2 comments

Comments

Projects
None yet
1 participant
@Ghabry
Copy link
Member

Ghabry commented Oct 21, 2017

Instead of using the middle frame it probably uses the frame that was used before the jump started.
When the CharSet used during jump has no proper left/right frame this looks bad:

As can be nicely seen in this video, sometimes the jump charset is invisible.
Video in a zip because github is not web2.0 enough...

vid.zip

@Ghabry Ghabry added this to the 0.5.4 milestone Oct 21, 2017

@Ghabry Ghabry changed the title Charset animation frame not set to "Middle" when a Jump happens Charset animation frame not set to "Middle" when a Jump happens or "Stop Animation" is used Oct 23, 2017

@Ghabry

This comment has been minimized.

Copy link
Member Author

Ghabry commented Oct 23, 2017

Same problem happens with "Stop Animation"/"Animation OFF" (depending on which translation of the editor you use).

@Ghabry

This comment has been minimized.

Copy link
Member Author

Ghabry commented Oct 29, 2017

Potential patch but I don't think it's correct. Will fail when the event has a fixed animation with a left/right step defined by the event page...

Maybe check for RPG::EventPage::AnimType_fixed_graphic ?

diff --git a/src/game_character.cpp b/src/game_character.cpp
index db2a8870..7c52c8a9 100644
--- a/src/game_character.cpp
+++ b/src/game_character.cpp
@@ -404,6 +404,7 @@ void Game_Character::MoveTypeCustom() {
 				SetThrough(false);
 				break;
 			case RPG::MoveCommand::Code::stop_animation:
+				pattern = RPG::EventPage::Frame_middle;
 				walk_animation = false;
 				break;
 			case RPG::MoveCommand::Code::start_animation:
@@ -613,6 +614,8 @@ void Game_Character::BeginJump(const RPG::MoveRoute* current_route, int* current
 	jump_plus_y = 0;
 	jumping = true;
 
+	pattern = RPG::EventPage::Frame_middle;
+
 	bool end_found = false;
 	unsigned int i;
 	for (i = *current_index; i < current_route->move_commands.size(); ++i) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.