]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Awards.cpp
Remove some extra declarations of "channels"
[lugaru.git] / Source / Awards.cpp
index be967c538f2e4b703a1e3c073f852dd84edf0010..cbfe3814ff2779a6e9c7e95c90a84ff9e6e7c32a 100644 (file)
@@ -30,6 +30,21 @@ 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;