10 Jan 2011

This commit is contained in:
g-cont 2011-01-10 00:00:00 +03:00 committed by Alibek Omarov
parent 50322d4cc6
commit 793c3899ee
28 changed files with 5715 additions and 5455 deletions

View File

@ -1,3 +1,10 @@
build 1433
Engine: rework hitbox trace
Engine: implement new check for blue-shift map format
Engine: fix PointContents for custom contents checking (spirit)
Engine: fix "angle" field on maps (typically for gearbox)
GameUI: implement 'mouse look' checkbox
build 1430
Engine: fix crash with invalid room_type set (more than 60)
Engine: fix stuck on elevators or tracktrains for clients

View File

@ -23,6 +23,9 @@ if errorlevel 1 set BUILD_ERROR=1
%MSDEV% launch/launch.dsp %CONFIG%"launch - Win32 Debug" %build_target%
if errorlevel 1 set BUILD_ERROR=1
%MSDEV% room/room.dsp %CONFIG%"room - Win32 Debug" %build_target%
if errorlevel 1 set BUILD_ERROR=1
if "%BUILD_ERROR%"=="" goto build_ok
echo *********************
@ -47,8 +50,7 @@ if exist cl_dll\cl_dll.plg del /f /q cl_dll\cl_dll.plg
if exist engine\engine.plg del /f /q engine\engine.plg
if exist mainui\mainui.plg del /f /q mainui\mainui.plg
if exist launch\launch.plg del /f /q launch\launch.plg
if exist vid_gl\vid_gl.plg del /f /q vid_gl\vid_gl.plg
if exist viewer\viewer.plg del /f /q viewer\viewer.plg
if exist room\room.plg del /f /q room\room.plg
echo
echo Build succeeded!

View File

@ -556,6 +556,8 @@ static int g_serveractive = 0;
void ServerDeactivate( void )
{
// ALERT( at_console, "ServerDeactivate()\n" );
// It's possible that the engine will call this function more times than is necessary
// Therefore, only run it one time for each call to ServerActivate
if ( g_serveractive != 1 )
@ -574,6 +576,8 @@ void ServerActivate( edict_t *pEdictList, int edictCount, int clientMax )
int i;
CBaseEntity *pClass;
// ALERT( at_console, "ServerActivate()\n" );
// Every call to ServerActivate should be matched by a call to ServerDeactivate
g_serveractive = 1;
@ -613,6 +617,8 @@ Called every frame before physics are run
*/
void PlayerPreThink( edict_t *pEntity )
{
// ALERT( at_console, "PreThink( %g, frametime %g )\n", gpGlobals->time, gpGlobals->frametime );
entvars_t *pev = &pEntity->v;
CBasePlayer *pPlayer = (CBasePlayer *)GET_PRIVATE(pEntity);
@ -629,6 +635,8 @@ Called every frame after physics are run
*/
void PlayerPostThink( edict_t *pEntity )
{
// ALERT( at_console, "PostThink( %g, frametime %g )\n", gpGlobals->time, gpGlobals->frametime );
entvars_t *pev = &pEntity->v;
CBasePlayer *pPlayer = (CBasePlayer *)GET_PRIVATE(pEntity);

View File

@ -662,6 +662,20 @@ static void pfnKeySetOverstrikeMode( int fActive )
host.key_overstrike = fActive;
}
/*
====================
pfnKeyGetState
returns kbutton struct if found
====================
*/
static void *pfnKeyGetState( const char *name )
{
if( clgame.dllFuncs.KB_Find )
return clgame.dllFuncs.KB_Find( name );
return NULL;
}
/*
=========
pfnMemAlloc
@ -879,6 +893,7 @@ static ui_enginefuncs_t gEngfuncs =
Key_IsDown,
pfnKeyGetOverstrikeMode,
pfnKeySetOverstrikeMode,
pfnKeyGetState,
pfnMemAlloc,
pfnMemFree,
pfnGetGameInfo,
@ -910,6 +925,7 @@ void UI_UnloadProgs( void )
qboolean UI_LoadProgs( const char *name )
{
static MENUAPI GetMenuAPI;
static ui_enginefuncs_t gpEngfuncs;
static ui_globalvars_t gpGlobals;
int i;
@ -932,7 +948,10 @@ qboolean UI_LoadProgs( const char *name )
return false;
}
if( !GetMenuAPI( &menu.dllFuncs, &gEngfuncs, menu.globals ))
// make local copy of engfuncs to prevent overwrite it with user dll
Mem_Copy( &gpEngfuncs, &gEngfuncs, sizeof( gpEngfuncs ));
if( !GetMenuAPI( &menu.dllFuncs, &gpEngfuncs, menu.globals ))
{
FS_FreeLibrary( menu.hInstance );
MsgDev( D_NOTE, "UI_LoadProgs: can't init client API\n" );

View File

@ -175,12 +175,6 @@ void CL_SetSolidPlayers( int playernum )
}
}
/*
=============
CL_TruePointContents
=============
*/
int CL_TruePointContents( const vec3_t p )
{
int i, contents;
@ -202,7 +196,7 @@ int CL_TruePointContents( const vec3_t p )
continue;
// only brushes can have special contents
if( !pe->model || pe->model->type != mod_brush )
if( pe->model->type != mod_brush )
continue;
// check water brushes accuracy
@ -215,7 +209,9 @@ int CL_TruePointContents( const vec3_t p )
if( PM_HullPointContents( hull, hull->firstclipnode, test ) == CONTENTS_EMPTY )
continue;
contents = pe->skin;
// compare contents ranking
if( RankForContents( pe->skin ) > RankForContents( contents ))
contents = pe->skin; // new content has more priority
}
return contents;

View File

@ -1,7 +0,0 @@
void DSP_InitAll( void ); // initalize
void DSP_FreeAll( void ); // shutdown
void DSP_ClearState( void ); // same as VidInit
int DSP_Alloc( int ipset, float xfade, int cchan ); // alloc
void DSP_SetPreset( int idsp, int ipsetnew ); // set preset
void DSP_Process( int idsp, portable_samplepair_t *pbfront, int sampleCount ); // process
void DSP_Free( int idsp ); // free

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -709,6 +709,8 @@ void S_StopAllSounds( void )
S_FreeChannel( &channels[i] );
}
DSP_ClearState();
// clear all the channels
Mem_Set( channels, 0, sizeof( channels ));

View File

@ -77,7 +77,7 @@ qboolean Cmd_GetMapList( const char *s, char *completedname, int length )
case Q1BSP_VERSION:
case HLBSP_VERSION:
header = (dheader_t *)buf;
if( header->lumps[LUMP_PLANES].filelen % sizeof( dplane_t ))
if( header->lumps[LUMP_ENTITIES].fileofs <= 1024 )
{
lumpofs = header->lumps[LUMP_PLANES].fileofs;
lumplen = header->lumps[LUMP_PLANES].filelen;
@ -663,7 +663,7 @@ qboolean Cmd_CheckMapsList_R( qboolean fRefresh, qboolean onlyingamedir )
case Q1BSP_VERSION:
case HLBSP_VERSION:
header = (dheader_t *)buf;
if( header->lumps[LUMP_PLANES].filelen % sizeof( dplane_t ))
if( header->lumps[LUMP_ENTITIES].fileofs <= 1024 )
{
lumpofs = header->lumps[LUMP_PLANES].fileofs;
lumplen = header->lumps[LUMP_PLANES].filelen;

View File

@ -1458,7 +1458,7 @@ static void Mod_LoadBrushModel( model_t *mod, const void *buffer )
loadmodel->mempool = Mem_AllocPool( va( "sv: ^2%s^7", loadmodel->name ));
// load into heap
if( header->lumps[LUMP_PLANES].filelen % sizeof( dplane_t ))
if( header->lumps[LUMP_ENTITIES].fileofs <= 1024 )
{
// blue-shift swapped lumps
Mod_LoadEntities( &header->lumps[LUMP_PLANES] );

View File

@ -520,7 +520,7 @@ pmtrace_t PM_PlayerTrace( playermove_t *pmove, vec3_t start, vec3_t end, int fla
}
// g-cont. needs for global test!!!
if( trace.allsolid || /*trace.startsolid ||*/ trace.fraction < total.fraction )
if( trace.allsolid || trace.startsolid || trace.fraction < total.fraction )
{
trace.ent = i;
@ -532,7 +532,7 @@ pmtrace_t PM_PlayerTrace( playermove_t *pmove, vec3_t start, vec3_t end, int fla
else total = trace;
}
else if( trace.startsolid )
trace.startsolid = true;
total.startsolid = true;
if( i == 0 && ( flags & PM_WORLD_ONLY ))
break; // done

View File

@ -95,7 +95,8 @@ void World_MoveBounds( const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_
trace_t World_CombineTraces( trace_t *cliptrace, trace_t *trace, edict_t *touch )
{
if( trace->allsolid || trace->fraction < cliptrace->fraction )
// g-cont. needs for global test!!!
if( trace->allsolid || trace->startsolid || trace->fraction < cliptrace->fraction )
{
trace->ent = touch;
@ -150,8 +151,8 @@ int RankForContents( int contents )
case CONTENTS_LAVA: return 10;
case CONTENTS_SKY: return 11;
case CONTENTS_SOLID: return 12;
default: return 13; // any user contents has more priority than default
}
return -1;
}
/*

View File

@ -117,6 +117,7 @@ typedef struct ui_enginefuncs_s
int (*pfnKeyIsDown)( int keynum );
int (*pfnKeyGetOverstrikeMode)( void );
void (*pfnKeySetOverstrikeMode)( int fActive );
void *(*pfnKeyGetState)( const char *name ); // for mlook, klook etc
// engine memory manager
void* (*pfnMemAlloc)( size_t cb, const char *filename, const int fileline );

35
engine/room_int.h Normal file
View File

@ -0,0 +1,35 @@
//=======================================================================
// Copyright XashXT Group 2011 ©
// room_int.h - interface between engine and DSP
//=======================================================================
#ifndef ROOM_INT_H
#define ROOM_INT_H
#define DSP_VERSION 1
typedef struct dsp_enginefuncs_s
{
// random generator
float (*pfnRandomFloat)( float flLow, float flHigh );
long (*pfnRandomLong)( long lLow, long lHigh );
// debug messages
void (*Con_Printf)( char *fmt, ... );
void (*Con_DPrintf)( char *fmt, ... );
} dsp_enginefuncs_t;
typedef struct
{
void (*pfnVidInit)( void );
void (*pfnInit)( void );
void (*pfnShutdown)( void );
int (*pfnDSP_Alloc)( int ipset, float xfade, int cchan ); // alloc
void (*pfnDSP_SetPreset)( int idsp, int ipsetnew ); // set preset
void (*pfnDSP_Process)( int idsp, void *pbfront, int sampleCount ); // process
float (*pfnDSP_GetGain)( int idsp );
void (*pfnDSP_Free)( int idsp );
} DSP_FUNCTIONS;
typedef int (*ROOMAPI)( DSP_FUNCTIONS *pFunctionTable, dsp_enginefuncs_t* engfuncs, int iVersion );
#endif//ROOM_INT_H

View File

@ -295,6 +295,7 @@ typedef struct
void *vp; // acess by offset in bytes
};
int numEntities; // actual entities count
float force_retouch; // always start at new frame to relink all ents
movevars_t movevars; // curstate
movevars_t oldmovevars; // oldstate

View File

@ -905,6 +905,11 @@ void SV_PutClientInServer( edict_t *ent )
}
ent->v.effects |= EF_NOINTERP;
// reset weaponanim
BF_WriteByte( &client->netchan.message, svc_weaponanim );
BF_WriteByte( &client->netchan.message, 0 );
BF_WriteByte( &client->netchan.message, 0 );
// trigger_camera restored here
if( sv.viewentity > 0 && sv.viewentity < GI->max_edicts )
client->pViewEntity = EDICT_NUM( sv.viewentity );

View File

@ -451,7 +451,7 @@ void SV_WriteEntityPatch( const char *filename )
case Q1BSP_VERSION:
case HLBSP_VERSION:
header = (dheader_t *)buf;
if( header->lumps[LUMP_PLANES].filelen % sizeof( dplane_t ))
if( header->lumps[LUMP_ENTITIES].fileofs <= 1024 )
{
lumpofs = header->lumps[LUMP_PLANES].fileofs;
lumplen = header->lumps[LUMP_PLANES].filelen;
@ -507,7 +507,7 @@ script_t *SV_GetEntityScript( const char *filename, int *flags )
case Q1BSP_VERSION:
case HLBSP_VERSION:
header = (dheader_t *)buf;
if( header->lumps[LUMP_PLANES].filelen % sizeof( dplane_t ))
if( header->lumps[LUMP_ENTITIES].fileofs <= 1024 )
{
lumpofs = header->lumps[LUMP_PLANES].fileofs;
lumplen = header->lumps[LUMP_PLANES].filelen;
@ -635,11 +635,9 @@ void SV_FreeEdict( edict_t *pEdict )
if( pEdict->pvPrivateData )
{
// NOTE: new interface can be missing
if( svgame.dllFuncs2.pfnOnFreeEntPrivateData )
{
// NOTE: new interface can be missing
svgame.dllFuncs2.pfnOnFreeEntPrivateData( pEdict );
}
Mem_Free( pEdict->pvPrivateData );
}
Mem_Set( pEdict, 0, sizeof( *pEdict ));
@ -4267,6 +4265,9 @@ qboolean SV_ParseEdict( script_t *script, edict_t *ent )
if( world.version == Q1BSP_VERSION && keyname[0] == '_' )
continue;
// ignore attempts to set value ""
if( !token.string[0] ) continue;
// create keyvalue strings
pkvd[numpairs].szClassName = (char *)classname; // unknown at this moment
pkvd[numpairs].szKeyName = copystring( keyname );
@ -4343,6 +4344,8 @@ void SV_LoadFromFile( script_t *entities )
qboolean create_world = true;
edict_t *ent;
ASSERT( entities != NULL );
inhibited = 0;
spawned = 0;
died = 0;
@ -4564,6 +4567,7 @@ qboolean SV_LoadProgs( const char *name )
}
svgame.globals->pStringBase = ""; // setup string base
svgame.force_retouch = 0.0f;
svgame.globals->maxEntities = GI->max_edicts;
svgame.globals->maxClients = sv_maxclients->integer;

View File

@ -242,11 +242,14 @@ void SV_ActivateServer( void )
}
numFrames = (sv.loadgame) ? 1 : 2;
host.frametime = (svgame.globals->changelevel) ? 0.0f : 0.1f;
svgame.globals->force_retouch++; // g-cont. this is correct ?
host.frametime = 0.1f;
// run some frames to allow everything to settle
for( i = 0; i < numFrames; i++ )
{
SV_Physics();
}
// invoke to refresh all movevars
Mem_Set( &svgame.oldmovevars, 0, sizeof( movevars_t ));
@ -400,7 +403,6 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot )
sv.paused = paused;
sv.loadgame = loadgame;
sv.time = 1.0f; // server spawn time it's always 1.0 second
svgame.globals->time = sv_time();
// initialize buffers
BF_Init( &sv.datagram, "Datagram", sv.datagram_buf, sizeof( sv.datagram_buf ));

View File

@ -437,7 +437,23 @@ void SV_PrepWorldFrame( void )
ent->v.effects &= ~EF_NOINTERP;
}
}
qboolean runFrame = false;
/*
=================
SV_IsSimulating
=================
*/
qboolean SV_IsSimulating( void )
{
if( sv.hostflags & SVF_PLAYERSONLY )
return false;
if( !SV_HasActivePlayers())
return false;
if( !sv.paused && CL_IsInGame( ))
return true;
return false;
}
/*
=================
SV_RunGameFrame
@ -445,8 +461,11 @@ SV_RunGameFrame
*/
void SV_RunGameFrame( void )
{
if( !SV_HasActivePlayers()) return;
if( runFrame ) SV_Physics();
if( !SV_IsSimulating( )) return;
SV_Physics();
sv.time += host.frametime;
}
/*
@ -460,20 +479,8 @@ void Host_ServerFrame( void )
// if server is not active, do nothing
if( !svs.initialized ) return;
// advances servertime
if( !sv.paused && CL_IsInGame( ) && !sv.loadgame )
{
if(!( sv.hostflags & SVF_PLAYERSONLY ))
sv.time += host.frametime;
svgame.globals->frametime = host.frametime;
svgame.globals->time = sv.time;
runFrame = true;
}
else
{
svgame.globals->frametime = 0.0f;
runFrame = false;
}
svgame.globals->frametime = host.frametime;
// check timeouts
SV_CheckTimeouts ();
@ -494,7 +501,7 @@ void Host_ServerFrame( void )
// let everything in the world think and move
SV_RunGameFrame ();
// send messages back to the clients that had packets read this frame
SV_SendClientMessages ();

View File

@ -737,7 +737,7 @@ static edict_t *SV_PushMove( edict_t *pusher, float movetime )
sv_pushed_t *p, *pushed_p;
edict_t *check;
if( VectorIsNull( pusher->v.velocity ))
if( sv.state == ss_loading || VectorIsNull( pusher->v.velocity ))
{
pusher->v.ltime += movetime;
return NULL;
@ -858,7 +858,7 @@ static edict_t *SV_PushRotate( edict_t *pusher, float movetime )
vec3_t org, org2, temp;
edict_t *check;
if( VectorIsNull( pusher->v.avelocity ))
if( sv.state == ss_loading || VectorIsNull( pusher->v.avelocity ))
{
pusher->v.ltime += movetime;
return NULL;
@ -1363,7 +1363,6 @@ void SV_Physics_Step( edict_t *ent )
qboolean wasinwater;
qboolean inwater;
qboolean isfalling = false;
edict_t *pHit;
trace_t trace;
SV_CheckVelocity( ent );
@ -1501,22 +1500,21 @@ void SV_Physics_Step( edict_t *ent )
}
SV_LinkEdict( ent, true );
}
else
{
if( svgame.force_retouch > 0 )
{
trace = SV_Move(ent->v.origin, ent->v.mins, ent->v.maxs, ent->v.origin, MOVE_NORMAL, ent );
if(( trace.fraction < 1.0f || trace.startsolid ) && SV_IsValidEdict( trace.ent ))
SV_Impact( ent, &trace );
}
}
if(!( ent->v.flags & FL_ONGROUND ) && isfalling )
{
SV_AddHalfGravity( ent, host.frametime );
}
if( ent->v.movetype == MOVETYPE_STEP )
{
// check monster with another monster intersect (e.g. tentacle damage)
trace = SV_Move( ent->v.origin, ent->v.mins, ent->v.maxs, ent->v.origin, MOVE_NORMAL, ent );
pHit = trace.ent;
if( SV_IsValidEdict( pHit ) && pHit->v.flags & FL_MONSTER && pHit->v.deadflag == DEAD_NO )
SV_Impact( ent, &trace );
}
if( !SV_RunThink( ent )) return;
SV_CheckWaterTransition( ent );
@ -1538,7 +1536,6 @@ void SV_Physics_None( edict_t *ent )
static void SV_Physics_Client( edict_t *ent )
{
trace_t trace;
edict_t *pHit;
switch( ent->v.movetype )
{
@ -1549,18 +1546,16 @@ static void SV_Physics_Client( edict_t *ent )
default: return;
}
if( svgame.globals->force_retouch )
if( svgame.force_retouch > 0 )
{
// force retouch even for stationary
SV_LinkEdict( ent, true );
// check for huge monster tap (e.g. tentacle)
trace = SV_Move(ent->v.origin, ent->v.mins, ent->v.maxs, ent->v.origin, MOVE_NORMAL, ent );
if(( trace.fraction < 1.0f || trace.startsolid ) && SV_IsValidEdict( trace.ent ))
SV_Impact( ent, &trace );
}
// check client colliding with monster (e.g. tentacle damage)
trace = SV_Move( ent->v.origin, ent->v.mins, ent->v.maxs, ent->v.origin, MOVE_NORMAL, ent );
pHit = trace.ent;
if( SV_IsValidEdict( pHit ) && pHit->v.flags & FL_MONSTER && pHit->v.deadflag == DEAD_NO )
SV_Impact( ent, &trace );
}
static void SV_Physics_Entity( edict_t *ent )
@ -1575,7 +1570,7 @@ static void SV_Physics_Entity( edict_t *ent )
}
ent->v.flags &= ~FL_BASEVELOCITY;
if( svgame.globals->force_retouch )
if( svgame.force_retouch > 0 )
{
// force retouch even for stationary
SV_LinkEdict( ent, true );
@ -1651,25 +1646,25 @@ void SV_Physics( void )
{
edict_t *ent;
int i;
SV_CheckAllEnts ();
svgame.globals->time = sv.time;
svgame.force_retouch = svgame.globals->force_retouch;
// let the progs know that a new frame has started
svgame.dllFuncs.pfnStartFrame();
// treat each object in turn
if( !( sv.hostflags & SVF_PLAYERSONLY ))
for( i = 0; i < svgame.numEntities; i++ )
{
for( i = 0; i < svgame.numEntities; i++ )
{
ent = EDICT_NUM( i );
if( !SV_IsValidEdict( ent )) continue;
if( ent->v.flags & FL_KILLME ) continue;
ent = EDICT_NUM( i );
if( !SV_IsValidEdict( ent )) continue;
if( ent->v.flags & FL_KILLME ) continue;
if( i > 0 && i <= svgame.globals->maxClients )
SV_Physics_Client( ent );
else SV_Physics_Entity( ent );
}
if( i > 0 && i <= svgame.globals->maxClients )
SV_Physics_Client( ent );
else SV_Physics_Entity( ent );
}
// animate lightstyles (used for GetEntityIllum)
@ -1678,6 +1673,6 @@ void SV_Physics( void )
// at end of frame kill all entities which supposed to it
SV_FreeOldEntities();
if( svgame.globals->force_retouch > 0 )
svgame.globals->force_retouch = max( 0, svgame.globals->force_retouch - 1 );
if( svgame.force_retouch > 0 )
svgame.globals->force_retouch = max( 0.0f, svgame.globals->force_retouch - 1.0f );
}

View File

@ -496,9 +496,11 @@ static void PM_SetupMove( playermove_t *pmove, edict_t *clent, usercmd_t *ucmd,
vec3_t absmin, absmax;
int i;
svgame.globals->frametime = (ucmd->msec * 0.001f);
pmove->player_index = NUM_FOR_EDICT( clent ) - 1;
pmove->multiplayer = (sv_maxclients->integer > 1) ? true : false;
pmove->time = sv_time(); // probably never used
pmove->time = sv.time; // probably never used
VectorCopy( clent->v.origin, pmove->origin );
VectorCopy( clent->v.v_angle, pmove->angles );
VectorCopy( clent->v.v_angle, pmove->oldangles );
@ -883,6 +885,7 @@ void SV_RunCmd( sv_client_t *cl, usercmd_t *ucmd, int random_seed )
if(!( clent->v.flags & FL_SPECTATOR ))
{
svgame.globals->time = sv.time + host.frametime;
svgame.dllFuncs.pfnPlayerPreThink( clent );
SV_RunThink( clent ); // clients cannot be deleted from map
@ -952,6 +955,7 @@ void SV_PostRunCmd( sv_client_t *cl )
else svgame.dllFuncs.pfnPlayerPostThink( clent );
// restore frametime
svgame.globals->time = sv.time + host.frametime;
svgame.globals->frametime = host.frametime;
svgame.dllFuncs.pfnCmdEnd( cl->edict );
}

View File

@ -394,7 +394,14 @@ void SV_TouchLinks( edict_t *ent, areanode_t *node )
{
next = l->next;
touch = EDICT_FROM_AREA( l );
#if 0
if( touch->v.solid >= SOLID_BBOX )
{
// did you forget call SV_LinkEdict ?
SV_LinkEdict( touch, false );
continue;
}
#endif
if( touch == ent || touch->v.solid != SOLID_TRIGGER ) // disabled ?
continue;
@ -616,11 +623,6 @@ POINT TESTING IN HULLS
===============================================================================
*/
/*
====================
SV_WaterLinks
====================
*/
void SV_WaterLinks( const vec3_t origin, int *pCont, areanode_t *node )
{
link_t *l, *next;
@ -637,13 +639,6 @@ void SV_WaterLinks( const vec3_t origin, int *pCont, areanode_t *node )
if( touch->v.solid != SOLID_NOT ) // disabled ?
continue;
if( touch->v.groupinfo != 0 )
{
if(( svs.groupop == 0 && (touch->v.groupinfo & svs.groupmask) == 0 ) ||
(svs.groupop == 1 && (touch->v.groupinfo & svs.groupmask) != 0))
continue;
}
// only brushes can have special contents
if( Mod_GetType( touch->v.modelindex ) != mod_brush )
continue;
@ -661,7 +656,9 @@ void SV_WaterLinks( const vec3_t origin, int *pCont, areanode_t *node )
if( PM_HullPointContents( hull, hull->firstclipnode, test ) == CONTENTS_EMPTY )
continue;
*pCont = touch->v.skin;
// compare contents ranking
if( RankForContents( touch->v.skin ) > RankForContents( *pCont ))
*pCont = touch->v.skin; // new content has more priority
}
// recurse down both sides

View File

@ -259,7 +259,7 @@ qboolean CRC32_MapFile( dword *crcvalue, const char *filename )
CRC32_Init( crcvalue );
// check for Blue-Shift maps
if( header.lumps[LUMP_PLANES].filelen % sizeof( dplane_t ))
if( header.lumps[LUMP_ENTITIES].fileofs <= 1024 )
blue_shift = true;
for( i = 0; i < HEADER_LUMPS; i++ )

View File

@ -69,6 +69,7 @@ inline HIMAGE PIC_Load( const char *szPicName, const byte *ucRawImage, long ulRa
#define KEY_IsDown (*g_engfuncs.pfnKeyIsDown)
#define KEY_GetOverstrike (*g_engfuncs.pfnKeyGetOverstrikeMode)
#define KEY_SetOverstrike (*g_engfuncs.pfnKeySetOverstrikeMode)
#define Key_GetState (*g_engfuncs.pfnKeyGetState)
#define Cmd_AddCommand (*g_engfuncs.pfnAddCommand)
#define Cmd_RemoveCommand (*g_engfuncs.pfnDelCommand)

View File

@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "extdll.h"
#include "basemenu.h"
#include "utils.h"
#include "../cl_dll/kbutton.h"
#define ART_BANNER "gfx/shell/head_advanced"
@ -71,7 +72,6 @@ static void UI_AdvControls_UpdateConfig( void )
CVAR_SET_FLOAT( "m_pitch", fabs( CVAR_GET_FLOAT( "m_pitch" )));
CVAR_SET_FLOAT( "crosshair", uiAdvControls.crosshair.enabled );
CVAR_SET_FLOAT( "freelook", uiAdvControls.mouseLook.enabled );
CVAR_SET_FLOAT( "lookspring", uiAdvControls.lookSpring.enabled );
CVAR_SET_FLOAT( "lookstrafe", uiAdvControls.lookStrafe.enabled );
CVAR_SET_FLOAT( "m_filter", uiAdvControls.mouseFilter.enabled );
@ -82,11 +82,13 @@ static void UI_AdvControls_UpdateConfig( void )
{
uiAdvControls.lookSpring.generic.flags |= QMF_GRAYED;
uiAdvControls.lookStrafe.generic.flags |= QMF_GRAYED;
CLIENT_COMMAND( TRUE, "+mlook" );
}
else
{
uiAdvControls.lookSpring.generic.flags &= ~QMF_GRAYED;
uiAdvControls.lookStrafe.generic.flags &= ~QMF_GRAYED;
CLIENT_COMMAND( TRUE, "-mlook" );
}
}
@ -97,13 +99,16 @@ UI_AdvControls_GetConfig
*/
static void UI_AdvControls_GetConfig( void )
{
kbutton_t *mlook;
if( CVAR_GET_FLOAT( "m_pitch" ) < 0 )
uiAdvControls.invertMouse.enabled = true;
if( CVAR_GET_FLOAT( "crosshair" ))
uiAdvControls.crosshair.enabled = 1;
if( CVAR_GET_FLOAT( "freelook" ))
mlook = (kbutton_s *)Key_GetState( "in_mlook" );
if( mlook && mlook->state & 1 )
uiAdvControls.mouseLook.enabled = 1;
if( CVAR_GET_FLOAT( "lookspring" ))

View File

@ -23,6 +23,9 @@ if errorlevel 1 set BUILD_ERROR=1
%MSDEV% launch/launch.dsp %CONFIG%"launch - Win32 Release" %build_target%
if errorlevel 1 set BUILD_ERROR=1
%MSDEV% room/room.dsp %CONFIG%"room - Win32 Release" %build_target%
if errorlevel 1 set BUILD_ERROR=1
if "%BUILD_ERROR%"=="" goto build_ok
echo *********************
@ -47,7 +50,7 @@ if exist cl_dll\cl_dll.plg del /f /q cl_dll\cl_dll.plg
if exist engine\engine.plg del /f /q engine\engine.plg
if exist mainui\mainui.plg del /f /q mainui\mainui.plg
if exist launch\launch.plg del /f /q launch\launch.plg
if exist vid_gl\vid_gl.plg del /f /q vid_gl\vid_gl.plg
if exist room\room.plg del /f /q room\room.plg
echo
echo Build succeeded!

View File

@ -63,6 +63,18 @@ Package=<4>
###############################################################################
Project: "room"=".\room\room.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>