mirror of
https://github.com/luksamuk/engine-psx.git
synced 2025-04-28 13:28:02 +03:00
Small programatic changes to Knuckles animations
This commit is contained in:
parent
712c80c682
commit
6271d5e741
1 changed files with 11 additions and 3 deletions
14
src/player.c
14
src/player.c
|
@ -1158,11 +1158,15 @@ player_update(Player *player)
|
||||||
// it slightly slower
|
// it slightly slower
|
||||||
player_set_frame_duration(player, 1);
|
player_set_frame_duration(player, 1);
|
||||||
} else {
|
} else {
|
||||||
switch(player_get_current_animation_hash(player)) {
|
uint32_t anim_hash = player_get_current_animation_hash(player);
|
||||||
|
switch(anim_hash) {
|
||||||
case ANIM_WALKING:
|
case ANIM_WALKING:
|
||||||
case ANIM_WATERWALK:
|
case ANIM_WATERWALK:
|
||||||
case ANIM_RUNNING:
|
case ANIM_RUNNING:
|
||||||
player_set_frame_duration(player, MAX(0, 8 - abs(player->vel.vz >> 12)));
|
if((player->character == CHARA_KNUCKLES) && (anim_hash == ANIM_WALKING))
|
||||||
|
// Speed up Knuckles's walk animation, just a little bit
|
||||||
|
player_set_frame_duration(player, MAX(0, 7 - abs(player->vel.vz >> 12)));
|
||||||
|
else player_set_frame_duration(player, MAX(0, 8 - abs(player->vel.vz >> 12)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ANIM_SPINDASH:
|
case ANIM_SPINDASH:
|
||||||
|
@ -1179,7 +1183,11 @@ player_update(Player *player)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ANIM_PUSHING:
|
case ANIM_PUSHING:
|
||||||
player_set_frame_duration(player, MAX(0, 8 - abs(player->vel.vz >> 12)) << 2);
|
player_set_frame_duration(
|
||||||
|
player,
|
||||||
|
(player->character == CHARA_KNUCKLES)
|
||||||
|
? 6
|
||||||
|
: MAX(0, 8 - abs(player->vel.vz >> 12)) << 2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ANIM_SPRING:
|
case ANIM_SPRING:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue