From: Mario Date: Tue, 1 Dec 2015 12:28:34 +0000 (+1000) Subject: Hopefully fix issues with vaporizer beam X-Git-Tag: xonotic-v0.8.2~1596 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4ccced60ef2f0735c760abcc92c5208da00e5238;p=xonotic%2Fxonotic-data.pk3dir.git Hopefully fix issues with vaporizer beam --- diff --git a/qcsrc/common/movetypes/movetypes.qc b/qcsrc/common/movetypes/movetypes.qc index be592e774..e3ebd98ab 100644 --- a/qcsrc/common/movetypes/movetypes.qc +++ b/qcsrc/common/movetypes/movetypes.qc @@ -588,6 +588,8 @@ void _Movetype_Physics_Frame(entity this, float movedt) case MOVETYPE_FLY_WORLDONLY: _Movetype_Physics_Toss(this, movedt); break; + case MOVETYPE_PHYSICS: + break; } } diff --git a/qcsrc/common/movetypes/toss.qc b/qcsrc/common/movetypes/toss.qc index 51d6b6e13..3029c9a9d 100644 --- a/qcsrc/common/movetypes/toss.qc +++ b/qcsrc/common/movetypes/toss.qc @@ -4,7 +4,7 @@ void _Movetype_Physics_Toss(entity this, float dt) // SV_Physics_Toss { if (this.move_flags & FL_ONGROUND) { - if (this.move_velocity.z >= 1 / 32) + if (this.move_velocity.z >= 1 / 32 && UPWARD_VELOCITY_CLEARS_ONGROUND) { this.move_flags &= ~FL_ONGROUND; } diff --git a/qcsrc/common/physics.qc b/qcsrc/common/physics.qc index d21579fa6..c4f0f4ce3 100644 --- a/qcsrc/common/physics.qc +++ b/qcsrc/common/physics.qc @@ -122,7 +122,8 @@ void PM_ClientMovement_UpdateStatus(entity this, bool ground) { #ifdef CSQC // make sure player is not stuck - PM_ClientMovement_Unstick(this); + if(autocvar_cl_movement != 3) + PM_ClientMovement_Unstick(this); // set crouched if (PHYS_INPUT_BUTTON_CROUCH(this)) @@ -158,27 +159,30 @@ void PM_ClientMovement_UpdateStatus(entity this, bool ground) UNSET_ONGROUND(this); } - // set watertype/waterlevel - origin1 = this.origin; - origin1.z += this.mins_z + 1; - this.waterlevel = WATERLEVEL_NONE; + if(autocvar_cl_movement != 3) + { + // set watertype/waterlevel + origin1 = this.origin; + origin1.z += this.mins_z + 1; + this.waterlevel = WATERLEVEL_NONE; - int thepoint = pointcontents(origin1); + int thepoint = pointcontents(origin1); - this.watertype = (thepoint == CONTENT_WATER || thepoint == CONTENT_LAVA || thepoint == CONTENT_SLIME); + this.watertype = (thepoint == CONTENT_WATER || thepoint == CONTENT_LAVA || thepoint == CONTENT_SLIME); - if (this.watertype) - { - this.waterlevel = WATERLEVEL_WETFEET; - origin1.z = this.origin.z + (this.mins.z + this.maxs.z) * 0.5; - thepoint = pointcontents(origin1); - if (thepoint == CONTENT_WATER || thepoint == CONTENT_LAVA || thepoint == CONTENT_SLIME) + if (this.watertype) { - this.waterlevel = WATERLEVEL_SWIMMING; - origin1.z = this.origin.z + 22; + this.waterlevel = WATERLEVEL_WETFEET; + origin1.z = this.origin.z + (this.mins.z + this.maxs.z) * 0.5; thepoint = pointcontents(origin1); if (thepoint == CONTENT_WATER || thepoint == CONTENT_LAVA || thepoint == CONTENT_SLIME) - this.waterlevel = WATERLEVEL_SUBMERGED; + { + this.waterlevel = WATERLEVEL_SWIMMING; + origin1.z = this.origin.z + 22; + thepoint = pointcontents(origin1); + if (thepoint == CONTENT_WATER || thepoint == CONTENT_LAVA || thepoint == CONTENT_SLIME) + this.waterlevel = WATERLEVEL_SUBMERGED; + } } } diff --git a/qcsrc/common/weapons/weapon/vaporizer.qc b/qcsrc/common/weapons/weapon/vaporizer.qc index 6e7e386e5..a3c4c1f97 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qc +++ b/qcsrc/common/weapons/weapon/vaporizer.qc @@ -71,7 +71,7 @@ void SendCSQCVaporizerBeamParticle(entity player, int hit) { WriteCoord(MSG_BROADCAST, v.y); WriteCoord(MSG_BROADCAST, v.z); WriteByte(MSG_BROADCAST, hit); - WriteShort(MSG_BROADCAST, num_for_edict(player)); + WriteByte(MSG_BROADCAST, num_for_edict(player)); WriteByte(MSG_BROADCAST, player.team); } #elif defined(CSQC) @@ -103,7 +103,15 @@ void VaporizerBeam_Draw(entity this) string tex = "particles/lgbeam"; if(this.cnt) tex = "particles/gauntletbeam"; - vector rgb = getcsqcplayercolor(this.sv_entnum - 1); + vector rgb; + //entity e = CSQCModel_server2csqc(this.sv_entnum - 1); + //if (e == NULL) + //{ + rgb = colormapPaletteColor(stof(getplayerkeyvalue(this.sv_entnum - 1, "colors")) & 0x0F, true); + //rgb = '1 1 1'; + //} + //else + // rgb = e.glowmod; rgb *= (1 + autocvar_cl_vaporizerbeam_colorboost); float fail = (self.nextthink - time); @@ -133,7 +141,9 @@ NET_HANDLE(TE_CSQC_VAPORBEAMPARTICLE, bool isNew) this.vorg1_x = ReadCoord(); this.vorg1_y = ReadCoord(); this.vorg1_z = ReadCoord(); this.vorg2_x = ReadCoord(); this.vorg2_y = ReadCoord(); this.vorg2_z = ReadCoord(); this.cnt = ReadByte(); - this.sv_entnum = ReadShort(); + int myowner = ReadByte(); + this.owner = playerslots[myowner - 1]; + this.sv_entnum = myowner; this.team = ReadByte() - 1; if(autocvar_cl_vaporizerbeam_particle)