X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FWeapons.cpp;h=ff41d8b26c5799298393bbc9bdc00141c34d1b5b;hb=c84fb27b1b242249929b90c2b50f2c92c6a0556d;hp=7745b8996670fe5f0c7def5647ddc5c8fbfc5e00;hpb=d5ff767196019eeb0001f921365bb1e4060eee5b;p=lugaru.git diff --git a/Source/Weapons.cpp b/Source/Weapons.cpp index 7745b89..ff41d8b 100644 --- a/Source/Weapons.cpp +++ b/Source/Weapons.cpp @@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "Animation.h" #include "Sounds.h" #include "Game.h" +#include "Awards.h" extern float multiplier; extern int channels[100]; @@ -51,10 +52,6 @@ extern float viewdistance; extern float blackout; extern int difficulty; extern bool freeze; -extern int bonus; -extern float bonusvalue; -extern float bonustotal; -extern float bonustime; extern int tutoriallevel; extern int numthrowkill; extern "C" void PlaySoundEx(int channel, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused); @@ -278,16 +275,10 @@ void Weapons::DoStuff(){ OPENAL_SetVolume(channels[fleshstabsound], 128); OPENAL_SetPaused(channels[fleshstabsound], false); - if(animation[player[0].targetanimation].height==highheight){ - bonus=ninja; - bonustime=0; - bonusvalue=60; - } - else{ - bonus=Bullseyebonus; - bonustime=0; - bonusvalue=30; - } + if(animation[player[0].targetanimation].height==highheight) + award_bonus(0, ninja); + else + award_bonus(0, Bullseyebonus); } } else missed[i]=1;