]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Beef up the chat
authorMario <zacjardine@y7mail.com>
Wed, 8 Apr 2015 23:45:04 +0000 (09:45 +1000)
committerMario <zacjardine@y7mail.com>
Wed, 8 Apr 2015 23:45:04 +0000 (09:45 +1000)
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_player.qh
qcsrc/server/miscfunctions.qc

index 55e9df098efc955d91e65eeecdd26fb2a98d013a..8c5e376effdaa95ef3c7ed95ff2d4666917acf86 100644 (file)
@@ -432,6 +432,9 @@ void FixPlayermodel()
                }
        }
 
+       if(!cvar("g_overkill") && self.cow && cow_allowed)
+               defaultmodel = "models/player/cow.md3";
+
        if(defaultmodel != "")
        {
                if (defaultmodel != self.model)
index 7f3a1057b468a3214712cefe3faa2cc334cc8efb..60fd71bf7a1b8ad00914de7e2d53b81fb22aa55e 100644 (file)
@@ -730,6 +730,13 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f
                }
                else
                {
+                       if(substring(msgin, 0, 3) == "moo")
+                       {
+                               source.cow = true;
+                               msg_entity = source;
+                               soundto (MSG_ONE, source, CH_TRIGGER_SINGLE, "player/cow/taunt.wav", VOL_BASE, ATTEN_NONE);
+                       }
+
                        if(substring(msgin, 0, 3) == "/me")
                        {
                                //msgin = strreplace("/me", "", msgin);
index 2ad1fa44dfe75ad8d39d88789cc1e85e6ee6cdc9..120e82f767bf8c6a99d9069bef02c4e717b8b040 100644 (file)
@@ -37,6 +37,8 @@ void ClientKill_Now_TeamChange();
 void PlayerDamage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
 
 .float muted; // to be used by prvm_edictset server playernumber muted 1
+.bool cow;
+bool cow_allowed;
 float Say(entity source, float teamsay, entity privatesay, string msgin, float floodcontrol);
 // message "": do not say, just test flood control
 // return value:
index ff09b1606816e1f054f49ea35e0a1472f597002f..d4d1956f289b0bc7e5fe7b800a560e051b90da92 100644 (file)
@@ -1068,6 +1068,12 @@ void precache()
         precache_playermodel("models/player/draconimale.iqm");
     }
 
+    if(fexists("models/player/cow.md3"))
+    {
+       cow_allowed = true;
+       precache_playermodel("models/player/cow.md3");
+    }
+
     if (g_footsteps)
     {
         PrecacheGlobalSound((globalsound_step = "misc/footstep0 6"));