MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / weapon_setIdle

Function weapon_setIdle

TheForceEngine/TFE_DarkForces/weapon.cpp:796–815  ·  view source on GitHub ↗

Set weapons back to their idle frame; stop looping sound

Source from the content-addressed store, hash-verified

794
795 // Set weapons back to their idle frame; stop looping sound
796 void weapon_setIdle()
797 {
798 PlayerWeapon* weapon = s_curPlayerWeapon;
799 if (s_prevWeapon == WPN_REPEATER)
800 {
801 if (s_repeaterFireSndID)
802 {
803 sound_stop(s_repeaterFireSndID);
804 s_repeaterFireSndID = 0;
805 }
806 weapon->frame = 0;
807 }
808 else if (s_prevWeapon == WPN_CANNON)
809 {
810 if (!s_secondaryFire)
811 {
812 weapon->frame = 0;
813 }
814 }
815 }
816
817 void weapon_playerWeaponTaskFunc(MessageType msg)
818 {

Callers 2

weapon_handleStateFunction · 0.85

Calls 1

sound_stopFunction · 0.85

Tested by

no test coverage detected