- case ammo_shells: this.ammo_shells = cvar("g_pickup_shells_weapon"); break;
- case ammo_nails: this.ammo_nails = cvar("g_pickup_nails_weapon"); break;
- case ammo_rockets: this.ammo_rockets = cvar("g_pickup_rockets_weapon"); break;
- case ammo_cells: this.ammo_cells = cvar("g_pickup_cells_weapon"); break;
- case ammo_plasma: this.ammo_plasma = cvar("g_pickup_plasma_weapon"); break;
- case ammo_fuel: this.ammo_fuel = cvar("g_pickup_fuel_weapon"); break;
+ case RESOURCE_SHELLS: SetResourceAmount(this, wpn.ammo_type, cvar("g_pickup_shells_weapon")); break;
+ case RESOURCE_BULLETS: SetResourceAmount(this, wpn.ammo_type, cvar("g_pickup_nails_weapon")); break;
+ case RESOURCE_ROCKETS: SetResourceAmount(this, wpn.ammo_type, cvar("g_pickup_rockets_weapon")); break;
+ case RESOURCE_CELLS: SetResourceAmount(this, wpn.ammo_type, cvar("g_pickup_cells_weapon")); break;
+ case RESOURCE_PLASMA: SetResourceAmount(this, wpn.ammo_type, cvar("g_pickup_plasma_weapon")); break;
+ case RESOURCE_FUEL: SetResourceAmount(this, wpn.ammo_type, cvar("g_pickup_fuel_weapon")); break;