From: Mario Date: Tue, 1 Dec 2015 16:30:25 +0000 (+1000) Subject: Always draw ladders (reduces amount of bandwidth wasted when player enters & leaves... X-Git-Tag: xonotic-v0.8.2~1593 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b9e14f57da10bef89237ef637b5ecdfcc90b1658;p=xonotic%2Fxonotic-data.pk3dir.git Always draw ladders (reduces amount of bandwidth wasted when player enters & leaves pvs) --- diff --git a/qcsrc/common/triggers/func/ladder.qc b/qcsrc/common/triggers/func/ladder.qc index df4cb4453..edba03233 100644 --- a/qcsrc/common/triggers/func/ladder.qc +++ b/qcsrc/common/triggers/func/ladder.qc @@ -76,6 +76,7 @@ void func_ladder_init() else setsize(self, self.mins, self.maxs); self.touch = func_ladder_touch; + BITSET_ASSIGN(self.effects, EF_NODEPTHTEST); func_ladder_link(); } diff --git a/qcsrc/common/triggers/trigger/impulse.qc b/qcsrc/common/triggers/trigger/impulse.qc index e8d85a013..abb40563e 100644 --- a/qcsrc/common/triggers/trigger/impulse.qc +++ b/qcsrc/common/triggers/trigger/impulse.qc @@ -24,7 +24,7 @@ void trigger_impulse_touch1() #ifdef SVQC str = min(self.radius, vlen(self.origin - other.origin)); #elif defined(CSQC) - str = min(self.radius, vlen(self.move_origin - other.move_origin)); + str = min(self.radius, vlen(self.origin - other.move_origin)); #endif if(self.falloff == 1) @@ -49,11 +49,11 @@ void trigger_impulse_touch1() other.velocity += accelspeed * normalize(targ.origin - self.origin); } #elif defined(CSQC) - float addspeed = str - other.move_velocity * normalize(targ.move_origin - self.move_origin); + float addspeed = str - other.move_velocity * normalize(targ.origin - self.origin); if (addspeed > 0) { float accelspeed = min(8 * pushdeltatime * str, addspeed); - other.move_velocity += accelspeed * normalize(targ.move_origin - self.move_origin); + other.move_velocity += accelspeed * normalize(targ.origin - self.origin); } #endif } @@ -61,11 +61,11 @@ void trigger_impulse_touch1() #ifdef SVQC other.velocity = other.velocity + normalize(targ.origin - self.origin) * str * pushdeltatime; #elif defined(CSQC) - other.move_velocity = other.move_velocity + normalize(targ.move_origin - self.move_origin) * str * pushdeltatime; + other.move_velocity = other.move_velocity + normalize(targ.origin - self.origin) * str * pushdeltatime; #endif #ifdef SVQC - other.flags &= ~FL_ONGROUND; + UNSET_ONGROUND(other); UpdateCSQCProjectile(other); #elif defined(CSQC) @@ -125,7 +125,7 @@ void trigger_impulse_touch3() #ifdef SVQC str = min(self.radius, vlen(self.origin - other.origin)); #elif defined(CSQC) - str = min(self.radius, vlen(self.move_origin - other.move_origin)); + str = min(self.radius, vlen(self.origin - other.move_origin)); #endif if(self.falloff == 1) @@ -140,7 +140,7 @@ void trigger_impulse_touch3() UpdateCSQCProjectile(other); #elif defined(CSQC) - other.move_velocity = other.move_velocity + normalize(other.move_origin - self.move_origin) * str * pushdeltatime; + other.move_velocity = other.move_velocity + normalize(other.move_origin - self.origin) * str * pushdeltatime; #endif } diff --git a/qcsrc/common/triggers/trigger/jumppads.qc b/qcsrc/common/triggers/trigger/jumppads.qc index 390bae206..62d1d8ead 100644 --- a/qcsrc/common/triggers/trigger/jumppads.qc +++ b/qcsrc/common/triggers/trigger/jumppads.qc @@ -351,6 +351,7 @@ void trigger_push_updatelink() void trigger_push_link() { + BITSET_ASSIGN(self.effects, EF_NODEPTHTEST); Net_LinkEntity(self, false, 0, trigger_push_send); } #endif @@ -401,11 +402,16 @@ bool target_push_send(entity this, entity to, float sf) WriteCoord(MSG_ENTITY, self.origin_y); WriteCoord(MSG_ENTITY, self.origin_z); + WriteAngle(MSG_ENTITY, self.angles_x); + WriteAngle(MSG_ENTITY, self.angles_y); + WriteAngle(MSG_ENTITY, self.angles_z); + return true; } void target_push_link() {SELFPARAM(); + BITSET_ASSIGN(self.effects, EF_NODEPTHTEST); Net_LinkEntity(self, false, 0, target_push_send); //self.SendFlags |= 1; // update } @@ -469,6 +475,10 @@ NET_HANDLE(ENT_CLIENT_TARGET_PUSH, bool isnew) self.origin_y = ReadCoord(); self.origin_z = ReadCoord(); + self.angles_x = ReadAngle(); + self.angles_y = ReadAngle(); + self.angles_z = ReadAngle(); + return = true; setorigin(self, self.origin);