ShitThrower::ShitThrower(Sound& sound, TextureManager& textureManager, const Definition& definition) : LegacyWeapon(sound, textureManager, definition, 16) { Color brownColor(83, 44, 0); PlayerSkinColors skinColors(brownColor); brownSkin = std::make_unique<PlayerSkin>("textures/man/", skinColors, textureManager); }
void WPN_Init(TextureManager& textureManager, Sound& sound, Console& console) { std::set<Int32> nearestFilterBoom = { 5, 6, 9, 13, 14, 15, 16 }; console.printLine("\n===Weapon initialization==="); for (Weapon& weap : d6WpnDef) { const std::string wpnPath = Format("{0}{1,3|0}") << D6_TEXTURE_WPN_PATH << weap.index; weap.textures.boom = textureManager.load(Format("{0}/boom/") << wpnPath, nearestFilterBoom.find(weap.index) != nearestFilterBoom.end() ? GL_NEAREST : GL_LINEAR, true); weap.textures.gun = textureManager.load(Format("{0}/gun/") << wpnPath, GL_NEAREST, true); weap.textures.shot = textureManager.load(Format("{0}/shot/") << wpnPath, GL_NEAREST, true); if (weap.shotSound) { weap.shotSample = sound.loadSample(std::string(D6_FILE_WEAPON_SOUNDS) + weap.shotSound); } if (weap.boomSound) { weap.boomSample = sound.loadSample(std::string(D6_FILE_WEAPON_SOUNDS) + weap.boomSound); } } Color brownColor(83, 44, 0); PlayerSkinColors skinColors(brownColor); brownSkin = std::make_unique<PlayerSkin>("textures/man/", skinColors, textureManager); }