MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ShowAmmoAddedMessage

Function ShowAmmoAddedMessage

Descent3/multisafe.cpp:2545–2556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2543 {"NapalmTank", NAPALM_INDEX, TXI_MSG_NAPALMFUEL, TXI_MSG_NAPALMFULL}};
2544#define NUM_POWERUP_TYPES_AMMO (sizeof(powerup_data_ammo) / sizeof(*powerup_data_ammo))
2545void ShowAmmoAddedMessage(int weapon_index, int msg_index, int added) {
2546 int added_frac = 0;
2547 if (Ships[Players[Player_num].ship_index].fire_flags[weapon_index] & SFF_TENTHS) {
2548 added_frac = added;
2549 while (added_frac >= 100)
2550 added_frac -= 100;
2551 while (added_frac >= 10)
2552 added_frac -= 10;
2553 added /= 10;
2554 }
2555 AddFilteredHUDMessage(TXT(msg_index), added, added_frac);
2556}
2557// See if we should select the specified weapon
2558void CheckForWeaponSelect(int id, int weapon_index) {
2559 if (id == Player_num) {

Callers 1

HandleWeaponPowerupsFunction · 0.85

Calls 1

AddFilteredHUDMessageFunction · 0.85

Tested by

no test coverage detected