Skip to content

Commit 0b8a425

Browse files
authored
zBungeeState work (#740)
* insert_animations 67% * insert_animations 98%
1 parent 2bda80e commit 0b8a425

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

src/SB/Game/zEntPlayerBungeeState.cpp

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,3 +1461,32 @@ namespace bungee_state
14611461
shared.flags = 0x3;
14621462
}
14631463
} // namespace bungee_state
1464+
1465+
void bungee_state::insert_animations(xAnimTable& at)
1466+
{
1467+
xAnimTableNewState(&at, "bungee_bottom_0", 0x10, 0, 1.0f, 0, 0, 0.0f, 0, 0, xAnimDefaultBeforeEnter, 0, 0);
1468+
xAnimTableNewState(&at, "bungee_top_0", 0x10, 0, 1.0f, 0, 0, 0.0f, 0, 0, xAnimDefaultBeforeEnter, 0, 0);
1469+
xAnimTableNewState(&at, "bungee_down_0", 0, 0, 1.0f, 0, 0, 0.0f, 0, 0, xAnimDefaultBeforeEnter, 0, 0);
1470+
xAnimTableNewState(&at, "bungee_hit_0", 0x20, 0, 1.0f, 0, 0, 0.0f, 0, 0, xAnimDefaultBeforeEnter, 0, 0);
1471+
xAnimTableNewState(&at, "bungee_mount_0", 0x20, 0, 1.0f, 0, 0, 0.0f, 0, 0, xAnimDefaultBeforeEnter, 0, 0);
1472+
xAnimTableNewState(&at, "bungee_cycle_0", 0x10, 0, 1.0f, 0, 0, 0.0f, 0, 0, xAnimDefaultBeforeEnter, 0, 0);
1473+
xAnimTableNewState(&at, "bungee_death_0", 0, 0, 1.0f, 0, 0, 0.0f, 0, 0, xAnimDefaultBeforeEnter, 0, 0);
1474+
1475+
static const char* start_from = "JumpStart01 JumpLift01 JumpApex01 DJumpStart01 DJumpLift01 Fall01 FallHigh01";
1476+
static const char* start_to = "bungee_cycle_0";
1477+
1478+
shared.anim_tran.start = xAnimTableNewTransition(&at, start_from, start_to, check_anim_start, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, 0.5f, 0);
1479+
shared.anim_tran.dive_start = xAnimTableNewTransition(&at, "bungee_cycle_0", "bungee_dive_0", 0, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, fixed.dive.time, 0);
1480+
shared.anim_tran.dive_stop = xAnimTableNewTransition(&at, "bungee_dive_0", "bungee_cycle_0", 0, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, fixed.dive.anim_out_time, 0);
1481+
shared.anim_tran.top_start = xAnimTableNewTransition(&at, "bungee_cycle_0", "bungee_top_0", 0, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, fixed.top_anim_time, 0);
1482+
shared.anim_tran.top_stop = xAnimTableNewTransition(&at, "bungee_top_0", "bungee_cycle_0", 0, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, fixed.top_anim_time, 0);
1483+
shared.anim_tran.bottom_start = xAnimTableNewTransition(&at, "bungee_cycle_0", "bungee_bottom_0", 0, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, fixed.bottom_anim_time, 0);
1484+
shared.anim_tran.bottom_stop = xAnimTableNewTransition(&at, "bungee_bottom_0", "bungee_cycle_0", 0, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, fixed.bottom_anim_time, 0);
1485+
shared.anim_tran.hit = xAnimTableNewTransition(&at, "bungee_cycle_0", "bungee_hit_0", 0, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, fixed.hit_anim_time, 0);
1486+
xAnimTableNewTransition(&at, "bungee_hit_0", "bungee_dive_0", check_anim_hit_to_dive, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, fixed.hit_anim_time, 0);
1487+
xAnimTableNewTransition(&at, "bungee_hit_0", "bungee_top_0", check_anim_hit_to_top, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, fixed.hit_anim_time, 0);
1488+
xAnimTableNewTransition(&at, "bungee_hit_0", "bungee_bottom_0", check_anim_hit_to_bottom, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, fixed.hit_anim_time, 0);
1489+
xAnimTableNewTransition(&at, "bungee_hit_0", "bungee_cycle_0", check_anim_hit_to_cycle, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, fixed.hit_anim_time, 0);
1490+
xAnimTableNewTransition(&at, "bungee_hit_0", "bungee_death_0", check_anim_hit_to_death, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, fixed.hit_anim_time, 0);
1491+
shared.anim_tran.stop = xAnimTableNewTransition(&at, "bungee_cycle_0", "Fall01", 0, 0, 0x10, 0, 0.0f, 0.0f, 0, 0, 0.5f, 0);
1492+
}

0 commit comments

Comments
 (0)