X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=data%2Fqcsrc%2Fserver%2Fcl_player.qc;h=148170f7f0f898b80df894ef9fbf1194f3a1a748;hb=0cd670dbc049e8e389053b2e8462c784e9d7c9c7;hp=3997e3ded0b8a479529b23a8160af1cff9454ffb;hpb=b1448088c02a14b43c2814283e0792ede4fbc310;p=voretournament%2Fvoretournament.git diff --git a/data/qcsrc/server/cl_player.qc b/data/qcsrc/server/cl_player.qc index 3997e3de..148170f7 100644 --- a/data/qcsrc/server/cl_player.qc +++ b/data/qcsrc/server/cl_player.qc @@ -143,6 +143,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; @@ -245,7 +246,7 @@ void player_setupanimsformodel() self.anim_backright = '21 1 1'; self.anim_backleft = '22 1 1'; animparseerror = FALSE; - animfilename = strcat(self.model, ".animinfo"); + animfilename = strcat(self.playermodel, ".animinfo"); // only the normal player model may contain animation info animfile = fopen(animfilename, FILE_READ); if (animfile >= 0) { @@ -281,14 +282,13 @@ void player_setupanimsformodel() } else dprint("File ", animfilename, " not found, assuming legacy .zym model animation timings\n"); + + // reset animstate now + setanim(self, self.anim_idle, TRUE, FALSE, TRUE); }; 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); @@ -309,7 +309,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); @@ -749,7 +756,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 @@ -1233,7 +1240,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); @@ -1252,7 +1259,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); @@ -1271,7 +1278,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); @@ -1292,7 +1299,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)); @@ -1312,7 +1319,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)); @@ -1321,7 +1328,7 @@ 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);