Fix for the QW protocol problem by Dabb..

Some profiling changes as well..
Code now compiles with profiling support, will disable later..
This commit is contained in:
Zephaniah E. Hull 2000-02-20 20:46:13 +00:00
parent f6b334821b
commit d356761b93
6 changed files with 83 additions and 70 deletions

View file

@ -177,3 +177,9 @@ D: Q1/QW tree merging
N: Jason Nelson N: Jason Nelson
E: jason_nelson@email.msn.com E: jason_nelson@email.msn.com
D: VC win32 support. D: VC win32 support.
N: Jukka Sorjonen
E: jukka.sorjonen@asikkala.fi
D: Bug squasher (see below).
D: QW network protocol fixes.
D: Found out why our VERSION was messing things up..

View file

@ -315,14 +315,15 @@ CL_ParseTEnt (void)
R_TeleportSplash (pos); R_TeleportSplash (pos);
break; break;
#ifdef QUAKEWORLD
case TE_GUNSHOT: // bullet hitting wall case TE_GUNSHOT: // bullet hitting wall
cnt = MSG_ReadByte ();
pos[0] = MSG_ReadCoord (); pos[0] = MSG_ReadCoord ();
pos[1] = MSG_ReadCoord (); pos[1] = MSG_ReadCoord ();
pos[2] = MSG_ReadCoord (); pos[2] = MSG_ReadCoord ();
R_RunParticleEffect (pos, vec3_origin, 0, 20); R_RunParticleEffect (pos, vec3_origin, 0, 20 * cnt);
break; break;
#ifdef QUAKEWORLD
case TE_BLOOD: // bullets hitting body case TE_BLOOD: // bullets hitting body
cnt = MSG_ReadByte (); cnt = MSG_ReadByte ();
pos[0] = MSG_ReadCoord (); pos[0] = MSG_ReadCoord ();
@ -340,6 +341,13 @@ CL_ParseTEnt (void)
#endif // QUAKEWORLD #endif // QUAKEWORLD
#ifdef UQUAKE #ifdef UQUAKE
case TE_GUNSHOT: // bullet hitting wall
pos[0] = MSG_ReadCoord ();
pos[1] = MSG_ReadCoord ();
pos[2] = MSG_ReadCoord ();
R_RunParticleEffect (pos, vec3_origin, 0, 20);
break;
// PGM 01/21/97 // PGM 01/21/97
case TE_BEAM: // grappling hook beam case TE_BEAM: // grappling hook beam
CL_ParseBeam (Mod_ForName("progs/beam.mdl", true)); CL_ParseBeam (Mod_ForName("progs/beam.mdl", true));

View file

@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <qtypes.h> #include <qtypes.h>
#include <cvar.h> #include <cvar.h>
#define MAX_INFO_STRING 196 #define MAX_INFO_STRING 512
#define MAX_SERVERINFO_STRING 512 #define MAX_SERVERINFO_STRING 512
#define MAX_LOCALINFO_STRING 32768 #define MAX_LOCALINFO_STRING 32768

View file

@ -3,7 +3,7 @@ AC_PREREQ(2.13)
AC_INIT(common/crc.h) AC_INIT(common/crc.h)
dnl Version of this release dnl Version of this release
QF_VERSION=0.2-devel QF_VERSION=0.2-d
VERSION=2.40 VERSION=2.40
AC_DEFINE_UNQUOTED(QF_VERSION,"$QF_VERSION") AC_DEFINE_UNQUOTED(QF_VERSION,"$QF_VERSION")
AC_DEFINE_UNQUOTED(VERSION,"$VERSION") AC_DEFINE_UNQUOTED(VERSION,"$VERSION")
@ -522,7 +522,7 @@ fi
dnl We want warnings, lots of warnings... dnl We want warnings, lots of warnings...
if test "x$GCC" = xyes; then if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -Wall -Werror" CFLAGS="$CFLAGS -Wall -Werror -pg"
fi fi
# CFLAGS="$CFLAGS -Wall -pedantic" # CFLAGS="$CFLAGS -Wall -pedantic"

View file

@ -99,7 +99,8 @@ void R_DrawParticles (void)
} }
// hack a scale up to keep particles from disapearing // hack a scale up to keep particles from disapearing
scale = (p->org[0] - r_origin[0])*vpn[0] + (p->org[1] - r_origin[1])*vpn[1] scale = (p->org[0] - r_origin[0])*vpn[0]
+ (p->org[1] - r_origin[1])*vpn[1]
+ (p->org[2] - r_origin[2])*vpn[2]; + (p->org[2] - r_origin[2])*vpn[2];
if (scale < 20) if (scale < 20)
scale = 1; scale = 1;

View file

@ -378,47 +378,49 @@ void R_RocketTrail (vec3_t start, vec3_t end, int type)
VectorCopy (vec3_origin, p->vel); VectorCopy (vec3_origin, p->vel);
p->die = cl.time + 2; p->die = cl.time + 2;
if (type == 4) switch (type) {
{ // slight blood case 4:
// slight blood
p->type = pt_slowgrav; p->type = pt_slowgrav;
p->color = 67 + (rand()&3); p->color = 67 + (rand()&3);
for (j=0 ; j<3 ; j++) for (j=0 ; j<3 ; j++)
p->org[j] = start[j] + ((rand()%6)-3); p->org[j] = start[j] + ((rand()%6)-3);
len -= 3; len -= 3;
} break;
else if (type == 2) case 2:
{ // blood // blood
p->type = pt_slowgrav; p->type = pt_slowgrav;
p->color = 67 + (rand()&3); p->color = 67 + (rand()&3);
for (j=0 ; j<3 ; j++) for (j=0 ; j<3 ; j++)
p->org[j] = start[j] + ((rand()%6)-3); p->org[j] = start[j] + ((rand()%6)-3);
} break;
else if (type == 6) case 6:
{ // voor trail // voor trail
p->color = 9*16 + 8 + (rand()&3); p->color = 9*16 + 8 + (rand()&3);
p->type = pt_static; p->type = pt_static;
p->die = cl.time + 0.3; p->die = cl.time + 0.3;
for (j=0 ; j<3 ; j++) for (j=0 ; j<3 ; j++)
p->org[j] = start[j] + ((rand()&15)-8); p->org[j] = start[j] + ((rand()&15)-8);
} break;
else if (type == 1) case 1:
{ // smoke smoke // smoke smoke
p->ramp = (rand()&3) + 2; p->ramp = (rand()&3) + 2;
p->color = ramp3[(int)p->ramp]; p->color = ramp3[(int)p->ramp];
p->type = pt_fire; p->type = pt_fire;
for (j=0 ; j<3 ; j++) for (j=0 ; j<3 ; j++)
p->org[j] = start[j] + ((rand()%6)-3); p->org[j] = start[j] + ((rand()%6)-3);
} break;
else if (type == 0) case 0:
{ // rocket trail // rocket trail
p->ramp = (rand()&3); p->ramp = (rand()&3);
p->color = ramp3[(int)p->ramp]; p->color = ramp3[(int)p->ramp];
p->type = pt_fire; p->type = pt_fire;
for (j=0 ; j<3 ; j++) for (j=0 ; j<3 ; j++)
p->org[j] = start[j] + ((rand()%6)-3); p->org[j] = start[j] + ((rand()%6)-3);
} break;
else if (type == 3 || type == 5) case 3:
{ // tracer case 5:
// tracer
static int tracercount; static int tracercount;
p->die = cl.time + 0.5; p->die = cl.time + 0.5;
@ -431,20 +433,16 @@ void R_RocketTrail (vec3_t start, vec3_t end, int type)
tracercount++; tracercount++;
VectorCopy (start, p->org); VectorCopy (start, p->org);
if (tracercount & 1) if (tracercount & 1) {
{
p->vel[0] = 30*vec[1]; p->vel[0] = 30*vec[1];
p->vel[1] = 30*-vec[0]; p->vel[1] = 30*-vec[0];
} } else {
else
{
p->vel[0] = 30*-vec[1]; p->vel[0] = 30*-vec[1];
p->vel[1] = 30*vec[0]; p->vel[1] = 30*vec[0];
} }
break;
} }
VectorAdd (start, vec, start); VectorAdd (start, vec, start);
} }
} }