]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't perform floodcontrol checks if there is no source entity
authorMario <mario@smbclan.net>
Sat, 15 Jul 2017 15:55:08 +0000 (01:55 +1000)
committerMario <mario@smbclan.net>
Sat, 15 Jul 2017 15:55:08 +0000 (01:55 +1000)
qcsrc/server/client.qh
qcsrc/server/player.qc

index eebb7d969824fed6cf6ba03a73e56de81c42f1f9..e85419cfe46b7124ebe8244c0e482036b0a30d98 100644 (file)
@@ -34,7 +34,7 @@ CLASS(Client, Object)
     ATTRIB(Client, playerid, int, this.playerid);
 
     ATTRIB(Client, parm_idlesince, int, this.parm_idlesince);
-    ATTRIB(Client, muted, int, this.muted);
+    ATTRIB(Client, muted, bool, this.muted);
 
     METHOD(Client, m_unwind, bool(Client this));
 
index 70e972da88f50af29fa3a2246b693e58b7373c51..fcb29523c84a05ddeb9dac8923a14ed960491cd8 100644 (file)
@@ -838,7 +838,7 @@ int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodc
        // FLOOD CONTROL
        int flood = 0;
        var .float flood_field = floodcontrol_chat;
-       if(floodcontrol)
+       if(floodcontrol && source)
        {
                float flood_spl;
                float flood_burst;