Given a weapon handle, returns that weapons discharge bitmap
| 606 | |
| 607 | // Given a weapon handle, returns that weapons discharge bitmap |
| 608 | int GetWeaponFireImage(int handle, int frame) { |
| 609 | if (Weapons[handle].flags & WF_IMAGE_VCLIP) { |
| 610 | float cur_frametime; |
| 611 | int int_frame; |
| 612 | |
| 613 | PageInVClip(Weapons[handle].fire_image_handle); |
| 614 | |
| 615 | vclip *vc = &GameVClips[Weapons[handle].fire_image_handle]; |
| 616 | ASSERT(vc->used >= 1); |
| 617 | |
| 618 | cur_frametime = Gametime / vc->frame_time; |
| 619 | int_frame = cur_frametime; |
| 620 | int_frame += frame; |
| 621 | return (vc->frames[int_frame % vc->num_frames]); |
| 622 | } else |
| 623 | return (Weapons[handle].fire_image_handle); |
| 624 | } |
| 625 | |
| 626 | // Given a filename, loads either the bitmap or model found in that file. If type |
| 627 | // is not NULL, sets it to 1 if file is model, otherwise sets it to zero |
no test coverage detected