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

Method Upd_FunFrag

src/SB/Game/zNPCHazard.cpp:1815–1846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1813}
1814
1815void NPCHazard::Upd_FunFrag(F32 dt)
1816{
1817 HAZTarTar* tartar = &this->custdata.tartar;
1818 xParabola* parab = &tartar->parabinfo;
1819
1820 if (this->flg_hazard & 0x8)
1821 {
1822 tartar->vel.x = 2.5f * (2.0f * (xurand() - 0.5f));
1823 tartar->vel.y = 5.0f * xurand() + 4.0f;
1824 tartar->vel.z = 2.5f * (2.0f * (xurand() - 0.5f));
1825 }
1826
1827 tartar->rad_cur = LERP(this->pam_interp, tartar->rad_min, tartar->rad_max);
1828
1829 if (this->flg_hazard & 0x8)
1830 {
1831 PreCollide();
1832 }
1833
1834 F32 tym = this->tym_lifespan < this->tym_lifespan - this->tmr_remain ?
1835 this->tym_lifespan :
1836 this->tym_lifespan - this->tmr_remain;
1837 xParabolaEvalPos(parab, &this->pos_hazard, tym);
1838 xParabolaEvalVel(parab, &tartar->vel, tym);
1839
1840 static S32 moreorless = 0;
1841 if (--moreorless < 0)
1842 {
1843 moreorless = 3;
1844 zFX_SpawnBubbleTrail(&this->pos_hazard, 1);
1845 }
1846}
1847
1848void NPCHazard::StreakUpdate(U32 streakID, F32 rad)
1849{

Callers

nothing calls this directly

Calls 6

xurandFunction · 0.85
LERPFunction · 0.85
xParabolaEvalPosFunction · 0.85
xParabolaEvalVelFunction · 0.85
zFX_SpawnBubbleTrailFunction · 0.70
PreCollideFunction · 0.50

Tested by

no test coverage detected