X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=blobdiff_plain;f=data%2Fqcsrc%2Fserver%2Fcl_player.qc;h=829a6501b777bf234d15110d7ad8a240b123fef3;hp=148170f7f0f898b80df894ef9fbf1194f3a1a748;hb=80e531b34bc8354b0eb9c55a94dbc41643dea27f;hpb=0cd670dbc049e8e389053b2e8462c784e9d7c9c7 diff --git a/data/qcsrc/server/cl_player.qc b/data/qcsrc/server/cl_player.qc index 148170f7..829a6501 100644 --- a/data/qcsrc/server/cl_player.qc +++ b/data/qcsrc/server/cl_player.qc @@ -114,6 +114,7 @@ void CopyBody(float keepvelocity) self.lip = oldself.lip; self.colormap = oldself.colormap; self.colormod = oldself.colormod; + self.glowmod = oldself.glowmod; self.iscreature = oldself.iscreature; self.angles = oldself.angles; self.avelocity = oldself.avelocity; @@ -309,7 +310,11 @@ void player_anim (void) if (!self.animstate_override) { - if(self.stat_eaten) + if(self.swallow_progress_pred) + setanim(self, self.anim_duckjump, TRUE, FALSE, FALSE); // looks good for predators who are swallowing + else if(self.swallow_progress_prey) + setanim(self, self.anim_die2, FALSE, FALSE, FALSE); // looks good for prey who's getting swallowed + else if(self.stat_eaten) { if(self.BUTTON_ATCK || self.predator.digesting) setanim(self, self.anim_pain2, FALSE, TRUE, FALSE); // looks good for prey attacking the stomach or being digested @@ -358,7 +363,16 @@ void player_anim (void) if (self.weaponentity) if (!self.weaponentity.animstate_override) - setanim(self.weaponentity, self.weaponentity.anim_idle, TRUE, FALSE, FALSE); + { + if(self.swallow_progress_pred) + setanim(self.weaponentity, self.weaponentity.anim_fire2, TRUE, FALSE, FALSE); // looks good for predators who are swallowing + else if(self.swallow_progress_prey) + setanim(self.weaponentity, self.weaponentity.anim_reload, TRUE, FALSE, FALSE); // looks good for prey who's getting swallowed + else if(self.stat_eaten && self.BUTTON_ATCK) + setanim(self.weaponentity, self.weaponentity.anim_fire1, TRUE, FALSE, FALSE); // looks good for prey attacking the stomach + else + setanim(self.weaponentity, self.weaponentity.anim_idle, TRUE, FALSE, FALSE); + } } void SpawnThrownWeapon (vector org, float w, float doreduce) @@ -1218,6 +1232,7 @@ void GlobalSound(string sample, float chan, float voicetype) { float n; float tauntrand; + float vol; if(sample == "") return; @@ -1229,6 +1244,14 @@ void GlobalSound(string sample, float chan, float voicetype) else sample = strcat(argv(0), ".wav"); // randomization + // modified volume, used for attenuated (non-radio) voices + vol = VOL_BASEVOICE; + if(self.stat_eaten && cvar("g_vore_soundocclusion")) // reduce sound volume for prey, to simulate stomach culling + vol *= cvar("g_vore_soundocclusion"); + if(cvar("g_healthsize") && cvar("g_healthsize_soundfactor")) // amplify or reduce sound volume based on the size of the player + vol *= pow(self.scale, cvar("g_healthsize_soundfactor")); + vol = bound(0, vol, 1); + switch(voicetype) { case VOICETYPE_LASTATTACKER_ONLY: @@ -1239,12 +1262,7 @@ void GlobalSound(string sample, float chan, float voicetype) if(clienttype(msg_entity) == CLIENTTYPE_REAL) { if(msg_entity.cvar_cl_voice_directional == 1) - { - if(self.stat_eaten) - soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_MIN); - else - soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN); - } + soundto(MSG_ONE, self, chan, sample, vol, ATTN_MIN); else soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE); } @@ -1258,12 +1276,7 @@ void GlobalSound(string sample, float chan, float voicetype) if(clienttype(msg_entity) == CLIENTTYPE_REAL) { if(msg_entity.cvar_cl_voice_directional == 1) - { - if(self.stat_eaten) - soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_MIN); - else - soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN); - } + soundto(MSG_ONE, self, chan, sample, vol, ATTN_MIN); else soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE); } @@ -1277,12 +1290,7 @@ void GlobalSound(string sample, float chan, float voicetype) if(!teams_matter || msg_entity.team == self.team) { if(msg_entity.cvar_cl_voice_directional == 1) - { - if(self.stat_eaten) - soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_MIN); - else - soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN); - } + soundto(MSG_ONE, self, chan, sample, vol, ATTN_MIN); else soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE); } @@ -1297,15 +1305,12 @@ void GlobalSound(string sample, float chan, float voicetype) tauntrand = random(); FOR_EACH_REALCLIENT(msg_entity) if (tauntrand < msg_entity.cvar_cl_autotaunt) - if (msg_entity.cvar_cl_voice_directional >= 1) { - if(self.stat_eaten) - soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX)); + if (msg_entity.cvar_cl_voice_directional >= 1) + soundto(MSG_ONE, self, chan, sample, vol, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX)); else - soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX)); + soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE); } - else - soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE); break; case VOICETYPE_TAUNT: if(self.classname == "player") @@ -1318,24 +1323,16 @@ void GlobalSound(string sample, float chan, float voicetype) FOR_EACH_REALCLIENT(msg_entity) { if (msg_entity.cvar_cl_voice_directional >= 1) - { - if(self.stat_eaten) - soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX)); - else - soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX)); - } + soundto(MSG_ONE, self, chan, sample, vol, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX)); else soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE); } case VOICETYPE_PLAYERSOUND: - if(self.stat_eaten) - sound(self, chan, sample, VOL_BASE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_NORM); - else - sound(self, chan, sample, VOL_BASE, ATTN_NORM); + sound(self, chan, sample, vol, ATTN_NORM); break; case VOICETYPE_GURGLE: if(self.stomach_load) - sound(self, chan, sample, VOL_BASE * self.stomach_load / cvar("g_balance_vore_swallow_limit"), ATTN_NORM); + sound(self, chan, sample, vol * self.stomach_load / g_balance_vore_swallow_limit, ATTN_NORM); else stopsound(self, chan); break;