]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/items.cpp
Allow playing sounds with stereo effects.
[quix0rs-blobwars.git] / src / items.cpp
index 0a54e67c7990eb0e4c277cc683f7662848af0770..4c28235a3c4073832c949a215443a23be7a407fb 100644 (file)
@@ -1,5 +1,6 @@
 /*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
+Copyright (C) 2011-2015 Perpendicular Dimensions
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -243,7 +244,7 @@ void pickUpItem(Entity *item)
                case ITEM_POINTS5:
                case ITEM_POINTS6:
                case ITEM_POINTS7:
-                       game.score += item->value;
+                       addPlayerScore(item->value);
                        audio.playSound(SND_ITEM, CH_ITEM);
                        break;
                case ITEM_CHERRY:
@@ -278,10 +279,10 @@ void pickUpItem(Entity *item)
                        case 'o':
                        case 'U':
                        case 'u':
-                               sprintf(string, _("Picked up an %s"), item->name);
+                               snprintf(string, sizeof string, _("Picked up an %s"), item->name);
                                break;
                        default:
-                               sprintf(string, _("Picked up a %s"), item->name);
+                               snprintf(string, sizeof string, _("Picked up a %s"), item->name);
                                break;
                }
 
@@ -289,6 +290,11 @@ void pickUpItem(Entity *item)
                        engine.setInfoMessage(string, 0, INFO_NORMAL);
 
                checkObjectives(item->name, true);
+               
+               if (strcmp(item->name, "LRTS") == 0)
+               {
+                       presentPlayerMedal("LRTS_PART");
+               }
        }
 }