]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove modinfo (this mutator isn't necessary) and fix emerald nade (from LegendaryGua...
authorLegendaryGuard <rootuser999@gmail.com>
Sat, 29 May 2021 13:40:12 +0000 (15:40 +0200)
committerLegendaryGuard <rootuser999@gmail.com>
Sat, 29 May 2021 13:40:12 +0000 (15:40 +0200)
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/server/_mod.inc
qcsrc/server/modinfo.qc [deleted file]

index 4605dd794ff96b9b2d7b89c4584acc78afcd3f8a..78f9fc742b8e9d314bfda51efc3574499fc679dd 100644 (file)
@@ -797,7 +797,7 @@ void nade_emerald_randomitem(entity e, vector org)
                        nade_emerald_dropitem(e, org, ((random() > 0.5) ? ITEM_Shield : ITEM_Strength));
                else
                {
-                       if(!g_ca || !g_freezetag)
+                       if(IS_GAMETYPE(FREEZETAG) || IS_GAMETYPE(LMS))
                                nade_emerald_dropitem(e, org, ((random() > 0.5) ? ITEM_ArmorSmall : ITEM_HealthSmall));
                        else
                                nade_emerald_randomweapons(e, org);
@@ -811,7 +811,7 @@ void nade_emerald_randomitem(entity e, vector org)
                        nade_emerald_dropitem(e, org, ((random() > 0.5) ? ITEM_Shells : ITEM_Rockets));
                else
                {
-                       if(!g_ca || !g_freezetag)
+                       if(IS_GAMETYPE(FREEZETAG) || IS_GAMETYPE(LMS))
                                nade_emerald_dropitem(e, org, ((random() > 0.5) ? ITEM_ArmorSmall : ITEM_HealthSmall));
                        else
                                nade_emerald_randomweapons(e, org);
@@ -846,24 +846,27 @@ void nade_emerald_dropping(vector org)
        {
                entity e = spawn();
                e.spawnfunc_checked = true;
-               //int cvar which manages the ONLY dropping per each type of item 14-03-2021
                
-               switch (autocvar_g_nades_emerald_dropitemselect)
+               if(!IS_GAMETYPE(CA))
                {
-                       case 0: nade_emerald_randomitem(e, org); return;
-                       case 1: nade_emerald_dropitem(e, org, ITEM_HealthSmall); return;
-                       case 2: nade_emerald_dropitem(e, org, ITEM_ArmorSmall); return;
-                       case 3: nade_emerald_allammoitemdrop(e, org); return;
-                       case 4: nade_emerald_dropitem(e, org, ITEM_Shells); return;
-                       case 5: nade_emerald_dropitem(e, org, ITEM_Bullets); return;
-                       case 6: nade_emerald_dropitem(e, org, ITEM_Rockets); return;
-                       case 7: nade_emerald_dropitem(e, org, ITEM_Cells); return;
-                       case 8: nade_emerald_dropitem(e, org, ITEM_Jetpack); return;
-                       case 9: nade_emerald_dropitem(e, org, ITEM_JetpackFuel); return;
-                       case 10: nade_emerald_dropitem(e, org, ITEM_Shield); return;
-                       case 11: nade_emerald_dropitem(e, org, ITEM_Strength); return;
-                       case 12: nade_emerald_randomweapons(e, org); return;
-                       default: nade_emerald_randomitem(e, org); return;
+                       //int cvar which manages the ONLY dropping per each type of item 14-03-2021
+                       switch (autocvar_g_nades_emerald_dropitemselect)
+                       {
+                               case 0: nade_emerald_randomitem(e, org); return;
+                               case 1: nade_emerald_dropitem(e, org, ITEM_HealthSmall); return;
+                               case 2: nade_emerald_dropitem(e, org, ITEM_ArmorSmall); return;
+                               case 3: nade_emerald_allammoitemdrop(e, org); return;
+                               case 4: nade_emerald_dropitem(e, org, ITEM_Shells); return;
+                               case 5: nade_emerald_dropitem(e, org, ITEM_Bullets); return;
+                               case 6: nade_emerald_dropitem(e, org, ITEM_Rockets); return;
+                               case 7: nade_emerald_dropitem(e, org, ITEM_Cells); return;
+                               case 8: nade_emerald_dropitem(e, org, ITEM_Jetpack); return;
+                               case 9: nade_emerald_dropitem(e, org, ITEM_JetpackFuel); return;
+                               case 10: nade_emerald_dropitem(e, org, ITEM_Shield); return;
+                               case 11: nade_emerald_dropitem(e, org, ITEM_Strength); return;
+                               case 12: nade_emerald_randomweapons(e, org); return;
+                               default: nade_emerald_randomitem(e, org); return;
+                       }
                }
        }
 }
index 13edd957ccfb24e8183ba445d3120a89b2066f6b..588aa92bd9b6da31bf2f606969f540629008d53a 100644 (file)
@@ -20,7 +20,6 @@
 
 //SMB mods
 #include <server/mute.qc>
-#include <server/modinfo.qc>
 //
 
 #include <server/player.qc>
diff --git a/qcsrc/server/modinfo.qc b/qcsrc/server/modinfo.qc
deleted file mode 100644 (file)
index 6b998fe..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-REGISTER_MUTATOR(mutator_mod, true);
-
-MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsString) {
-    M_ARGV(0, string) = strcat(M_ARGV(0, string), ":mod");
-}
-
-// we now show a proper message in the about page
-//MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsPrettyString) {
-//    M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Mod");
-//}
-
-MUTATOR_HOOKFUNCTION(mutator_mod, BuildGameplayTipsString, CBC_ORDER_LAST)
-{
-    M_ARGV(0, string) = strcat(M_ARGV(0, string), "\n\n ^7Running ^5Cyber^7 mod \n^3https://gitlab.com/xonotic/xonotic-data.pk3dir/-/tree/LegendaryGuard/cyber/");
-}
\ No newline at end of file