]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/magicear.qc
Fix compile
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / magicear.qc
index 7ca85876c0bed9a44aeb4f4c4ea75d17a50162a7..c20514e1a61f8e9cff3b0355c77bee16d10fce4f 100644 (file)
@@ -5,7 +5,6 @@ string trigger_magicear_processmessage(entity ear, entity source, float teamsay,
 {SELFPARAM();
        float domatch, dotrigger, matchstart, l;
        string s, msg;
-       entity oldself;
        string savemessage;
 
        magicear_matched = false;
@@ -29,14 +28,13 @@ string trigger_magicear_processmessage(entity ear, entity source, float teamsay,
 
                if(dotrigger)
                {
-                       oldself = self;
                        activator = source;
-                       self = ear;
+                       setself(ear);
                        savemessage = self.message;
                        self.message = string_null;
                        SUB_UseTargets();
                        self.message = savemessage;
-                       self = oldself;
+                       setself(this);
                }
 
                if(ear.netname != "")
@@ -120,14 +118,13 @@ string trigger_magicear_processmessage(entity ear, entity source, float teamsay,
 
        if(dotrigger)
        {
-               oldself = self;
                activator = source;
-               self = ear;
+               setself(ear);
                savemessage = self.message;
                self.message = string_null;
                SUB_UseTargets();
                self.message = savemessage;
-               self = oldself;
+               setself(this);
        }
 
        if(ear.spawnflags & 16)
@@ -165,8 +162,8 @@ string trigger_magicear_processmessage_forallears(entity source, float teamsay,
        return msgin;
 }
 
-void spawnfunc_trigger_magicear()
-{SELFPARAM();
+spawnfunc(trigger_magicear)
+{
        self.enemy = magicears;
        magicears = self;