From: Mario Date: Wed, 8 Apr 2015 23:45:04 +0000 (+1000) Subject: Beef up the chat X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3fee02fe6b2975a5c3b46ee464afe2c246d53e7b;p=xonotic%2Fxonotic-data.pk3dir.git Beef up the chat --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 55e9df098..8c5e376ef 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -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) diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 7f3a1057b..60fd71bf7 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -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); diff --git a/qcsrc/server/cl_player.qh b/qcsrc/server/cl_player.qh index 2ad1fa44d..120e82f76 100644 --- a/qcsrc/server/cl_player.qh +++ b/qcsrc/server/cl_player.qh @@ -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: diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index ff09b1606..d4d1956f2 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -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"));