]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove attackertext mutator (developed by z411), already added in SMB modpack
authorLegendaryGuard <rootuser999@gmail.com>
Mon, 12 Jul 2021 18:49:19 +0000 (20:49 +0200)
committerLegendaryGuard <rootuser999@gmail.com>
Mon, 12 Jul 2021 18:49:19 +0000 (20:49 +0200)
qcsrc/common/mutators/mutator/_mod.inc
qcsrc/common/mutators/mutator/_mod.qh
qcsrc/common/mutators/mutator/attackertext/_mod.inc [deleted file]
qcsrc/common/mutators/mutator/attackertext/_mod.qh [deleted file]
qcsrc/common/mutators/mutator/attackertext/attackertext.qc [deleted file]
qcsrc/common/mutators/mutator/attackertext/attackertext.qh [deleted file]
qcsrc/common/mutators/mutator/attackertext/cl_attackertext.qc [deleted file]
qcsrc/common/mutators/mutator/attackertext/cl_attackertext.qh [deleted file]
qcsrc/common/mutators/mutator/attackertext/sv_attackertext.qc [deleted file]
qcsrc/common/mutators/mutator/attackertext/sv_attackertext.qh [deleted file]

index 57e591d48ee6c95309174dadc0117838f757823b..c463c429f0c0eec1c0c1ffa89487a79158a9ae1a 100644 (file)
@@ -1,6 +1,5 @@
 // generated file; do not modify
 
-#include <common/mutators/mutator/attackertext/_mod.inc>
 #include <common/mutators/mutator/bloodloss/_mod.inc>
 #include <common/mutators/mutator/breakablehook/_mod.inc>
 #include <common/mutators/mutator/buffs/_mod.inc>
index 5128166ec4e3a5b7ea397c035e6f00d3bdec0ccd..3b4eba7cb65a6a4fa93d97e515d6bb19a7f7b347 100644 (file)
@@ -4,7 +4,6 @@
 #include <common/mutators/mutator/breakablehook/_mod.qh>
 #include <common/mutators/mutator/buffs/_mod.qh>
 #include <common/mutators/mutator/bugrigs/_mod.qh>
-#include <common/mutators/mutator/attackertext/_mod.qh>
 #include <common/mutators/mutator/campcheck/_mod.qh>
 #include <common/mutators/mutator/cloaked/_mod.qh>
 #include <common/mutators/mutator/damagetext/_mod.qh>
diff --git a/qcsrc/common/mutators/mutator/attackertext/_mod.inc b/qcsrc/common/mutators/mutator/attackertext/_mod.inc
deleted file mode 100644 (file)
index 52b56df..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// generated file; do not modify
-#include <common/mutators/mutator/attackertext/attackertext.qc>
-#ifdef CSQC
-    #include <common/mutators/mutator/attackertext/cl_attackertext.qc>
-#endif
-#ifdef SVQC
-    #include <common/mutators/mutator/attackertext/sv_attackertext.qc>
-#endif
diff --git a/qcsrc/common/mutators/mutator/attackertext/_mod.qh b/qcsrc/common/mutators/mutator/attackertext/_mod.qh
deleted file mode 100644 (file)
index e712e37..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// generated file; do not modify
-#include <common/mutators/mutator/damagetext/damagetext.qh>
-#ifdef CSQC
-    #include <common/mutators/mutator/damagetext/cl_damagetext.qh>
-#endif
-#ifdef SVQC
-    #include <common/mutators/mutator/damagetext/sv_damagetext.qh>
-#endif
-#ifdef MENUQC
-    #include <common/mutators/mutator/damagetext/ui_damagetext.qh>
-#endif
diff --git a/qcsrc/common/mutators/mutator/attackertext/attackertext.qc b/qcsrc/common/mutators/mutator/attackertext/attackertext.qc
deleted file mode 100644 (file)
index dafd533..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "attackertext.qh"
-
-REGISTER_NET_TEMP(attackertext)
diff --git a/qcsrc/common/mutators/mutator/attackertext/attackertext.qh b/qcsrc/common/mutators/mutator/attackertext/attackertext.qh
deleted file mode 100644 (file)
index 96d63a7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#pragma once
-
-const int ATFLAG_SAMETEAM = BIT(0);
-
diff --git a/qcsrc/common/mutators/mutator/attackertext/cl_attackertext.qc b/qcsrc/common/mutators/mutator/attackertext/cl_attackertext.qc
deleted file mode 100644 (file)
index e191cf2..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#include "cl_attackertext.qh"
-
-AUTOCVAR_SAVE(cl_attackertext,                        bool,   true,       "Draw damage dealt where you hit the enemy");
-AUTOCVAR_SAVE(cl_attackertext_friendlyfire,           bool,   false,      "Show for friendlyfire");
-AUTOCVAR_SAVE(cl_attackertext_time,                   float,  3,          "Time to show");
-AUTOCVAR_SAVE(cl_attackertext_fadetime,               float,  2,          "Time to fade");
-AUTOCVAR_SAVE(cl_attackertext_decolorize,             int,    1,          "1 = decolorize names when teamplay, 2 = decolorize always");
-
-REGISTER_MUTATOR(attackertext, true);
-
-MUTATOR_HOOKFUNCTION(attackertext, DrawInfoMessages)
-{
-       if (autocvar_cl_attackertext == 0) return false;
-       
-       float fade_start = max(0, autocvar_cl_attackertext_time);
-       float fade_time = max(0, autocvar_cl_attackertext_fadetime);
-               
-       if (last_attack_time && last_attack_time > time - fade_start - fade_time) {
-               vector pos = M_ARGV(0, vector);
-               vector mySize = M_ARGV(1, vector);
-               vector fontsize = '0.3 0.3 0' * mySize.y;
-               int img_curr_group = M_ARGV(2, int);
-               
-               float alpha_ = 0;
-               
-               if (last_attack_time + fade_start > time)
-                       alpha_ = panel_fg_alpha;
-               else if (fade_time != 0)
-                       alpha_ = panel_fg_alpha - bound(0, (time - last_attack_time - fade_start) * (1 / fade_time), 1);
-               else
-                       return true;
-                       
-               pos = InfoMessages_drawstring(last_attack_name, pos, mySize, alpha_, fontsize);
-               img_curr_group = -1;
-
-               return true;
-       }
-               
-       return false;
-}
-
-
-NET_HANDLE(attackertext, bool isNew)
-{
-    int server_entity_index = ReadByte();
-       int flags = ReadByte();
-    bool friendlyfire = flags & ATFLAG_SAMETEAM;
-       
-       return = true;
-       
-    if (autocvar_cl_attackertext == 0) return;
-    if (friendlyfire && autocvar_cl_attackertext_friendlyfire == 0) return;
-       
-       string s = entcs_GetName(server_entity_index - 1);
-       if ((autocvar_cl_attackertext_decolorize == 1 && teamplay) || autocvar_cl_attackertext_decolorize == 2)
-               s = playername(s, entcs_GetTeam(server_entity_index - 1), true);
-
-       last_attack_time = time;
-       strfree(last_attack_name);
-       strcpy(last_attack_name, s);
-}
diff --git a/qcsrc/common/mutators/mutator/attackertext/cl_attackertext.qh b/qcsrc/common/mutators/mutator/attackertext/cl_attackertext.qh
deleted file mode 100644 (file)
index c2c6d6e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#pragma once
-
-float last_attack_time;
-string last_attack_name;
\ No newline at end of file
diff --git a/qcsrc/common/mutators/mutator/attackertext/sv_attackertext.qc b/qcsrc/common/mutators/mutator/attackertext/sv_attackertext.qc
deleted file mode 100644 (file)
index 2a2556d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#include "sv_attackertext.qh"
-
-AUTOCVAR(sv_attackertext, int, 1, "0: disabled, 1: visible");
-
-REGISTER_MUTATOR(attackertext, true);
-
-#define SV_ATTACKERTEXT_DISABLED()        (autocvar_sv_attackertext <= 0)
-#define SV_ATTACKERTEXT_ENABLED()         (autocvar_sv_attackertext >= 1)
-
-void attackertext_Send(entity to, entity attacker, int sf)
-{
-       if(IS_REAL_CLIENT(to)) {
-               msg_entity = to;
-               WriteHeader(MSG_ONE, attackertext);
-               WriteByte(MSG_ONE, etof(attacker));
-               WriteByte(MSG_ONE, sf);
-       }
-}
-
-MUTATOR_HOOKFUNCTION(attackertext, PlayerDamaged) {
-    if (SV_ATTACKERTEXT_DISABLED()) return;
-       
-    entity attacker = M_ARGV(0, entity);
-    entity hit = M_ARGV(1, entity);
-       
-       if (hit == attacker) return;
-       if (!IS_PLAYER(attacker)) return;
-       
-       int sf = 0;
-       if (SAME_TEAM(hit, attacker)) sf |= ATFLAG_SAMETEAM;
-       
-       attackertext_Send(hit, attacker, sf);
-       FOREACH_CLIENT(IS_SPEC(it) && it.(enemy) == hit, { attackertext_Send(it, attacker, sf); });
-}
diff --git a/qcsrc/common/mutators/mutator/attackertext/sv_attackertext.qh b/qcsrc/common/mutators/mutator/attackertext/sv_attackertext.qh
deleted file mode 100644 (file)
index 6f70f09..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#pragma once