| 43 | } |
| 44 | |
| 45 | void xEntBoulder_Render(xEnt* ent) |
| 46 | { |
| 47 | xModelInstance* model = ent->model; |
| 48 | S32 shadowResult; |
| 49 | xVec3 shadVec; |
| 50 | F32 radius; |
| 51 | |
| 52 | if ((model != NULL) && xEntIsVisible(ent)) |
| 53 | { |
| 54 | switch (model->Flags & 0x400) |
| 55 | { |
| 56 | case 0: |
| 57 | if (ent->flags & 0x40) |
| 58 | { |
| 59 | if (!iModelCull(model->Data, model->Mat)) |
| 60 | { |
| 61 | xModelRender(model); |
| 62 | } |
| 63 | } |
| 64 | else |
| 65 | { |
| 66 | shadVec.x = model->Mat->pos.x; |
| 67 | shadVec.y = model->Mat->pos.y - 10.0f; |
| 68 | shadVec.z = model->Mat->pos.z; |
| 69 | |
| 70 | if (!iModelCullPlusShadow(model->Data, model->Mat, &shadVec, &shadowResult)) |
| 71 | { |
| 72 | xModelRender(model); |
| 73 | } |
| 74 | |
| 75 | if (!shadowResult) |
| 76 | { |
| 77 | if (ent->flags & 0x10) |
| 78 | { |
| 79 | xShadowManager_Add(ent); |
| 80 | } |
| 81 | else |
| 82 | { |
| 83 | radius = ent->model->Data->boundingSphere.radius; |
| 84 | if (radius > 0.75f) |
| 85 | { |
| 86 | radius = 0.75f; |
| 87 | } |
| 88 | xShadowSimple_Add(ent->simpShadow, ent, 2.0f * radius, 1.0f); |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | break; |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | void xEntBoulder_Init(void* ent, void* asset) |
| 98 | { |
nothing calls this directly
no test coverage detected