]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Awards.cpp
Remove some extra declarations of "channels"
[lugaru.git] / Source / Awards.cpp
index 8640bdf948b2eea78184becff7b1066dbbc2171c..cbfe3814ff2779a6e9c7e95c90a84ff9e6e7c32a 100644 (file)
@@ -28,6 +28,23 @@ float bonusvalue;
 float bonustotal;
 float startbonustotal;
 float bonustime;
+float bonusnum[100];
+
+static const int bonus_values[bonus_count] = {
+#define DECLARE_BONUS(id, name, value, ...) value,
+#include "Bonuses.def"
+#undef DECLARE_BONUS
+};
+
+void
+award_bonus(int playerid, int bonusid, int alt_value)
+{
+  if (playerid != 0)
+    return;
+  bonus = bonusid;
+  bonustime = 0;
+  bonusvalue = alt_value ? alt_value : bonus_values[bonusid];
+}
 
 // FIXME: make these per-player
 float damagetaken;