X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fclient.qc;h=0276fbf63eacec7e78e4068e650390d7bceaed1f;hp=5029da7df9613f216a5ba89cedd44b70b647e801;hb=f7b39f30ba70e25be35459c7d2c1f6f99efe135d;hpb=f6eba5d1edfbdbb4a6f1578d904ae8d38ddf6dbe diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 5029da7df9..0276fbf63e 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -713,10 +713,7 @@ void PutPlayerInServer(entity this) for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) { .entity weaponentity = weaponentities[slot]; - entity oldwep = this.(weaponentity); CL_SpawnWeaponentity(this, weaponentity); - if(oldwep && oldwep.owner == this) - this.(weaponentity).m_gunalign = oldwep.m_gunalign; } this.alpha = default_player_alpha; this.colormod = '1 1 1' * autocvar_g_player_brightness; @@ -778,6 +775,7 @@ void PutPlayerInServer(entity this) if (CS(this).impulse) ImpulseCommands(this); + W_ResetGunAlign(this, CS(this).cvar_cl_gunalign); for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) { .entity weaponentity = weaponentities[slot]; @@ -1339,7 +1337,7 @@ void PrintToChat(entity client, string text) ERASEABLE void DebugPrintToChat(entity client, string text) { - if (autocvar_developer) + if (autocvar_developer > 0) { PrintToChat(client, text); } @@ -1355,7 +1353,7 @@ void PrintToChatAll(string text) ERASEABLE void DebugPrintToChatAll(string text) { - if (autocvar_developer) + if (autocvar_developer > 0) { PrintToChatAll(text); } @@ -1377,7 +1375,7 @@ void PrintToChatTeam(int team_num, string text) ERASEABLE void DebugPrintToChatTeam(int team_num, string text) { - if (autocvar_developer) + if (autocvar_developer > 0) { PrintToChatTeam(team_num, text); } @@ -1617,7 +1615,7 @@ void player_regen(entity this) this.event_damage(this, this, this, 1, DEATH_ROT.m_id, DMG_NOWEP, this.origin, '0 0 0'); } - if (!(this.items & IT_UNLIMITED_WEAPON_AMMO)) + if (!(this.items & IT_UNLIMITED_AMMO)) { float minf, maxf, limitf; @@ -1683,6 +1681,7 @@ void SpectateCopy(entity this, entity spectatee) this.effects = spectatee.effects & EFMASK_CHEAP; // eat performance SetResourceExplicit(this, RES_HEALTH, GetResource(spectatee, RES_HEALTH)); CS(this).impulse = 0; + this.disableclientprediction = 1; // no need to run prediction on a spectator this.items = spectatee.items; STAT(LAST_PICKUP, this) = STAT(LAST_PICKUP, spectatee); STAT(HIT_TIME, this) = STAT(HIT_TIME, spectatee); @@ -2084,6 +2083,7 @@ bool joinAllowed(entity this) .int items_added; .string shootfromfixedorigin; +.bool dualwielding_prev; bool PlayerThink(entity this) { if (game_stopped || intermission_running) { @@ -2186,6 +2186,15 @@ bool PlayerThink(entity this) stuffcmd(this, sprintf("\ncl_shootfromfixedorigin \"%s\"\n", autocvar_g_shootfromfixedorigin)); } + // reset gun alignment when dual wielding status changes + // to ensure guns are always aligned right and left + bool dualwielding = W_DualWielding(this); + if(this.dualwielding_prev != dualwielding) + { + W_ResetGunAlign(this, CS(this).cvar_cl_gunalign); + this.dualwielding_prev = dualwielding; + } + // LordHavoc: allow firing on move frames (sub-ticrate), this gives better timing on slow servers //if(frametime) {