X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fphysics%2Fplayer.qc;h=20e2d4cc32f16d0b736e421d0a1172262492ff7c;hb=0c6b993abfdde30411dc771643b8d25b8377cb50;hp=6f83e76b9020255bd0a65745493e434999b559f2;hpb=12ad79a6e66bd40fb5afea8618a4c8960892b129;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 6f83e76b9..20e2d4cc3 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -488,8 +488,13 @@ string specialcommand = "xwxwxsxsxaxdxaxdx1x "; .float specialcommand_pos; void SpecialCommand(entity this) { - if (!CheatImpulse(this, CHIMPULSE_GIVE_ALL.impulse)) - LOG_INFO("A hollow voice says \"Plugh\".\n"); + if(autocvar_sv_cheats || this.maycheat) + { + if (!CheatImpulse(this, CHIMPULSE_GIVE_ALL.impulse)) + LOG_INFO("A hollow voice says \"Plugh\"."); + } + else + STAT(MOVEVARS_SPECIALCOMMAND, this) = true; } #endif @@ -514,18 +519,18 @@ bool PM_check_specialcommand(entity this, int buttons) else c = "?"; - if (c == substring(specialcommand, this.specialcommand_pos, 1)) + if (c == substring(specialcommand, CS(this).specialcommand_pos, 1)) { - this.specialcommand_pos += 1; - if (this.specialcommand_pos >= strlen(specialcommand)) + CS(this).specialcommand_pos += 1; + if (CS(this).specialcommand_pos >= strlen(specialcommand)) { - this.specialcommand_pos = 0; + CS(this).specialcommand_pos = 0; SpecialCommand(this); return true; } } - else if (this.specialcommand_pos && (c != substring(specialcommand, this.specialcommand_pos - 1, 1))) - this.specialcommand_pos = 0; + else if (CS(this).specialcommand_pos && (c != substring(specialcommand, CS(this).specialcommand_pos - 1, 1))) + CS(this).specialcommand_pos = 0; #endif return false; } @@ -808,7 +813,8 @@ void CSQC_ClientMovement_PlayerMove_Frame(entity this) { #ifdef SVQC // needs to be called before physics are run! - PM_UpdateButtons(this, CS(this)); + if(IS_REAL_CLIENT(this)) + PM_UpdateButtons(this, CS(this)); #endif sys_phys_update(this, PHYS_INPUT_TIMELENGTH);