X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_player.qc;h=a602e9242b12751dd158afdb0d18621ac9ca8e0e;hb=d53800a81ad1253e6ee6eca8b9971bbf275df7ee;hp=13cf1ad68828f32856b54f5fab2a93600bbfb7c5;hpb=3a264e945a45a04f4566feb9e9a91e0d5266361e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 13cf1ad68..a602e9242 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -134,7 +134,6 @@ void CopyBody(float keepvelocity) self.enemy = oldself; self.lip = oldself.lip; self.colormap = oldself.colormap; - self.glowmod = oldself.glowmod; self.iscreature = oldself.iscreature; self.damagedbycontents = oldself.damagedbycontents; self.angles = oldself.angles; @@ -142,6 +141,7 @@ void CopyBody(float keepvelocity) self.classname = "body"; self.damageforcescale = oldself.damageforcescale; self.effects = oldself.effects; + self.glowmod = oldself.glowmod; self.event_damage = oldself.event_damage; self.animstate_startframe = oldself.animstate_startframe; self.animstate_numframes = oldself.animstate_numframes; @@ -158,11 +158,7 @@ void CopyBody(float keepvelocity) self.armortype = oldself.armortype; self.model = oldself.model; self.modelindex = oldself.modelindex; - self.modelindex_lod0 = oldself.modelindex_lod0; - self.modelindex_lod0_from_xonotic = oldself.modelindex_lod0_from_xonotic; - self.modelindex_lod1 = oldself.modelindex_lod1; - self.modelindex_lod2 = oldself.modelindex_lod2; - self.skinindex = oldself.skinindex; + self.skin = oldself.skin; self.species = oldself.species; self.movetype = oldself.movetype; self.nextthink = oldself.nextthink; @@ -186,13 +182,16 @@ void CopyBody(float keepvelocity) Drag_MoveDrag(oldself, self); + if(self.colormap <= maxclients && self.colormap > 0) + self.colormap = 1024 + self.clientcolors; + self = oldself; } float player_getspecies() { float s; - get_model_parameters(self.model, self.skinindex); + get_model_parameters(self.model, self.skin); s = get_model_parameters_species; get_model_parameters(string_null, 0); if(s < 0) @@ -493,7 +492,8 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht self.armorvalue = self.armorvalue - save; self.health = self.health - take; // pause regeneration for 5 seconds - self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_pause_health_regen); + if(take) + self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_pause_health_regen); if (time > self.pain_finished) //Don't switch pain sequences like crazy { @@ -660,6 +660,8 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht MUTATOR_CALLHOOK(PlayerDies); weapon_action(self.weapon, WR_PLAYERDEATH); + RemoveGrapplingHook(self); + if(self.flagcarried) { if(attacker.classname != "player") @@ -1143,18 +1145,18 @@ float LoadPlayerSounds(string f, float first) } .float modelindex_for_playersound; -.float skinindex_for_playersound; +.float skin_for_playersound; void UpdatePlayerSounds() { if(self.modelindex == self.modelindex_for_playersound) - if(self.skinindex == self.skinindex_for_playersound) + if(self.skin == self.skin_for_playersound) return; self.modelindex_for_playersound = self.modelindex; - self.skinindex_for_playersound = self.skinindex; + self.skin_for_playersound = self.skin; ClearPlayerSounds(); LoadPlayerSounds("sound/player/default.sounds", 1); if(!autocvar_g_debug_defaultsounds) - if(!LoadPlayerSounds(get_model_datafilename(self.model, self.skinindex, "sounds"), 0)) + if(!LoadPlayerSounds(get_model_datafilename(self.model, self.skin, "sounds"), 0)) LoadPlayerSounds(get_model_datafilename(self.model, 0, "sounds"), 0); }