]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Weapons.cpp
Bonus Score deduplication
[lugaru.git] / Source / Weapons.cpp
index 6d6d2649e537ce2ecca1163e0009d40afdaf7263..ff41d8b26c5799298393bbc9bdc00141c34d1b5b 100644 (file)
@@ -22,10 +22,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 /**> HEADER FILES <**/
 #include "Weapons.h"
 #include "openal_wrapper.h"
+#include "Animation.h"
+#include "Sounds.h"
+#include "Game.h"
+#include "Awards.h"
 
 extern float multiplier;
-extern Animation animation[animation_count];
-extern OPENAL_SAMPLE   *samp[100];
 extern int channels[100];
 extern Terrain terrain;
 extern float gravity;
@@ -49,13 +51,7 @@ extern float terraindetail;
 extern float viewdistance;
 extern float blackout;
 extern int difficulty;
-extern Person player[maxplayers];
-extern int numplayers;
 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);
@@ -279,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;