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

Method CollideReview

src/SB/Game/zNPCTypeCommon.cpp:1658–1736  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1656}
1657
1658void zNPCCommon::CollideReview()
1659{
1660 xEntCollis* npccol = this->collis;
1661 xCollis* colrec = &npccol->colls[0];
1662 S32 i;
1663 S32 hitthings = 0;
1664
1665 if (!(colrec->flags & k_HIT_IT) && (this->flg_move & 0x2))
1666 {
1667 this->colFreq = 0;
1668 }
1669
1670 if (this->drv_data)
1671 {
1672 if ((colrec->flags & k_HIT_IT) && colrec->optr)
1673 {
1674 xEnt* flent = (xEnt*)colrec->optr;
1675 if (this->IsMountableType((en_ZBASETYPE)flent->baseType))
1676 {
1677 if (!this->drv_data->driver)
1678 {
1679 xEntDriveMount(this->drv_data, flent, 1.0f, colrec);
1680 }
1681 else if (flent != this->drv_data->driver)
1682 {
1683 xEntDriveDismount(this->drv_data, 0.3f);
1684 xEntDriveMount(this->drv_data, flent, 1.0f, colrec);
1685 }
1686 }
1687 }
1688 else if (this->drv_data->driver)
1689 {
1690 xEntDriveDismount(this->drv_data, 0.3f);
1691 }
1692 }
1693
1694 for (i = npccol->env_sidx; i < npccol->env_eidx; i++)
1695 {
1696 if (!(npccol->colls[i].flags & k_HIT_0x4))
1697 {
1698 hitthings++;
1699 }
1700 }
1701
1702 for (i = npccol->stat_sidx; i < npccol->stat_eidx; i++)
1703 {
1704 if (!(npccol->colls[i].flags & k_HIT_0x4))
1705 {
1706 hitthings++;
1707 }
1708 }
1709
1710 for (i = npccol->dyn_sidx; i < npccol->dyn_eidx; i++)
1711 {
1712 if (npccol->colls[i].flags & k_HIT_0x4)
1713 {
1714 xBase* base = (xBase*)npccol->colls[i].optr;
1715 if (base->baseType == eBaseTypeButton)

Callers

nothing calls this directly

Calls 5

IsMountableTypeMethod · 0.95
xEntDriveDismountFunction · 0.85
xurandFunction · 0.85
zEntButton_HoldFunction · 0.70
xEntDriveMountFunction · 0.50

Tested by

no test coverage detected