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

Function weapon_emptyAnim

TheForceEngine/TFE_DarkForces/weapon.cpp:475–488  ·  view source on GitHub ↗

If using TDs or mines and no ammo, show empty right hand

Source from the content-addressed store, hash-verified

473
474 // If using TDs or mines and no ammo, show empty right hand
475 void weapon_emptyAnim()
476 {
477 PlayerWeapon* weapon = s_curPlayerWeapon;
478 s32 ammo = weapon->ammo ? *weapon->ammo : 0;
479
480 if (s_prevWeapon == WPN_THERMAL_DET && !ammo)
481 {
482 weapon->frame = 3;
483 }
484 else if (s_prevWeapon == WPN_MINE && !ammo)
485 {
486 weapon->frame = 2;
487 }
488 }
489
490 void weapon_computeMatrix(fixed16_16* mtx, angle14_32 pitch, angle14_32 yaw)
491 {

Callers 4

giveAllWeaponsAndHealthFunction · 0.85
giveHealthAndFullAmmoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected