26 Jul 2017

This commit is contained in:
g-cont 2017-07-26 00:00:00 +03:00 committed by Alibek Omarov
parent 3bdfe5ef77
commit 88e6c9e25f
7 changed files with 20 additions and 19 deletions

View File

@ -768,6 +768,9 @@ void CL_ParseFinaleCutscene( sizebuf_t *msg, int level )
// to prevent grab too long messages
Q_strncpy( (char *)text->pMessage, MSG_ReadString( msg ), 2048 );
if( *text->pMessage == '\0' )
return; // no real text
// NOTE: a "HudText" message contain only 'string' with message name, so we
// don't needs to use MSG_ routines here, just directly write msgname into netbuffer
CL_DispatchUserMessage( "HudText", Q_strlen( text->pName ) + 1, (void *)text->pName );

View File

@ -117,7 +117,7 @@ void V_SetRefParams( ref_params_t *fd )
fd->frametime = host.frametime;
fd->time = cl.time;
fd->intermission = cl.intermission; // Quake Remake compatibility
fd->intermission = cl.intermission;
fd->paused = (cl.paused != 0);
fd->spectator = (cls.spectator != 0);
fd->onground = (cl.local.onground != -1);
@ -229,7 +229,6 @@ void V_GetRefParams( ref_params_t *fd, ref_viewpass_t *rvp )
// part2: really used updates
VectorCopy( fd->crosshairangle, cl.crosshairangle );
VectorCopy( fd->cl_viewangles, cl.viewangles );
cl.intermission = fd->intermission; // Quake Remake compatibility
// setup ref_viewpass
rvp->viewport[0] = fd->viewport[0];

View File

@ -1369,8 +1369,6 @@ void R_DrawAliasModel( cl_entity_t *e )
m_pAliasHeader = (aliashdr_t *)Mod_AliasExtradata( RI.currententity->model );
if( !m_pAliasHeader ) return;
GL_SetupFogColorForModels();
// init time
R_AliasSetupTimings();
@ -1461,8 +1459,6 @@ void R_DrawAliasModel( cl_entity_t *e )
// HACKHACK: keep the angles unchanged
VectorCopy( angles, e->angles );
GL_ResetFogColor();
}
//==================================================================================

View File

@ -3146,8 +3146,7 @@ byte *W_ReadLump( wfile_t *wad, dlumpinfo_t *lump, long *lumpsizeptr )
return NULL;
}
if( lumpsizeptr ) *lumpsizeptr = lump->size;
if( lumpsizeptr ) *lumpsizeptr = lump->disksize;
FS_Seek( wad->handle, oldpos, SEEK_SET );
return buf;
@ -3362,6 +3361,10 @@ wfile_t *W_Open( const char *filename, const char *mode, int *error )
if( srclumps[i].type == 68 && !Q_stricmp( srclumps[i].name, "conchars" ))
srclumps[i].type = TYP_GFXPIC;
// fixups bad image types (some quake wads)
if( srclumps[i].img_type < 0 || srclumps[i].img_type > IMG_DECAL_COLOR )
srclumps[i].img_type = IMG_DIFFUSE;
W_AddFileToWad( name, wad, &srclumps[i] );
}
@ -3465,10 +3468,10 @@ size_t W_SaveFile( wfile_t *wad, const char *lump, const void *data, size_t data
return -1;
}
if( datasize != find->size )
if( datasize != find->disksize )
{
MsgDev( D_ERROR, "W_ReplaceLump: %s [%s] should be [%s]\n",
lumpname, Q_memprint( datasize ), Q_memprint( find->size ));
lumpname, Q_memprint( datasize ), Q_memprint( find->disksize ));
return -1;
}

View File

@ -162,10 +162,6 @@ hull_t *PM_HullForBsp( physent_t *pe, playermove_t *pmove, float *offset )
Assert( hull != NULL );
// force to use hull0 because other hulls doesn't exist for water
if( pe->model->flags & MODEL_LIQUID && pe->solid != SOLID_TRIGGER )
hull = &pe->model->hulls[0];
// calculate an offset value to center the origin
VectorSubtract( hull->clip_mins, pmove->player_mins[pmove->usehull], offset );
VectorAdd( offset, pe->origin, offset );

View File

@ -81,7 +81,7 @@ qboolean SV_CopyEdictToPhysEnt( physent_t *pe, edict_t *ed )
Q_strncpy( pe->name, "player", sizeof( pe->name ));
pe->player = pe->info;
}
else if( ed->v.flags & FL_FAKECLIENT )
else if( ed->v.flags & FL_FAKECLIENT && ed->v.solid != MOVETYPE_PUSH )
{
// bot
Q_strncpy( pe->name, "bot", sizeof( pe->name ));
@ -239,8 +239,12 @@ void SV_AddLinksToPmove( areanode_t *node, const vec3_t pmove_mins, const vec3_t
if( check == pl ) continue; // himself
if(( FBitSet( check->v.flags, FL_CLIENT|FL_FAKECLIENT ) && check->v.health <= 0.0f ) || check->v.deadflag == DEAD_DEAD )
continue; // dead body
// nehahra collision flags
if( check->v.movetype != MOVETYPE_PUSH )
{
if(( FBitSet( check->v.flags, FL_CLIENT|FL_FAKECLIENT ) && check->v.health <= 0.0f ) || check->v.deadflag == DEAD_DEAD )
continue; // dead body
}
if( VectorIsNull( check->v.size ))
continue;

View File

@ -243,7 +243,7 @@ hull_t *SV_HullForBsp( edict_t *ent, const vec3_t mins, const vec3_t maxs, vec3_
if( world.sky_sphere || world.version == Q1BSP_VERSION )
{
// alternate hull select for quake maps
if( size[0] < 3.0f || ( model->flags & MODEL_LIQUID && ent->v.solid != SOLID_TRIGGER ))
if( size[0] < 3.0f )
hull = &model->hulls[0];
else if( size[0] <= 32.0f )
hull = &model->hulls[1];
@ -253,7 +253,7 @@ hull_t *SV_HullForBsp( edict_t *ent, const vec3_t mins, const vec3_t maxs, vec3_
}
else
{
if( size[0] <= 8.0f || ( model->flags & MODEL_LIQUID && ent->v.solid != SOLID_TRIGGER ))
if( size[0] <= 8.0f )
{
hull = &model->hulls[0];
VectorCopy( hull->clip_mins, offset );