summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_draw.c4
-rw-r--r--src/cgame/cg_ents.c2
-rw-r--r--src/cgame/cg_particles.c2
-rw-r--r--src/client/cl_main.c3
-rw-r--r--src/game/g_active.c6
-rw-r--r--src/qcommon/q_shared.h2
-rw-r--r--src/renderergl2/tr_extramath.c7
-rw-r--r--src/renderergl2/tr_extramath.h3
-rw-r--r--src/renderergl2/tr_vbo.c15
9 files changed, 21 insertions, 23 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 6a3b52a6..9528fed7 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -2352,9 +2352,9 @@ static void CG_DrawSpeedGraph( rectDef_t *rect, vec4_t foreColor,
{
val = speedSamples[ ( oldestSpeedSample + i ) % SPEEDOMETER_NUM_SAMPLES ];
if( val < SPEED_MED )
- VectorLerp( val / SPEED_MED, slow, medium, color );
+ VectorLerp2( val / SPEED_MED, slow, medium, color );
else if( val < SPEED_FAST )
- VectorLerp( ( val - SPEED_MED ) / ( SPEED_FAST - SPEED_MED ),
+ VectorLerp2( ( val - SPEED_MED ) / ( SPEED_FAST - SPEED_MED ),
medium, fast, color );
else
VectorCopy( fast, color );
diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c
index 6c30339b..d4e0f342 100644
--- a/src/cgame/cg_ents.c
+++ b/src/cgame/cg_ents.c
@@ -964,7 +964,7 @@ static void CG_CalcEntityLerpPositions( centity_t *cent )
// don't let the projectile go through the floor
if( tr.fraction < 1.0f )
- VectorLerp( tr.fraction, lastOrigin, cent->lerpOrigin, cent->lerpOrigin );
+ VectorLerp2( tr.fraction, lastOrigin, cent->lerpOrigin, cent->lerpOrigin );
}
// adjust for riding a mover if it wasn't rolled into the predicted
diff --git a/src/cgame/cg_particles.c b/src/cgame/cg_particles.c
index a3f74fbd..d3e53f03 100644
--- a/src/cgame/cg_particles.c
+++ b/src/cgame/cg_particles.c
@@ -1534,7 +1534,7 @@ static qboolean CG_ParseParticleFile( const char *fileName )
}
if( i < numBaseParticleSystems )
{
- SkipBracedSection( &text_p );
+ SkipBracedSection( &text_p, 0 );
continue;
}
diff --git a/src/client/cl_main.c b/src/client/cl_main.c
index d7e4d1a2..80d655c4 100644
--- a/src/client/cl_main.c
+++ b/src/client/cl_main.c
@@ -2430,9 +2430,6 @@ void CL_InitServerInfo( serverInfo_t *server, netadr_t *address ) {
server->game[0] = '\0';
server->gameType = 0;
server->netType = 0;
- server->punkbuster = 0;
- server->g_humanplayers = 0;
- server->g_needpass = 0;
}
/*
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 16b21349..1b7be618 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -1052,13 +1052,13 @@ void G_UnlaggedCalc( int time, gentity_t *rewindEnt )
continue;
// between two unlagged markers
- VectorLerp( lerp, ent->client->unlaggedHist[ startIndex ].mins,
+ VectorLerp2( lerp, ent->client->unlaggedHist[ startIndex ].mins,
ent->client->unlaggedHist[ stopIndex ].mins,
ent->client->unlaggedCalc.mins );
- VectorLerp( lerp, ent->client->unlaggedHist[ startIndex ].maxs,
+ VectorLerp2( lerp, ent->client->unlaggedHist[ startIndex ].maxs,
ent->client->unlaggedHist[ stopIndex ].maxs,
ent->client->unlaggedCalc.maxs );
- VectorLerp( lerp, ent->client->unlaggedHist[ startIndex ].origin,
+ VectorLerp2( lerp, ent->client->unlaggedHist[ startIndex ].origin,
ent->client->unlaggedHist[ stopIndex ].origin,
ent->client->unlaggedCalc.origin );
diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h
index e3b1a48e..3f4f0780 100644
--- a/src/qcommon/q_shared.h
+++ b/src/qcommon/q_shared.h
@@ -526,7 +526,7 @@ void ByteToDir( int b, vec3_t dir );
#define VectorCopy(a,b) ((b)[0]=(a)[0],(b)[1]=(a)[1],(b)[2]=(a)[2])
#define VectorScale(v, s, o) ((o)[0]=(v)[0]*(s),(o)[1]=(v)[1]*(s),(o)[2]=(v)[2]*(s))
#define VectorMA(v, s, b, o) ((o)[0]=(v)[0]+(b)[0]*(s),(o)[1]=(v)[1]+(b)[1]*(s),(o)[2]=(v)[2]+(b)[2]*(s))
-#define VectorLerp( f, s, e, r ) ((r)[0]=(s)[0]+(f)*((e)[0]-(s)[0]),\
+#define VectorLerp2( f, s, e, r ) ((r)[0]=(s)[0]+(f)*((e)[0]-(s)[0]),\
(r)[1]=(s)[1]+(f)*((e)[1]-(s)[1]),\
(r)[2]=(s)[2]+(f)*((e)[2]-(s)[2]))
diff --git a/src/renderergl2/tr_extramath.c b/src/renderergl2/tr_extramath.c
index fe787ef1..84816a61 100644
--- a/src/renderergl2/tr_extramath.c
+++ b/src/renderergl2/tr_extramath.c
@@ -156,6 +156,13 @@ void Mat4SimpleInverse( const mat4_t in, mat4_t out)
out[ 3] = 0.0f; out[ 7] = 0.0f; out[11] = 0.0f; out[15] = 1.0f;
}
+void VectorLerp( vec3_t a, vec3_t b, float lerp, vec3_t c)
+{
+ c[0] = a[0] * (1.0f - lerp) + b[0] * lerp;
+ c[1] = a[1] * (1.0f - lerp) + b[1] * lerp;
+ c[2] = a[2] * (1.0f - lerp) + b[2] * lerp;
+}
+
qboolean SpheresIntersect(vec3_t origin1, float radius1, vec3_t origin2, float radius2)
{
float radiusSum = radius1 + radius2;
diff --git a/src/renderergl2/tr_extramath.h b/src/renderergl2/tr_extramath.h
index af7c3804..f1ea5767 100644
--- a/src/renderergl2/tr_extramath.h
+++ b/src/renderergl2/tr_extramath.h
@@ -77,6 +77,9 @@ static ID_INLINE int VectorCompare5(const vec5_t v1, const vec5_t v2)
return 1;
}
+void VectorLerp( vec3_t a, vec3_t b, float lerp, vec3_t c);
+
+
qboolean SpheresIntersect(vec3_t origin1, float radius1, vec3_t origin2, float radius2);
void BoundingSphereOfSpheres(vec3_t origin1, float radius1, vec3_t origin2, float radius2, vec3_t origin3, float *radius3);
diff --git a/src/renderergl2/tr_vbo.c b/src/renderergl2/tr_vbo.c
index 8eb85d41..dc0f33be 100644
--- a/src/renderergl2/tr_vbo.c
+++ b/src/renderergl2/tr_vbo.c
@@ -559,14 +559,11 @@ R_CreateIBO2
IBO_t *R_CreateIBO2(const char *name, int numIndexes, glIndex_t * inIndexes, vboUsage_t usage)
{
IBO_t *ibo;
- int i, j;
+ int i;
glIndex_t *indexes;
int indexesSize;
- int indexesCount;
- glIndex_t *tri;
- glIndex_t index;
int glUsage;
switch (usage)
@@ -605,16 +602,10 @@ IBO_t *R_CreateIBO2(const char *name, int numIndexes, glIndex_t * inInd
indexesSize = numIndexes * sizeof(glIndex_t);
indexes = ri.Hunk_AllocateTempMemory(indexesSize);
- indexesCount = 0;
- for(i = 0, tri = inIndexes; i < numIndexes; i += 3, tri += 3)
+ for(i = 0; i < numIndexes; i++)
{
- for(j = 0; j < 3; j++)
- {
- index = tri[j];
- memcpy(indexes + indexesOfs, &index, sizeof(glIndex_t));
- indexesOfs += sizeof(glIndex_t);
- }
+ indexes[i] = inIndexes[i];
}
ibo->indexesSize = indexesSize;