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

Method nextGoal

src/SB/Game/zNPCTypeBossPatrick.cpp:1586–1614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1584 doDamage = 1;
1585
1586 this->playSplat(&this->glob[i].lastPos);
1587
1588 this->bossFlags &= 0xfffffffe;
1589 break;
1590 }
1591 }
1592
1593damage: // TODO: fix goto
1594 if (doDamage && zEntPlayer_Damage(NULL, 1, &knockback))
1595 {
1596 U32 picker = xrand();
1597
1598 if (globals.player.Health == 1 && this->round == 2)
1599 {
1600 this->newsfish->SpeakStart(sNFComment[NF_SANDY_BECOME_BANANA_SPLIT].soundID, 0, -1);
1601 }
1602 else if (touchDamage && !(picker & 0x3000))
1603 {
1604 this->newsfish->SpeakStart(sNFComment[NF_CLOSE_ENCOUNTERS_PAINFUL_KIND].soundID, 0,
1605 -1);
1606 }
1607 else if ((picker & 0x1f) <= 0xa)
1608 {
1609 this->newsfish->SpeakStart(sNFComment[NF_THAT_WAS_A_DOOZY].soundID, 0, -1);
1610 }
1611 else if ((picker & 0x1f) <= 0x14)
1612 {
1613 this->newsfish->SpeakStart(sNFComment[NF_THATS_GOTTA_STING].soundID, 0, -1);
1614 }
1615 }
1616
1617 S32 num = this->round;

Callers 10

idleCBFunction · 0.80
tauntCBFunction · 0.80
hitCBFunction · 0.80
spitCBFunction · 0.80
runCBFunction · 0.80
smackCBFunction · 0.80
freezeCBFunction · 0.80
spawnCBFunction · 0.80
spinCBFunction · 0.80
fudgeCBFunction · 0.80

Calls 1

canSpawnChucksMethod · 0.95

Tested by

no test coverage detected