From: Mario Date: Thu, 23 Jun 2016 22:21:00 +0000 (+1000) Subject: A couple of tweaks (don't do fall damage tests if player entity isn't moving, don... X-Git-Tag: xonotic-v0.8.2~700^2~102^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f4cb5d9a857411199bcb6f95112252a183955a00;p=xonotic%2Fxonotic-data.pk3dir.git A couple of tweaks (don't do fall damage tests if player entity isn't moving, don't trace crosshair constantly if cheats are enabled) --- diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index 9706a2f15..a7cbeae28 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -733,7 +733,8 @@ float CheatFrame(entity this) if(this.maycheat || (gamestart_sv_cheats && autocvar_sv_cheats)) { // use cheat dragging if cheats are enabled - crosshair_trace_plusvisibletriggers(this); + //if(Drag_IsDragging(this)) + //crosshair_trace_plusvisibletriggers(this); Drag(this, true, true); } else diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 608895b4e..3edf09ef9 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -802,7 +802,7 @@ void ClientKill_Now(entity this) if(this.killindicator_teamchange) ClientKill_Now_TeamChange(this); - if(IS_PLAYER(this)) + if(!IS_SPEC(this) && !IS_OBSERVER(it)) Damage(this, this, this, 100000, DEATH_KILL.m_id, this.origin, '0 0 0'); // now I am sure the player IS dead @@ -905,7 +905,7 @@ void ClientKill_TeamChange (entity this, float targetteam) // 0 = don't change, setorigin(it.killindicator, '0 0 52'); setthink(it.killindicator, KillIndicator_Think); it.killindicator.nextthink = starttime + (it.lip) * 0.05; - clientkilltime = max(clientkilltime, it.killindicator.nextthink + 0.05); + //clientkilltime = max(clientkilltime, it.killindicator.nextthink + 0.05); it.killindicator.cnt = ceil(killtime); }); this.lip = 0; diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index 5eaf6618f..bc6814879 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -96,6 +96,7 @@ void CreatureFrame_Liquids(entity this) void CreatureFrame_FallDamage(entity this) { if(!IS_VEHICLE(this) && !(this.flags & FL_PROJECTILE)) // vehicles don't get falling damage + if(this.velocity || this.oldvelocity) // moving or has moved { // check for falling damage float velocity_len = vlen(this.velocity);