ioquake3 resync to revision 3550 from 3534.

Fix IQM quat normalize fail case
Remove erroneous newlines from Com_Error in sdl_glimp.c
Restore OpenGL 1.1 support (GL_CLAMP)
q3rcc: Allow to override build date
Fix lightning gun handling for corpses and single player podiums
Fix for macOS Catalina screen resolution issue
Fix team orders menu not listing clients with lower clientnums
Fix duplicate team join center print for bots and g_teamAutoJoin
E2K: fixed build by MCST lcc compiler when using USE_CURL=1 option
This commit is contained in:
zturtleman 2020-03-15 19:40:23 +00:00
parent 06cbdb679a
commit 9b86138351
15 changed files with 79 additions and 32 deletions

View file

@ -44,7 +44,7 @@ ifndef BUILD_DEFINES
endif
# ioquake3 svn version that this is based on
IOQ3_REVISION = 3534
IOQ3_REVISION = 3550
#############################################################################
#

View file

@ -1355,7 +1355,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
}
// make sure we aren't looking at cg.predictedPlayerEntity for LG
nonPredictedCent = &cg_entities[cent->currentState.clientNum];
nonPredictedCent = &cg_entities[cent->currentState.number];
// if the index of the nonPredictedCent is not the same as the clientNum
// then this is a fake player (like on the single player podiums), so

View file

@ -288,19 +288,34 @@
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(__LCC__)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
# if defined(__e2k__) /* MCST eLbrus C Compiler */
# define CURL_SIZEOF_LONG 8
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
# define CURL_PULL_SYS_TYPES_H 1
# define CURL_PULL_SYS_SOCKET_H 1
# else /* Local (or Little) C Compiler */
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
# endif
#elif defined(__SYMBIAN32__)
# if defined(__EABI__) /* Treat all ARM compilers equally */
# if defined(__EABI__) /* Treat all ARM compilers equally */
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
@ -539,7 +554,8 @@
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# elif defined(__LP64__) || \
defined(__x86_64__) || defined(__ppc64__) || defined(__powerpc64__) || defined(__sparc64__)
defined(__x86_64__) || defined(__ppc64__) || defined(__powerpc64__) || defined(__sparc64__) || \
defined(__e2k__) /* MCST Elbrus 2000 */
# define CURL_SIZEOF_LONG 8
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"

View file

@ -810,8 +810,6 @@ void SetTeam( gentity_t *ent, const char *s ) {
CheckTeamLeader( oldTeam );
}
BroadcastTeamChange( client, oldTeam );
// get and distribute relevant parameters
ClientUserinfoChanged( clientNum );
@ -820,6 +818,8 @@ void SetTeam( gentity_t *ent, const char *s ) {
return;
}
BroadcastTeamChange( client, oldTeam );
ClientBegin( clientNum );
}

View file

@ -296,7 +296,7 @@ static void UI_TeamOrdersMenu_BuildBotList( void ) {
int numPlayers;
int isBot;
int n;
char playerTeam = '3';
char playerTeam;
char botTeam;
char info[MAX_INFO_STRING];
@ -313,14 +313,16 @@ static void UI_TeamOrdersMenu_BuildBotList( void ) {
numPlayers = atoi( Info_ValueForKey( info, "sv_maxclients" ) );
teamOrdersMenuInfo.gametype = atoi( Info_ValueForKey( info, "g_gametype" ) );
for( n = 0; n < numPlayers && teamOrdersMenuInfo.numBots < 9; n++ ) {
trap_GetConfigString( CS_PLAYERS + n, info, MAX_INFO_STRING );
trap_GetConfigString( CS_PLAYERS + cs.clientNum, info, MAX_INFO_STRING );
playerTeam = *Info_ValueForKey( info, "t" );
for( n = 0; n < numPlayers && teamOrdersMenuInfo.numBots < 9; n++ ) {
if( n == cs.clientNum ) {
playerTeam = *Info_ValueForKey( info, "t" );
continue;
}
trap_GetConfigString( CS_PLAYERS + n, info, MAX_INFO_STRING );
isBot = atoi( Info_ValueForKey( info, "skill" ) );
if( !isBot ) {
continue;

View file

@ -80,6 +80,7 @@ extern glconfig_t glConfig; // outside of TR since it shouldn't be cleared duri
extern qboolean textureFilterAnisotropic;
extern int maxAnisotropy;
extern float displayAspect;
extern qboolean haveClampToEdge;
//
// cvars

View file

@ -794,8 +794,8 @@ void RE_UploadCinematic (int w, int h, int cols, int rows, const byte *data, int
qglTexImage2D( GL_TEXTURE_2D, 0, GL_RGB8, cols, rows, 0, GL_RGBA, GL_UNSIGNED_BYTE, data );
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, haveClampToEdge ? GL_CLAMP_TO_EDGE : GL_CLAMP );
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, haveClampToEdge ? GL_CLAMP_TO_EDGE : GL_CLAMP );
} else {
if (dirty) {
// otherwise, just subimage upload it so that drivers can tell we are going to be changing

View file

@ -866,7 +866,7 @@ image_t *R_CreateImage( const char *name, byte *pic, int width, int height,
image->width = width;
image->height = height;
if (flags & IMGFLAG_CLAMPTOEDGE)
glWrapClampMode = GL_CLAMP_TO_EDGE;
glWrapClampMode = haveClampToEdge ? GL_CLAMP_TO_EDGE : GL_CLAMP;
else
glWrapClampMode = GL_REPEAT;

View file

@ -27,6 +27,7 @@ glconfig_t glConfig;
qboolean textureFilterAnisotropic = qfalse;
int maxAnisotropy = 0;
float displayAspect = 0.0f;
qboolean haveClampToEdge = qfalse;
glstate_t glState;
@ -1294,6 +1295,7 @@ void RE_Shutdown( qboolean destroyWindow ) {
textureFilterAnisotropic = qfalse;
maxAnisotropy = 0;
displayAspect = 0.0f;
haveClampToEdge = qfalse;
Com_Memset( &glState, 0, sizeof( glState ) );
}

View file

@ -154,7 +154,8 @@ static vec_t QuatNormalize2( const quat_t v, quat_t out) {
out[2] = v[2]*ilength;
out[3] = v[3]*ilength;
} else {
out[0] = out[1] = out[2] = out[3] = 0;
out[0] = out[1] = out[2] = 0;
out[3] = -1;
}
return length;

View file

@ -30,6 +30,7 @@ glRefConfig_t glRefConfig;
qboolean textureFilterAnisotropic = qfalse;
int maxAnisotropy = 0;
float displayAspect = 0.0f;
qboolean haveClampToEdge = qfalse;
glstate_t glState;
@ -1552,6 +1553,7 @@ void RE_Shutdown( qboolean destroyWindow ) {
textureFilterAnisotropic = qfalse;
maxAnisotropy = 0;
displayAspect = 0.0f;
haveClampToEdge = qfalse;
Com_Memset( &glState, 0, sizeof( glState ) );
}

View file

@ -154,7 +154,8 @@ static vec_t QuatNormalize2( const quat_t v, quat_t out) {
out[2] = v[2]*ilength;
out[3] = v[3]*ilength;
} else {
out[0] = out[1] = out[2] = out[3] = 0;
out[0] = out[1] = out[2] = 0;
out[3] = -1;
}
return length;

View file

@ -261,7 +261,7 @@ static qboolean GLimp_GetProcAddresses( qboolean fixedFunction ) {
version = (const char *)qglGetString( GL_VERSION );
if ( !version ) {
Com_Error( ERR_FATAL, "GL_VERSION is NULL\n" );
Com_Error( ERR_FATAL, "GL_VERSION is NULL" );
}
if ( Q_stricmpn( "OpenGL ES", version, 9 ) == 0 ) {
@ -277,7 +277,7 @@ static qboolean GLimp_GetProcAddresses( qboolean fixedFunction ) {
}
if ( fixedFunction ) {
if ( QGL_VERSION_ATLEAST( 1, 2 ) ) {
if ( QGL_VERSION_ATLEAST( 1, 1 ) ) {
QGL_1_1_PROCS;
QGL_1_1_FIXED_FUNCTION_PROCS;
QGL_DESKTOP_1_1_PROCS;
@ -289,9 +289,9 @@ static qboolean GLimp_GetProcAddresses( qboolean fixedFunction ) {
QGL_ES_1_1_PROCS;
QGL_ES_1_1_FIXED_FUNCTION_PROCS;
// error so this doesn't segfault due to NULL desktop GL functions being used
Com_Error( ERR_FATAL, "Unsupported OpenGL Version: %s\n", version );
Com_Error( ERR_FATAL, "Unsupported OpenGL Version: %s", version );
} else {
Com_Error( ERR_FATAL, "Unsupported OpenGL Version (%s), OpenGL 1.2 is required\n", version );
Com_Error( ERR_FATAL, "Unsupported OpenGL Version (%s), OpenGL 1.1 is required", version );
}
} else {
if ( QGL_VERSION_ATLEAST( 2, 0 ) ) {
@ -307,9 +307,9 @@ static qboolean GLimp_GetProcAddresses( qboolean fixedFunction ) {
QGL_1_5_PROCS;
QGL_2_0_PROCS;
// error so this doesn't segfault due to NULL desktop GL functions being used
Com_Error( ERR_FATAL, "Unsupported OpenGL Version: %s\n", version );
Com_Error( ERR_FATAL, "Unsupported OpenGL Version: %s", version );
} else {
Com_Error( ERR_FATAL, "Unsupported OpenGL Version (%s), OpenGL 2.0 is required\n", version );
Com_Error( ERR_FATAL, "Unsupported OpenGL Version (%s), OpenGL 2.0 is required", version );
}
}
@ -965,6 +965,17 @@ static void GLimp_InitExtensions( qboolean fixedFunction )
{
ri.Printf( PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not found\n" );
}
haveClampToEdge = qfalse;
if ( QGL_VERSION_ATLEAST( 1, 2 ) || QGLES_VERSION_ATLEAST( 1, 0 ) || SDL_GL_ExtensionSupported( "GL_SGIS_texture_edge_clamp" ) )
{
ri.Printf( PRINT_ALL, "...using GL_SGIS_texture_edge_clamp\n" );
haveClampToEdge = qtrue;
}
else
{
ri.Printf( PRINT_ALL, "...GL_SGIS_texture_edge_clamp not found\n" );
}
}
#define R_MODE_FALLBACK 3 // 640 * 480

View file

@ -19,6 +19,15 @@ int ifdepth;
int ifsatisfied[NIF];
int skipping;
time_t reproducible_time()
{
char *source_date_epoch;
time_t t;
if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH")) == NULL ||
(t = (time_t)strtol(source_date_epoch, NULL, 10)) <= 0)
return time(NULL);
return t;
}
int
main(int argc, char **argv)
@ -28,7 +37,7 @@ main(int argc, char **argv)
char ebuf[BUFSIZ];
setbuf(stderr, ebuf);
t = time(NULL);
t = reproducible_time();
curtime = ctime(&t);
maketokenrow(3, &tr);
expandlex();

View file

@ -329,6 +329,8 @@ PLIST="${PLIST}
<string>QUAKE III ARENA Copyright © 1999-2000 id Software, Inc. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<false/>
</dict>
</plist>
"