Skip to content

Commit

Permalink
Merge branch 'master' into game/eliteforce
Browse files Browse the repository at this point in the history
  • Loading branch information
zturtleman committed May 1, 2015
2 parents 956bea9 + 2292bf5 commit 56bdf5d
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 22 deletions.
9 changes: 4 additions & 5 deletions Makefile
Expand Up @@ -1115,11 +1115,10 @@ ifeq ($(USE_INTERNAL_JPEG),1)
BASE_CFLAGS += -DUSE_INTERNAL_JPEG
BASE_CFLAGS += -I$(JPDIR)
else
# libjpeg doesn't have pkg-config yet, but let users override with
# "make JPEG_CFLAGS=-I/opt/jpeg/include JPEG_LIBS='-L/opt/jpeg/lib -ljpeg'"
# if they need to
JPEG_CFLAGS ?=
JPEG_LIBS ?= -ljpeg
# IJG libjpeg doesn't have pkg-config, but libjpeg-turbo uses libjpeg.pc;
# we fall back to hard-coded answers if libjpeg.pc is unavailable
JPEG_CFLAGS ?= $(shell pkg-config --silence-errors --cflags libjpeg || true)
JPEG_LIBS ?= $(shell pkg-config --silence-errors --libs libjpeg || echo -ljpeg)
BASE_CFLAGS += $(JPEG_CFLAGS)
RENDERER_LIBS += $(JPEG_LIBS)
endif
Expand Down
10 changes: 1 addition & 9 deletions code/cgame/cg_servercmds.c
Expand Up @@ -820,7 +820,6 @@ CG_PlayVoiceChat
=================
*/
void CG_PlayVoiceChat( bufferedVoiceChat_t *vchat ) {
#ifdef MISSIONPACK
// if we are going into the intermission, don't start any voices
if ( cg.intermissionStarted ) {
return;
Expand All @@ -845,7 +844,6 @@ void CG_PlayVoiceChat( bufferedVoiceChat_t *vchat ) {
CG_Printf( "%s\n", vchat->message );
}
voiceChatBuffer[cg.voiceChatBufferOut].snd = 0;
#endif
}

/*
Expand All @@ -854,7 +852,6 @@ CG_PlayBufferedVoieChats
=====================
*/
void CG_PlayBufferedVoiceChats( void ) {
#ifdef MISSIONPACK
if ( cg.voiceChatTime < cg.time ) {
if (cg.voiceChatBufferOut != cg.voiceChatBufferIn && voiceChatBuffer[cg.voiceChatBufferOut].snd) {
//
Expand All @@ -864,7 +861,6 @@ void CG_PlayBufferedVoiceChats( void ) {
cg.voiceChatTime = cg.time + 1000;
}
}
#endif
}

/*
Expand All @@ -873,7 +869,6 @@ CG_AddBufferedVoiceChat
=====================
*/
void CG_AddBufferedVoiceChat( bufferedVoiceChat_t *vchat ) {
#ifdef MISSIONPACK
// if we are going into the intermission, don't start any voices
if ( cg.intermissionStarted ) {
return;
Expand All @@ -885,7 +880,6 @@ void CG_AddBufferedVoiceChat( bufferedVoiceChat_t *vchat ) {
CG_PlayVoiceChat( &voiceChatBuffer[cg.voiceChatBufferOut] );
cg.voiceChatBufferOut++;
}
#endif
}

/*
Expand All @@ -894,7 +888,6 @@ CG_VoiceChatLocal
=================
*/
void CG_VoiceChatLocal( int mode, qboolean voiceOnly, int clientNum, int color, const char *cmd ) {
#ifdef MISSIONPACK
char *chat;
voiceChatList_t *voiceChatList;
clientInfo_t *ci;
Expand Down Expand Up @@ -934,7 +927,6 @@ void CG_VoiceChatLocal( int mode, qboolean voiceOnly, int clientNum, int color,
CG_AddBufferedVoiceChat(&vchat);
}
}
#endif
}

/*
Expand Down Expand Up @@ -962,7 +954,7 @@ void CG_VoiceChat( int mode ) {

CG_VoiceChatLocal( mode, voiceOnly, clientNum, color, cmd );
}
#endif
#endif // MISSIONPACK

/*
=================
Expand Down
12 changes: 8 additions & 4 deletions code/game/ai_main.c
Expand Up @@ -1100,7 +1100,8 @@ void BotWriteSessionData(bot_state_t *bs) {
"%i %i %i %i %i %i %i %i"
" %f %f %f"
" %f %f %f"
" %f %f %f",
" %f %f %f"
" %f",
bs->lastgoal_decisionmaker,
bs->lastgoal_ltgtype,
bs->lastgoal_teammate,
Expand All @@ -1117,7 +1118,8 @@ void BotWriteSessionData(bot_state_t *bs) {
bs->lastgoal_teamgoal.mins[2],
bs->lastgoal_teamgoal.maxs[0],
bs->lastgoal_teamgoal.maxs[1],
bs->lastgoal_teamgoal.maxs[2]
bs->lastgoal_teamgoal.maxs[2],
bs->formation_dist
);

var = va( "botsession%i", bs->client );
Expand All @@ -1141,7 +1143,8 @@ void BotReadSessionData(bot_state_t *bs) {
"%i %i %i %i %i %i %i %i"
" %f %f %f"
" %f %f %f"
" %f %f %f",
" %f %f %f"
" %f",
&bs->lastgoal_decisionmaker,
&bs->lastgoal_ltgtype,
&bs->lastgoal_teammate,
Expand All @@ -1158,7 +1161,8 @@ void BotReadSessionData(bot_state_t *bs) {
&bs->lastgoal_teamgoal.mins[2],
&bs->lastgoal_teamgoal.maxs[0],
&bs->lastgoal_teamgoal.maxs[1],
&bs->lastgoal_teamgoal.maxs[2]
&bs->lastgoal_teamgoal.maxs[2],
&bs->formation_dist
);
}

Expand Down
6 changes: 6 additions & 0 deletions code/qcommon/unzip.c
@@ -1,4 +1,10 @@
/* unzip.c -- IO for uncompress .zip files using zlib
Modified for Quake III Arena to use the Z_Malloc() memory pool;
this means a system copy of minizip is not a suitable replacement.
Based on minizip:
Version 1.01e, February 12th, 2005
Copyright (C) 1998-2005 Gilles Vollant
Expand Down
2 changes: 1 addition & 1 deletion code/renderergl1/tr_animation.c
Expand Up @@ -346,7 +346,7 @@ void RB_MDRSurfaceAnim( mdrSurface_t *surface )
oldFrame = (mdrFrame_t *)((byte *)header + header->ofsFrames +
backEnd.currentEntity->e.oldframe * frameSize );

RB_CheckOverflow( surface->numVerts, surface->numTriangles );
RB_CHECKOVERFLOW( surface->numVerts, surface->numTriangles * 3 );

triangles = (int *) ((byte *)surface + surface->ofsTriangles);
indexes = surface->numTriangles * 3;
Expand Down
2 changes: 1 addition & 1 deletion code/renderergl2/tr_animation.c
Expand Up @@ -350,7 +350,7 @@ void RB_MDRSurfaceAnim( mdrSurface_t *surface )
oldFrame = (mdrFrame_t *)((byte *)header + header->ofsFrames +
backEnd.currentEntity->e.oldframe * frameSize );

RB_CheckOverflow( surface->numVerts, surface->numTriangles );
RB_CHECKOVERFLOW( surface->numVerts, surface->numTriangles * 3 );

triangles = (int *) ((byte *)surface + surface->ofsTriangles);
indexes = surface->numTriangles * 3;
Expand Down
2 changes: 1 addition & 1 deletion code/renderergl2/tr_extramath.c
Expand Up @@ -225,7 +225,7 @@ uint16_t FloatToHalf(float in)

f32.f = in;

f16.pack.exponent = CLAMP(f32.pack.exponent - 112, 0, 31);
f16.pack.exponent = CLAMP((int)(f32.pack.exponent) - 112, 0, 31);
f16.pack.fraction = f32.pack.fraction >> 13;
f16.pack.sign = f32.pack.sign;

Expand Down
2 changes: 1 addition & 1 deletion code/renderergl2/tr_image.c
Expand Up @@ -2714,7 +2714,7 @@ void R_CreateBuiltinImages( void ) {
{
for( x = 0; x < MAX_DLIGHTS; x++)
{
tr.shadowCubemaps[x] = R_CreateImage(va("*shadowcubemap%i", x), (byte *)data, PSHADOW_MAP_SIZE, PSHADOW_MAP_SIZE, IMGTYPE_COLORALPHA, IMGFLAG_CLAMPTOEDGE | IMGFLAG_CUBEMAP, 0);
tr.shadowCubemaps[x] = R_CreateImage(va("*shadowcubemap%i", x), NULL, PSHADOW_MAP_SIZE, PSHADOW_MAP_SIZE, IMGTYPE_COLORALPHA, IMGFLAG_CLAMPTOEDGE | IMGFLAG_CUBEMAP, 0);
}
}

Expand Down

0 comments on commit 56bdf5d

Please sign in to comment.