16 Oct 2011
This commit is contained in:
parent
5157440f45
commit
2ba33aa1db
|
@ -136,7 +136,7 @@ void CL_UpdateEntityFields( cl_entity_t *ent )
|
|||
f = ang1 - ang2;
|
||||
if( d > 180 ) f -= 360;
|
||||
else if( d < -180 ) f += 360;
|
||||
ent->curstate.angles[i] += d * f;
|
||||
ent->angles[i] += d * f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1016,8 +1016,7 @@ void R_DrawEntitiesOnList( void )
|
|||
while( pglGetError() != GL_NO_ERROR );
|
||||
|
||||
// don't fogging translucent surfaces
|
||||
if( !RI.fogCustom )
|
||||
pglDisable( GL_FOG );
|
||||
pglDisable( GL_FOG );
|
||||
pglDepthMask( GL_FALSE );
|
||||
glState.drawTrans = true;
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ qboolean Image_LoadFNT( const char *name, const byte *buffer, size_t filesize )
|
|||
const byte *pal, *fin;
|
||||
size_t size;
|
||||
int numcolors;
|
||||
qboolean newstyle = false;
|
||||
|
||||
if( image.hint == IL_HINT_Q1 )
|
||||
return false; // Quake1 doesn't have qfonts
|
||||
|
@ -96,6 +97,7 @@ qboolean Image_LoadFNT( const char *name, const byte *buffer, size_t filesize )
|
|||
// Half-Life 1.1.0.0 font style (qfont_t)
|
||||
image.width = font.width * QCHAR_WIDTH;
|
||||
image.height = font.height;
|
||||
newstyle = true;
|
||||
}
|
||||
|
||||
if( !Image_LumpValidSize( name ))
|
||||
|
@ -105,17 +107,12 @@ qboolean Image_LoadFNT( const char *name, const byte *buffer, size_t filesize )
|
|||
pal = fin + (image.width * image.height);
|
||||
numcolors = *(short *)pal, pal += sizeof( short );
|
||||
|
||||
if( numcolors == 768 )
|
||||
if( numcolors == 768 || numcolors == 256 )
|
||||
{
|
||||
// newstyle font
|
||||
// g-cont. make sure that is didn't hit anything
|
||||
Image_GetPaletteLMP( pal, LUMP_QFONT );
|
||||
image.flags |= IMAGE_HAS_ALPHA; // fonts always have transparency
|
||||
}
|
||||
else if( numcolors == 256 )
|
||||
{
|
||||
// oldstyle font (no transparency)
|
||||
Image_GetPaletteLMP( pal, LUMP_TRANSPARENT );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( image.hint == IL_HINT_NO )
|
||||
|
|
|
@ -142,7 +142,6 @@ typedef struct server_s
|
|||
model_t *worldmodel; // pointer to world
|
||||
uint checksum; // for catching cheater maps
|
||||
|
||||
qboolean droptofloor; // 0 == normal mode, 1 == special mode
|
||||
qboolean write_bad_message; // just for debug
|
||||
qboolean paused;
|
||||
} server_t;
|
||||
|
|
|
@ -1536,42 +1536,16 @@ int pfnDropToFloor( edict_t* e )
|
|||
MsgDev( D_ERROR, "SV_DropToFloor: invalid entity %s\n", SV_ClassName( e ));
|
||||
return 0;
|
||||
}
|
||||
#if 0
|
||||
if( sv.droptofloor )
|
||||
{
|
||||
studiohdr_t *hdr = Mod_Extradata( Mod_Handle( e->v.modelindex ));
|
||||
mstudioseqdesc_t *pseqdesc;
|
||||
vec3_t neworg, newang;
|
||||
int seq;
|
||||
|
||||
if( hdr )
|
||||
{
|
||||
seq = e->v.sequence;
|
||||
if( seq < 0 || seq >= hdr->numseq ) seq = 0;
|
||||
pseqdesc = (mstudioseqdesc_t *)((byte *)hdr + hdr->seqindex) + seq;
|
||||
|
||||
SV_GetBonePosition( e, 0, neworg, newang );
|
||||
VectorSubtract( e->v.angles, newang, end );
|
||||
if( anglemod( end[0] ) > 1.0f || anglemod( end[2] ) > 1.0f )
|
||||
Msg( "%s, root bone is rotate %g %g\n", SV_ClassName( e ), anglemod( end[0] ), anglemod( end[2] ) );
|
||||
}
|
||||
sv.droptofloor = false;
|
||||
}
|
||||
#endif
|
||||
VectorCopy( e->v.origin, end );
|
||||
end[2] -= 256;
|
||||
|
||||
trace = SV_Move( e->v.origin, e->v.mins, e->v.maxs, end, MOVE_NORMAL, e );
|
||||
VectorSubtract( e->v.origin, trace.endpos, end );
|
||||
|
||||
// HACKHACK: to prevent falling stiiting_scientist from 'c1a0'
|
||||
if( trace.startsolid && SV_IsValidEdict( trace.ent ) && trace.ent->v.movetype == MOVETYPE_PUSHSTEP )
|
||||
return -1;
|
||||
|
||||
// HACKHACK: another hack to prevent unexpected moving scripted entities
|
||||
// if( e->v.flags & FL_ONGROUND && e->v.animtime && VectorLength( end ) == 1.0f )
|
||||
// return -1;
|
||||
|
||||
if( trace.allsolid )
|
||||
return -1;
|
||||
|
||||
|
@ -1639,7 +1613,6 @@ void pfnSetOrigin( edict_t *e, const float *rgflOrigin )
|
|||
|
||||
VectorCopy( rgflOrigin, e->v.origin );
|
||||
SV_LinkEdict( e, false );
|
||||
sv.droptofloor = false; // any call of SET_ORIGIN must reset dropfloor
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1023,8 +1023,6 @@ void SV_GetBonePosition( edict_t *e, int iBone, float *org, float *ang )
|
|||
|
||||
if( org ) Matrix3x4_OriginFromMatrix( sv_studiobones[iBone], org );
|
||||
if( ang ) VectorAngles( sv_studiobones[iBone][0], ang ); // bone forward to angles
|
||||
|
||||
sv.droptofloor = true;
|
||||
}
|
||||
|
||||
static sv_blending_interface_t gBlendAPI =
|
||||
|
|
Reference in New Issue