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

Function MultiSubtractAmmoToFire

Descent3/multi.cpp:3321–3327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3319}
3320
3321void MultiSubtractAmmoToFire(int slot, int wb_index) {
3322 ship *ship = &Ships[Players[slot].ship_index];
3323 otype_wb_info *wb = &ship->static_wb[wb_index];
3324 Players[slot].weapon_ammo[wb_index] -= wb->ammo_usage;
3325 if (Players[slot].weapon_ammo[wb_index] < 0)
3326 Players[slot].weapon_ammo[wb_index] = 0;
3327}
3328
3329#define MPFF_QUADED 128
3330// Sends a fire packet from a player

Callers 2

MultiDoFirePlayerWBFunction · 0.85
MultiDoRequestToFireFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected