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

Function zGooAdd

src/SB/Game/zGoo.cpp:31–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31S32 zGooAdd(xEnt* obj, F32 depth, S32 freezeGroup)
32{
33 S32 i;
34 zGooParams* gp;
35
36 for (i = 0; i < zgoo_nused; i++)
37 {
38 gp = &zgoo_gps[i];
39
40 if (gp->goo_ent == obj)
41 {
42 return 1;
43 }
44 }
45
46 if (zgoo_nused >= zgoo_ngps)
47 {
48 return 0;
49 }
50
51 gp = &zgoo_gps[zgoo_nused];
52
53 gp->orig_depth = depth;
54 gp->depth = depth;
55 gp->goo_ent = obj;
56
57 zgoo_nused++;
58
59 if (obj->model->Data)
60 {
61 zFXGooEnable(obj->model->Data, freezeGroup);
62 }
63
64 return 1;
65}
66
67S32 zGooIs(xEnt* obj, F32& depth, U32 playerCheck)
68{

Callers 2

zEntSimpleObjEventCBFunction · 0.70
zPlatformEventCBFunction · 0.70

Calls 1

zFXGooEnableFunction · 0.85

Tested by

no test coverage detected