Clears a Spew Event given a handle to it
| 431 | |
| 432 | // Clears a Spew Event given a handle to it |
| 433 | void SpewClearEvent(int handle, bool force) { |
| 434 | spewinfo *vis; |
| 435 | |
| 436 | int slot = GET_SLOT(handle); |
| 437 | |
| 438 | if ((slot < 0) || (slot > MAX_SPEW_EFFECTS)) |
| 439 | return; |
| 440 | |
| 441 | // mprintf(0,"Clearing spew event %d - %d....",handle,slot); |
| 442 | |
| 443 | vis = &SpewEffects[slot]; |
| 444 | |
| 445 | if ((!force) && (handle != vis->handle)) |
| 446 | return; |
| 447 | |
| 448 | // mprintf(0,"handle OK\n"); |
| 449 | |
| 450 | vis->inuse = vis->random = vis->use_gunpoint = vis->real_obj = false; |
| 451 | vis->pt.origin.x = vis->pt.origin.y = vis->pt.origin.z = 0.0f; |
| 452 | vis->pt.room_num = 0; |
| 453 | vis->pt.normal.x = vis->pt.normal.y = vis->pt.normal.z = 0.0f; |
| 454 | vis->effect_type = MED_SMOKE_INDEX; |
| 455 | vis->phys_info = PF_FIXED_VELOCITY; |
| 456 | vis->drag = vis->mass = vis->time_int = vis->longevity = vis->lifetime = vis->size = vis->speed = 0.0f; |
| 457 | vis->time_until_next_blob = vis->start_time = 0.0f; |
| 458 | vis->handle = 0; |
| 459 | vis->flags = 0; |
| 460 | } |
| 461 | |
| 462 | bool SpewObjectNeedsEveryFrameUpdate(object *obj, int gun_num) { |
| 463 | poly_model *pm; |
no test coverage detected