]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_lms.qc
Merge branch 'master' into terencehill/quickmenu
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_lms.qc
index 13b77305a25429c78dd95768701167057b7a699e..a5707182e4de7125eb68a2bf48efc09c33579738 100644 (file)
@@ -1,3 +1,11 @@
+#include "gamemode_lms.qh"
+#include "../_all.qh"
+
+#include "gamemode.qh"
+
+#include "../campaign.qh"
+#include "../command/cmd.qh"
+
 // main functions
 float LMS_NewPlayerLives()
 {
@@ -150,7 +158,7 @@ MUTATOR_HOOKFUNCTION(lms_KeepScore)
 MUTATOR_HOOKFUNCTION(lms_FilterItem)
 {
        if(autocvar_g_lms_extra_lives)
-       if(self.classname == "item_health_mega")
+       if(self.itemdef == ITEM_HealthMega)
        {
                self.max_health = 1;
                return false;
@@ -162,7 +170,7 @@ MUTATOR_HOOKFUNCTION(lms_FilterItem)
 MUTATOR_HOOKFUNCTION(lms_ItemTouch)
 {
        // give extra lives for mega health
-       if(self.items & IT_HEALTH)
+       if (self.items & ITEM_HealthMega.m_itemid)
        {
                Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_EXTRALIVES);
                PlayerScore_Add(other, SP_LMS_LIVES, autocvar_g_lms_extra_lives);
@@ -221,7 +229,7 @@ MUTATOR_DEFINITION(gamemode_lms)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }