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

Function spawnNRewards

src/SB/Game/zEntPickup.cpp:1566–1598  ·  view source on GitHub ↗

Equivalent: scheduling

Source from the content-addressed store, hash-verified

1564
1565// Equivalent: scheduling
1566static void spawnNRewards(U32* pickups, U32 num, xVec3* ppos, xVec3 pos)
1567{
1568 if (num >= 1 && gEnableRewardsQueue)
1569 {
1570 for (S32 i = 0; i < REWARD_COUNT; i++)
1571 {
1572 if (!sRewards[i].active)
1573 {
1574 // non-matching: scheduling
1575 sRewards[i].active = true;
1576 sRewards[i].num = num;
1577 sRewards[i].timer = 0.2f;
1578
1579 for (U32 j = 0; j < num; j++)
1580 {
1581 sRewards[i].pickups[j] = pickups[j];
1582 }
1583
1584 if (ppos)
1585 {
1586 sRewards[i].ppos = ppos;
1587 }
1588 else
1589 {
1590 sRewards[i].pos = pos;
1591 sRewards[i].ppos = NULL;
1592 }
1593
1594 break;
1595 }
1596 }
1597 }
1598}
1599
1600void zEntPickup_SpawnNRewards(U32* pickups, U32 num, xVec3* ppos)
1601{

Callers 1

zEntPickup_SpawnNRewardsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected