do whatever needs to be done for this piece of splinter for this frame
| 72 | |
| 73 | // do whatever needs to be done for this piece of splinter for this frame |
| 74 | void DoSplinterFrame(object *obj) { |
| 75 | ASSERT(obj->control_type == CT_SPLINTER); |
| 76 | |
| 77 | if ((obj->lifeleft <= 0.0) && ((ps_rand() % 2) == 0)) { |
| 78 | // Mark the object to die |
| 79 | SetObjectDeadFlag(obj); |
| 80 | } else { |
| 81 | // Create smoke for some splinters |
| 82 | if (((obj - Objects) % 8) == 0) { |
| 83 | if (ps_rand() % 4) { |
| 84 | int type = ((obj - Objects) % 2) ? GetRandomSmallExplosion() : BLACK_SMOKE_INDEX; |
| 85 | CreateFireball(&obj->pos, type, obj->roomnum, VISUAL_FIREBALL); |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | } |
no test coverage detected