MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / register_tweaks

Method register_tweaks

src/SB/Game/zEntCruiseBubble.cpp:1657–2320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1655 }
1656
1657 void tweak_group::register_tweaks(bool init, xModelAssetParam* ap, U32 apsize, const char*)
1658 {
1659 if (init)
1660 {
1661 this->aim_delay = 0.2f;
1662 auto_tweak::load_param<F32, F32>(this->aim_delay, 1.0f, 0.0f, 1.0f, ap, apsize,
1663 "aim_delay");
1664 }
1665
1666 if (init)
1667 {
1668 this->player.halt_time = 0.5f;
1669 auto_tweak::load_param<F32, F32>(this->player.halt_time, 1.0f, 0.0f, 1.0f, ap,
1670 apsize, "player.halt_time");
1671 }
1672
1673 if (init)
1674 {
1675 this->player.aim.turn_speed = 0.05f;
1676 auto_tweak::load_param<F32, F32>(this->player.aim.turn_speed, 1.0f, 0.01f,
1677 1000000000.0f, ap, apsize,
1678 "player.aim.turn_speed");
1679 }
1680
1681 if (init)
1682 {
1683 this->player.aim.anim_delta = 0.5f;
1684 auto_tweak::load_param<F32, F32>(this->player.aim.anim_delta, 1.0f, 0.0f,
1685 1000000000.0f, ap, apsize,
1686 "player.aim.anim_delta");
1687 }
1688
1689 if (init)
1690 {
1691 this->player.fire.delay_wand = 0.06666667f;
1692 auto_tweak::load_param<F32, F32>(this->player.fire.delay_wand, 1.0f, 0.0f, 100.0f,
1693 ap, apsize, "player.fire.delay_wand");
1694 }
1695
1696 if (init)
1697 {
1698 this->missle.life = 6.0f;
1699 auto_tweak::load_param<F32, F32>(this->missle.life, 1.0f, 0.01f, 1000000000.0f, ap,
1700 apsize, "missle.life");
1701 }
1702
1703 if (init)
1704 {
1705 this->missle.hit_dist = 0.3f;
1706 auto_tweak::load_param<F32, F32>(this->missle.hit_dist, 1.0f, 0.0f, 1.0f, ap,
1707 apsize, "missle.hit_dist");
1708 }
1709
1710 if (init)
1711 {
1712 this->missle.crash_angle = 30.0f;
1713 auto_tweak::load_param<F32, F32>(this->missle.crash_angle, DEG2RAD(1), 0.0f, 60.0f,
1714 ap, apsize, "missle.crash_angle");

Callers 1

loadMethod · 0.95

Calls 2

createFunction · 0.50
xStrHashFunction · 0.50

Tested by

no test coverage detected