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

Function rewardRequest

src/SB/Game/zEntPickup.cpp:1400–1433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1398// Uses int-to-float conversion
1399
1400static U32 rewardRequest(U32 shinyType, xVec3* ppos, xVec3 pos)
1401{
1402 for (S32 i = 0; i < REWARD_PICKUP_COUNT; i++)
1403 {
1404 zEntPickup* p = rewardPickups[shinyType][i];
1405
1406 if (p && (p->state & 0x8))
1407 {
1408 p->state = (p->state & ~0x3f) | 0x4;
1409
1410 xEntShow(p);
1411
1412 p->baseFlags &= (U8)~0x40;
1413 p->baseFlags |= 0x80;
1414
1415 if (ppos)
1416 {
1417 xVec3Copy((xVec3*)&p->model->Mat->pos, ppos);
1418
1419 p->grab_pos = *ppos;
1420 }
1421 else
1422 {
1423 xVec3Copy((xVec3*)&p->model->Mat->pos, &pos);
1424
1425 p->grab_pos = pos;
1426 }
1427
1428 return 1;
1429 }
1430 }
1431
1432 return 0;
1433}
1434
1435void zEntPickup_SceneEnter()
1436{

Callers 1

zEntPickup_SceneUpdateFunction · 0.70

Calls 2

xEntShowFunction · 0.85
xVec3CopyFunction · 0.85

Tested by

no test coverage detected