02 Jan 2011

This commit is contained in:
g-cont 2011-01-02 00:00:00 +03:00 committed by Alibek Omarov
parent 3c13292c27
commit c9a3cffbb0
3 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,7 @@
build ????
Engine: fix trigger_camera serialization bug
build 1422
Render: fix decals serialization bug

View File

@ -93,7 +93,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->startsolid || trace->fraction < cliptrace->fraction )
// g-cont. needs for global test!!!
if( trace->allsolid || /*trace->startsolid ||*/ trace->fraction < cliptrace->fraction )
{
trace->ent = touch;

View File

@ -1141,8 +1141,6 @@ int SV_LoadGameState( char const *level, qboolean createPlayers )
Cvar_SetFloat( "sv_skyvec_y", header.skyVec_y );
Cvar_SetFloat( "sv_skyvec_z", header.skyVec_z );
sv.viewentity = ( header.viewentity == 1 ) ? 0 : (word)header.viewentity;
// re-base the savedata since we re-ordered the entity/table / restore fields
SaveRestore_Rebase( pSaveData );
@ -1222,6 +1220,14 @@ int SV_LoadGameState( char const *level, qboolean createPlayers )
}
}
// restore camera view here
pent = pSaveData->pTable[bound( 0, (word)header.viewentity, pSaveData->tableCount )].pent;
if( SV_IsValidEdict( pent )) sv.viewentity = pent->serialnumber;
else sv.viewentity = 0;
// just use normal client view
if( sv.viewentity == 1 ) sv.viewentity = 0;
SV_LoadClientState( pSaveData, level, false );
SV_SaveFinish( pSaveData );