X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=blobdiff_plain;f=data%2Fqcsrc%2Fserver%2Fcl_player.qc;h=430d6655b9c7f692343153dfcae2031ea690c0a2;hp=e282ed37e836a32238750c3469e776cd4bc29306;hb=25ec1c4fdd064c2e0cfaffce3541336b794672ac;hpb=9109dc44350b48e3924e7749634f30b188a7de4a diff --git a/data/qcsrc/server/cl_player.qc b/data/qcsrc/server/cl_player.qc index e282ed37..430d6655 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; @@ -143,6 +144,7 @@ void CopyBody(float keepvelocity) self.solid = oldself.solid; self.takedamage = oldself.takedamage; self.think = oldself.think; + self.scale = oldself.scale; self.customizeentityforclient = oldself.customizeentityforclient; self.uncustomizeentityforclient = oldself.uncustomizeentityforclient; self.uncustomizeentityforclient_set = oldself.uncustomizeentityforclient_set; @@ -218,10 +220,6 @@ float player_getspecies() void player_setupanimsformodel() { - // if this is the stomach model (or any model that can't be animated), don't attempt to animate - //if(substring(self.model, strlen(self.model) - 3, 3) == "md3") // check model extension - // return; - local string animfilename; local float animfile; // defaults for legacy .zym models without animinfo files @@ -292,10 +290,6 @@ void player_setupanimsformodel() void player_anim (void) { - // if this is the stomach model (or any model that can't be animated), don't attempt to animate - //if(substring(self.model, strlen(self.model) - 3, 3) == "md3") // check model extension - // return; - updateanim(self); if (self.weaponentity) updateanim(self.weaponentity); @@ -316,7 +310,14 @@ void player_anim (void) if (!self.animstate_override) { - if (!(self.flags & FL_ONGROUND)) + 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 + else + setanim(self, self.anim_jump, FALSE, TRUE, FALSE); // looks good for prey idling inside the stomach + } + else if (!(self.flags & FL_ONGROUND)) { if (self.crouch) setanim(self, self.anim_duckjump, FALSE, TRUE, self.restart_jump); @@ -756,7 +757,7 @@ void UpdateSelectedPlayer() selected = world; selected_score = 0.95; // 18 degrees - if(self.predator.classname == "player") + if(self.stat_eaten) { if(!self.dropweapon_check) if(self.predator.team != self.team) // don't disarm team mates when swallowing them @@ -1240,7 +1241,7 @@ void GlobalSound(string sample, float chan, float voicetype) { if(msg_entity.cvar_cl_voice_directional == 1) { - if(self.predator.classname == "player") + 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); @@ -1259,7 +1260,7 @@ void GlobalSound(string sample, float chan, float voicetype) { if(msg_entity.cvar_cl_voice_directional == 1) { - if(self.predator.classname == "player") + 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); @@ -1278,7 +1279,7 @@ void GlobalSound(string sample, float chan, float voicetype) { if(msg_entity.cvar_cl_voice_directional == 1) { - if(self.predator.classname == "player") + 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); @@ -1299,7 +1300,7 @@ void GlobalSound(string sample, float chan, float voicetype) if (tauntrand < msg_entity.cvar_cl_autotaunt) if (msg_entity.cvar_cl_voice_directional >= 1) { - if(self.predator.classname == "player") + 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)); @@ -1319,7 +1320,7 @@ void GlobalSound(string sample, float chan, float voicetype) { if (msg_entity.cvar_cl_voice_directional >= 1) { - if(self.predator.classname == "player") + 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)); @@ -1328,14 +1329,14 @@ void GlobalSound(string sample, float chan, float voicetype) soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE); } case VOICETYPE_PLAYERSOUND: - if(self.predator.classname == "player") + 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); 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_BASE * self.stomach_load / g_balance_vore_swallow_limit, ATTN_NORM); else stopsound(self, chan); break;