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

Function zEntPickup_Reset

src/SB/Game/zEntPickup.cpp:1087–1112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1085}
1086
1087void zEntPickup_Reset(zEntPickup* ent)
1088{
1089 zEntReset(ent);
1090
1091 ent->state = 0x41;
1092 ent->animTime = 0.0f;
1093 ent->timer = 0.0f;
1094 ent->vel.x = ent->vel.y = ent->vel.z = 0.0f;
1095 ent->bound.type = XBOUND_TYPE_SPHERE;
1096 ent->shake_timer = 0.0f;
1097 ent->fx_timer = 0.0f;
1098 ent->fx_par = NULL;
1099 ent->fx_emit = NULL;
1100 ent->fx_scale = 1.0f;
1101 ent->flyflags = 0;
1102
1103 if (isRewardPickup(ent))
1104 {
1105 ent->state = 0x48;
1106 ent->flyflags = 0x1;
1107 }
1108
1109 // this is likely really slow, assuming zEntPickup_Reset runs for every single pickup in the level...
1110 // might be faster to move this to zEntPickup_SceneReset
1111 gEmitShinySparkles = zParEmitterFind("PAREMIT_SHINY_SPARKLES");
1112}
1113
1114void zEntPickup_Save(zEntPickup* ent, xSerial* s)
1115{

Callers 2

zEntPickupEventCBFunction · 0.85
zSceneSetupFunction · 0.85

Calls 3

isRewardPickupFunction · 0.85
zEntResetFunction · 0.70
zParEmitterFindFunction · 0.70

Tested by

no test coverage detected