Fix all whitespace errors

Excluding 3rd party files.
This commit is contained in:
dhewg 2011-12-06 19:20:15 +01:00
parent ff493f6847
commit 79ad905e05
1086 changed files with 21052 additions and 21253 deletions

View file

@ -72,7 +72,7 @@ public:
const char *NextToken( const char *errorstring = NULL ); const char *NextToken( const char *errorstring = NULL );
bool TokenAvailable( void ) { return currentToken < tokens.Num(); }; bool TokenAvailable( void ) { return currentToken < tokens.Num(); };
int Num( void ) { return tokens.Num(); }; int Num( void ) { return tokens.Num(); };
void UnGetToken( void ) { if ( currentToken > 0 ) { currentToken--; } }; void UnGetToken( void ) { if ( currentToken > 0 ) { currentToken--; } };
const char *GetToken( int index ) { if ( ( index >= 0 ) && ( index < tokens.Num() ) ) { return tokens[ index ]; } else { return NULL; } }; const char *GetToken( int index ) { if ( ( index >= 0 ) && ( index < tokens.Num() ) ) { return tokens[ index ]; } else { return NULL; } };
const char *CurrentToken( void ) { return GetToken( currentToken ); }; const char *CurrentToken( void ) { return GetToken( currentToken ); };

View file

@ -1681,7 +1681,7 @@ void idMayaExport::CreateJoints( float scale ) {
} }
joint->dagnode->getPath( dagPath ); joint->dagnode->getPath( dagPath );
GetBindPose( dagPath.node( &status ), joint, scale ); GetBindPose( dagPath.node( &status ), joint, scale );
} }
} }
@ -1834,9 +1834,9 @@ void idMayaExport::GetTextureForMesh( idExportMesh *mesh, MFnDagNode &dagNode )
instanceNum = path.instanceNumber(); instanceNum = path.instanceNumber();
} }
// Get a list of all sets pertaining to the selected shape and the // Get a list of all sets pertaining to the selected shape and the
// members of those sets. // members of those sets.
// //
MFnMesh fnMesh( path ); MFnMesh fnMesh( path );
MObjectArray sets; MObjectArray sets;
MObjectArray comps; MObjectArray comps;
@ -1846,8 +1846,8 @@ void idMayaExport::GetTextureForMesh( idExportMesh *mesh, MFnDagNode &dagNode )
} }
// Loop through all the sets. If the set is a polygonal set, find the // Loop through all the sets. If the set is a polygonal set, find the
// shader attached to the and print out the texture file name for the // shader attached to the and print out the texture file name for the
// set along with the polygons in the set. // set along with the polygons in the set.
// //
for ( i = 0; i < ( int )sets.length(); i++ ) { for ( i = 0; i < ( int )sets.length(); i++ ) {
MObject set = sets[i]; MObject set = sets[i];
@ -1856,20 +1856,20 @@ void idMayaExport::GetTextureForMesh( idExportMesh *mesh, MFnDagNode &dagNode )
MFnSet fnSet( set, &status ); MFnSet fnSet( set, &status );
if ( status == MS::kFailure ) { if ( status == MS::kFailure ) {
MayaError( "GetTextureForMesh: MFnSet constructor failed (%s)", status.errorString().asChar() ); MayaError( "GetTextureForMesh: MFnSet constructor failed (%s)", status.errorString().asChar() );
continue; continue;
} }
// Make sure the set is a polygonal set. If not, continue. // Make sure the set is a polygonal set. If not, continue.
MItMeshPolygon piter(path, comp, &status); MItMeshPolygon piter(path, comp, &status);
if (status == MS::kFailure) { if (status == MS::kFailure) {
continue; continue;
} }
// Find the texture that is applied to this set. First, get the // Find the texture that is applied to this set. First, get the
// shading node connected to the set. Then, if there is an input // shading node connected to the set. Then, if there is an input
// attribute called "color", search upstream from it for a texture // attribute called "color", search upstream from it for a texture
// file node. // file node.
// //
MObject shaderNode = FindShader( set ); MObject shaderNode = FindShader( set );
if ( shaderNode == MObject::kNullObj ) { if ( shaderNode == MObject::kNullObj ) {
continue; continue;
@ -1892,18 +1892,18 @@ void idMayaExport::GetTextureForMesh( idExportMesh *mesh, MFnDagNode &dagNode )
dgIt.disablePruningOnFilter(); dgIt.disablePruningOnFilter();
// If no texture file node was found, just continue. // If no texture file node was found, just continue.
// //
if ( dgIt.isDone() ) { if ( dgIt.isDone() ) {
continue; continue;
} }
// Print out the texture node name and texture file that it references. // Print out the texture node name and texture file that it references.
// //
MObject textureNode = dgIt.thisNode(); MObject textureNode = dgIt.thisNode();
MPlug filenamePlug = MFnDependencyNode( textureNode ).findPlug( "fileTextureName" ); MPlug filenamePlug = MFnDependencyNode( textureNode ).findPlug( "fileTextureName" );
MString textureName; MString textureName;
filenamePlug.getValue( textureName ); filenamePlug.getValue( textureName );
// remove the OS path and save it in the mesh // remove the OS path and save it in the mesh
OSPathToRelativePath( textureName.asChar(), mesh->shader, options.game ); OSPathToRelativePath( textureName.asChar(), mesh->shader, options.game );
@ -2482,7 +2482,7 @@ void idMayaExport::CreateCameraAnim( idMat3 &align ) {
} }
} }
camJoint = model.FindJoint( currentCam ); camJoint = model.FindJoint( currentCam );
if ( !camJoint ) { if ( !camJoint ) {
MayaError( "Couldn't find camera '%s'", currentCam.c_str() ); MayaError( "Couldn't find camera '%s'", currentCam.c_str() );
} }
@ -2865,7 +2865,7 @@ void idMayaExport::ConvertModel( void ) {
switch( options.type ) { switch( options.type ) {
case WRITE_MESH : case WRITE_MESH :
common->Printf( "Grabbing default pose:\n" ); common->Printf( "Grabbing default pose:\n" );
GetDefaultPose( align ); GetDefaultPose( align );
common->Printf( "Writing file...\n" ); common->Printf( "Writing file...\n" );
if ( !model.WriteMesh( options.dest, options ) ) { if ( !model.WriteMesh( options.dest, options ) ) {
@ -2874,7 +2874,7 @@ void idMayaExport::ConvertModel( void ) {
break; break;
case WRITE_ANIM : case WRITE_ANIM :
common->Printf( "Creating animation frames:\n" ); common->Printf( "Creating animation frames:\n" );
CreateAnimation( align ); CreateAnimation( align );
common->Printf( "Writing file...\n" ); common->Printf( "Writing file...\n" );
if ( !model.WriteAnim( options.dest, options ) ) { if ( !model.WriteAnim( options.dest, options ) ) {
@ -2905,7 +2905,7 @@ void idMayaExport::ConvertToMD3( void ) {
#if 0 #if 0
int i, j; int i, j;
md3Header_t *pinmodel; md3Header_t *pinmodel;
md3Frame_t *frame; md3Frame_t *frame;
md3Surface_t *surf; md3Surface_t *surf;
md3Shader_t *shader; md3Shader_t *shader;
md3Triangle_t *tri; md3Triangle_t *tri;
@ -2933,15 +2933,15 @@ void idMayaExport::ConvertToMD3( void ) {
memcpy (mod->md3[lod], buffer, LittleLong(pinmodel->ofsEnd) ); memcpy (mod->md3[lod], buffer, LittleLong(pinmodel->ofsEnd) );
LL(mod->md3[lod]->ident); LL(mod->md3[lod]->ident);
LL(mod->md3[lod]->version); LL(mod->md3[lod]->version);
LL(mod->md3[lod]->numFrames); LL(mod->md3[lod]->numFrames);
LL(mod->md3[lod]->numTags); LL(mod->md3[lod]->numTags);
LL(mod->md3[lod]->numSurfaces); LL(mod->md3[lod]->numSurfaces);
LL(mod->md3[lod]->ofsFrames); LL(mod->md3[lod]->ofsFrames);
LL(mod->md3[lod]->ofsTags); LL(mod->md3[lod]->ofsTags);
LL(mod->md3[lod]->ofsSurfaces); LL(mod->md3[lod]->ofsSurfaces);
LL(mod->md3[lod]->ofsEnd); LL(mod->md3[lod]->ofsEnd);
if ( mod->md3[lod]->numFrames < 1 ) { if ( mod->md3[lod]->numFrames < 1 ) {
common->Printf( "R_LoadMD3: %s has no frames\n", mod_name ); common->Printf( "R_LoadMD3: %s has no frames\n", mod_name );
@ -2949,42 +2949,42 @@ void idMayaExport::ConvertToMD3( void ) {
} }
// swap all the frames // swap all the frames
frame = (md3Frame_t *) ( (byte *)mod->md3[lod] + mod->md3[lod]->ofsFrames ); frame = (md3Frame_t *) ( (byte *)mod->md3[lod] + mod->md3[lod]->ofsFrames );
for ( i = 0 ; i < mod->md3[lod]->numFrames ; i++, frame++) { for ( i = 0 ; i < mod->md3[lod]->numFrames ; i++, frame++) {
frame->radius = LittleFloat( frame->radius ); frame->radius = LittleFloat( frame->radius );
for ( j = 0 ; j < 3 ; j++ ) { for ( j = 0 ; j < 3 ; j++ ) {
frame->bounds[0][j] = LittleFloat( frame->bounds[0][j] ); frame->bounds[0][j] = LittleFloat( frame->bounds[0][j] );
frame->bounds[1][j] = LittleFloat( frame->bounds[1][j] ); frame->bounds[1][j] = LittleFloat( frame->bounds[1][j] );
frame->localOrigin[j] = LittleFloat( frame->localOrigin[j] ); frame->localOrigin[j] = LittleFloat( frame->localOrigin[j] );
} }
} }
// swap all the tags // swap all the tags
tag = (md3Tag_t *) ( (byte *)mod->md3[lod] + mod->md3[lod]->ofsTags ); tag = (md3Tag_t *) ( (byte *)mod->md3[lod] + mod->md3[lod]->ofsTags );
for ( i = 0 ; i < mod->md3[lod]->numTags * mod->md3[lod]->numFrames ; i++, tag++) { for ( i = 0 ; i < mod->md3[lod]->numTags * mod->md3[lod]->numFrames ; i++, tag++) {
for ( j = 0 ; j < 3 ; j++ ) { for ( j = 0 ; j < 3 ; j++ ) {
tag->origin[j] = LittleFloat( tag->origin[j] ); tag->origin[j] = LittleFloat( tag->origin[j] );
tag->axis[0][j] = LittleFloat( tag->axis[0][j] ); tag->axis[0][j] = LittleFloat( tag->axis[0][j] );
tag->axis[1][j] = LittleFloat( tag->axis[1][j] ); tag->axis[1][j] = LittleFloat( tag->axis[1][j] );
tag->axis[2][j] = LittleFloat( tag->axis[2][j] ); tag->axis[2][j] = LittleFloat( tag->axis[2][j] );
} }
} }
// swap all the surfaces // swap all the surfaces
surf = (md3Surface_t *) ( (byte *)mod->md3[lod] + mod->md3[lod]->ofsSurfaces ); surf = (md3Surface_t *) ( (byte *)mod->md3[lod] + mod->md3[lod]->ofsSurfaces );
for ( i = 0 ; i < mod->md3[lod]->numSurfaces ; i++) { for ( i = 0 ; i < mod->md3[lod]->numSurfaces ; i++) {
LL(surf->ident); LL(surf->ident);
LL(surf->flags); LL(surf->flags);
LL(surf->numFrames); LL(surf->numFrames);
LL(surf->numShaders); LL(surf->numShaders);
LL(surf->numTriangles); LL(surf->numTriangles);
LL(surf->ofsTriangles); LL(surf->ofsTriangles);
LL(surf->numVerts); LL(surf->numVerts);
LL(surf->ofsShaders); LL(surf->ofsShaders);
LL(surf->ofsSt); LL(surf->ofsSt);
LL(surf->ofsXyzNormals); LL(surf->ofsXyzNormals);
LL(surf->ofsEnd); LL(surf->ofsEnd);
if ( surf->numVerts > SHADER_MAX_VERTEXES ) { if ( surf->numVerts > SHADER_MAX_VERTEXES ) {
ri.Error (ERR_DROP, "R_LoadMD3: %s has more than %i verts on a surface (%i)", ri.Error (ERR_DROP, "R_LoadMD3: %s has more than %i verts on a surface (%i)",
@ -3008,18 +3008,18 @@ void idMayaExport::ConvertToMD3( void ) {
surf->name[j-2] = 0; surf->name[j-2] = 0;
} }
// register the shaders // register the shaders
shader = (md3Shader_t *) ( (byte *)surf + surf->ofsShaders ); shader = (md3Shader_t *) ( (byte *)surf + surf->ofsShaders );
for ( j = 0 ; j < surf->numShaders ; j++, shader++ ) { for ( j = 0 ; j < surf->numShaders ; j++, shader++ ) {
shader_t *sh; shader_t *sh;
sh = R_FindShader( shader->name, LIGHTMAP_NONE, qtrue ); sh = R_FindShader( shader->name, LIGHTMAP_NONE, qtrue );
if ( sh->defaultShader ) { if ( sh->defaultShader ) {
shader->shaderIndex = 0; shader->shaderIndex = 0;
} else { } else {
shader->shaderIndex = sh->index; shader->shaderIndex = sh->index;
} }
} }
// swap all the triangles // swap all the triangles
tri = (md3Triangle_t *) ( (byte *)surf + surf->ofsTriangles ); tri = (md3Triangle_t *) ( (byte *)surf + surf->ofsTriangles );
@ -3030,22 +3030,22 @@ void idMayaExport::ConvertToMD3( void ) {
} }
// swap all the ST // swap all the ST
st = (md3St_t *) ( (byte *)surf + surf->ofsSt ); st = (md3St_t *) ( (byte *)surf + surf->ofsSt );
for ( j = 0 ; j < surf->numVerts ; j++, st++ ) { for ( j = 0 ; j < surf->numVerts ; j++, st++ ) {
st->st[0] = LittleFloat( st->st[0] ); st->st[0] = LittleFloat( st->st[0] );
st->st[1] = LittleFloat( st->st[1] ); st->st[1] = LittleFloat( st->st[1] );
} }
// swap all the XyzNormals // swap all the XyzNormals
xyz = (md3XyzNormal_t *) ( (byte *)surf + surf->ofsXyzNormals ); xyz = (md3XyzNormal_t *) ( (byte *)surf + surf->ofsXyzNormals );
for ( j = 0 ; j < surf->numVerts * surf->numFrames ; j++, xyz++ ) for ( j = 0 ; j < surf->numVerts * surf->numFrames ; j++, xyz++ )
{ {
xyz->xyz[0] = LittleShort( xyz->xyz[0] ); xyz->xyz[0] = LittleShort( xyz->xyz[0] );
xyz->xyz[1] = LittleShort( xyz->xyz[1] ); xyz->xyz[1] = LittleShort( xyz->xyz[1] );
xyz->xyz[2] = LittleShort( xyz->xyz[2] ); xyz->xyz[2] = LittleShort( xyz->xyz[2] );
xyz->normal = LittleShort( xyz->normal ); xyz->normal = LittleShort( xyz->normal );
} }
// find the next surface // find the next surface

View file

@ -114,7 +114,7 @@ ALSA (default 1)
enable ALSA sound backend support enable ALSA sound backend support
SETUP (default 0, not saved) SETUP (default 0, not saved)
build a setup. implies release build build a setup. implies release build
SDK (default 0, not saved) SDK (default 0, not saved)
build an SDK release build an SDK release

View file

@ -720,7 +720,7 @@ void idTypeInfoGen::ParseScope( const char *scope, bool isTemplate, idParser &sr
var.bits = 0; var.bits = 0;
typeInfo->variables.Append( var ); typeInfo->variables.Append( var );
if ( !src.CheckTokenString( "," ) ) { if ( !src.CheckTokenString( "," ) ) {
varType = ""; varType = "";
isConst = false; isConst = false;
isStatic = false; isStatic = false;
break; break;

View file

@ -1261,7 +1261,7 @@ void idAF::RemoveBindConstraints( void ) {
name.Strip( "bindConstraint " ); name.Strip( "bindConstraint " );
if ( physicsObj.GetConstraint( name ) ) { if ( physicsObj.GetConstraint( name ) ) {
physicsObj.DeleteConstraint( name ); physicsObj.DeleteConstraint( name );
} }
kv = args.MatchPrefix( "bindConstraint ", kv ); kv = args.MatchPrefix( "bindConstraint ", kv );

View file

@ -3116,7 +3116,7 @@ idRenderModel *idGameEdit::AF_CreateMesh( const idDict &args, idVec3 &meshOrigin
modifiedAxis[ jointNum ] = ( bodyAxis[i] * originalJoints[jointNum].ToMat3().Transpose() ).Transpose() * ( newBodyAxis[i] * meshAxis.Transpose() ); modifiedAxis[ jointNum ] = ( bodyAxis[i] * originalJoints[jointNum].ToMat3().Transpose() ).Transpose() * ( newBodyAxis[i] * meshAxis.Transpose() );
// FIXME: calculate correct modifiedOrigin // FIXME: calculate correct modifiedOrigin
modifiedOrigin[ jointNum ] = originalJoints[ jointNum ].ToVec3(); modifiedOrigin[ jointNum ] = originalJoints[ jointNum ].ToVec3();
} }
} }
// apply joint modifications to the skeleton // apply joint modifications to the skeleton

View file

@ -627,7 +627,7 @@ void idActor::Spawn( void ) {
int headAnim = headAnimator->GetAnim( "def_head" ); int headAnim = headAnimator->GetAnim( "def_head" );
if ( headAnim ) { if ( headAnim ) {
if ( headEnt ) { if ( headEnt ) {
headAnimator->CycleAnim( ANIMCHANNEL_ALL, headAnim, gameLocal.time, 0 ); headAnimator->CycleAnim( ANIMCHANNEL_ALL, headAnim, gameLocal.time, 0 );
} else { } else {
headAnimator->CycleAnim( ANIMCHANNEL_HEAD, headAnim, gameLocal.time, 0 ); headAnimator->CycleAnim( ANIMCHANNEL_HEAD, headAnim, gameLocal.time, 0 );
} }
@ -3268,7 +3268,7 @@ void idActor::Event_NextEnemy( idEntity *ent ) {
} }
} }
idThread::ReturnEntity( NULL ); idThread::ReturnEntity( NULL );
} }
/* /*

View file

@ -416,7 +416,7 @@ bool idBrittleFracture::UpdateRenderEntity( renderEntity_s *renderEntity, const
} }
packedColor = PackColor( idVec4( renderEntity->shaderParms[ SHADERPARM_RED ] * fade, packedColor = PackColor( idVec4( renderEntity->shaderParms[ SHADERPARM_RED ] * fade,
renderEntity->shaderParms[ SHADERPARM_GREEN ] * fade, renderEntity->shaderParms[ SHADERPARM_GREEN ] * fade,
renderEntity->shaderParms[ SHADERPARM_BLUE ] * fade, renderEntity->shaderParms[ SHADERPARM_BLUE ] * fade,
fade ) ); fade ) );
const idWinding &winding = shards[i]->winding; const idWinding &winding = shards[i]->winding;
@ -946,7 +946,7 @@ void idBrittleFracture::DropFloatingIslands( const idVec3 &point, const idVec3 &
continue; continue;
} }
queueStart = 0; queueStart = 0;
queueEnd = 1; queueEnd = 1;
queue[0] = shards[i]; queue[0] = shards[i];
shards[i]->islandNum = numIslands+1; shards[i]->islandNum = numIslands+1;

View file

@ -63,4 +63,3 @@ private:
void Event_Trigger( idEntity *activator ); void Event_Trigger( idEntity *activator );
}; };

View file

@ -160,8 +160,8 @@ ABSTRACT_DECLARATION( idClass, idEntity )
EVENT( EV_GetMins, idEntity::Event_GetMins) EVENT( EV_GetMins, idEntity::Event_GetMins)
EVENT( EV_GetMaxs, idEntity::Event_GetMaxs ) EVENT( EV_GetMaxs, idEntity::Event_GetMaxs )
EVENT( EV_Touches, idEntity::Event_Touches ) EVENT( EV_Touches, idEntity::Event_Touches )
EVENT( EV_SetGuiParm, idEntity::Event_SetGuiParm ) EVENT( EV_SetGuiParm, idEntity::Event_SetGuiParm )
EVENT( EV_SetGuiFloat, idEntity::Event_SetGuiFloat ) EVENT( EV_SetGuiFloat, idEntity::Event_SetGuiFloat )
EVENT( EV_GetNextKey, idEntity::Event_GetNextKey ) EVENT( EV_GetNextKey, idEntity::Event_GetNextKey )
EVENT( EV_SetKey, idEntity::Event_SetKey ) EVENT( EV_SetKey, idEntity::Event_SetKey )
EVENT( EV_GetKey, idEntity::Event_GetKey ) EVENT( EV_GetKey, idEntity::Event_GetKey )
@ -2429,7 +2429,7 @@ void idEntity::JoinTeam( idEntity *teammember ) {
ent->teamChain->teamMaster = master; ent->teamChain->teamMaster = master;
} }
prev->teamChain = this; prev->teamChain = this;
ent->teamChain = next; ent->teamChain = next;
} }
@ -2959,9 +2959,9 @@ explosions and melee attacks.
============ ============
*/ */
bool idEntity::CanDamage( const idVec3 &origin, idVec3 &damagePoint ) const { bool idEntity::CanDamage( const idVec3 &origin, idVec3 &damagePoint ) const {
idVec3 dest; idVec3 dest;
trace_t tr; trace_t tr;
idVec3 midpoint; idVec3 midpoint;
// use the midpoint of the bounds instead of the origin, because // use the midpoint of the bounds instead of the origin, because
// bmodels may have their origin at 0,0,0 // bmodels may have their origin at 0,0,0
@ -4499,9 +4499,9 @@ void idEntity::Event_RestorePosition( void ) {
if ( spawnArgs.GetMatrix( "rotation", "1 0 0 0 1 0 0 0 1", axis ) ) { if ( spawnArgs.GetMatrix( "rotation", "1 0 0 0 1 0 0 0 1", axis ) ) {
angles = axis.ToAngles(); angles = axis.ToAngles();
} else { } else {
angles[ 0 ] = 0; angles[ 0 ] = 0;
angles[ 1 ] = spawnArgs.GetFloat( "angle" ); angles[ 1 ] = spawnArgs.GetFloat( "angle" );
angles[ 2 ] = 0; angles[ 2 ] = 0;
} }
Teleport( org, angles, NULL ); Teleport( org, angles, NULL );

View file

@ -536,12 +536,12 @@ protected:
private: private:
void Event_GetJointHandle( const char *jointname ); void Event_GetJointHandle( const char *jointname );
void Event_ClearAllJoints( void ); void Event_ClearAllJoints( void );
void Event_ClearJoint( jointHandle_t jointnum ); void Event_ClearJoint( jointHandle_t jointnum );
void Event_SetJointPos( jointHandle_t jointnum, jointModTransform_t transform_type, const idVec3 &pos ); void Event_SetJointPos( jointHandle_t jointnum, jointModTransform_t transform_type, const idVec3 &pos );
void Event_SetJointAngle( jointHandle_t jointnum, jointModTransform_t transform_type, const idAngles &angles ); void Event_SetJointAngle( jointHandle_t jointnum, jointModTransform_t transform_type, const idAngles &angles );
void Event_GetJointPos( jointHandle_t jointnum ); void Event_GetJointPos( jointHandle_t jointnum );
void Event_GetJointAngle( jointHandle_t jointnum ); void Event_GetJointAngle( jointHandle_t jointnum );
}; };

View file

@ -43,7 +43,7 @@ const idEventDef EV_Fx_KillFx( "_killfx" );
const idEventDef EV_Fx_Action( "_fxAction", "e" ); // implemented by subclasses const idEventDef EV_Fx_Action( "_fxAction", "e" ); // implemented by subclasses
CLASS_DECLARATION( idEntity, idEntityFx ) CLASS_DECLARATION( idEntity, idEntityFx )
EVENT( EV_Activate, idEntityFx::Event_Trigger ) EVENT( EV_Activate, idEntityFx::Event_Trigger )
EVENT( EV_Fx_KillFx, idEntityFx::Event_ClearFx ) EVENT( EV_Fx_KillFx, idEntityFx::Event_ClearFx )
END_CLASS END_CLASS

View file

@ -241,7 +241,7 @@ public:
// Animation system calls for non-game based skeletal rendering. // Animation system calls for non-game based skeletal rendering.
virtual idRenderModel * ANIM_GetModelFromEntityDef( const char *classname ); virtual idRenderModel * ANIM_GetModelFromEntityDef( const char *classname );
virtual const idVec3 &ANIM_GetModelOffsetFromEntityDef( const char *classname ); virtual const idVec3 &ANIM_GetModelOffsetFromEntityDef( const char *classname );
virtual idRenderModel * ANIM_GetModelFromEntityDef( const idDict *args ); virtual idRenderModel * ANIM_GetModelFromEntityDef( const idDict *args );
virtual idRenderModel * ANIM_GetModelFromName( const char *modelName ); virtual idRenderModel * ANIM_GetModelFromName( const char *modelName );
virtual const idMD5Anim * ANIM_GetAnimFromEntityDef( const char *classname, const char *animname ); virtual const idMD5Anim * ANIM_GetAnimFromEntityDef( const char *classname, const char *animname );

View file

@ -176,7 +176,7 @@ void idDragEntity::Update( idPlayer *player ) {
player->GetViewPos( viewPoint, viewAxis ); player->GetViewPos( viewPoint, viewAxis );
// if no entity selected for dragging // if no entity selected for dragging
if ( !dragEnt.GetEntity() ) { if ( !dragEnt.GetEntity() ) {
if ( player->usercmd.buttons & BUTTON_ATTACK ) { if ( player->usercmd.buttons & BUTTON_ATTACK ) {
@ -470,7 +470,7 @@ idEditEntities::RemoveSelectedEntity
============== ==============
*/ */
void idEditEntities::RemoveSelectedEntity( idEntity *ent ) { void idEditEntities::RemoveSelectedEntity( idEntity *ent ) {
if ( selectedEntities.Find( ent ) ) { if ( selectedEntities.Find( ent ) ) {
selectedEntities.Remove( ent ); selectedEntities.Remove( ent );
} }
} }

View file

@ -2240,7 +2240,7 @@ bool idGameLocal::InPlayerPVS( idEntity *ent ) const {
if ( playerPVS.i == -1 ) { if ( playerPVS.i == -1 ) {
return false; return false;
} }
return pvs.InCurrentPVS( playerPVS, ent->GetPVSAreas(), ent->GetNumPVSAreas() ); return pvs.InCurrentPVS( playerPVS, ent->GetPVSAreas(), ent->GetNumPVSAreas() );
} }
/* /*
@ -2254,7 +2254,7 @@ bool idGameLocal::InPlayerConnectedArea( idEntity *ent ) const {
if ( playerConnectedAreas.i == -1 ) { if ( playerConnectedAreas.i == -1 ) {
return false; return false;
} }
return pvs.InCurrentPVS( playerConnectedAreas, ent->GetPVSAreas(), ent->GetNumPVSAreas() ); return pvs.InCurrentPVS( playerConnectedAreas, ent->GetPVSAreas(), ent->GetNumPVSAreas() );
} }
/* /*
@ -2269,7 +2269,7 @@ void idGameLocal::UpdateGravity( void ) {
if ( g_gravity.GetFloat() == 0.0f ) { if ( g_gravity.GetFloat() == 0.0f ) {
g_gravity.SetFloat( 1.0f ); g_gravity.SetFloat( 1.0f );
} }
gravity.Set( 0, 0, -g_gravity.GetFloat() ); gravity.Set( 0, 0, -g_gravity.GetFloat() );
// update all physics objects // update all physics objects
for( ent = spawnedEntities.Next(); ent != NULL; ent = ent->spawnNode.Next() ) { for( ent = spawnedEntities.Next(); ent != NULL; ent = ent->spawnNode.Next() ) {
@ -3575,7 +3575,7 @@ int idGameLocal::GetTargets( const idDict &args, idList< idEntityPtr<idEntity> >
ent = FindEntity( arg->GetValue() ); ent = FindEntity( arg->GetValue() );
if ( ent ) { if ( ent ) {
idEntityPtr<idEntity> &entityPtr = list.Alloc(); idEntityPtr<idEntity> &entityPtr = list.Alloc();
entityPtr = ent; entityPtr = ent;
} }
} }
} }
@ -3844,7 +3844,7 @@ void idGameLocal::RadiusDamage( const idVec3 &origin, idEntity *inflictor, idEnt
idEntity * entityList[ MAX_GENTITIES ]; idEntity * entityList[ MAX_GENTITIES ];
int numListedEntities; int numListedEntities;
idBounds bounds; idBounds bounds;
idVec3 v, damagePoint, dir; idVec3 v, damagePoint, dir;
int i, e, damage, radius, push; int i, e, damage, radius, push;
const idDict *damageDef = FindEntityDefDict( damageDefName, false ); const idDict *damageDef = FindEntityDefDict( damageDefName, false );
@ -4983,4 +4983,3 @@ idGameLocal::GetMapLoadingGUI
=============== ===============
*/ */
void idGameLocal::GetMapLoadingGUI( char gui[ MAX_STRING_CHARS ] ) { } void idGameLocal::GetMapLoadingGUI( char gui[ MAX_STRING_CHARS ] ) { }

View file

@ -461,7 +461,7 @@ int idGrabber::Update( idPlayer *player, bool hide ) {
owner = player; owner = player;
// if no entity selected for dragging // if no entity selected for dragging
if ( !dragEnt.GetEntity() ) { if ( !dragEnt.GetEntity() ) {
idBounds bounds; idBounds bounds;
idVec3 end = player->firstPersonViewOrigin + player->firstPersonViewAxis[0] * dragTraceDist; idVec3 end = player->firstPersonViewOrigin + player->firstPersonViewAxis[0] * dragTraceDist;

View file

@ -302,7 +302,7 @@ void idItem::Spawn( void ) {
if ( spawnArgs.GetBool( "spin" ) || (gameLocal.isMultiplayer && !this->IsType( idItemTeam::Type ) ) ) { if ( spawnArgs.GetBool( "spin" ) || (gameLocal.isMultiplayer && !this->IsType( idItemTeam::Type ) ) ) {
spin = true; spin = true;
BecomeActive( TH_THINK ); BecomeActive( TH_THINK );
} }
#else #else
if ( spawnArgs.GetBool( "spin" ) || gameLocal.isMultiplayer ) { if ( spawnArgs.GetBool( "spin" ) || gameLocal.isMultiplayer ) {
spin = true; spin = true;
@ -677,12 +677,12 @@ idItemTeam::idItemTeam
=============== ===============
*/ */
idItemTeam::idItemTeam() { idItemTeam::idItemTeam() {
team = -1; team = -1;
carried = false; carried = false;
dropped = false; dropped = false;
lastDrop = 0; lastDrop = 0;
itemGlowHandle = -1; itemGlowHandle = -1;
skinDefault = NULL; skinDefault = NULL;
skinCarried = NULL; skinCarried = NULL;
@ -710,7 +710,7 @@ idItemTeam::Spawn
=============== ===============
*/ */
void idItemTeam::Spawn( void ) { void idItemTeam::Spawn( void ) {
team = spawnArgs.GetInt( "team" ); team = spawnArgs.GetInt( "team" );
returnOrigin = GetPhysics()->GetOrigin() + idVec3( 0, 0, 20 ); returnOrigin = GetPhysics()->GetOrigin() + idVec3( 0, 0, 20 );
returnAxis = GetPhysics()->GetAxis(); returnAxis = GetPhysics()->GetAxis();
@ -829,18 +829,18 @@ idItemTeam::Pickup
=============== ===============
*/ */
bool idItemTeam::Pickup( idPlayer *player ) { bool idItemTeam::Pickup( idPlayer *player ) {
if ( !gameLocal.mpGame.IsGametypeFlagBased() ) /* CTF */ if ( !gameLocal.mpGame.IsGametypeFlagBased() ) /* CTF */
return false; return false;
if ( gameLocal.mpGame.GetGameState() == idMultiplayerGame::WARMUP || if ( gameLocal.mpGame.GetGameState() == idMultiplayerGame::WARMUP ||
gameLocal.mpGame.GetGameState() == idMultiplayerGame::COUNTDOWN ) gameLocal.mpGame.GetGameState() == idMultiplayerGame::COUNTDOWN )
return false; return false;
// wait 2 seconds after drop before beeing picked up again // wait 2 seconds after drop before beeing picked up again
if ( lastDrop != 0 && (gameLocal.time - lastDrop) < spawnArgs.GetInt("pickupDelay", "500") ) if ( lastDrop != 0 && (gameLocal.time - lastDrop) < spawnArgs.GetInt("pickupDelay", "500") )
return false; return false;
if ( carried == false && player->team != this->team ) { if ( carried == false && player->team != this->team ) {
PostEventMS( &EV_TakeFlag, 0, player ); PostEventMS( &EV_TakeFlag, 0, player );
@ -864,7 +864,7 @@ idItemTeam::ClientReceiveEvent
=============== ===============
*/ */
bool idItemTeam::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) { bool idItemTeam::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) {
gameLocal.DPrintf("ClientRecieveEvent: %i\n", event ); gameLocal.DPrintf("ClientRecieveEvent: %i\n", event );
switch ( event ) { switch ( event ) {
case EVENT_TAKEFLAG: { case EVENT_TAKEFLAG: {
@ -905,7 +905,7 @@ bool idItemTeam::ClientReceiveEvent( int event, int time, const idBitMsg &msg )
return true; return true;
}; };
return false; return false;
} }
/* /*
@ -995,7 +995,7 @@ idItemTeam::Event_TakeFlag
================ ================
*/ */
void idItemTeam::Event_TakeFlag( idPlayer * player ) { void idItemTeam::Event_TakeFlag( idPlayer * player ) {
gameLocal.DPrintf("Event_TakeFlag()!\n"); gameLocal.DPrintf("Event_TakeFlag()!\n");
if ( gameLocal.isServer ) { if ( gameLocal.isServer ) {
idBitMsg msg; idBitMsg msg;
@ -1044,14 +1044,14 @@ void idItemTeam::Event_TakeFlag( idPlayer * player ) {
SetSkin( skinCarried ); SetSkin( skinCarried );
UpdateVisuals(); UpdateVisuals();
UpdateGuis(); UpdateGuis();
if ( gameLocal.isServer ) { if ( gameLocal.isServer ) {
if ( team == 0 ) if ( team == 0 )
gameLocal.mpGame.player_red_flag = player->entityNumber; gameLocal.mpGame.player_red_flag = player->entityNumber;
else else
gameLocal.mpGame.player_blue_flag = player->entityNumber; gameLocal.mpGame.player_blue_flag = player->entityNumber;
} }
} }
/* /*
@ -1060,7 +1060,7 @@ idItemTeam::Event_DropFlag
================ ================
*/ */
void idItemTeam::Event_DropFlag( bool death ) { void idItemTeam::Event_DropFlag( bool death ) {
gameLocal.DPrintf("Event_DropFlag()!\n"); gameLocal.DPrintf("Event_DropFlag()!\n");
if ( gameLocal.isServer ) { if ( gameLocal.isServer ) {
idBitMsg msg; idBitMsg msg;
@ -1118,16 +1118,16 @@ void idItemTeam::Event_DropFlag( bool death ) {
SetSkin( skinDefault ); SetSkin( skinDefault );
UpdateVisuals(); UpdateVisuals();
UpdateGuis(); UpdateGuis();
if ( gameLocal.isServer ) { if ( gameLocal.isServer ) {
if ( team == 0 ) if ( team == 0 )
gameLocal.mpGame.player_red_flag = -1; gameLocal.mpGame.player_red_flag = -1;
else else
gameLocal.mpGame.player_blue_flag = -1; gameLocal.mpGame.player_blue_flag = -1;
} }
} }
/* /*
@ -1136,7 +1136,7 @@ idItemTeam::Event_FlagReturn
================ ================
*/ */
void idItemTeam::Event_FlagReturn( idPlayer * player ) { void idItemTeam::Event_FlagReturn( idPlayer * player ) {
gameLocal.DPrintf("Event_FlagReturn()!\n"); gameLocal.DPrintf("Event_FlagReturn()!\n");
if ( gameLocal.isServer ) { if ( gameLocal.isServer ) {
ServerSendEvent( EVENT_FLAGRETURN, NULL, false, -1 ); ServerSendEvent( EVENT_FLAGRETURN, NULL, false, -1 );
@ -1166,15 +1166,15 @@ void idItemTeam::Event_FlagReturn( idPlayer * player ) {
} }
UpdateVisuals(); UpdateVisuals();
UpdateGuis(); UpdateGuis();
// Present(); // Present();
if ( gameLocal.isServer ) { if ( gameLocal.isServer ) {
if ( team == 0 ) if ( team == 0 )
gameLocal.mpGame.player_red_flag = -1; gameLocal.mpGame.player_red_flag = -1;
else else
gameLocal.mpGame.player_blue_flag = -1; gameLocal.mpGame.player_blue_flag = -1;
} }
} }
/* /*
@ -1215,15 +1215,15 @@ void idItemTeam::Event_FlagCapture( void ) {
} }
UpdateVisuals(); UpdateVisuals();
UpdateGuis(); UpdateGuis();
if ( gameLocal.isServer ) { if ( gameLocal.isServer ) {
if ( team == 0 ) if ( team == 0 )
gameLocal.mpGame.player_red_flag = -1; gameLocal.mpGame.player_red_flag = -1;
else else
gameLocal.mpGame.player_blue_flag = -1; gameLocal.mpGame.player_blue_flag = -1;
} }
} }
@ -1287,15 +1287,15 @@ void idItemTeam::ReadFromSnapshot( const idBitMsgDelta &msg ) {
ReadBindFromSnapshot( msg ); ReadBindFromSnapshot( msg );
if ( msg.HasChanged() ) if ( msg.HasChanged() )
{ {
UpdateGuis(); UpdateGuis();
if ( carried == true ) if ( carried == true )
SetSkin( skinCarried ); SetSkin( skinCarried );
else else
SetSkin( skinDefault ); SetSkin( skinDefault );
} }
idMoveableItem::ReadFromSnapshot( msg ); idMoveableItem::ReadFromSnapshot( msg );
} }
@ -1308,7 +1308,7 @@ Update all client's huds wrt the flag status.
================ ================
*/ */
void idItemTeam::UpdateGuis( void ) { void idItemTeam::UpdateGuis( void ) {
idPlayer *player; idPlayer *player;
for ( int i = 0; i < gameLocal.numClients; i++ ) { for ( int i = 0; i < gameLocal.numClients; i++ ) {
player = static_cast<idPlayer *>( gameLocal.entities[ i ] ); player = static_cast<idPlayer *>( gameLocal.entities[ i ] );
@ -1316,13 +1316,13 @@ void idItemTeam::UpdateGuis( void ) {
if ( player == NULL || player->hud == NULL ) if ( player == NULL || player->hud == NULL )
continue; continue;
player->hud->SetStateInt( "red_flagstatus", gameLocal.mpGame.GetFlagStatus( 0 ) ); player->hud->SetStateInt( "red_flagstatus", gameLocal.mpGame.GetFlagStatus( 0 ) );
player->hud->SetStateInt( "blue_flagstatus", gameLocal.mpGame.GetFlagStatus( 1 ) ); player->hud->SetStateInt( "blue_flagstatus", gameLocal.mpGame.GetFlagStatus( 1 ) );
player->hud->SetStateInt( "red_team_score", gameLocal.mpGame.GetFlagPoints( 0 ) ); player->hud->SetStateInt( "red_team_score", gameLocal.mpGame.GetFlagPoints( 0 ) );
player->hud->SetStateInt( "blue_team_score", gameLocal.mpGame.GetFlagPoints( 1 ) ); player->hud->SetStateInt( "blue_team_score", gameLocal.mpGame.GetFlagPoints( 1 ) );
} }
} }
@ -1479,7 +1479,7 @@ void idObjective::Event_Trigger( idEntity *activator ) {
//Pickup( player ); //Pickup( player );
if ( spawnArgs.GetString( "inv_objective", NULL ) ) { if ( spawnArgs.GetString( "inv_objective", NULL ) ) {
if ( player && player->hud ) { if ( player && player->hud ) {
idStr shotName = gameLocal.GetMapName(); idStr shotName = gameLocal.GetMapName();
shotName.StripFileExtension(); shotName.StripFileExtension();
shotName += "/"; shotName += "/";
@ -1641,7 +1641,7 @@ idMoveableItem::Save
================ ================
*/ */
void idMoveableItem::Save( idSaveGame *savefile ) const { void idMoveableItem::Save( idSaveGame *savefile ) const {
savefile->WriteStaticObject( physicsObj ); savefile->WriteStaticObject( physicsObj );
savefile->WriteClipModel( trigger ); savefile->WriteClipModel( trigger );
@ -2115,7 +2115,7 @@ void idObjectiveComplete::Event_Trigger( idEntity *activator ) {
RemoveItem( player ); RemoveItem( player );
if ( spawnArgs.GetString( "inv_objective", NULL ) ) { if ( spawnArgs.GetString( "inv_objective", NULL ) ) {
if ( player->hud ) { if ( player->hud ) {
player->hud->SetStateString( "objective", "2"); player->hud->SetStateString( "objective", "2");
player->hud->SetStateString( "objectivetext", spawnArgs.GetString( "objectivetext" ) ); player->hud->SetStateString( "objectivetext", spawnArgs.GetString( "objectivetext" ) );

View file

@ -60,9 +60,9 @@ public:
EVENT_RESPAWN, EVENT_RESPAWN,
EVENT_RESPAWNFX, EVENT_RESPAWNFX,
#ifdef CTF #ifdef CTF
EVENT_TAKEFLAG, EVENT_TAKEFLAG,
EVENT_DROPFLAG, EVENT_DROPFLAG,
EVENT_FLAGRETURN, EVENT_FLAGRETURN,
EVENT_FLAGCAPTURE, EVENT_FLAGCAPTURE,
#endif #endif
EVENT_MAXEVENTS EVENT_MAXEVENTS
@ -203,12 +203,12 @@ private:
class idItemTeam : public idMoveableItem { class idItemTeam : public idMoveableItem {
public: public:
CLASS_PROTOTYPE( idItemTeam ); CLASS_PROTOTYPE( idItemTeam );
idItemTeam(); idItemTeam();
virtual ~idItemTeam(); virtual ~idItemTeam();
void Spawn(); void Spawn();
virtual bool Pickup( idPlayer *player ); virtual bool Pickup( idPlayer *player );
virtual bool ClientReceiveEvent( int event, int time, const idBitMsg &msg ); virtual bool ClientReceiveEvent( int event, int time, const idBitMsg &msg );
virtual void Think(void ); virtual void Think(void );
@ -225,7 +225,7 @@ public:
virtual void ReadFromSnapshot( const idBitMsgDelta &msg ); virtual void ReadFromSnapshot( const idBitMsgDelta &msg );
public: public:
int team; int team;
// TODO : turn this into a state : // TODO : turn this into a state :
bool carried; // is it beeing carried by a player? bool carried; // is it beeing carried by a player?
bool dropped; // was it dropped? bool dropped; // was it dropped?
@ -243,8 +243,8 @@ private:
const function_t * scriptReturned; const function_t * scriptReturned;
const function_t * scriptCaptured; const function_t * scriptCaptured;
renderLight_t itemGlow; // Used by flags when they are picked up renderLight_t itemGlow; // Used by flags when they are picked up
int itemGlowHandle; int itemGlowHandle;
int lastNuggetDrop; int lastNuggetDrop;
const char * nuggetName; const char * nuggetName;
@ -252,7 +252,7 @@ private:
private: private:
void Event_TakeFlag( idPlayer * player ); void Event_TakeFlag( idPlayer * player );
void Event_DropFlag( bool death ); void Event_DropFlag( bool death );
void Event_FlagReturn( idPlayer * player = NULL ); void Event_FlagReturn( idPlayer * player = NULL );
void Event_FlagCapture( void ); void Event_FlagCapture( void );
@ -260,7 +260,7 @@ private:
function_t * LoadScript( char * script ); function_t * LoadScript( char * script );
void SpawnNugget( idVec3 pos ); void SpawnNugget( idVec3 pos );
void UpdateGuis( void ); void UpdateGuis( void );
}; };
#endif #endif

View file

@ -123,10 +123,10 @@ void idGameEdit::ParseSpawnArgsToRenderLight( const idDict *args, renderLight_t
idMat3 mat; idMat3 mat;
if ( !args->GetMatrix( "light_rotation", "1 0 0 0 1 0 0 0 1", mat ) ) { if ( !args->GetMatrix( "light_rotation", "1 0 0 0 1 0 0 0 1", mat ) ) {
if ( !args->GetMatrix( "rotation", "1 0 0 0 1 0 0 0 1", mat ) ) { if ( !args->GetMatrix( "rotation", "1 0 0 0 1 0 0 0 1", mat ) ) {
args->GetFloat( "angle", "0", angles[ 1 ] ); args->GetFloat( "angle", "0", angles[ 1 ] );
angles[ 0 ] = 0; angles[ 0 ] = 0;
angles[ 1 ] = idMath::AngleNormalize360( angles[ 1 ] ); angles[ 1 ] = idMath::AngleNormalize360( angles[ 1 ] );
angles[ 2 ] = 0; angles[ 2 ] = 0;
mat = angles.ToMat3(); mat = angles.ToMat3();
} }
} }
@ -357,10 +357,10 @@ void idLight::Spawn( void ) {
} }
#ifdef CTF #ifdef CTF
// Midnight CTF // Midnight CTF
if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") && !spawnArgs.GetBool("midnight_override") ) { if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") && !spawnArgs.GetBool("midnight_override") ) {
Off(); Off();
} }
#endif #endif
health = spawnArgs.GetInt( "health", "0" ); health = spawnArgs.GetInt( "health", "0" );

View file

@ -2973,8 +2973,8 @@ idPhantomObjects::idPhantomObjects
idPhantomObjects::idPhantomObjects() { idPhantomObjects::idPhantomObjects() {
target = NULL; target = NULL;
end_time = 0; end_time = 0;
throw_time = 0.0f; throw_time = 0.0f;
shake_time = 0.0f; shake_time = 0.0f;
shake_ang.Zero(); shake_ang.Zero();
speed = 0.0f; speed = 0.0f;
min_wait = 0; min_wait = 0;
@ -3095,7 +3095,7 @@ void idPhantomObjects::Event_Activate( idEntity *activator ) {
const idVec3 &toPos = target.GetEntity()->GetEyePosition(); const idVec3 &toPos = target.GetEntity()->GetEyePosition();
// calculate the relative times of all the objects // calculate the relative times of all the objects
time = 0.0f; time = 0.0f;
for( i = 0; i < targetTime.Num(); i++ ) { for( i = 0; i < targetTime.Num(); i++ ) {
targetTime[ i ] = SEC2MS( time ); targetTime[ i ] = SEC2MS( time );

View file

@ -556,7 +556,7 @@ void idMoveable::Event_Activate( idEntity *activator ) {
Show(); Show();
if ( !spawnArgs.GetInt( "notPushable" ) ) { if ( !spawnArgs.GetInt( "notPushable" ) ) {
physicsObj.EnableImpact(); physicsObj.EnableImpact();
} }
physicsObj.Activate(); physicsObj.Activate();

View file

@ -524,7 +524,7 @@ idMover::FindGuiTargets
================ ================
*/ */
void idMover::FindGuiTargets( void ) { void idMover::FindGuiTargets( void ) {
gameLocal.GetTargets( spawnArgs, guiTargets, "guiTarget" ); gameLocal.GetTargets( spawnArgs, guiTargets, "guiTarget" );
} }
/* /*
@ -2440,7 +2440,7 @@ idMover_Binary::SetMoverState
=============== ===============
*/ */
void idMover_Binary::SetMoverState( moverState_t newstate, int time ) { void idMover_Binary::SetMoverState( moverState_t newstate, int time ) {
idVec3 delta; idVec3 delta;
moverState = newstate; moverState = newstate;
move_thread = 0; move_thread = 0;
@ -2911,7 +2911,7 @@ idMover_Binary::FindGuiTargets
================ ================
*/ */
void idMover_Binary::FindGuiTargets( void ) { void idMover_Binary::FindGuiTargets( void ) {
gameLocal.GetTargets( spawnArgs, guiTargets, "guiTarget" ); gameLocal.GetTargets( spawnArgs, guiTargets, "guiTarget" );
} }
/* /*
@ -3938,13 +3938,13 @@ void idDoor::Event_Activate( idEntity *activator ) {
} }
} }
if ( syncLock.Length() ) { if ( syncLock.Length() ) {
idEntity *sync = gameLocal.FindEntity( syncLock ); idEntity *sync = gameLocal.FindEntity( syncLock );
if ( sync && sync->IsType( idDoor::Type ) ) { if ( sync && sync->IsType( idDoor::Type ) ) {
if ( static_cast<idDoor *>( sync )->IsOpen() ) { if ( static_cast<idDoor *>( sync )->IsOpen() ) {
return; return;
} }
} }
} }
ActivateTargets( activator ); ActivateTargets( activator );

View file

@ -122,8 +122,8 @@ idMultiplayerGame::idMultiplayerGame() {
flagMsgOn = true; flagMsgOn = true;
player_blue_flag = -1; player_blue_flag = -1;
player_red_flag = -1; player_red_flag = -1;
#endif #endif
Clear(); Clear();
@ -181,10 +181,10 @@ void idMultiplayerGame::Reset() {
assert( !scoreBoard && !spectateGui && !guiChat && !mainGui && !mapList ); assert( !scoreBoard && !spectateGui && !guiChat && !mainGui && !mapList );
#ifdef CTF #ifdef CTF
// CTF uses its own scoreboard // CTF uses its own scoreboard
if ( IsGametypeFlagBased() ) if ( IsGametypeFlagBased() )
scoreBoard = uiManager->FindGui( "guis/ctfscoreboard.gui", true, false, true ); scoreBoard = uiManager->FindGui( "guis/ctfscoreboard.gui", true, false, true );
else else
#endif #endif
scoreBoard = uiManager->FindGui( "guis/scoreboard.gui", true, false, true ); scoreBoard = uiManager->FindGui( "guis/scoreboard.gui", true, false, true );
@ -316,7 +316,7 @@ void idMultiplayerGame::ClearGuis() {
} }
#ifdef CTF #ifdef CTF
ClearHUDStatus(); ClearHUDStatus();
#endif #endif
} }
@ -327,22 +327,22 @@ idMultiplayerGame::ClearHUDStatus
================ ================
*/ */
void idMultiplayerGame::ClearHUDStatus( void ) { void idMultiplayerGame::ClearHUDStatus( void ) {
int i; int i;
for ( i = 0; i < MAX_CLIENTS; i++ ) { for ( i = 0; i < MAX_CLIENTS; i++ ) {
idPlayer *player = static_cast<idPlayer *>( gameLocal.entities[ i ] ); idPlayer *player = static_cast<idPlayer *>( gameLocal.entities[ i ] );
if ( !player || !player->hud ) { if ( !player || !player->hud ) {
continue; continue;
} }
player->hud->SetStateInt( "red_flagstatus", 0 ); player->hud->SetStateInt( "red_flagstatus", 0 );
player->hud->SetStateInt( "blue_flagstatus", 0 ); player->hud->SetStateInt( "blue_flagstatus", 0 );
if ( IsGametypeFlagBased()) if ( IsGametypeFlagBased())
player->hud->SetStateInt( "self_team", player->team ); player->hud->SetStateInt( "self_team", player->team );
else else
player->hud->SetStateInt( "self_team", -1 ); // Invisible. player->hud->SetStateInt( "self_team", -1 ); // Invisible.
} }
} }
@ -358,9 +358,9 @@ Gets number of captures in CTF game.
*/ */
int idMultiplayerGame::GetFlagPoints( int team ) int idMultiplayerGame::GetFlagPoints( int team )
{ {
assert( team <= 1 ); assert( team <= 1 );
return teamPoints[ team ]; return teamPoints[ team ];
} }
#endif #endif
@ -622,38 +622,38 @@ void idMultiplayerGame::UpdateCTFScoreboard( idUserInterface *scoreBoard, idPlay
idEntity *ent; idEntity *ent;
int value; int value;
// The display lines // The display lines
int ilines[2] = {0,0}; int ilines[2] = {0,0};
// The team strings // The team strings
char redTeam[] = "red"; char redTeam[] = "red";
char blueTeam[] = "blue"; char blueTeam[] = "blue";
char *curTeam = NULL; char *curTeam = NULL;
/* Word "frags" */ /* Word "frags" */
scoreBoard->SetStateString( "scoretext", gameLocal.gameType == GAME_LASTMAN ? common->GetLanguageDict()->GetString( "#str_04242" ) : common->GetLanguageDict()->GetString( "#str_04243" ) ); scoreBoard->SetStateString( "scoretext", gameLocal.gameType == GAME_LASTMAN ? common->GetLanguageDict()->GetString( "#str_04242" ) : common->GetLanguageDict()->GetString( "#str_04243" ) );
// Blank the flag carrier on the scoreboard. We update these in the loop below if necessary. // Blank the flag carrier on the scoreboard. We update these in the loop below if necessary.
if ( this->player_blue_flag == -1 ) if ( this->player_blue_flag == -1 )
scoreBoard->SetStateInt( "player_blue_flag", 0 ); scoreBoard->SetStateInt( "player_blue_flag", 0 );
if ( this->player_red_flag == -1 ) if ( this->player_red_flag == -1 )
scoreBoard->SetStateInt( "player_red_flag", 0 ); scoreBoard->SetStateInt( "player_red_flag", 0 );
if ( gameState != WARMUP ) { if ( gameState != WARMUP ) {
for ( i = 0; i < numRankedPlayers; i++ ) { for ( i = 0; i < numRankedPlayers; i++ ) {
idPlayer *player = rankedPlayers[ i ]; idPlayer *player = rankedPlayers[ i ];
assert( player ); assert( player );
if ( player->team == 0 ) if ( player->team == 0 )
curTeam = redTeam; curTeam = redTeam;
else else
curTeam = blueTeam; curTeam = blueTeam;
// Increase the appropriate iline // Increase the appropriate iline
assert( player->team <= 1 ); assert( player->team <= 1 );
ilines[ player->team ]++; ilines[ player->team ]++;
// Update the flag status // Update the flag status
@ -665,149 +665,149 @@ void idMultiplayerGame::UpdateCTFScoreboard( idUserInterface *scoreBoard, idPlay
/* Player Name */ /* Player Name */
scoreBoard->SetStateString( va( "player%i_%s", ilines[ player->team ], curTeam ), player->GetUserInfo()->GetString( "ui_name" ) ); scoreBoard->SetStateString( va( "player%i_%s", ilines[ player->team ], curTeam ), player->GetUserInfo()->GetString( "ui_name" ) );
if ( IsGametypeTeamBased() ) { if ( IsGametypeTeamBased() ) {
value = idMath::ClampInt( MP_PLAYER_MINFRAGS, MP_PLAYER_MAXFRAGS, playerState[ rankedPlayers[ i ]->entityNumber ].fragCount ); value = idMath::ClampInt( MP_PLAYER_MINFRAGS, MP_PLAYER_MAXFRAGS, playerState[ rankedPlayers[ i ]->entityNumber ].fragCount );
scoreBoard->SetStateInt( va( "player%i_%s_score", ilines[ player->team ], curTeam ), value ); scoreBoard->SetStateInt( va( "player%i_%s_score", ilines[ player->team ], curTeam ), value );
/* Team score and score, blanked */ /* Team score and score, blanked */
scoreBoard->SetStateString( va( "player%i_%s_tscore", ilines[ player->team ], curTeam ), "" ); scoreBoard->SetStateString( va( "player%i_%s_tscore", ilines[ player->team ], curTeam ), "" );
//scoreBoard->SetStateString( va( "player%i_%s_score", ilines[ player->team ], curTeam ), "" ); //scoreBoard->SetStateString( va( "player%i_%s_score", ilines[ player->team ], curTeam ), "" );
} }
/* Wins */ /* Wins */
value = idMath::ClampInt( 0, MP_PLAYER_MAXWINS, playerState[ rankedPlayers[ i ]->entityNumber ].wins ); value = idMath::ClampInt( 0, MP_PLAYER_MAXWINS, playerState[ rankedPlayers[ i ]->entityNumber ].wins );
scoreBoard->SetStateInt( va( "player%i_%s_wins", ilines[ player->team ], curTeam ), value ); scoreBoard->SetStateInt( va( "player%i_%s_wins", ilines[ player->team ], curTeam ), value );
/* Ping */ /* Ping */
scoreBoard->SetStateInt( va( "player%i_%s_ping", ilines[ player->team ], curTeam ), playerState[ rankedPlayers[ i ]->entityNumber ].ping ); scoreBoard->SetStateInt( va( "player%i_%s_ping", ilines[ player->team ], curTeam ), playerState[ rankedPlayers[ i ]->entityNumber ].ping );
} }
} }
for ( i = 0; i < MAX_CLIENTS; i++ ) { for ( i = 0; i < MAX_CLIENTS; i++ ) {
ent = gameLocal.entities[ i ]; ent = gameLocal.entities[ i ];
if ( !ent || !ent->IsType( idPlayer::Type ) ) { if ( !ent || !ent->IsType( idPlayer::Type ) ) {
continue; continue;
} }
if ( gameState != WARMUP ) { if ( gameState != WARMUP ) {
// check he's not covered by ranks already // check he's not covered by ranks already
for ( j = 0; j < numRankedPlayers; j++ ) { for ( j = 0; j < numRankedPlayers; j++ ) {
if ( ent == rankedPlayers[ j ] ) { if ( ent == rankedPlayers[ j ] ) {
break; break;
} }
} }
if ( j != numRankedPlayers ) { if ( j != numRankedPlayers ) {
continue; continue;
} }
} }
player = static_cast< idPlayer * >( ent ); player = static_cast< idPlayer * >( ent );
if ( player->spectating ) if ( player->spectating )
continue; continue;
if ( player->team == 0 ) if ( player->team == 0 )
curTeam = redTeam; curTeam = redTeam;
else else
curTeam = blueTeam; curTeam = blueTeam;
ilines[ player->team ]++; ilines[ player->team ]++;
if ( !playerState[ i ].ingame ) { if ( !playerState[ i ].ingame ) {
/* "New Player" on player's name location */ /* "New Player" on player's name location */
scoreBoard->SetStateString( va( "player%i_%s", ilines[ player->team ], curTeam ), common->GetLanguageDict()->GetString( "#str_04244" ) ); scoreBoard->SetStateString( va( "player%i_%s", ilines[ player->team ], curTeam ), common->GetLanguageDict()->GetString( "#str_04244" ) );
/* "Connecting" on player's score location */ /* "Connecting" on player's score location */
scoreBoard->SetStateString( va( "player%i_%s_score", ilines[ player->team ], curTeam ), common->GetLanguageDict()->GetString( "#str_04245" ) ); scoreBoard->SetStateString( va( "player%i_%s_score", ilines[ player->team ], curTeam ), common->GetLanguageDict()->GetString( "#str_04245" ) );
} else { } else {
/* Player's name in player's name location */ /* Player's name in player's name location */
if ( !player->spectating ) if ( !player->spectating )
scoreBoard->SetStateString( va( "player%i_%s", ilines[ player->team ], curTeam ), gameLocal.userInfo[ i ].GetString( "ui_name" ) ); scoreBoard->SetStateString( va( "player%i_%s", ilines[ player->team ], curTeam ), gameLocal.userInfo[ i ].GetString( "ui_name" ) );
if ( gameState == WARMUP ) { if ( gameState == WARMUP ) {
if ( player->spectating ) { if ( player->spectating ) {
/* "Spectating" on player's score location */ /* "Spectating" on player's score location */
scoreBoard->SetStateString( va( "player%i_%s_score", ilines[ player->team ], curTeam ), common->GetLanguageDict()->GetString( "#str_04246" ) ); scoreBoard->SetStateString( va( "player%i_%s_score", ilines[ player->team ], curTeam ), common->GetLanguageDict()->GetString( "#str_04246" ) );
} else { } else {
/* Display "ready" in player's score location if they're ready. Display nothing if not. No room for 'not ready'. */ /* Display "ready" in player's score location if they're ready. Display nothing if not. No room for 'not ready'. */
scoreBoard->SetStateString( va( "player%i_%s_score", ilines[ player->team ], curTeam ), player->IsReady() ? common->GetLanguageDict()->GetString( "#str_04247" ) : "" ); scoreBoard->SetStateString( va( "player%i_%s_score", ilines[ player->team ], curTeam ), player->IsReady() ? common->GetLanguageDict()->GetString( "#str_04247" ) : "" );
} }
} }
} }
} }
// Clear remaining slots // Clear remaining slots
for ( i = 0; i < 2; i++ ) for ( i = 0; i < 2; i++ )
{ {
if ( i ) if ( i )
curTeam = blueTeam; curTeam = blueTeam;
else else
curTeam = redTeam; curTeam = redTeam;
for ( j = ilines[ i ]+1; j <= 8; j++ ) for ( j = ilines[ i ]+1; j <= 8; j++ )
{ {
scoreBoard->SetStateString( va( "player%i_%s", j, curTeam ), "" ); scoreBoard->SetStateString( va( "player%i_%s", j, curTeam ), "" );
scoreBoard->SetStateString( va( "player%i_%s_score", j, curTeam ), "" ); scoreBoard->SetStateString( va( "player%i_%s_score", j, curTeam ), "" );
scoreBoard->SetStateString( va( "player%i_%s_wins", j, curTeam ), "" ); scoreBoard->SetStateString( va( "player%i_%s_wins", j, curTeam ), "" );
scoreBoard->SetStateString( va( "player%i_%s_ping", j, curTeam ), "" ); scoreBoard->SetStateString( va( "player%i_%s_ping", j, curTeam ), "" );
scoreBoard->SetStateInt( "rank_self", 0 ); scoreBoard->SetStateInt( "rank_self", 0 );
} }
} }
// Don't display "CTF" -- if this scoreboard comes up, it should be apparent. // Don't display "CTF" -- if this scoreboard comes up, it should be apparent.
if ( gameLocal.gameType == GAME_CTF ) { if ( gameLocal.gameType == GAME_CTF ) {
int captureLimit = gameLocal.serverInfo.GetInt( "si_fragLimit" ); int captureLimit = gameLocal.serverInfo.GetInt( "si_fragLimit" );
if ( captureLimit > MP_CTF_MAXPOINTS ) if ( captureLimit > MP_CTF_MAXPOINTS )
captureLimit = MP_CTF_MAXPOINTS; captureLimit = MP_CTF_MAXPOINTS;
int timeLimit = gameLocal.serverInfo.GetInt( "si_timeLimit" ); int timeLimit = gameLocal.serverInfo.GetInt( "si_timeLimit" );
/* Prints "Capture Limit: %i" at the bottom of the scoreboard, left */ /* Prints "Capture Limit: %i" at the bottom of the scoreboard, left */
if ( captureLimit ) if ( captureLimit )
scoreBoard->SetStateString( "gameinfo_red", va( common->GetLanguageDict()->GetString( "#str_11108" ), captureLimit) ); scoreBoard->SetStateString( "gameinfo_red", va( common->GetLanguageDict()->GetString( "#str_11108" ), captureLimit) );
else else
scoreBoard->SetStateString( "gameinfo_red", "" ); scoreBoard->SetStateString( "gameinfo_red", "" );
/* Prints "Time Limit: %i" at the bottom of the scoreboard, right */ /* Prints "Time Limit: %i" at the bottom of the scoreboard, right */
if ( timeLimit ) if ( timeLimit )
scoreBoard->SetStateString( "gameinfo_blue", va( common->GetLanguageDict()->GetString( "#str_11109" ), timeLimit) ); scoreBoard->SetStateString( "gameinfo_blue", va( common->GetLanguageDict()->GetString( "#str_11109" ), timeLimit) );
else else
scoreBoard->SetStateString( "gameinfo_blue", "" ); scoreBoard->SetStateString( "gameinfo_blue", "" );
} }
// Set team scores // Set team scores
scoreBoard->SetStateInt( "red_team_score", GetFlagPoints( 0 ) ); scoreBoard->SetStateInt( "red_team_score", GetFlagPoints( 0 ) );
scoreBoard->SetStateInt( "blue_team_score", GetFlagPoints( 1 ) ); scoreBoard->SetStateInt( "blue_team_score", GetFlagPoints( 1 ) );
// Handle flag status changed event // Handle flag status changed event
scoreBoard->HandleNamedEvent( "BlueFlagStatusChange" ); scoreBoard->HandleNamedEvent( "BlueFlagStatusChange" );
scoreBoard->HandleNamedEvent( "RedFlagStatusChange" ); scoreBoard->HandleNamedEvent( "RedFlagStatusChange" );
scoreBoard->Redraw( gameLocal.time ); scoreBoard->Redraw( gameLocal.time );
@ -1418,7 +1418,7 @@ void idMultiplayerGame::NewState( gameState_t news, idPlayer *player ) {
teamPoints[0] = 0; teamPoints[0] = 0;
teamPoints[1] = 0; teamPoints[1] = 0;
ClearHUDStatus(); ClearHUDStatus();
#endif #endif
PlayGlobalSound( -1, SND_FIGHT ); PlayGlobalSound( -1, SND_FIGHT );
@ -2557,10 +2557,10 @@ void idMultiplayerGame::UpdateHud( idPlayer *player, idUserInterface *hud ) {
} }
#ifdef CTF #ifdef CTF
if ( IsGametypeFlagBased() ) if ( IsGametypeFlagBased() )
hud->SetStateInt( "self_team", player->team ); hud->SetStateInt( "self_team", player->team );
else else
hud->SetStateInt( "self_team", -1 ); /* Disable */ hud->SetStateInt( "self_team", -1 ); /* Disable */
#endif #endif
} }
@ -2578,9 +2578,9 @@ void idMultiplayerGame::DrawScoreBoard( idPlayer *player ) {
} }
#ifdef CTF #ifdef CTF
if ( IsGametypeFlagBased() ) if ( IsGametypeFlagBased() )
UpdateCTFScoreboard( scoreBoard, player ); UpdateCTFScoreboard( scoreBoard, player );
else else
#endif #endif
UpdateScoreboard( scoreBoard, player ); UpdateScoreboard( scoreBoard, player );
@ -2704,10 +2704,10 @@ void idMultiplayerGame::WriteToSnapshot( idBitMsgDelta &msg ) const {
} }
#ifdef CTF #ifdef CTF
msg.WriteShort( teamPoints[0] ); msg.WriteShort( teamPoints[0] );
msg.WriteShort( teamPoints[1] ); msg.WriteShort( teamPoints[1] );
msg.WriteShort( player_red_flag ); msg.WriteShort( player_red_flag );
msg.WriteShort( player_blue_flag ); msg.WriteShort( player_blue_flag );
#endif #endif
} }
@ -2743,11 +2743,11 @@ void idMultiplayerGame::ReadFromSnapshot( const idBitMsgDelta &msg ) {
} }
#ifdef CTF #ifdef CTF
teamPoints[0] = msg.ReadShort(); teamPoints[0] = msg.ReadShort();
teamPoints[1] = msg.ReadShort(); teamPoints[1] = msg.ReadShort();
player_red_flag = msg.ReadShort(); player_red_flag = msg.ReadShort();
player_blue_flag = msg.ReadShort(); player_blue_flag = msg.ReadShort();
#endif #endif
@ -2880,8 +2880,8 @@ void idMultiplayerGame::PrintMessageEvent( int to, msg_evt_t evt, int parm1, int
break; break;
case MSG_FLAGTAKEN : case MSG_FLAGTAKEN :
if ( gameLocal.GetLocalPlayer() == NULL ) if ( gameLocal.GetLocalPlayer() == NULL )
break; break;
if ( parm2 < 0 || parm2 >= MAX_CLIENTS ) if ( parm2 < 0 || parm2 >= MAX_CLIENTS )
break; break;
@ -2894,8 +2894,8 @@ void idMultiplayerGame::PrintMessageEvent( int to, msg_evt_t evt, int parm1, int
break; break;
case MSG_FLAGDROP : case MSG_FLAGDROP :
if ( gameLocal.GetLocalPlayer() == NULL ) if ( gameLocal.GetLocalPlayer() == NULL )
break; break;
if ( gameLocal.GetLocalPlayer()->team != parm1 ) { if ( gameLocal.GetLocalPlayer()->team != parm1 ) {
AddChatLine( common->GetLanguageDict()->GetString( "#str_11103" ) ); // your team AddChatLine( common->GetLanguageDict()->GetString( "#str_11103" ) ); // your team
@ -2905,8 +2905,8 @@ void idMultiplayerGame::PrintMessageEvent( int to, msg_evt_t evt, int parm1, int
break; break;
case MSG_FLAGRETURN : case MSG_FLAGRETURN :
if ( gameLocal.GetLocalPlayer() == NULL ) if ( gameLocal.GetLocalPlayer() == NULL )
break; break;
if ( parm2 >= 0 && parm2 < MAX_CLIENTS ) { if ( parm2 >= 0 && parm2 < MAX_CLIENTS ) {
if ( gameLocal.GetLocalPlayer()->team != parm1 ) { if ( gameLocal.GetLocalPlayer()->team != parm1 ) {
@ -2920,8 +2920,8 @@ void idMultiplayerGame::PrintMessageEvent( int to, msg_evt_t evt, int parm1, int
break; break;
case MSG_FLAGCAPTURE : case MSG_FLAGCAPTURE :
if ( gameLocal.GetLocalPlayer() == NULL ) if ( gameLocal.GetLocalPlayer() == NULL )
break; break;
if ( parm2 < 0 || parm2 >= MAX_CLIENTS ) if ( parm2 < 0 || parm2 >= MAX_CLIENTS )
break; break;
@ -3017,8 +3017,8 @@ void idMultiplayerGame::CheckRespawns( idPlayer *spectator ) {
} }
} else { } else {
if ( gameLocal.gameType == GAME_DM || // CTF : 3wave sboily, was DM really included before? if ( gameLocal.gameType == GAME_DM || // CTF : 3wave sboily, was DM really included before?
IsGametypeTeamBased() ) IsGametypeTeamBased() )
{ {
if ( gameState == WARMUP || gameState == COUNTDOWN || gameState == GAMEON ) { if ( gameState == WARMUP || gameState == COUNTDOWN || gameState == GAMEON ) {
p->ServerSpectate( false ); p->ServerSpectate( false );
} }
@ -3619,7 +3619,7 @@ void idMultiplayerGame::MapRestart( void ) {
teamPoints[0] = 0; teamPoints[0] = 0;
teamPoints[1] = 0; teamPoints[1] = 0;
ClearHUDStatus(); ClearHUDStatus();
#endif #endif
#ifdef CTF #ifdef CTF
@ -3650,7 +3650,7 @@ void idMultiplayerGame::SwitchToTeam( int clientNum, int oldteam, int newteam )
idEntity *ent; idEntity *ent;
int i; int i;
assert( IsGametypeTeamBased() ); /* CTF */ assert( IsGametypeTeamBased() ); /* CTF */
assert( oldteam != newteam ); assert( oldteam != newteam );
assert( !gameLocal.isClient ); assert( !gameLocal.isClient );
@ -3686,8 +3686,8 @@ void idMultiplayerGame::SwitchToTeam( int clientNum, int oldteam, int newteam )
} }
p->Kill( true, true ); p->Kill( true, true );
#ifdef CTF #ifdef CTF
if ( IsGametypeFlagBased() ) if ( IsGametypeFlagBased() )
p->DropFlag(); p->DropFlag();
#endif #endif
CheckAbortGame(); CheckAbortGame();
} }
@ -3710,7 +3710,7 @@ void idMultiplayerGame::ProcessChatMessage( int clientNum, bool team, const char
const char *prefix = NULL; const char *prefix = NULL;
int send_to; // 0 - all, 1 - specs, 2 - team int send_to; // 0 - all, 1 - specs, 2 - team
int i; int i;
idEntity *ent; idEntity *ent;
idPlayer *p; idPlayer *p;
idStr prefixed_name; idStr prefixed_name;
@ -4144,7 +4144,7 @@ void idMultiplayerGame::ClientReadWarmupTime( const idBitMsg &msg ) {
/* /*
#ifdef CTF #ifdef CTF
Threewave note: Threewave note:
The below IsGametype...() functions were implemented for CTF, The below IsGametype...() functions were implemented for CTF,
but we did not #ifdef CTF them, because doing so would clutter but we did not #ifdef CTF them, because doing so would clutter
the codebase substantially. Please consider them part of the merged the codebase substantially. Please consider them part of the merged
@ -4158,24 +4158,24 @@ idMultiplayerGame::IsGametypeTeamBased
*/ */
bool idMultiplayerGame::IsGametypeTeamBased( void ) /* CTF */ bool idMultiplayerGame::IsGametypeTeamBased( void ) /* CTF */
{ {
switch ( gameLocal.gameType ) switch ( gameLocal.gameType )
{ {
case GAME_SP: case GAME_SP:
case GAME_DM: case GAME_DM:
case GAME_TOURNEY: case GAME_TOURNEY:
case GAME_LASTMAN: case GAME_LASTMAN:
return false; return false;
#ifdef CTF #ifdef CTF
case GAME_CTF: case GAME_CTF:
#endif #endif
case GAME_TDM: case GAME_TDM:
return true; return true;
default: default:
assert( !"Add support for your new gametype here." ); assert( !"Add support for your new gametype here." );
} }
return false; return false;
} }
/* /*
@ -4184,25 +4184,25 @@ idMultiplayerGame::IsGametypeFlagBased
================ ================
*/ */
bool idMultiplayerGame::IsGametypeFlagBased( void ) { bool idMultiplayerGame::IsGametypeFlagBased( void ) {
switch ( gameLocal.gameType ) switch ( gameLocal.gameType )
{ {
case GAME_SP: case GAME_SP:
case GAME_DM: case GAME_DM:
case GAME_TOURNEY: case GAME_TOURNEY:
case GAME_LASTMAN: case GAME_LASTMAN:
case GAME_TDM: case GAME_TDM:
return false; return false;
#ifdef CTF #ifdef CTF
case GAME_CTF: case GAME_CTF:
return true; return true;
#endif #endif
default: default:
assert( !"Add support for your new gametype here." ); assert( !"Add support for your new gametype here." );
} }
return false; return false;
} }
#ifdef CTF #ifdef CTF
@ -4213,7 +4213,7 @@ idMultiplayerGame::GetTeamFlag
================ ================
*/ */
idItemTeam * idMultiplayerGame::GetTeamFlag( int team ) { idItemTeam * idMultiplayerGame::GetTeamFlag( int team ) {
assert( team == 0 || team == 1 ); assert( team == 0 || team == 1 );
if ( !IsGametypeFlagBased() || ( team != 0 && team != 1 ) ) /* CTF */ if ( !IsGametypeFlagBased() || ( team != 0 && team != 1 ) ) /* CTF */
return NULL; return NULL;
@ -4263,24 +4263,24 @@ idMultiplayerGame::GetFlagStatus
================ ================
*/ */
flagStatus_t idMultiplayerGame::GetFlagStatus( int team ) { flagStatus_t idMultiplayerGame::GetFlagStatus( int team ) {
//assert( IsGametypeFlagBased() ); //assert( IsGametypeFlagBased() );
idItemTeam *teamFlag = GetTeamFlag( team ); idItemTeam *teamFlag = GetTeamFlag( team );
//assert( teamFlag != NULL ); //assert( teamFlag != NULL );
if ( teamFlag != NULL ) { if ( teamFlag != NULL ) {
if ( teamFlag->carried == false && teamFlag->dropped == false ) if ( teamFlag->carried == false && teamFlag->dropped == false )
return FLAGSTATUS_INBASE; return FLAGSTATUS_INBASE;
if ( teamFlag->carried == true ) if ( teamFlag->carried == true )
return FLAGSTATUS_TAKEN; return FLAGSTATUS_TAKEN;
if ( teamFlag->carried == false && teamFlag->dropped == true ) if ( teamFlag->carried == false && teamFlag->dropped == true )
return FLAGSTATUS_STRAY; return FLAGSTATUS_STRAY;
} }
//assert( !"Invalid flag state." ); //assert( !"Invalid flag state." );
return FLAGSTATUS_NONE; return FLAGSTATUS_NONE;
} }
/* /*

View file

@ -51,7 +51,7 @@ typedef enum {
GAME_TDM, GAME_TDM,
GAME_LASTMAN, GAME_LASTMAN,
#ifdef CTF #ifdef CTF
GAME_CTF, GAME_CTF,
GAME_COUNT, GAME_COUNT,
#endif #endif
} gameType_t; } gameType_t;
@ -60,10 +60,10 @@ typedef enum {
// Used by the UI // Used by the UI
typedef enum { typedef enum {
FLAGSTATUS_INBASE = 0, FLAGSTATUS_INBASE = 0,
FLAGSTATUS_TAKEN = 1, FLAGSTATUS_TAKEN = 1,
FLAGSTATUS_STRAY = 2, FLAGSTATUS_STRAY = 2,
FLAGSTATUS_NONE = 3 FLAGSTATUS_NONE = 3
} flagStatus_t; } flagStatus_t;
#endif #endif
@ -286,14 +286,14 @@ public:
void ServerClientConnect( int clientNum ); void ServerClientConnect( int clientNum );
#ifdef CTF #ifdef CTF
void ClearHUDStatus( void ); void ClearHUDStatus( void );
int GetFlagPoints( int team ); // Team points in CTF int GetFlagPoints( int team ); // Team points in CTF
void SetFlagMsg( bool b ); // allow flag event messages to be sent void SetFlagMsg( bool b ); // allow flag event messages to be sent
bool IsFlagMsgOn( void ); // should flag event messages go through? bool IsFlagMsgOn( void ); // should flag event messages go through?
void ClearGuis( void ); void ClearGuis( void );
int player_red_flag; // Ent num of red flag carrier for HUD int player_red_flag; // Ent num of red flag carrier for HUD
int player_blue_flag; // Ent num of blue flag carrier for HUD int player_blue_flag; // Ent num of blue flag carrier for HUD
#endif #endif
void PlayerStats( int clientNum, char *data, const int len ); void PlayerStats( int clientNum, char *data, const int len );
@ -388,7 +388,7 @@ private:
#endif #endif
#ifndef CTF #ifndef CTF
// We declare this publically above so we can call it during a map restart. // We declare this publically above so we can call it during a map restart.
void ClearGuis( void ); void ClearGuis( void );
#endif #endif
@ -441,12 +441,12 @@ public:
#ifdef CTF #ifdef CTF
idItemTeam * GetTeamFlag( int team ); idItemTeam * GetTeamFlag( int team );
flagStatus_t GetFlagStatus( int team ); flagStatus_t GetFlagStatus( int team );
void TeamScoreCTF( int team, int delta ); void TeamScoreCTF( int team, int delta );
void PlayerScoreCTF( int playerIdx, int delta ); void PlayerScoreCTF( int playerIdx, int delta );
// returns entityNum to team flag carrier, -1 if no flag carrier // returns entityNum to team flag carrier, -1 if no flag carrier
int GetFlagCarrier( int team ); int GetFlagCarrier( int team );
void UpdateScoreboardFlagStatus( void ); void UpdateScoreboardFlagStatus( void );
void SetBestGametype( const char * map ); void SetBestGametype( const char * map );
void ReloadScoreboard(); void ReloadScoreboard();
@ -480,4 +480,3 @@ ID_INLINE bool idMultiplayerGame::IsInGame( int clientNum ) {
} }
#endif /* !__MULTIPLAYERGAME_H__ */ #endif /* !__MULTIPLAYERGAME_H__ */

View file

@ -266,7 +266,7 @@ void idInventory::GetPersistantData( idDict &dict ) {
// armor // armor
dict.SetInt( "armor", armor ); dict.SetInt( "armor", armor );
// don't bother with powerups, maxhealth, maxarmor, or the clip // don't bother with powerups, maxhealth, maxarmor, or the clip
// ammo // ammo
for( i = 0; i < AMMO_NUMTYPES; i++ ) { for( i = 0; i < AMMO_NUMTYPES; i++ ) {
@ -1759,10 +1759,10 @@ void idPlayer::Spawn( void ) {
if ( hud ) { if ( hud ) {
hud->Activate( true, gameLocal.time ); hud->Activate( true, gameLocal.time );
#ifdef CTF #ifdef CTF
if ( gameLocal.mpGame.IsGametypeFlagBased() ) { if ( gameLocal.mpGame.IsGametypeFlagBased() ) {
hud->SetStateInt( "red_team_score", gameLocal.mpGame.GetFlagPoints(0) ); hud->SetStateInt( "red_team_score", gameLocal.mpGame.GetFlagPoints(0) );
hud->SetStateInt( "blue_team_score", gameLocal.mpGame.GetFlagPoints(1) ); hud->SetStateInt( "blue_team_score", gameLocal.mpGame.GetFlagPoints(1) );
} }
#endif #endif
} }
@ -2543,7 +2543,7 @@ void idPlayer::PrepareForRestart( void ) {
#ifdef CTF #ifdef CTF
// Confirm reset hud states // Confirm reset hud states
DropFlag(); DropFlag();
if ( hud ) { if ( hud ) {
hud->SetStateInt( "red_flagstatus", 0 ); hud->SetStateInt( "red_flagstatus", 0 );
@ -3098,19 +3098,19 @@ void idPlayer::UpdateHudStats( idUserInterface *_hud ) {
} }
#ifdef CTF #ifdef CTF
if ( gameLocal.mpGame.IsGametypeFlagBased() && _hud ) if ( gameLocal.mpGame.IsGametypeFlagBased() && _hud )
{ {
_hud->SetStateInt( "red_flagstatus", gameLocal.mpGame.GetFlagStatus( 0 ) ); _hud->SetStateInt( "red_flagstatus", gameLocal.mpGame.GetFlagStatus( 0 ) );
_hud->SetStateInt( "blue_flagstatus", gameLocal.mpGame.GetFlagStatus( 1 ) ); _hud->SetStateInt( "blue_flagstatus", gameLocal.mpGame.GetFlagStatus( 1 ) );
_hud->SetStateInt( "red_team_score", gameLocal.mpGame.GetFlagPoints( 0 ) ); _hud->SetStateInt( "red_team_score", gameLocal.mpGame.GetFlagPoints( 0 ) );
_hud->SetStateInt( "blue_team_score", gameLocal.mpGame.GetFlagPoints( 1 ) ); _hud->SetStateInt( "blue_team_score", gameLocal.mpGame.GetFlagPoints( 1 ) );
_hud->HandleNamedEvent( "RedFlagStatusChange" ); _hud->HandleNamedEvent( "RedFlagStatusChange" );
_hud->HandleNamedEvent( "BlueFlagStatusChange" ); _hud->HandleNamedEvent( "BlueFlagStatusChange" );
} }
_hud->HandleNamedEvent( "selfTeam" ); _hud->HandleNamedEvent( "selfTeam" );
#endif #endif
@ -5016,7 +5016,7 @@ void idPlayer::UpdateWeapon( void ) {
} else if ( ActiveGui() ) { } else if ( ActiveGui() ) {
// gui handling overrides weapon use // gui handling overrides weapon use
Weapon_GUI(); Weapon_GUI();
} else if ( focusCharacter && ( focusCharacter->health > 0 ) ) { } else if ( focusCharacter && ( focusCharacter->health > 0 ) ) {
Weapon_NPC(); Weapon_NPC();
} else { } else {
Weapon_Combat(); Weapon_Combat();
@ -5504,7 +5504,7 @@ void idPlayer::UpdateFocus( void ) {
// clamp the mouse to the corner // clamp the mouse to the corner
ev = sys->GenerateMouseMoveEvent( -2000, -2000 ); ev = sys->GenerateMouseMoveEvent( -2000, -2000 );
command = focusUI->HandleEvent( &ev, gameLocal.time ); command = focusUI->HandleEvent( &ev, gameLocal.time );
HandleGuiCommands( focusGUIent, command ); HandleGuiCommands( focusGUIent, command );
// move to an absolute position // move to an absolute position
ev = sys->GenerateMouseMoveEvent( pt.x * SCREEN_WIDTH, pt.y * SCREEN_HEIGHT ); ev = sys->GenerateMouseMoveEvent( pt.x * SCREEN_WIDTH, pt.y * SCREEN_HEIGHT );
@ -5963,7 +5963,7 @@ void idPlayer::AdjustHeartRate( int target, float timeInSecs, float delay, bool
return; return;
} }
lastHeartAdjust = gameLocal.time; lastHeartAdjust = gameLocal.time;
heartInfo.Init( gameLocal.time + delay * 1000, timeInSecs * 1000, heartRate, target ); heartInfo.Init( gameLocal.time + delay * 1000, timeInSecs * 1000, heartRate, target );
} }
@ -6904,7 +6904,7 @@ void idPlayer::AdjustBodyAngles( void ) {
upBlend = -frac; upBlend = -frac;
} }
animator.CurrentAnim( ANIMCHANNEL_TORSO )->SetSyncedAnimWeight( 0, downBlend ); animator.CurrentAnim( ANIMCHANNEL_TORSO )->SetSyncedAnimWeight( 0, downBlend );
animator.CurrentAnim( ANIMCHANNEL_TORSO )->SetSyncedAnimWeight( 1, forwardBlend ); animator.CurrentAnim( ANIMCHANNEL_TORSO )->SetSyncedAnimWeight( 1, forwardBlend );
animator.CurrentAnim( ANIMCHANNEL_TORSO )->SetSyncedAnimWeight( 2, upBlend ); animator.CurrentAnim( ANIMCHANNEL_TORSO )->SetSyncedAnimWeight( 2, upBlend );
@ -7114,7 +7114,7 @@ void idPlayer::Move( void ) {
if ( AI_JUMP ) { if ( AI_JUMP ) {
// bounce the view weapon // bounce the view weapon
loggedAccel_t *acc = &loggedAccel[currentLoggedAccel&(NUM_LOGGED_ACCELS-1)]; loggedAccel_t *acc = &loggedAccel[currentLoggedAccel&(NUM_LOGGED_ACCELS-1)];
currentLoggedAccel++; currentLoggedAccel++;
acc->time = gameLocal.time; acc->time = gameLocal.time;
acc->dir[2] = 200; acc->dir[2] = 200;
@ -7171,7 +7171,7 @@ void idPlayer::UpdateHud( void ) {
inventory.pickupItemNames.RemoveIndex( 0 ); inventory.pickupItemNames.RemoveIndex( 0 );
if (inventory.nextItemNum == 1 ) { if (inventory.nextItemNum == 1 ) {
inventory.onePickupTime = gameLocal.time; inventory.onePickupTime = gameLocal.time;
} else if ( inventory.nextItemNum > count ) { //_D3XP } else if ( inventory.nextItemNum > count ) { //_D3XP
inventory.nextItemNum = 1; inventory.nextItemNum = 1;
inventory.nextItemPickup = inventory.onePickupTime + 2000; inventory.nextItemPickup = inventory.onePickupTime + 2000;
} else { } else {
@ -7420,7 +7420,7 @@ void idPlayer::Think( void ) {
// service animations // service animations
if ( !spectating && !af.IsActive() && !gameLocal.inCinematic ) { if ( !spectating && !af.IsActive() && !gameLocal.inCinematic ) {
UpdateConditions(); UpdateConditions();
UpdateAnimState(); UpdateAnimState();
CheckBlink(); CheckBlink();
} }
@ -7517,7 +7517,7 @@ void idPlayer::Think( void ) {
if ( !g_stopTime.GetBool() ) { if ( !g_stopTime.GetBool() ) {
UpdateAnimation(); UpdateAnimation();
Present(); Present();
UpdateDamageEffects(); UpdateDamageEffects();
@ -7893,18 +7893,18 @@ void idPlayer::DamageFeedback( idEntity *victim, idEntity *inflictor, int &damag
damage *= PowerUpModifier( BERSERK ); damage *= PowerUpModifier( BERSERK );
if ( damage && ( victim != this ) && ( victim->IsType( idActor::Type ) || victim->IsType( idDamagable::Type ) ) ) { if ( damage && ( victim != this ) && ( victim->IsType( idActor::Type ) || victim->IsType( idDamagable::Type ) ) ) {
idPlayer *victimPlayer = NULL; idPlayer *victimPlayer = NULL;
/* No damage feedback sound for hitting friendlies in CTF */ /* No damage feedback sound for hitting friendlies in CTF */
if ( victim->IsType( idPlayer::Type ) ) { if ( victim->IsType( idPlayer::Type ) ) {
victimPlayer = static_cast<idPlayer*>(victim); victimPlayer = static_cast<idPlayer*>(victim);
} }
if ( gameLocal.mpGame.IsGametypeFlagBased() && victimPlayer && this->team == victimPlayer->team ) { if ( gameLocal.mpGame.IsGametypeFlagBased() && victimPlayer && this->team == victimPlayer->team ) {
/* Do nothing ... */ /* Do nothing ... */
} }
else { else {
SetLastHitTime( gameLocal.time ); SetLastHitTime( gameLocal.time );
} }
} }
} }
@ -9338,7 +9338,7 @@ void idPlayer::ClientPredictionThink( void ) {
// service animations // service animations
if ( !spectating && !af.IsActive() ) { if ( !spectating && !af.IsActive() ) {
UpdateConditions(); UpdateConditions();
UpdateAnimState(); UpdateAnimState();
CheckBlink(); CheckBlink();
} }
@ -9543,8 +9543,8 @@ void idPlayer::WriteToSnapshot( idBitMsgDelta &msg ) const {
msg.WriteBits( isLagged, 1 ); msg.WriteBits( isLagged, 1 );
msg.WriteBits( isChatting, 1 ); msg.WriteBits( isChatting, 1 );
#ifdef CTF #ifdef CTF
/* Needed for the scoreboard */ /* Needed for the scoreboard */
msg.WriteBits( carryingFlag, 1 ); msg.WriteBits( carryingFlag, 1 );
#endif #endif
#ifdef _D3XP #ifdef _D3XP
msg.WriteBits( enviroSuitLight.GetSpawnId(), 32 ); msg.WriteBits( enviroSuitLight.GetSpawnId(), 32 );
@ -10040,9 +10040,9 @@ void idPlayer::DrawPlayerIcons( void ) {
} }
#ifdef CTF #ifdef CTF
// Never draw icons for hidden players. // Never draw icons for hidden players.
if ( this->IsHidden() ) if ( this->IsHidden() )
return; return;
#endif #endif
playerIcon.Draw( this, headJoint ); playerIcon.Draw( this, headJoint );

View file

@ -837,4 +837,3 @@ ID_INLINE void idPlayer::SetSelfSmooth( bool b ) {
} }
#endif /* !__GAME_PLAYER_H__ */ #endif /* !__GAME_PLAYER_H__ */

View file

@ -195,4 +195,3 @@ void idPlayerIcon::UpdateIcon( idPlayer *player, const idVec3 &origin, const idM
renderEnt.axis = axis; renderEnt.axis = axis;
gameRenderWorld->UpdateEntityDef( iconHandle, &renderEnt ); gameRenderWorld->UpdateEntityDef( iconHandle, &renderEnt );
} }

View file

@ -64,4 +64,3 @@ public:
#endif /* !_PLAYERICON_H_ */ #endif /* !_PLAYERICON_H_ */

View file

@ -1690,7 +1690,7 @@ void FullscreenFXManager::Initialize( idPlayerView *pv ) {
renderSystem->CaptureRenderToImage( "_accum" ); renderSystem->CaptureRenderToImage( "_accum" );
renderSystem->UnCrop(); renderSystem->UnCrop();
renderSystem->CropRenderSize( 512, 256, true ); renderSystem->CropRenderSize( 512, 256, true );
renderSystem->CaptureRenderToImage( "_scratch" ); renderSystem->CaptureRenderToImage( "_scratch" );
renderSystem->UnCrop(); renderSystem->UnCrop();

View file

@ -911,10 +911,10 @@ void idProjectile::Explode( const trace_t &collision, idEntity *ignore ) {
light_shader = spawnArgs.GetString( "mtr_explode_light_shader" ); light_shader = spawnArgs.GetString( "mtr_explode_light_shader" );
#ifdef CTF #ifdef CTF
if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") ) if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") )
{ {
light_shader = "lights/midnight_grenade"; light_shader = "lights/midnight_grenade";
} }
#endif #endif
if ( *light_shader ) { if ( *light_shader ) {
@ -925,13 +925,13 @@ void idProjectile::Explode( const trace_t &collision, idEntity *ignore ) {
renderLight.lightRadius[2] = spawnArgs.GetFloat( "explode_light_radius" ); renderLight.lightRadius[2] = spawnArgs.GetFloat( "explode_light_radius" );
#ifdef CTF #ifdef CTF
// Midnight ctf // Midnight ctf
if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") ) if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") )
{ {
renderLight.lightRadius[0] = renderLight.lightRadius[0] =
renderLight.lightRadius[1] = renderLight.lightRadius[1] =
renderLight.lightRadius[2] = spawnArgs.GetFloat( "explode_light_radius" ) * 2; renderLight.lightRadius[2] = spawnArgs.GetFloat( "explode_light_radius" ) * 2;
} }
#endif #endif
@ -943,12 +943,12 @@ void idProjectile::Explode( const trace_t &collision, idEntity *ignore ) {
renderLight.shaderParms[SHADERPARM_TIMEOFFSET] = -MS2SEC( gameLocal.time ); renderLight.shaderParms[SHADERPARM_TIMEOFFSET] = -MS2SEC( gameLocal.time );
#ifdef CTF #ifdef CTF
// Midnight ctf // Midnight ctf
if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") ) if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") )
{ {
light_fadetime = 3.0f; light_fadetime = 3.0f;
} }
else else
#endif #endif
light_fadetime = spawnArgs.GetFloat( "explode_light_fadetime", "0.5" ); light_fadetime = spawnArgs.GetFloat( "explode_light_fadetime", "0.5" );
lightStartTime = gameLocal.time; lightStartTime = gameLocal.time;

View file

@ -446,7 +446,7 @@ void idSecurityCamera::StartSweep( void ) {
sweepStart = gameLocal.time; sweepStart = gameLocal.time;
speed = SEC2MS( SweepSpeed() ); speed = SEC2MS( SweepSpeed() );
sweepEnd = sweepStart + speed; sweepEnd = sweepStart + speed;
PostEventMS( &EV_SecurityCam_Pause, speed ); PostEventMS( &EV_SecurityCam_Pause, speed );
StartSound( "snd_moving", SND_CHANNEL_BODY, 0, false, NULL ); StartSound( "snd_moving", SND_CHANNEL_BODY, 0, false, NULL );
} }
@ -463,7 +463,7 @@ void idSecurityCamera::Event_ContinueSweep( void ) {
sweepStart = f; sweepStart = f;
speed = MS2SEC( SweepSpeed() ); speed = MS2SEC( SweepSpeed() );
sweepEnd = sweepStart + speed; sweepEnd = sweepStart + speed;
PostEventMS( &EV_SecurityCam_Pause, speed * (1.0 - pct)); PostEventMS( &EV_SecurityCam_Pause, speed * (1.0 - pct));
StartSound( "snd_moving", SND_CHANNEL_BODY, 0, false, NULL ); StartSound( "snd_moving", SND_CHANNEL_BODY, 0, false, NULL );
SetAlertMode(SCANNING); SetAlertMode(SCANNING);
sweeping = true; sweeping = true;
@ -510,7 +510,7 @@ void idSecurityCamera::Event_Pause( void ) {
sweeping = false; sweeping = false;
StopSound( SND_CHANNEL_ANY, false ); StopSound( SND_CHANNEL_ANY, false );
StartSound( "snd_stop", SND_CHANNEL_BODY, 0, false, NULL ); StartSound( "snd_stop", SND_CHANNEL_BODY, 0, false, NULL );
PostEventSec( &EV_SecurityCam_ReverseSweep, sweepWait ); PostEventSec( &EV_SecurityCam_ReverseSweep, sweepWait );
} }
/* /*

View file

@ -216,7 +216,7 @@ bool idSmokeParticles::EmitSmoke( const idDeclParticle *smoke, const int systemS
} }
// see how many particles we should emit this tic // see how many particles we should emit this tic
// FIXME: smoke.privateStartTime += stage->timeOffset; // FIXME: smoke.privateStartTime += stage->timeOffset;
int finalParticleTime = stage->cycleMsec * stage->spawnBunching; int finalParticleTime = stage->cycleMsec * stage->spawnBunching;
int deltaMsec = gameLocal.time - systemStartTime; int deltaMsec = gameLocal.time - systemStartTime;

View file

@ -302,4 +302,3 @@ idSound::ShowEditingDialog
void idSound::ShowEditingDialog( void ) { void idSound::ShowEditingDialog( void ) {
common->InitTool( EDITOR_SOUND, &spawnArgs ); common->InitTool( EDITOR_SOUND, &spawnArgs );
} }

View file

@ -1798,4 +1798,3 @@ void idTarget_FadeSoundClass::Event_RestoreVolume() {
// restore volume // restore volume
gameSoundWorld->FadeSoundClasses( 0, fadeDB, fadeTime ); gameSoundWorld->FadeSoundClasses( 0, fadeDB, fadeTime );
} }

View file

@ -2703,10 +2703,10 @@ void idWeapon::ReadFromSnapshot( const idBitMsgDelta &msg ) {
idealState = "Fire"; idealState = "Fire";
} }
// immediately switch back to idle // immediately switch back to idle
if ( WEAPON_NETFIRING && !isFiring ) { if ( WEAPON_NETFIRING && !isFiring ) {
idealState = "Idle"; idealState = "Idle";
} }
WEAPON_NETFIRING = isFiring; WEAPON_NETFIRING = isFiring;
} }
@ -3769,9 +3769,9 @@ void idWeapon::Event_Melee( void ) {
#ifdef CTF /* Code is formed oddly for easy merge */ #ifdef CTF /* Code is formed oddly for easy merge */
if ( gameLocal.mpGame.IsGametypeFlagBased() ) if ( gameLocal.mpGame.IsGametypeFlagBased() )
{ /* Do nothing ... */ } { /* Do nothing ... */ }
else else
#endif #endif
owner->StealWeapon( static_cast< idPlayer * >( ent ) ); owner->StealWeapon( static_cast< idPlayer * >( ent ) );
} }

View file

@ -290,7 +290,7 @@ private:
bool isFiring; bool isFiring;
// zoom // zoom
int zoomFov; // variable zoom fov per weapon int zoomFov; // variable zoom fov per weapon
// joints from models // joints from models
jointHandle_t barrelJointView; jointHandle_t barrelJointView;

View file

@ -2163,7 +2163,7 @@ bool idAI::StepDirection( float dir ) {
if ( z <= ceilingPos.z ) { if ( z <= ceilingPos.z ) {
start.x = org.x; start.x = org.x;
start.y = org.y; start.y = org.y;
start.z = z; start.z = z;
} else { } else {
start = ceilingPos; start = ceilingPos;
} }
@ -2250,7 +2250,7 @@ bool idAI::NewWanderDir( const idVec3 &dest ) {
if ( gameLocal.random.RandomInt() & 1 ) { if ( gameLocal.random.RandomInt() & 1 ) {
for( tdir = 0; tdir <= 315; tdir += 45 ) { for( tdir = 0; tdir <= 315; tdir += 45 ) {
if ( tdir != turnaround && StepDirection( tdir ) ) { if ( tdir != turnaround && StepDirection( tdir ) ) {
return true; return true;
} }
} }
} else { } else {
@ -2961,9 +2961,9 @@ idAI::AdjustFlyingAngles
*/ */
void idAI::AdjustFlyingAngles( void ) { void idAI::AdjustFlyingAngles( void ) {
idVec3 vel; idVec3 vel;
float speed; float speed;
float roll; float roll;
float pitch; float pitch;
vel = physicsObj.GetLinearVelocity(); vel = physicsObj.GetLinearVelocity();
@ -3628,7 +3628,7 @@ void idAI::Activate( idEntity *activator ) {
// update the script in cinematics so that entities don't start anims or show themselves a frame late. // update the script in cinematics so that entities don't start anims or show themselves a frame late.
if ( cinematic ) { if ( cinematic ) {
UpdateAIScript(); UpdateAIScript();
// make sure our model gets updated // make sure our model gets updated
animator.ForceUpdate(); animator.ForceUpdate();
@ -4964,10 +4964,10 @@ bool idAI::UpdateAnimationControllers( void ) {
idVec3 focusPos; idVec3 focusPos;
idQuat jawQuat; idQuat jawQuat;
idVec3 left; idVec3 left;
idVec3 dir; idVec3 dir;
idVec3 orientationJointPos; idVec3 orientationJointPos;
idVec3 localDir; idVec3 localDir;
idAngles newLookAng; idAngles newLookAng;
idAngles diff; idAngles diff;
idMat3 mat; idMat3 mat;
idMat3 axis; idMat3 axis;
@ -5022,7 +5022,7 @@ bool idAI::UpdateAnimationControllers( void ) {
idEntity *focusEnt = focusEntity.GetEntity(); idEntity *focusEnt = focusEntity.GetEntity();
if ( !allowJointMod || !allowEyeFocus || ( gameLocal.time >= focusTime ) ) { if ( !allowJointMod || !allowEyeFocus || ( gameLocal.time >= focusTime ) ) {
focusPos = GetEyePosition() + orientationJointAxis[ 0 ] * 512.0f; focusPos = GetEyePosition() + orientationJointAxis[ 0 ] * 512.0f;
} else if ( focusEnt == NULL ) { } else if ( focusEnt == NULL ) {
// keep looking at last position until focusTime is up // keep looking at last position until focusTime is up
focusPos = currentFocusPos; focusPos = currentFocusPos;

View file

@ -689,8 +689,8 @@ protected:
void Event_AllowHiddenMovement( int enable ); void Event_AllowHiddenMovement( int enable );
void Event_TriggerParticles( const char *jointName ); void Event_TriggerParticles( const char *jointName );
void Event_FindActorsInBounds( const idVec3 &mins, const idVec3 &maxs ); void Event_FindActorsInBounds( const idVec3 &mins, const idVec3 &maxs );
void Event_CanReachPosition( const idVec3 &pos ); void Event_CanReachPosition( const idVec3 &pos );
void Event_CanReachEntity( idEntity *ent ); void Event_CanReachEntity( idEntity *ent );
void Event_CanReachEnemy( void ); void Event_CanReachEnemy( void );
void Event_GetReachableEntityPosition( idEntity *ent ); void Event_GetReachableEntityPosition( idEntity *ent );
#ifdef _D3XP #ifdef _D3XP

View file

@ -111,7 +111,7 @@ void idAI_Vagary::Event_ChooseObjectToThrow( const idVec3 &mins, const idVec3 &m
if ( PredictTrajectory( entPhys->GetOrigin() + offsetVec, enemyEyePos, speed, entPhys->GetGravity(), if ( PredictTrajectory( entPhys->GetOrigin() + offsetVec, enemyEyePos, speed, entPhys->GetGravity(),
entPhys->GetClipModel(), entPhys->GetClipMask(), MAX_WORLD_SIZE, NULL, enemyEnt, ai_debugTrajectory.GetBool() ? 4000 : 0, vel ) ) { entPhys->GetClipModel(), entPhys->GetClipMask(), MAX_WORLD_SIZE, NULL, enemyEnt, ai_debugTrajectory.GetBool() ? 4000 : 0, vel ) ) {
idThread::ReturnEntity( ent ); idThread::ReturnEntity( ent );
return; return;
} }
} }

View file

@ -308,7 +308,7 @@ CLASS_DECLARATION( idActor, idAI )
EVENT( AI_GetReachableEntityPosition, idAI::Event_GetReachableEntityPosition ) EVENT( AI_GetReachableEntityPosition, idAI::Event_GetReachableEntityPosition )
#ifdef _D3XP #ifdef _D3XP
EVENT( AI_MoveToPositionDirect, idAI::Event_MoveToPositionDirect ) EVENT( AI_MoveToPositionDirect, idAI::Event_MoveToPositionDirect )
EVENT( AI_AvoidObstacles, idAI::Event_AvoidObstacles ) EVENT( AI_AvoidObstacles, idAI::Event_AvoidObstacles )
EVENT( AI_TriggerFX, idAI::Event_TriggerFX ) EVENT( AI_TriggerFX, idAI::Event_TriggerFX )
EVENT( AI_StartEmitter, idAI::Event_StartEmitter ) EVENT( AI_StartEmitter, idAI::Event_StartEmitter )
EVENT( AI_GetEmitter, idAI::Event_GetEmitter ) EVENT( AI_GetEmitter, idAI::Event_GetEmitter )
@ -1853,7 +1853,7 @@ void idAI::Event_TestAnimMoveTowardEnemy( const char *animname ) {
} }
delta = enemyEnt->GetPhysics()->GetOrigin() - physicsObj.GetOrigin(); delta = enemyEnt->GetPhysics()->GetOrigin() - physicsObj.GetOrigin();
yaw = delta.ToYaw(); yaw = delta.ToYaw();
moveVec = animator.TotalMovementDelta( anim ) * idAngles( 0.0f, yaw, 0.0f ).ToMat3() * physicsObj.GetGravityAxis(); moveVec = animator.TotalMovementDelta( anim ) * idAngles( 0.0f, yaw, 0.0f ).ToMat3() * physicsObj.GetGravityAxis();
idAI::PredictPath( this, aas, physicsObj.GetOrigin(), moveVec, 1000, 1000, ( move.moveType == MOVETYPE_FLY ) ? SE_BLOCKED : ( SE_ENTER_OBSTACLE | SE_BLOCKED | SE_ENTER_LEDGE_AREA ), path ); idAI::PredictPath( this, aas, physicsObj.GetOrigin(), moveVec, 1000, 1000, ( move.moveType == MOVETYPE_FLY ) ? SE_BLOCKED : ( SE_ENTER_OBSTACLE | SE_BLOCKED | SE_ENTER_LEDGE_AREA ), path );
@ -2903,4 +2903,3 @@ void idAI::Event_StopEmitter( const char* name ) {
} }
#endif #endif

View file

@ -52,10 +52,10 @@ If you have questions concerning this license or the applicable additional terms
const float MAX_OBSTACLE_RADIUS = 256.0f; const float MAX_OBSTACLE_RADIUS = 256.0f;
const float PUSH_OUTSIDE_OBSTACLES = 0.5f; const float PUSH_OUTSIDE_OBSTACLES = 0.5f;
const float CLIP_BOUNDS_EPSILON = 10.0f; const float CLIP_BOUNDS_EPSILON = 10.0f;
const int MAX_AAS_WALL_EDGES = 256; const int MAX_AAS_WALL_EDGES = 256;
const int MAX_OBSTACLES = 256; const int MAX_OBSTACLES = 256;
const int MAX_PATH_NODES = 256; const int MAX_PATH_NODES = 256;
const int MAX_OBSTACLE_PATH = 64; const int MAX_OBSTACLE_PATH = 64;
typedef struct obstacle_s { typedef struct obstacle_s {
idVec2 bounds[2]; idVec2 bounds[2];
@ -425,7 +425,7 @@ int GetObstacles( const idPhysics *physics, const idAAS *aas, const idEntity *ig
lastEdgeNormal.Zero(); lastEdgeNormal.Zero();
nextVerts[0] = nextVerts[1] = 0; nextVerts[0] = nextVerts[1] = 0;
for ( i = 0; i < numWallEdges && numObstacles < MAX_OBSTACLES; i++ ) { for ( i = 0; i < numWallEdges && numObstacles < MAX_OBSTACLES; i++ ) {
aas->GetEdge( wallEdges[i], start, end ); aas->GetEdge( wallEdges[i], start, end );
aas->GetEdgeVertexNumbers( wallEdges[i], verts ); aas->GetEdgeVertexNumbers( wallEdges[i], verts );
edgeDir = end.ToVec2() - start.ToVec2(); edgeDir = end.ToVec2() - start.ToVec2();
edgeDir.Normalize(); edgeDir.Normalize();

View file

@ -1192,7 +1192,7 @@ void idAnimBlend::Reset( const idDeclModelDef *_modelDef ) {
blendStartValue = 0.0f; blendStartValue = 0.0f;
blendEndValue = 0.0f; blendEndValue = 0.0f;
blendStartTime = 0; blendStartTime = 0;
blendDuration = 0; blendDuration = 0;
} }
@ -1292,7 +1292,7 @@ idAnimBlend::SetWeight
void idAnimBlend::SetWeight( float newweight, int currentTime, int blendTime ) { void idAnimBlend::SetWeight( float newweight, int currentTime, int blendTime ) {
blendStartValue = GetWeight( currentTime ); blendStartValue = GetWeight( currentTime );
blendEndValue = newweight; blendEndValue = newweight;
blendStartTime = currentTime - 1; blendStartTime = currentTime - 1;
blendDuration = blendTime; blendDuration = blendTime;
if ( !newweight ) { if ( !newweight ) {
@ -1918,7 +1918,7 @@ bool idAnimBlend::BlendAnim( int currentTime, int channel, int numJoints, idJoin
blendFrame[j].q = jointFrame[j].q; blendFrame[j].q = jointFrame[j].q;
} }
} }
} else { } else {
blendWeight += weight; blendWeight += weight;
lerp = weight / blendWeight; lerp = weight / blendWeight;
SIMDProcessor->BlendJoints( blendFrame, jointFrame, lerp, modelDef->GetChannelJoints( channel ), modelDef->NumJointsOnChannel( channel ) ); SIMDProcessor->BlendJoints( blendFrame, jointFrame, lerp, modelDef->GetChannelJoints( channel ), modelDef->NumJointsOnChannel( channel ) );
@ -3634,7 +3634,7 @@ void idAnimator::SyncAnimChannels( int channelNum, int fromChannelNum, int curre
toBlend.blendStartValue = 0.0f; toBlend.blendStartValue = 0.0f;
toBlend.blendEndValue = 0.0f; toBlend.blendEndValue = 0.0f;
} }
toBlend.SetWeight( weight, currentTime - 1, blendTime ); toBlend.SetWeight( weight, currentTime - 1, blendTime );
// disable framecommands on the current channel so that commands aren't called twice // disable framecommands on the current channel so that commands aren't called twice
toBlend.AllowFrameCommands( false ); toBlend.AllowFrameCommands( false );
@ -4290,7 +4290,7 @@ bool idAnimator::CreateFrame( int currentTime, bool force ) {
if ( entity && ( ( g_debugAnim.GetInteger() == entity->entityNumber ) || ( g_debugAnim.GetInteger() == -2 ) ) ) { if ( entity && ( ( g_debugAnim.GetInteger() == entity->entityNumber ) || ( g_debugAnim.GetInteger() == -2 ) ) ) {
debugInfo = true; debugInfo = true;
gameLocal.Printf( "---------------\n%d: entity '%s':\n", gameLocal.time, entity->GetName() ); gameLocal.Printf( "---------------\n%d: entity '%s':\n", gameLocal.time, entity->GetName() );
gameLocal.Printf( "model '%s':\n", modelDef->GetModelName() ); gameLocal.Printf( "model '%s':\n", modelDef->GetModelName() );
} else { } else {
debugInfo = false; debugInfo = false;
} }
@ -5039,7 +5039,7 @@ idRenderModel *idGameEdit::ANIM_CreateMeshForAnim( idRenderModel *model, const c
const idDict *args; const idDict *args;
const char *temp; const char *temp;
idRenderModel *newmodel; idRenderModel *newmodel;
const idMD5Anim *md5anim; const idMD5Anim *md5anim;
idStr filename; idStr filename;
idStr extension; idStr extension;
const idAnim *anim; const idAnim *anim;

View file

@ -415,7 +415,7 @@ int idModelExport::ParseExportSection( idParser &parser ) {
return 0; return 0;
} }
parser.ReadToken( &token ); parser.ReadToken( &token );
if ( token.Icmp( g_exportMask.GetString() ) ) { if ( token.Icmp( g_exportMask.GetString() ) ) {
parser.SkipBracedSection(); parser.SkipBracedSection();
return 0; return 0;

View file

@ -414,7 +414,7 @@ void idTestModel::NextAnim( const idCmdArgs &args ) {
headAnim = 0; headAnim = 0;
if ( headAnimator ) { if ( headAnimator ) {
headAnimator->ClearAllAnims( gameLocal.time, 0 ); headAnimator->ClearAllAnims( gameLocal.time, 0 );
headAnim = headAnimator->GetAnim( animname ); headAnim = headAnimator->GetAnim( animname );
if ( !headAnim ) { if ( !headAnim ) {
headAnim = headAnimator->GetAnim( "idle" ); headAnim = headAnimator->GetAnim( "idle" );
} }
@ -456,7 +456,7 @@ void idTestModel::PrevAnim( const idCmdArgs &args ) {
headAnim = 0; headAnim = 0;
if ( headAnimator ) { if ( headAnimator ) {
headAnimator->ClearAllAnims( gameLocal.time, 0 ); headAnimator->ClearAllAnims( gameLocal.time, 0 );
headAnim = headAnimator->GetAnim( animname ); headAnim = headAnimator->GetAnim( animname );
if ( !headAnim ) { if ( !headAnim ) {
headAnim = headAnimator->GetAnim( "idle" ); headAnim = headAnimator->GetAnim( "idle" );
} }
@ -565,7 +565,7 @@ void idTestModel::TestAnim( const idCmdArgs &args ) {
headAnim = 0; headAnim = 0;
if ( headAnimator ) { if ( headAnimator ) {
headAnimator->ClearAllAnims( gameLocal.time, 0 ); headAnimator->ClearAllAnims( gameLocal.time, 0 );
headAnim = headAnimator->GetAnim( animname ); headAnim = headAnimator->GetAnim( animname );
if ( !headAnim ) { if ( !headAnim ) {
headAnim = headAnimator->GetAnim( "idle" ); headAnim = headAnimator->GetAnim( "idle" );
if ( !headAnim ) { if ( !headAnim ) {

View file

@ -58,19 +58,19 @@ public:
void TestAnim( const idCmdArgs &args ); void TestAnim( const idCmdArgs &args );
void BlendAnim( const idCmdArgs &args ); void BlendAnim( const idCmdArgs &args );
static void KeepTestModel_f( const idCmdArgs &args ); static void KeepTestModel_f( const idCmdArgs &args );
static void TestModel_f( const idCmdArgs &args ); static void TestModel_f( const idCmdArgs &args );
static void ArgCompletion_TestModel( const idCmdArgs &args, void(*callback)( const char *s ) ); static void ArgCompletion_TestModel( const idCmdArgs &args, void(*callback)( const char *s ) );
static void TestSkin_f( const idCmdArgs &args ); static void TestSkin_f( const idCmdArgs &args );
static void TestShaderParm_f( const idCmdArgs &args ); static void TestShaderParm_f( const idCmdArgs &args );
static void TestParticleStopTime_f( const idCmdArgs &args ); static void TestParticleStopTime_f( const idCmdArgs &args );
static void TestAnim_f( const idCmdArgs &args ); static void TestAnim_f( const idCmdArgs &args );
static void ArgCompletion_TestAnim( const idCmdArgs &args, void(*callback)( const char *s ) ); static void ArgCompletion_TestAnim( const idCmdArgs &args, void(*callback)( const char *s ) );
static void TestBlend_f( const idCmdArgs &args ); static void TestBlend_f( const idCmdArgs &args );
static void TestModelNextAnim_f( const idCmdArgs &args ); static void TestModelNextAnim_f( const idCmdArgs &args );
static void TestModelPrevAnim_f( const idCmdArgs &args ); static void TestModelPrevAnim_f( const idCmdArgs &args );
static void TestModelNextFrame_f( const idCmdArgs &args ); static void TestModelNextFrame_f( const idCmdArgs &args );
static void TestModelPrevFrame_f( const idCmdArgs &args ); static void TestModelPrevFrame_f( const idCmdArgs &args );
private: private:
idEntityPtr<idEntity> head; idEntityPtr<idEntity> head;

View file

@ -2623,4 +2623,3 @@ If you have questions concerning this license or the applicable additional terms
typedef void ( idClass::*eventCallback_ffffffff_t )( const float, const float, const float, const float, const float, const float, const float, const float ); typedef void ( idClass::*eventCallback_ffffffff_t )( const float, const float, const float, const float, const float, const float, const float, const float );
( this->*( eventCallback_ffffffff_t )callback )( *( float * )&data[ 0 ], *( float * )&data[ 1 ], *( float * )&data[ 2 ], *( float * )&data[ 3 ], *( float * )&data[ 4 ], *( float * )&data[ 5 ], *( float * )&data[ 6 ], *( float * )&data[ 7 ] ); ( this->*( eventCallback_ffffffff_t )callback )( *( float * )&data[ 0 ], *( float * )&data[ 1 ], *( float * )&data[ 2 ], *( float * )&data[ 3 ], *( float * )&data[ 4 ], *( float * )&data[ 5 ], *( float * )&data[ 6 ], *( float * )&data[ 7 ] );
break; break;

View file

@ -394,7 +394,7 @@ void idClass::Init( void ) {
// is a subclass of another // is a subclass of another
num = 0; num = 0;
for( c = classHierarchy.GetNext(); c != NULL; c = c->node.GetNext(), num++ ) { for( c = classHierarchy.GetNext(); c != NULL; c = c->node.GetNext(), num++ ) {
c->typeNum = num; c->typeNum = num;
c->lastChild += num; c->lastChild += num;
} }
@ -504,7 +504,7 @@ void idClass::operator delete( void *ptr ) {
p = ( ( int * )ptr ) - 1; p = ( ( int * )ptr ) - 1;
memused -= *p; memused -= *p;
numobjects--; numobjects--;
Mem_Free( p ); Mem_Free( p );
} }
} }
@ -515,7 +515,7 @@ void idClass::operator delete( void *ptr, int, int, char *, int ) {
p = ( ( int * )ptr ) - 1; p = ( ( int * )ptr ) - 1;
memused -= *p; memused -= *p;
numobjects--; numobjects--;
Mem_Free( p ); Mem_Free( p );
} }
} }

View file

@ -233,7 +233,7 @@ void idSaveGame::WriteString( const char *string ) {
len = strlen( string ); len = strlen( string );
WriteInt( len ); WriteInt( len );
file->Write( string, len ); file->Write( string, len );
} }
/* /*

View file

@ -623,19 +623,19 @@ static void Cmd_Say( bool team, const idCmdArgs &args ) {
} }
#ifdef CTF #ifdef CTF
// Append the player's location to team chat messages in CTF // Append the player's location to team chat messages in CTF
if ( gameLocal.mpGame.IsGametypeFlagBased() && team && player ) { if ( gameLocal.mpGame.IsGametypeFlagBased() && team && player ) {
idLocationEntity *locationEntity = gameLocal.LocationForPoint( player->GetEyePosition() ); idLocationEntity *locationEntity = gameLocal.LocationForPoint( player->GetEyePosition() );
if ( locationEntity ) { if ( locationEntity ) {
idStr temp = "["; idStr temp = "[";
temp += locationEntity->GetLocation(); temp += locationEntity->GetLocation();
temp += "] "; temp += "] ";
temp += text; temp += text;
text = temp; text = temp;
} }
} }
#endif #endif

View file

@ -112,7 +112,7 @@ idCVar ui_chat( "ui_chat", "0", CVAR_GAME | CVAR_USERINFO | CVAR_BOOL
// change anytime vars // change anytime vars
idCVar developer( "developer", "0", CVAR_GAME | CVAR_BOOL, "" ); idCVar developer( "developer", "0", CVAR_GAME | CVAR_BOOL, "" );
idCVar r_aspectRatio( "r_aspectRatio", "0", CVAR_RENDERER | CVAR_INTEGER | CVAR_ARCHIVE, "aspect ratio of view:\n0 = 4:3\n1 = 16:9\n2 = 16:10", 0, 2 ); idCVar r_aspectRatio( "r_aspectRatio", "0", CVAR_RENDERER | CVAR_INTEGER | CVAR_ARCHIVE, "aspect ratio of view:\n0 = 4:3\n1 = 16:9\n2 = 16:10", 0, 2 );
idCVar g_cinematic( "g_cinematic", "1", CVAR_GAME | CVAR_BOOL, "skips updating entities that aren't marked 'cinematic' '1' during cinematics" ); idCVar g_cinematic( "g_cinematic", "1", CVAR_GAME | CVAR_BOOL, "skips updating entities that aren't marked 'cinematic' '1' during cinematics" );
idCVar g_cinematicMaxSkipTime( "g_cinematicMaxSkipTime", "600", CVAR_GAME | CVAR_FLOAT, "# of seconds to allow game to run when skipping cinematic. prevents lock-up when cinematic doesn't end.", 0, 3600 ); idCVar g_cinematicMaxSkipTime( "g_cinematicMaxSkipTime", "600", CVAR_GAME | CVAR_FLOAT, "# of seconds to allow game to run when skipping cinematic. prevents lock-up when cinematic doesn't end.", 0, 3600 );

View file

@ -158,7 +158,7 @@ public: // common physics interface
virtual const contactInfo_t &GetContact( int num ) const = 0; virtual const contactInfo_t &GetContact( int num ) const = 0;
virtual void ClearContacts( void ) = 0; virtual void ClearContacts( void ) = 0;
virtual void AddContactEntity( idEntity *e ) = 0; virtual void AddContactEntity( idEntity *e ) = 0;
virtual void RemoveContactEntity( idEntity *e ) = 0; virtual void RemoveContactEntity( idEntity *e ) = 0;
// ground contacts // ground contacts
virtual bool HasGroundContacts( void ) const = 0; virtual bool HasGroundContacts( void ) const = 0;
virtual bool IsGroundEntity( int entityNum ) const = 0; virtual bool IsGroundEntity( int entityNum ) const = 0;

View file

@ -1301,12 +1301,12 @@ void idAFConstraint_UniversalJoint::DebugDraw( void ) {
d1 = axis1 * body1->GetWorldAxis(); d1 = axis1 * body1->GetWorldAxis();
if ( master ) { if ( master ) {
a2 = master->GetWorldOrigin() + anchor2 * master->GetWorldAxis(); a2 = master->GetWorldOrigin() + anchor2 * master->GetWorldAxis();
s2 = shaft2 * master->GetWorldAxis(); s2 = shaft2 * master->GetWorldAxis();
d2 = axis2 * master->GetWorldAxis(); d2 = axis2 * master->GetWorldAxis();
} }
else { else {
a2 = anchor2; a2 = anchor2;
s2 = shaft2; s2 = shaft2;
d2 = axis2; d2 = axis2;
} }

View file

@ -501,7 +501,7 @@ bool idPhysics_Monster::Evaluate( int timeStepMSec, int endTimeMSec ) {
delta = current.velocity * timeStep; delta = current.velocity * timeStep;
if ( delta != vec3_origin ) { if ( delta != vec3_origin ) {
moveResult = idPhysics_Monster::SlideMove( current.origin, current.velocity, delta ); moveResult = idPhysics_Monster::SlideMove( current.origin, current.velocity, delta );
delta.Zero(); delta.Zero();
} }
if ( !fly ) { if ( !fly ) {

View file

@ -2042,4 +2042,3 @@ void idPhysics_Player::ReadFromSnapshot( const idBitMsgDelta &msg ) {
clipModel->Link( gameLocal.clip, self, 0, current.origin, clipModel->GetAxis() ); clipModel->Link( gameLocal.clip, self, 0, current.origin, clipModel->GetAxis() );
} }
} }

View file

@ -762,7 +762,7 @@ void idPhysics_StaticMulti::DisableClip( void ) {
int i; int i;
for ( i = 0; i < clipModels.Num(); i++ ) { for ( i = 0; i < clipModels.Num(); i++ ) {
if ( clipModels[i] ) { if ( clipModels[i] ) {
clipModels[i]->Disable(); clipModels[i]->Disable();
} }
} }
@ -792,7 +792,7 @@ void idPhysics_StaticMulti::UnlinkClip( void ) {
int i; int i;
for ( i = 0; i < clipModels.Num(); i++ ) { for ( i = 0; i < clipModels.Num(); i++ ) {
if ( clipModels[i] ) { if ( clipModels[i] ) {
clipModels[i]->Unlink(); clipModels[i]->Unlink();
} }
} }
@ -934,7 +934,7 @@ void idPhysics_StaticMulti::SetMaster( idEntity *master, const bool orientated )
// transform from world space to master space // transform from world space to master space
self->GetMasterPosition( masterOrigin, masterAxis ); self->GetMasterPosition( masterOrigin, masterAxis );
for ( i = 0; i < clipModels.Num(); i++ ) { for ( i = 0; i < clipModels.Num(); i++ ) {
current[i].localOrigin = ( current[i].origin - masterOrigin ) * masterAxis.Transpose(); current[i].localOrigin = ( current[i].origin - masterOrigin ) * masterAxis.Transpose();
if ( orientated ) { if ( orientated ) {
current[i].localAxis = current[i].axis * masterAxis.Transpose(); current[i].localAxis = current[i].axis * masterAxis.Transpose();
} else { } else {

View file

@ -1394,7 +1394,7 @@ float idPush::ClipPush( trace_t &results, idEntity *pusher, const int flags,
idRotation rotation; idRotation rotation;
float mass; float mass;
mass = 0.0f; mass = 0.0f;
results.fraction = 1.0f; results.fraction = 1.0f;
results.endpos = newOrigin; results.endpos = newOrigin;

View file

@ -85,7 +85,7 @@ opcode_t idCompiler::opcodes[] = {
{ "!=", "NE_F", 5, false, &def_float, &def_float, &def_float }, { "!=", "NE_F", 5, false, &def_float, &def_float, &def_float },
{ "!=", "NE_V", 5, false, &def_vector, &def_vector, &def_float }, { "!=", "NE_V", 5, false, &def_vector, &def_vector, &def_float },
{ "!=", "NE_S", 5, false, &def_string, &def_string, &def_float }, { "!=", "NE_S", 5, false, &def_string, &def_string, &def_float },
{ "!=", "NE_E", 5, false, &def_entity, &def_entity, &def_float }, { "!=", "NE_E", 5, false, &def_entity, &def_entity, &def_float },
{ "!=", "NE_EO", 5, false, &def_entity, &def_object, &def_float }, { "!=", "NE_EO", 5, false, &def_entity, &def_object, &def_float },
{ "!=", "NE_OE", 5, false, &def_object, &def_entity, &def_float }, { "!=", "NE_OE", 5, false, &def_object, &def_entity, &def_float },
{ "!=", "NE_OO", 5, false, &def_object, &def_object, &def_float }, { "!=", "NE_OO", 5, false, &def_object, &def_object, &def_float },
@ -534,7 +534,7 @@ idVarDef *idCompiler::OptimizeOpcode( const opcode_t *op, idVarDef *var_a, idVar
case OP_UDIV_F: c._float = Divide( *var_b->value.floatPtr, *var_a->value.floatPtr ); type = &type_float; break; case OP_UDIV_F: c._float = Divide( *var_b->value.floatPtr, *var_a->value.floatPtr ); type = &type_float; break;
case OP_UMOD_F: c._float = ( int ) *var_b->value.floatPtr % ( int )*var_a->value.floatPtr; type = &type_float; break; case OP_UMOD_F: c._float = ( int ) *var_b->value.floatPtr % ( int )*var_a->value.floatPtr; type = &type_float; break;
case OP_UOR_F: c._float = ( int )*var_b->value.floatPtr | ( int )*var_a->value.floatPtr; type = &type_float; break; case OP_UOR_F: c._float = ( int )*var_b->value.floatPtr | ( int )*var_a->value.floatPtr; type = &type_float; break;
case OP_UAND_F: c._float = ( int )*var_b->value.floatPtr & ( int )*var_a->value.floatPtr; type = &type_float; break; case OP_UAND_F: c._float = ( int )*var_b->value.floatPtr & ( int )*var_a->value.floatPtr; type = &type_float; break;
case OP_UINC_F: c._float = *var_a->value.floatPtr + 1; type = &type_float; break; case OP_UINC_F: c._float = *var_a->value.floatPtr + 1; type = &type_float; break;
case OP_UDEC_F: c._float = *var_a->value.floatPtr - 1; type = &type_float; break; case OP_UDEC_F: c._float = *var_a->value.floatPtr - 1; type = &type_float; break;
case OP_COMP_F: c._float = ( float )~( int )*var_a->value.floatPtr; type = &type_float; break; case OP_COMP_F: c._float = ( float )~( int )*var_a->value.floatPtr; type = &type_float; break;
@ -586,7 +586,7 @@ idVarDef *idCompiler::EmitOpcode( const opcode_t *op, idVarDef *var_a, idVarDef
statement = gameLocal.program.AllocStatement(); statement = gameLocal.program.AllocStatement();
statement->linenumber = currentLineNumber; statement->linenumber = currentLineNumber;
statement->file = currentFileNumber; statement->file = currentFileNumber;
if ( ( op->type_c == &def_void ) || op->rightAssociative ) { if ( ( op->type_c == &def_void ) || op->rightAssociative ) {
// ifs, gotos, and assignments don't need vars allocated // ifs, gotos, and assignments don't need vars allocated
@ -935,8 +935,8 @@ idVarDef *idCompiler::EmitFunctionParms( int op, idVarDef *func, int startarg, i
const idTypeDef *funcArg; const idTypeDef *funcArg;
idVarDef *returnDef; idVarDef *returnDef;
idTypeDef *returnType; idTypeDef *returnType;
int arg; int arg;
int size; int size;
int resultOp; int resultOp;
type = func->TypeDef(); type = func->TypeDef();
@ -1199,7 +1199,7 @@ idVarDef *idCompiler::LookupDef( const char *name, const idVarDef *baseobj ) {
type_c = field->TypeDef()->ReturnType()->Type(); type_c = field->TypeDef()->ReturnType()->Type();
} else { } else {
type_c = field->TypeDef()->FieldType()->Type(); // field access gets type from field type_c = field->TypeDef()->FieldType()->Type(); // field access gets type from field
if ( CheckToken( "++" ) ) { if ( CheckToken( "++" ) ) {
if ( type_c != ev_float ) { if ( type_c != ev_float ) {
Error( "Invalid type for ++" ); Error( "Invalid type for ++" );
} }
@ -1303,7 +1303,7 @@ idCompiler::GetTerm
*/ */
idVarDef *idCompiler::GetTerm( void ) { idVarDef *idCompiler::GetTerm( void ) {
idVarDef *e; idVarDef *e;
int op; int op;
if ( !immediateType && CheckToken( "~" ) ) { if ( !immediateType && CheckToken( "~" ) ) {
e = GetExpression( TILDE_PRIORITY ); e = GetExpression( TILDE_PRIORITY );
@ -1468,9 +1468,9 @@ idVarDef *idCompiler::GetExpression( int priority ) {
idVarDef *e; idVarDef *e;
idVarDef *e2; idVarDef *e2;
const idVarDef *oldtype; const idVarDef *oldtype;
etype_t type_a; etype_t type_a;
etype_t type_b; etype_t type_b;
etype_t type_c; etype_t type_c;
if ( priority == 0 ) { if ( priority == 0 ) {
return GetTerm(); return GetTerm();
@ -1675,8 +1675,8 @@ idCompiler::ParseReturnStatement
*/ */
void idCompiler::ParseReturnStatement( void ) { void idCompiler::ParseReturnStatement( void ) {
idVarDef *e; idVarDef *e;
etype_t type_a; etype_t type_a;
etype_t type_b; etype_t type_b;
opcode_t *op; opcode_t *op;
if ( CheckToken( ";" ) ) { if ( CheckToken( ";" ) ) {
@ -1748,7 +1748,7 @@ void idCompiler::ParseWhileStatement( void ) {
EmitOpcode( OP_GOTO, JumpTo( patch2 ), 0 ); EmitOpcode( OP_GOTO, JumpTo( patch2 ), 0 );
} else { } else {
patch1 = gameLocal.program.NumStatements(); patch1 = gameLocal.program.NumStatements();
EmitOpcode( OP_IFNOT, e, 0 ); EmitOpcode( OP_IFNOT, e, 0 );
ParseStatement(); ParseStatement();
EmitOpcode( OP_GOTO, JumpTo( patch2 ), 0 ); EmitOpcode( OP_GOTO, JumpTo( patch2 ), 0 );
gameLocal.program.GetStatement( patch1 ).b = JumpFrom( patch1 ); gameLocal.program.GetStatement( patch1 ).b = JumpFrom( patch1 );
@ -2116,8 +2116,8 @@ void idCompiler::ParseFunctionDef( idTypeDef *returnType, const char *name ) {
idVarDef *def; idVarDef *def;
const idVarDef *parm; const idVarDef *parm;
idVarDef *oldscope; idVarDef *oldscope;
int i; int i;
int numParms; int numParms;
const idTypeDef *parmType; const idTypeDef *parmType;
function_t *func; function_t *func;
statement_t *pos; statement_t *pos;
@ -2399,7 +2399,7 @@ void idCompiler::ParseEventDef( idTypeDef *returnType, const char *name ) {
const idTypeDef *expectedType; const idTypeDef *expectedType;
idTypeDef *argType; idTypeDef *argType;
idTypeDef *type; idTypeDef *type;
int i; int i;
int num; int num;
const char *format; const char *format;
const idEventDef *ev; const idEventDef *ev;
@ -2483,7 +2483,7 @@ Called at the outer layer and when a local statement is hit
================ ================
*/ */
void idCompiler::ParseDefs( void ) { void idCompiler::ParseDefs( void ) {
idStr name; idStr name;
idTypeDef *type; idTypeDef *type;
idVarDef *def; idVarDef *def;
idVarDef *oldscope; idVarDef *oldscope;

View file

@ -170,7 +170,7 @@ void idInterpreter::Reset( void ) {
currentFunction = 0; currentFunction = 0;
NextInstruction( 0 ); NextInstruction( 0 );
threadDying = false; threadDying = false;
doneProcessing = true; doneProcessing = true;
} }
@ -389,7 +389,7 @@ idInterpreter::StackTrace
*/ */
void idInterpreter::StackTrace( void ) const { void idInterpreter::StackTrace( void ) const {
const function_t *f; const function_t *f;
int i; int i;
int top; int top;
if ( callStackDepth == 0 ) { if ( callStackDepth == 0 ) {
@ -552,7 +552,7 @@ NOTE: If this is called from within a event called by this interpreter, the func
==================== ====================
*/ */
void idInterpreter::EnterFunction( const function_t *func, bool clearStack ) { void idInterpreter::EnterFunction( const function_t *func, bool clearStack ) {
int c; int c;
prstack_t *stack; prstack_t *stack;
if ( clearStack ) { if ( clearStack ) {
@ -587,7 +587,7 @@ void idInterpreter::EnterFunction( const function_t *func, bool clearStack ) {
gameLocal.Printf( "%d: call '%s' from '%s'(line %d)%s\n", gameLocal.time, func->Name(), currentFunction->Name(), gameLocal.Printf( "%d: call '%s' from '%s'(line %d)%s\n", gameLocal.time, func->Name(), currentFunction->Name(),
gameLocal.program.GetStatement( instructionPointer ).linenumber, clearStack ? " clear stack" : "" ); gameLocal.program.GetStatement( instructionPointer ).linenumber, clearStack ? " clear stack" : "" );
} else { } else {
gameLocal.Printf( "%d: call '%s'%s\n", gameLocal.time, func->Name(), clearStack ? " clear stack" : "" ); gameLocal.Printf( "%d: call '%s'%s\n", gameLocal.time, func->Name(), clearStack ? " clear stack" : "" );
} }
} }
@ -681,11 +681,11 @@ idInterpreter::CallEvent
================ ================
*/ */
void idInterpreter::CallEvent( const function_t *func, int argsize ) { void idInterpreter::CallEvent( const function_t *func, int argsize ) {
int i; int i;
int j; int j;
varEval_t var; varEval_t var;
int pos; int pos;
int start; int start;
int data[ D_EVENT_MAXARGS ]; int data[ D_EVENT_MAXARGS ];
const idEventDef *evdef; const idEventDef *evdef;
const char *format; const char *format;
@ -852,11 +852,11 @@ idInterpreter::CallSysEvent
================ ================
*/ */
void idInterpreter::CallSysEvent( const function_t *func, int argsize ) { void idInterpreter::CallSysEvent( const function_t *func, int argsize ) {
int i; int i;
int j; int j;
varEval_t source; varEval_t source;
int pos; int pos;
int start; int start;
int data[ D_EVENT_MAXARGS ]; int data[ D_EVENT_MAXARGS ];
const idEventDef *evdef; const idEventDef *evdef;
const char *format; const char *format;
@ -939,7 +939,7 @@ bool idInterpreter::Execute( void ) {
varEval_t var_c; varEval_t var_c;
varEval_t var; varEval_t var;
statement_t *st; statement_t *st;
int runaway; int runaway;
idThread *newThread; idThread *newThread;
float floatVal; float floatVal;
idScriptObject *obj; idScriptObject *obj;

View file

@ -29,28 +29,28 @@ If you have questions concerning this license or the applicable additional terms
#ifndef __SCRIPT_INTERPRETER_H__ #ifndef __SCRIPT_INTERPRETER_H__
#define __SCRIPT_INTERPRETER_H__ #define __SCRIPT_INTERPRETER_H__
#define MAX_STACK_DEPTH 64 #define MAX_STACK_DEPTH 64
#define LOCALSTACK_SIZE 6144 #define LOCALSTACK_SIZE 6144
typedef struct prstack_s { typedef struct prstack_s {
int s; int s;
const function_t *f; const function_t *f;
int stackbase; int stackbase;
} prstack_t; } prstack_t;
class idInterpreter { class idInterpreter {
private: private:
prstack_t callStack[ MAX_STACK_DEPTH ]; prstack_t callStack[ MAX_STACK_DEPTH ];
int callStackDepth; int callStackDepth;
int maxStackDepth; int maxStackDepth;
byte localstack[ LOCALSTACK_SIZE ]; byte localstack[ LOCALSTACK_SIZE ];
int localstackUsed; int localstackUsed;
int localstackBase; int localstackBase;
int maxLocalstackUsed; int maxLocalstackUsed;
const function_t *currentFunction; const function_t *currentFunction;
int instructionPointer; int instructionPointer;
int popParms; int popParms;
const idEventDef *multiFrameEvent; const idEventDef *multiFrameEvent;

View file

@ -795,7 +795,7 @@ void idVarDef::PrintInfo( idFile *file, int instructionPointer ) const {
break; break;
case ev_float : case ev_float :
file->Printf( "%f", *value.floatPtr ); file->Printf( "%f", *value.floatPtr );
break; break;
case ev_virtualfunction : case ev_virtualfunction :
@ -1597,7 +1597,7 @@ void idProgram::BeginCompilation( void ) {
// make the first statement a return for a "NULL" function // make the first statement a return for a "NULL" function
statement = AllocStatement(); statement = AllocStatement();
statement->linenumber = 0; statement->linenumber = 0;
statement->file = 0; statement->file = 0;
statement->op = OP_RETURN; statement->op = OP_RETURN;
statement->a = NULL; statement->a = NULL;
statement->b = NULL; statement->b = NULL;

View file

@ -72,16 +72,16 @@ public:
void Clear( void ); void Clear( void );
private: private:
idStr name; idStr name;
public: public:
const idEventDef *eventdef; const idEventDef *eventdef;
idVarDef *def; idVarDef *def;
const idTypeDef *type; const idTypeDef *type;
int firstStatement; int firstStatement;
int numStatements; int numStatements;
int parmTotal; int parmTotal;
int locals; // total ints of parms + locals int locals; // total ints of parms + locals
int filenum; // source file defined in int filenum; // source file defined in
idList<int> parmSize; idList<int> parmSize;
}; };
@ -90,8 +90,8 @@ typedef union eval_s {
float _float; float _float;
float vector[ 3 ]; float vector[ 3 ];
function_t *function; function_t *function;
int _int; int _int;
int entity; int entity;
} eval_t; } eval_t;
/*********************************************************************** /***********************************************************************
@ -105,7 +105,7 @@ Contains type information for variables and functions.
class idTypeDef { class idTypeDef {
private: private:
etype_t type; etype_t type;
idStr name; idStr name;
int size; int size;
// function types are more complex // function types are more complex
@ -309,9 +309,9 @@ typedef union varEval_s {
float *floatPtr; float *floatPtr;
idVec3 *vectorPtr; idVec3 *vectorPtr;
function_t *functionPtr; function_t *functionPtr;
int *intPtr; int *intPtr;
byte *bytePtr; byte *bytePtr;
int *entityNumberPtr; int *entityNumberPtr;
int virtualFunction; int virtualFunction;
int jumpOffset; int jumpOffset;
int stackOffset; // offset in stack for local variables int stackOffset; // offset in stack for local variables
@ -328,7 +328,7 @@ class idVarDef {
public: public:
int num; int num;
varEval_t value; varEval_t value;
idVarDef * scope; // function, namespace, or object the var was defined in idVarDef * scope; // function, namespace, or object the var was defined in
int numUsers; // number of users if this is a constant int numUsers; // number of users if this is a constant
typedef enum { typedef enum {
@ -448,7 +448,7 @@ single idProgram.
class idProgram { class idProgram {
private: private:
idStrList fileList; idStrList fileList;
idStr filename; idStr filename;
int filenum; int filenum;
int numVariables; int numVariables;
@ -524,7 +524,7 @@ public:
statement_t &GetStatement( int index ); statement_t &GetStatement( int index );
int NumStatements( void ) { return statements.Num(); } int NumStatements( void ) { return statements.Num(); }
int GetReturnedInteger( void ); int GetReturnedInteger( void );
void ReturnFloat( float value ); void ReturnFloat( float value );
void ReturnInteger( int value ); void ReturnInteger( int value );

View file

@ -85,8 +85,8 @@ private:
idDict spawnArgs; idDict spawnArgs;
int threadNum; int threadNum;
idStr threadName; idStr threadName;
int lastExecuteTime; int lastExecuteTime;
int creationTime; int creationTime;
@ -134,10 +134,10 @@ private:
void Event_SpawnFloat( const char *key, float defaultvalue ); void Event_SpawnFloat( const char *key, float defaultvalue );
void Event_SpawnVector( const char *key, idVec3 &defaultvalue ); void Event_SpawnVector( const char *key, idVec3 &defaultvalue );
void Event_ClearPersistantArgs( void ); void Event_ClearPersistantArgs( void );
void Event_SetPersistantArg( const char *key, const char *value ); void Event_SetPersistantArg( const char *key, const char *value );
void Event_GetPersistantString( const char *key ); void Event_GetPersistantString( const char *key );
void Event_GetPersistantFloat( const char *key ); void Event_GetPersistantFloat( const char *key );
void Event_GetPersistantVector( const char *key ); void Event_GetPersistantVector( const char *key );
void Event_AngToForward( idAngles &ang ); void Event_AngToForward( idAngles &ang );
void Event_AngToRight( idAngles &ang ); void Event_AngToRight( idAngles &ang );
void Event_AngToUp( idAngles &ang ); void Event_AngToUp( idAngles &ang );
@ -176,17 +176,17 @@ private:
void Event_StartMusic( const char *name ); void Event_StartMusic( const char *name );
void Event_Warning( const char *text ); void Event_Warning( const char *text );
void Event_Error( const char *text ); void Event_Error( const char *text );
void Event_StrLen( const char *string ); void Event_StrLen( const char *string );
void Event_StrLeft( const char *string, int num ); void Event_StrLeft( const char *string, int num );
void Event_StrRight( const char *string, int num ); void Event_StrRight( const char *string, int num );
void Event_StrSkip( const char *string, int num ); void Event_StrSkip( const char *string, int num );
void Event_StrMid( const char *string, int start, int num ); void Event_StrMid( const char *string, int start, int num );
void Event_StrToFloat( const char *string ); void Event_StrToFloat( const char *string );
void Event_RadiusDamage( const idVec3 &origin, idEntity *inflictor, idEntity *attacker, idEntity *ignore, const char *damageDefName, float dmgPower ); void Event_RadiusDamage( const idVec3 &origin, idEntity *inflictor, idEntity *attacker, idEntity *ignore, const char *damageDefName, float dmgPower );
void Event_IsClient( void ); void Event_IsClient( void );
void Event_IsMultiplayer( void ); void Event_IsMultiplayer( void );
void Event_GetFrameTime( void ); void Event_GetFrameTime( void );
void Event_GetTicsPerSecond( void ); void Event_GetTicsPerSecond( void );
void Event_CacheSoundShader( const char *soundName ); void Event_CacheSoundShader( const char *soundName );
void Event_DebugLine( const idVec3 &color, const idVec3 &start, const idVec3 &end, const float lifetime ); void Event_DebugLine( const idVec3 &color, const idVec3 &start, const idVec3 &end, const float lifetime );
void Event_DebugArrow( const idVec3 &color, const idVec3 &start, const idVec3 &end, const int size, const float lifetime ); void Event_DebugArrow( const idVec3 &color, const idVec3 &start, const idVec3 &end, const int size, const float lifetime );
@ -255,7 +255,7 @@ public:
bool Start( void ); bool Start( void );
idThread *WaitingOnThread( void ); idThread *WaitingOnThread( void );
void SetThreadNum( int num ); void SetThreadNum( int num );
int GetThreadNum( void ); int GetThreadNum( void );
void SetThreadName( const char *name ); void SetThreadName( const char *name );
const char *GetThreadName( void ); const char *GetThreadName( void );

View file

@ -132,4 +132,3 @@ If you have questions concerning this license or the applicable additional terms
# define ID_ALLOW_D3XP 1 # define ID_ALLOW_D3XP 1
# endif # endif
#endif #endif

View file

@ -1021,7 +1021,7 @@ void idCompressor_Huffman::Swap( huffmanNode_t *node1, huffmanNode_t *node2 ) {
if ( par1->left == node1 ) { if ( par1->left == node1 ) {
par1->left = node2; par1->left = node2;
} else { } else {
par1->right = node2; par1->right = node2;
} }
} else { } else {
tree = node2; tree = node2;
@ -1092,7 +1092,7 @@ void idCompressor_Huffman::Increment( huffmanNode_t *node ) {
} }
if ( node->next != NULL && node->next->weight == node->weight ) { if ( node->next != NULL && node->next->weight == node->weight ) {
lnode = *node->head; lnode = *node->head;
if ( lnode != node->parent ) { if ( lnode != node->parent ) {
Swap( lnode, node ); Swap( lnode, node );
} }
@ -1101,7 +1101,7 @@ void idCompressor_Huffman::Increment( huffmanNode_t *node ) {
if ( node->prev && node->prev->weight == node->weight ) { if ( node->prev && node->prev->weight == node->weight ) {
*node->head = node->prev; *node->head = node->prev;
} else { } else {
*node->head = NULL; *node->head = NULL;
Free_ppnode( node->head ); Free_ppnode( node->head );
} }
node->weight++; node->weight++;
@ -1162,7 +1162,7 @@ void idCompressor_Huffman::AddRef( byte ch ) {
/* this should never happen */ /* this should never happen */
tnode->head = Get_ppnode(); tnode->head = Get_ppnode();
*tnode->head = tnode2; *tnode->head = tnode2;
} }
} else { } else {
/* this should never happen */ /* this should never happen */
tnode->head = Get_ppnode(); tnode->head = Get_ppnode();
@ -1483,7 +1483,7 @@ idCompressor_Arithmetic::GetCurrentCount
================ ================
*/ */
int idCompressor_Arithmetic::GetCurrentCount( void ) { int idCompressor_Arithmetic::GetCurrentCount( void ) {
return (unsigned int) ( ( ( ( (long) code - low ) + 1 ) * scale - 1 ) / ( ( (long) high - low ) + 1 ) ); return (unsigned int) ( ( ( ( (long) code - low ) + 1 ) * scale - 1 ) / ( ( (long) high - low ) + 1 ) );
} }
/* /*
@ -1521,10 +1521,10 @@ int idCompressor_Arithmetic::ProbabilityForCount( unsigned int count ) {
int j; int j;
for( j = 0; j < (1<<AC_WORD_LENGTH); j++ ) { for( j = 0; j < (1<<AC_WORD_LENGTH); j++ ) {
if ( count >= probabilities[ j ].low && count < probabilities[ j ].high ) { if ( count >= probabilities[ j ].low && count < probabilities[ j ].high ) {
return j; return j;
} }
} }
assert( false ); assert( false );
@ -1540,10 +1540,10 @@ idCompressor_Arithmetic::SymbolFromCount
*/ */
int idCompressor_Arithmetic::SymbolFromCount( unsigned int count, acSymbol_t* symbol ) { int idCompressor_Arithmetic::SymbolFromCount( unsigned int count, acSymbol_t* symbol ) {
int p = ProbabilityForCount( count ); int p = ProbabilityForCount( count );
symbol->low = probabilities[ p ].low; symbol->low = probabilities[ p ].low;
symbol->high = probabilities[ p ].high; symbol->high = probabilities[ p ].high;
symbol->position = p; symbol->position = p;
return p; return p;
} }
/* /*
@ -1552,31 +1552,31 @@ idCompressor_Arithmetic::RemoveSymbolFromStream
================ ================
*/ */
void idCompressor_Arithmetic::RemoveSymbolFromStream( acSymbol_t* symbol ) { void idCompressor_Arithmetic::RemoveSymbolFromStream( acSymbol_t* symbol ) {
long range; long range;
range = ( long )( high - low ) + 1; range = ( long )( high - low ) + 1;
high = low + ( unsigned short )( ( range * symbol->high ) / scale - 1 ); high = low + ( unsigned short )( ( range * symbol->high ) / scale - 1 );
low = low + ( unsigned short )( ( range * symbol->low ) / scale ); low = low + ( unsigned short )( ( range * symbol->low ) / scale );
while( true ) { while( true ) {
if ( ( high & AC_MSB_MASK ) == ( low & AC_MSB_MASK ) ) { if ( ( high & AC_MSB_MASK ) == ( low & AC_MSB_MASK ) ) {
} else if( ( low & AC_MSB2_MASK ) == AC_MSB2_MASK && ( high & AC_MSB2_MASK ) == 0 ) { } else if( ( low & AC_MSB2_MASK ) == AC_MSB2_MASK && ( high & AC_MSB2_MASK ) == 0 ) {
code ^= AC_MSB2_MASK; code ^= AC_MSB2_MASK;
low &= AC_MSB2_MASK - 1; low &= AC_MSB2_MASK - 1;
high |= AC_MSB2_MASK; high |= AC_MSB2_MASK;
} else { } else {
UpdateProbabilities( symbol ); UpdateProbabilities( symbol );
return; return;
} }
low <<= 1; low <<= 1;
high <<= 1; high <<= 1;
high |= 1; high |= 1;
code <<= 1; code <<= 1;
code |= ReadBits( 1 ); code |= ReadBits( 1 );
} }
} }
/* /*
@ -1619,26 +1619,26 @@ void idCompressor_Arithmetic::EncodeSymbol( acSymbol_t* symbol ) {
// the high digits of low and high have converged, and can be written to the stream // the high digits of low and high have converged, and can be written to the stream
WriteBits( high >> AC_MSB_SHIFT, 1 ); WriteBits( high >> AC_MSB_SHIFT, 1 );
while( underflowBits > 0 ) { while( underflowBits > 0 ) {
WriteBits( ~high >> AC_MSB_SHIFT, 1 ); WriteBits( ~high >> AC_MSB_SHIFT, 1 );
underflowBits--; underflowBits--;
} }
} else if ( ( low & AC_MSB2_MASK ) && !( high & AC_MSB2_MASK ) ) { } else if ( ( low & AC_MSB2_MASK ) && !( high & AC_MSB2_MASK ) ) {
// underflow is in danger of happening, 2nd digits are converging but 1st digits don't match // underflow is in danger of happening, 2nd digits are converging but 1st digits don't match
underflowBits += 1; underflowBits += 1;
low &= AC_MSB2_MASK - 1; low &= AC_MSB2_MASK - 1;
high |= AC_MSB2_MASK; high |= AC_MSB2_MASK;
} else { } else {
UpdateProbabilities( symbol ); UpdateProbabilities( symbol );
return; return;
} }
low <<= 1; low <<= 1;
high <<= 1; high <<= 1;
high |= 1; high |= 1;
} }
} }
/* /*

View file

@ -312,7 +312,7 @@ bool idDeclAF::WriteBody( idFile *f, const idDeclAF_Body &body ) const {
f->WriteFloatString( "\tmod %s\n", JointModToString( body.jointMod ) ); f->WriteFloatString( "\tmod %s\n", JointModToString( body.jointMod ) );
switch( body.modelType ) { switch( body.modelType ) {
case TRM_BOX: { case TRM_BOX: {
f->WriteFloatString( "\tmodel box( " ); f->WriteFloatString( "\tmodel box( " );
body.v1.Write( f ); body.v1.Write( f );
f->WriteFloatString( ", " ); f->WriteFloatString( ", " );
body.v2.Write( f ); body.v2.Write( f );
@ -320,7 +320,7 @@ bool idDeclAF::WriteBody( idFile *f, const idDeclAF_Body &body ) const {
break; break;
} }
case TRM_OCTAHEDRON: { case TRM_OCTAHEDRON: {
f->WriteFloatString( "\tmodel octahedron( " ); f->WriteFloatString( "\tmodel octahedron( " );
body.v1.Write( f ); body.v1.Write( f );
f->WriteFloatString( ", " ); f->WriteFloatString( ", " );
body.v2.Write( f ); body.v2.Write( f );
@ -328,7 +328,7 @@ bool idDeclAF::WriteBody( idFile *f, const idDeclAF_Body &body ) const {
break; break;
} }
case TRM_DODECAHEDRON: { case TRM_DODECAHEDRON: {
f->WriteFloatString( "\tmodel dodecahedron( " ); f->WriteFloatString( "\tmodel dodecahedron( " );
body.v1.Write( f ); body.v1.Write( f );
f->WriteFloatString( ", " ); f->WriteFloatString( ", " );
body.v2.Write( f ); body.v2.Write( f );
@ -336,7 +336,7 @@ bool idDeclAF::WriteBody( idFile *f, const idDeclAF_Body &body ) const {
break; break;
} }
case TRM_CYLINDER: { case TRM_CYLINDER: {
f->WriteFloatString( "\tmodel cylinder( " ); f->WriteFloatString( "\tmodel cylinder( " );
body.v1.Write( f ); body.v1.Write( f );
f->WriteFloatString( ", " ); f->WriteFloatString( ", " );
body.v2.Write( f ); body.v2.Write( f );
@ -344,7 +344,7 @@ bool idDeclAF::WriteBody( idFile *f, const idDeclAF_Body &body ) const {
break; break;
} }
case TRM_CONE: { case TRM_CONE: {
f->WriteFloatString( "\tmodel cone( " ); f->WriteFloatString( "\tmodel cone( " );
body.v1.Write( f ); body.v1.Write( f );
f->WriteFloatString( ", " ); f->WriteFloatString( ", " );
body.v2.Write( f ); body.v2.Write( f );
@ -352,7 +352,7 @@ bool idDeclAF::WriteBody( idFile *f, const idDeclAF_Body &body ) const {
break; break;
} }
case TRM_BONE: { case TRM_BONE: {
f->WriteFloatString( "\tmodel bone( " ); f->WriteFloatString( "\tmodel bone( " );
body.v1.Write( f ); body.v1.Write( f );
f->WriteFloatString( ", " ); f->WriteFloatString( ", " );
body.v2.Write( f ); body.v2.Write( f );

View file

@ -86,7 +86,7 @@ class idDeclLocal : public idDeclBase {
public: public:
idDeclLocal(); idDeclLocal();
virtual ~idDeclLocal() {}; virtual ~idDeclLocal() {};
virtual const char * GetName( void ) const; virtual const char * GetName( void ) const;
virtual declType_t GetType( void ) const; virtual declType_t GetType( void ) const;
virtual declState_t GetState( void ) const; virtual declState_t GetState( void ) const;
@ -272,39 +272,39 @@ typedef struct huffmanCode_s {
// compression ratio = 64% // compression ratio = 64%
static int huffmanFrequencies[] = { static int huffmanFrequencies[] = {
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00078fb6, 0x000352a7, 0x00000002, 0x00000001, 0x0002795e, 0x00000001, 0x00000001, 0x00000001, 0x00078fb6, 0x000352a7, 0x00000002, 0x00000001, 0x0002795e, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00049600, 0x000000dd, 0x00018732, 0x0000005a, 0x00000007, 0x00000092, 0x0000000a, 0x00000919, 0x00049600, 0x000000dd, 0x00018732, 0x0000005a, 0x00000007, 0x00000092, 0x0000000a, 0x00000919,
0x00002dcf, 0x00002dda, 0x00004dfc, 0x0000039a, 0x000058be, 0x00002d13, 0x00014d8c, 0x00023c60, 0x00002dcf, 0x00002dda, 0x00004dfc, 0x0000039a, 0x000058be, 0x00002d13, 0x00014d8c, 0x00023c60,
0x0002ddb0, 0x0000d1fc, 0x000078c4, 0x00003ec7, 0x00003113, 0x00006b59, 0x00002499, 0x0000184a, 0x0002ddb0, 0x0000d1fc, 0x000078c4, 0x00003ec7, 0x00003113, 0x00006b59, 0x00002499, 0x0000184a,
0x0000250b, 0x00004e38, 0x000001ca, 0x00000011, 0x00000020, 0x000023da, 0x00000012, 0x00000091, 0x0000250b, 0x00004e38, 0x000001ca, 0x00000011, 0x00000020, 0x000023da, 0x00000012, 0x00000091,
0x0000000b, 0x00000b14, 0x0000035d, 0x0000137e, 0x000020c9, 0x00000e11, 0x000004b4, 0x00000737, 0x0000000b, 0x00000b14, 0x0000035d, 0x0000137e, 0x000020c9, 0x00000e11, 0x000004b4, 0x00000737,
0x000006b8, 0x00001110, 0x000006b3, 0x000000fe, 0x00000f02, 0x00000d73, 0x000005f6, 0x00000be4, 0x000006b8, 0x00001110, 0x000006b3, 0x000000fe, 0x00000f02, 0x00000d73, 0x000005f6, 0x00000be4,
0x00000d86, 0x0000014d, 0x00000d89, 0x0000129b, 0x00000db3, 0x0000015a, 0x00000167, 0x00000375, 0x00000d86, 0x0000014d, 0x00000d89, 0x0000129b, 0x00000db3, 0x0000015a, 0x00000167, 0x00000375,
0x00000028, 0x00000112, 0x00000018, 0x00000678, 0x0000081a, 0x00000677, 0x00000003, 0x00018112, 0x00000028, 0x00000112, 0x00000018, 0x00000678, 0x0000081a, 0x00000677, 0x00000003, 0x00018112,
0x00000001, 0x000441ee, 0x000124b0, 0x0001fa3f, 0x00026125, 0x0005a411, 0x0000e50f, 0x00011820, 0x00000001, 0x000441ee, 0x000124b0, 0x0001fa3f, 0x00026125, 0x0005a411, 0x0000e50f, 0x00011820,
0x00010f13, 0x0002e723, 0x00003518, 0x00005738, 0x0002cc26, 0x0002a9b7, 0x0002db81, 0x0003b5fa, 0x00010f13, 0x0002e723, 0x00003518, 0x00005738, 0x0002cc26, 0x0002a9b7, 0x0002db81, 0x0003b5fa,
0x000185d2, 0x00001299, 0x00030773, 0x0003920d, 0x000411cd, 0x00018751, 0x00005fbd, 0x000099b0, 0x000185d2, 0x00001299, 0x00030773, 0x0003920d, 0x000411cd, 0x00018751, 0x00005fbd, 0x000099b0,
0x00009242, 0x00007cf2, 0x00002809, 0x00005a1d, 0x00000001, 0x00005a1d, 0x00000001, 0x00000001, 0x00009242, 0x00007cf2, 0x00002809, 0x00005a1d, 0x00000001, 0x00005a1d, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
}; };
static huffmanCode_t huffmanCodes[MAX_HUFFMAN_SYMBOLS]; static huffmanCode_t huffmanCodes[MAX_HUFFMAN_SYMBOLS];

View file

@ -100,7 +100,7 @@ const int DECL_LEXER_FLAGS = LEXFL_NOSTRINGCONCAT | // multiple strings seper
class idDeclBase { class idDeclBase {
public: public:
virtual ~idDeclBase() {}; virtual ~idDeclBase() {};
virtual const char * GetName( void ) const = 0; virtual const char * GetName( void ) const = 0;
virtual declType_t GetType( void ) const = 0; virtual declType_t GetType( void ) const = 0;
virtual declState_t GetState( void ) const = 0; virtual declState_t GetState( void ) const = 0;
@ -134,7 +134,7 @@ public:
// The constructor should initialize variables such that // The constructor should initialize variables such that
// an immediate call to FreeData() does no harm. // an immediate call to FreeData() does no harm.
idDecl( void ) { base = NULL; } idDecl( void ) { base = NULL; }
virtual ~idDecl( void ) {}; virtual ~idDecl( void ) {};
// Returns the name of the decl. // Returns the name of the decl.
const char * GetName( void ) const { return base->GetName(); } const char * GetName( void ) const { return base->GetName(); }

View file

@ -322,7 +322,3 @@ int idDemoFile::Read( void *buffer, int len ) {
int idDemoFile::Write( const void *buffer, int len ) { int idDemoFile::Write( const void *buffer, int len ) {
return compressor->Write( buffer, len ); return compressor->Write( buffer, len );
} }

View file

@ -267,10 +267,10 @@ int idFile::Printf( const char *fmt, ... ) {
va_end( argptr ); va_end( argptr );
// so notepad formats the lines correctly // so notepad formats the lines correctly
idStr work( buf ); idStr work( buf );
work.Replace( "\n", "\r\n" ); work.Replace( "\n", "\r\n" );
return Write( work.c_str(), work.Length() ); return Write( work.c_str(), work.Length() );
} }
/* /*
@ -548,7 +548,7 @@ int idFile::WriteString( const char *value ) {
len = strlen( value ); len = strlen( value );
WriteInt( len ); WriteInt( len );
return Write( value, len ); return Write( value, len );
} }
/* /*

View file

@ -401,7 +401,7 @@ public:
static void TouchFileList_f( const idCmdArgs &args ); static void TouchFileList_f( const idCmdArgs &args );
private: private:
friend dword BackgroundDownloadThread( void *parms ); friend dword BackgroundDownloadThread( void *parms );
searchpath_t * searchPaths; searchpath_t * searchPaths;
int readCount; // total bytes read int readCount; // total bytes read
@ -1706,9 +1706,9 @@ idFileSystemLocal::ListMods
=============== ===============
*/ */
idModList *idFileSystemLocal::ListMods( void ) { idModList *idFileSystemLocal::ListMods( void ) {
int i; int i;
const int MAX_DESCRIPTION = 256; const int MAX_DESCRIPTION = 256;
char desc[ MAX_DESCRIPTION ]; char desc[ MAX_DESCRIPTION ];
idStrList dirs; idStrList dirs;
idStrList pk4s; idStrList pk4s;
@ -2504,7 +2504,7 @@ bool idFileSystemLocal::UpdateGamePakChecksums( void ) {
if ( fs_debug.GetBool() ) { if ( fs_debug.GetBool() ) {
common->Printf( "Adding game pak checksum for OS %d: %s 0x%x\n", id, confFile->GetFullPath(), search->pack->checksum ); common->Printf( "Adding game pak checksum for OS %d: %s 0x%x\n", id, confFile->GetFullPath(), search->pack->checksum );
} }
gamePakForOS[ id ] = search->pack->checksum; gamePakForOS[ id ] = search->pack->checksum;
} }
} }
} }
@ -4012,7 +4012,7 @@ bool idFileSystemLocal::HasD3XP( void ) {
// checking wether the pak is loaded by checksum wouldn't be enough: // checking wether the pak is loaded by checksum wouldn't be enough:
// we may have a different fs_game right now but still need to reply that it's installed // we may have a different fs_game right now but still need to reply that it's installed
const char *search[4]; const char *search[4];
idFile *pakfile; idFile *pakfile;
search[0] = fs_savepath.GetString(); search[0] = fs_savepath.GetString();
search[1] = fs_devpath.GetString(); search[1] = fs_devpath.GetString();
search[2] = fs_basepath.GetString(); search[2] = fs_basepath.GetString();
@ -4146,7 +4146,7 @@ retrieve the decl dictionary, add a 'path' value
=============== ===============
*/ */
const idDict * idFileSystemLocal::GetMapDecl( int idecl ) { const idDict * idFileSystemLocal::GetMapDecl( int idecl ) {
int i; int i;
const idDecl *mapDecl; const idDecl *mapDecl;
const idDeclEntityDef *mapDef; const idDeclEntityDef *mapDef;
int numdecls = declManager->GetNumDecls( DECL_MAPDEF ); int numdecls = declManager->GetNumDecls( DECL_MAPDEF );

View file

@ -60,9 +60,9 @@ keyname_t keynames[] =
{"CTRL", K_CTRL, "#str_07028"}, {"CTRL", K_CTRL, "#str_07028"},
{"SHIFT", K_SHIFT, "#str_07029"}, {"SHIFT", K_SHIFT, "#str_07029"},
{"LWIN", K_LWIN, "#str_07030"}, {"LWIN", K_LWIN, "#str_07030"},
{"RWIN", K_RWIN, "#str_07031"}, {"RWIN", K_RWIN, "#str_07031"},
{"MENU", K_MENU, "#str_07032"}, {"MENU", K_MENU, "#str_07032"},
{"COMMAND", K_COMMAND, "#str_07033"}, {"COMMAND", K_COMMAND, "#str_07033"},
@ -70,102 +70,102 @@ keyname_t keynames[] =
{"SCROLL", K_SCROLL, "#str_07035"}, {"SCROLL", K_SCROLL, "#str_07035"},
{"PRINTSCREEN", K_PRINT_SCR, "#str_07179"}, {"PRINTSCREEN", K_PRINT_SCR, "#str_07179"},
{"F1", K_F1, "#str_07036"}, {"F1", K_F1, "#str_07036"},
{"F2", K_F2, "#str_07037"}, {"F2", K_F2, "#str_07037"},
{"F3", K_F3, "#str_07038"}, {"F3", K_F3, "#str_07038"},
{"F4", K_F4, "#str_07039"}, {"F4", K_F4, "#str_07039"},
{"F5", K_F5, "#str_07040"}, {"F5", K_F5, "#str_07040"},
{"F6", K_F6, "#str_07041"}, {"F6", K_F6, "#str_07041"},
{"F7", K_F7, "#str_07042"}, {"F7", K_F7, "#str_07042"},
{"F8", K_F8, "#str_07043"}, {"F8", K_F8, "#str_07043"},
{"F9", K_F9, "#str_07044"}, {"F9", K_F9, "#str_07044"},
{"F10", K_F10, "#str_07045"}, {"F10", K_F10, "#str_07045"},
{"F11", K_F11, "#str_07046"}, {"F11", K_F11, "#str_07046"},
{"F12", K_F12, "#str_07047"}, {"F12", K_F12, "#str_07047"},
{"INS", K_INS, "#str_07048"}, {"INS", K_INS, "#str_07048"},
{"DEL", K_DEL, "#str_07049"}, {"DEL", K_DEL, "#str_07049"},
{"PGDN", K_PGDN, "#str_07050"}, {"PGDN", K_PGDN, "#str_07050"},
{"PGUP", K_PGUP, "#str_07051"}, {"PGUP", K_PGUP, "#str_07051"},
{"HOME", K_HOME, "#str_07052"}, {"HOME", K_HOME, "#str_07052"},
{"END", K_END, "#str_07053"}, {"END", K_END, "#str_07053"},
{"MOUSE1", K_MOUSE1, "#str_07054"}, {"MOUSE1", K_MOUSE1, "#str_07054"},
{"MOUSE2", K_MOUSE2, "#str_07055"}, {"MOUSE2", K_MOUSE2, "#str_07055"},
{"MOUSE3", K_MOUSE3, "#str_07056"}, {"MOUSE3", K_MOUSE3, "#str_07056"},
{"MOUSE4", K_MOUSE4, "#str_07057"}, {"MOUSE4", K_MOUSE4, "#str_07057"},
{"MOUSE5", K_MOUSE5, "#str_07058"}, {"MOUSE5", K_MOUSE5, "#str_07058"},
{"MOUSE6", K_MOUSE6, "#str_07059"}, {"MOUSE6", K_MOUSE6, "#str_07059"},
{"MOUSE7", K_MOUSE7, "#str_07060"}, {"MOUSE7", K_MOUSE7, "#str_07060"},
{"MOUSE8", K_MOUSE8, "#str_07061"}, {"MOUSE8", K_MOUSE8, "#str_07061"},
{"MWHEELUP", K_MWHEELUP, "#str_07131"}, {"MWHEELUP", K_MWHEELUP, "#str_07131"},
{"MWHEELDOWN", K_MWHEELDOWN, "#str_07132"}, {"MWHEELDOWN", K_MWHEELDOWN, "#str_07132"},
{"JOY1", K_JOY1, "#str_07062"}, {"JOY1", K_JOY1, "#str_07062"},
{"JOY2", K_JOY2, "#str_07063"}, {"JOY2", K_JOY2, "#str_07063"},
{"JOY3", K_JOY3, "#str_07064"}, {"JOY3", K_JOY3, "#str_07064"},
{"JOY4", K_JOY4, "#str_07065"}, {"JOY4", K_JOY4, "#str_07065"},
{"JOY5", K_JOY5, "#str_07066"}, {"JOY5", K_JOY5, "#str_07066"},
{"JOY6", K_JOY6, "#str_07067"}, {"JOY6", K_JOY6, "#str_07067"},
{"JOY7", K_JOY7, "#str_07068"}, {"JOY7", K_JOY7, "#str_07068"},
{"JOY8", K_JOY8, "#str_07069"}, {"JOY8", K_JOY8, "#str_07069"},
{"JOY9", K_JOY9, "#str_07070"}, {"JOY9", K_JOY9, "#str_07070"},
{"JOY10", K_JOY10, "#str_07071"}, {"JOY10", K_JOY10, "#str_07071"},
{"JOY11", K_JOY11, "#str_07072"}, {"JOY11", K_JOY11, "#str_07072"},
{"JOY12", K_JOY12, "#str_07073"}, {"JOY12", K_JOY12, "#str_07073"},
{"JOY13", K_JOY13, "#str_07074"}, {"JOY13", K_JOY13, "#str_07074"},
{"JOY14", K_JOY14, "#str_07075"}, {"JOY14", K_JOY14, "#str_07075"},
{"JOY15", K_JOY15, "#str_07076"}, {"JOY15", K_JOY15, "#str_07076"},
{"JOY16", K_JOY16, "#str_07077"}, {"JOY16", K_JOY16, "#str_07077"},
{"JOY17", K_JOY17, "#str_07078"}, {"JOY17", K_JOY17, "#str_07078"},
{"JOY18", K_JOY18, "#str_07079"}, {"JOY18", K_JOY18, "#str_07079"},
{"JOY19", K_JOY19, "#str_07080"}, {"JOY19", K_JOY19, "#str_07080"},
{"JOY20", K_JOY20, "#str_07081"}, {"JOY20", K_JOY20, "#str_07081"},
{"JOY21", K_JOY21, "#str_07082"}, {"JOY21", K_JOY21, "#str_07082"},
{"JOY22", K_JOY22, "#str_07083"}, {"JOY22", K_JOY22, "#str_07083"},
{"JOY23", K_JOY23, "#str_07084"}, {"JOY23", K_JOY23, "#str_07084"},
{"JOY24", K_JOY24, "#str_07085"}, {"JOY24", K_JOY24, "#str_07085"},
{"JOY25", K_JOY25, "#str_07086"}, {"JOY25", K_JOY25, "#str_07086"},
{"JOY26", K_JOY26, "#str_07087"}, {"JOY26", K_JOY26, "#str_07087"},
{"JOY27", K_JOY27, "#str_07088"}, {"JOY27", K_JOY27, "#str_07088"},
{"JOY28", K_JOY28, "#str_07089"}, {"JOY28", K_JOY28, "#str_07089"},
{"JOY29", K_JOY29, "#str_07090"}, {"JOY29", K_JOY29, "#str_07090"},
{"JOY30", K_JOY30, "#str_07091"}, {"JOY30", K_JOY30, "#str_07091"},
{"JOY31", K_JOY31, "#str_07092"}, {"JOY31", K_JOY31, "#str_07092"},
{"JOY32", K_JOY32, "#str_07093"}, {"JOY32", K_JOY32, "#str_07093"},
{"AUX1", K_AUX1, "#str_07094"}, {"AUX1", K_AUX1, "#str_07094"},
{"AUX2", K_AUX2, "#str_07095"}, {"AUX2", K_AUX2, "#str_07095"},
{"AUX3", K_AUX3, "#str_07096"}, {"AUX3", K_AUX3, "#str_07096"},
{"AUX4", K_AUX4, "#str_07097"}, {"AUX4", K_AUX4, "#str_07097"},
{"AUX5", K_AUX5, "#str_07098"}, {"AUX5", K_AUX5, "#str_07098"},
{"AUX6", K_AUX6, "#str_07099"}, {"AUX6", K_AUX6, "#str_07099"},
{"AUX7", K_AUX7, "#str_07100"}, {"AUX7", K_AUX7, "#str_07100"},
{"AUX8", K_AUX8, "#str_07101"}, {"AUX8", K_AUX8, "#str_07101"},
{"AUX9", K_AUX9, "#str_07102"}, {"AUX9", K_AUX9, "#str_07102"},
{"AUX10", K_AUX10, "#str_07103"}, {"AUX10", K_AUX10, "#str_07103"},
{"AUX11", K_AUX11, "#str_07104"}, {"AUX11", K_AUX11, "#str_07104"},
{"AUX12", K_AUX12, "#str_07105"}, {"AUX12", K_AUX12, "#str_07105"},
{"AUX13", K_AUX13, "#str_07106"}, {"AUX13", K_AUX13, "#str_07106"},
{"AUX14", K_AUX14, "#str_07107"}, {"AUX14", K_AUX14, "#str_07107"},
{"AUX15", K_AUX15, "#str_07108"}, {"AUX15", K_AUX15, "#str_07108"},
{"AUX16", K_AUX16, "#str_07109"}, {"AUX16", K_AUX16, "#str_07109"},
{"KP_HOME", K_KP_HOME, "#str_07110"}, {"KP_HOME", K_KP_HOME, "#str_07110"},
{"KP_UPARROW", K_KP_UPARROW, "#str_07111"}, {"KP_UPARROW", K_KP_UPARROW, "#str_07111"},
{"KP_PGUP", K_KP_PGUP, "#str_07112"}, {"KP_PGUP", K_KP_PGUP, "#str_07112"},
{"KP_LEFTARROW", K_KP_LEFTARROW, "#str_07113"}, {"KP_LEFTARROW", K_KP_LEFTARROW, "#str_07113"},
{"KP_5", K_KP_5, "#str_07114"}, {"KP_5", K_KP_5, "#str_07114"},
{"KP_RIGHTARROW", K_KP_RIGHTARROW, "#str_07115"}, {"KP_RIGHTARROW", K_KP_RIGHTARROW, "#str_07115"},
{"KP_END", K_KP_END, "#str_07116"}, {"KP_END", K_KP_END, "#str_07116"},
{"KP_DOWNARROW", K_KP_DOWNARROW, "#str_07117"}, {"KP_DOWNARROW", K_KP_DOWNARROW, "#str_07117"},
{"KP_PGDN", K_KP_PGDN, "#str_07118"}, {"KP_PGDN", K_KP_PGDN, "#str_07118"},
{"KP_ENTER", K_KP_ENTER, "#str_07119"}, {"KP_ENTER", K_KP_ENTER, "#str_07119"},
{"KP_INS", K_KP_INS, "#str_07120"}, {"KP_INS", K_KP_INS, "#str_07120"},
{"KP_DEL", K_KP_DEL, "#str_07121"}, {"KP_DEL", K_KP_DEL, "#str_07121"},
{"KP_SLASH", K_KP_SLASH, "#str_07122"}, {"KP_SLASH", K_KP_SLASH, "#str_07122"},
{"KP_MINUS", K_KP_MINUS, "#str_07123"}, {"KP_MINUS", K_KP_MINUS, "#str_07123"},
{"KP_PLUS", K_KP_PLUS, "#str_07124"}, {"KP_PLUS", K_KP_PLUS, "#str_07124"},
{"KP_NUMLOCK", K_KP_NUMLOCK, "#str_07125"}, {"KP_NUMLOCK", K_KP_NUMLOCK, "#str_07125"},
{"KP_STAR", K_KP_STAR, "#str_07126"}, {"KP_STAR", K_KP_STAR, "#str_07126"},

File diff suppressed because it is too large Load diff

View file

@ -32,7 +32,7 @@ If you have questions concerning this license or the applicable additional terms
#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
/* like the STRICT of WIN32, we define a pointer that cannot be converted /* like the STRICT of WIN32, we define a pointer that cannot be converted
from (void*) without cast */ from (void*) without cast */
typedef struct TagunzFile__ { int unused; } unzFile__; typedef struct TagunzFile__ { int unused; } unzFile__;
typedef unzFile__ *unzFile; typedef unzFile__ *unzFile;
#else #else
@ -62,29 +62,29 @@ typedef struct unz_global_info_s
/* unz_file_info contain information about a file in the zipfile */ /* unz_file_info contain information about a file in the zipfile */
typedef struct unz_file_info_s typedef struct unz_file_info_s
{ {
unsigned long version; /* version made by 2 unsigned chars */ unsigned long version; /* version made by 2 unsigned chars */
unsigned long version_needed; /* version needed to extract 2 unsigned chars */ unsigned long version_needed; /* version needed to extract 2 unsigned chars */
unsigned long flag; /* general purpose bit flag 2 unsigned chars */ unsigned long flag; /* general purpose bit flag 2 unsigned chars */
unsigned long compression_method; /* compression method 2 unsigned chars */ unsigned long compression_method; /* compression method 2 unsigned chars */
unsigned long dosDate; /* last mod file date in Dos fmt 4 unsigned chars */ unsigned long dosDate; /* last mod file date in Dos fmt 4 unsigned chars */
unsigned long crc; /* crc-32 4 unsigned chars */ unsigned long crc; /* crc-32 4 unsigned chars */
unsigned long compressed_size; /* compressed size 4 unsigned chars */ unsigned long compressed_size; /* compressed size 4 unsigned chars */
unsigned long uncompressed_size; /* uncompressed size 4 unsigned chars */ unsigned long uncompressed_size; /* uncompressed size 4 unsigned chars */
unsigned long size_filename; /* filename length 2 unsigned chars */ unsigned long size_filename; /* filename length 2 unsigned chars */
unsigned long size_file_extra; /* extra field length 2 unsigned chars */ unsigned long size_file_extra; /* extra field length 2 unsigned chars */
unsigned long size_file_comment; /* file comment length 2 unsigned chars */ unsigned long size_file_comment; /* file comment length 2 unsigned chars */
unsigned long disk_num_start; /* disk number start 2 unsigned chars */ unsigned long disk_num_start; /* disk number start 2 unsigned chars */
unsigned long internal_fa; /* internal file attributes 2 unsigned chars */ unsigned long internal_fa; /* internal file attributes 2 unsigned chars */
unsigned long external_fa; /* external file attributes 4 unsigned chars */ unsigned long external_fa; /* external file attributes 4 unsigned chars */
tm_unz tmu_date; tm_unz tmu_date;
} unz_file_info; } unz_file_info;
/* unz_file_info_interntal contain internal info about a file in zipfile*/ /* unz_file_info_interntal contain internal info about a file in zipfile*/
typedef struct unz_file_info_internal_s typedef struct unz_file_info_internal_s
{ {
unsigned long offset_curfile;/* relative offset of static header 4 unsigned chars */ unsigned long offset_curfile;/* relative offset of static header 4 unsigned chars */
} unz_file_info_internal; } unz_file_info_internal;
typedef void* (*alloc_func) (void* opaque, unsigned int items, unsigned int size); typedef void* (*alloc_func) (void* opaque, unsigned int items, unsigned int size);
@ -93,31 +93,31 @@ typedef void (*free_func) (void* opaque, void* address);
struct internal_state; struct internal_state;
typedef struct z_stream_s { typedef struct z_stream_s {
unsigned char *next_in; /* next input unsigned char */ unsigned char *next_in; /* next input unsigned char */
unsigned int avail_in; /* number of unsigned chars available at next_in */ unsigned int avail_in; /* number of unsigned chars available at next_in */
unsigned long total_in; /* total nb of input unsigned chars read so */ unsigned long total_in; /* total nb of input unsigned chars read so */
unsigned char *next_out; /* next output unsigned char should be put there */ unsigned char *next_out; /* next output unsigned char should be put there */
unsigned int avail_out; /* remaining free space at next_out */ unsigned int avail_out; /* remaining free space at next_out */
unsigned long total_out; /* total nb of unsigned chars output so */ unsigned long total_out; /* total nb of unsigned chars output so */
char *msg; /* last error message, NULL if no error */ char *msg; /* last error message, NULL if no error */
struct internal_state *state; /* not visible by applications */ struct internal_state *state; /* not visible by applications */
alloc_func zalloc; /* used to allocate the internal state */ alloc_func zalloc; /* used to allocate the internal state */
free_func zfree; /* used to free the internal state */ free_func zfree; /* used to free the internal state */
unsigned char* opaque; /* private data object passed to zalloc and zfree */ unsigned char* opaque; /* private data object passed to zalloc and zfree */
int data_type; /* best guess about the data type: ascii or binary */ int data_type; /* best guess about the data type: ascii or binary */
unsigned long adler; /* adler32 value of the uncompressed data */ unsigned long adler; /* adler32 value of the uncompressed data */
unsigned long reserved; /* reserved for future use */ unsigned long reserved; /* reserved for future use */
} z_stream; } z_stream;
typedef z_stream *z_streamp; typedef z_stream *z_streamp;
/* file_in_zip_read_info_s contain internal information about a file in zipfile, /* file_in_zip_read_info_s contain internal information about a file in zipfile,
when reading and decompress it */ when reading and decompress it */
typedef struct typedef struct
{ {
char *read_buffer; /* internal buffer for compressed data */ char *read_buffer; /* internal buffer for compressed data */
@ -158,8 +158,8 @@ typedef struct
unz_file_info cur_file_info; /* public info about the current file in zip*/ unz_file_info cur_file_info; /* public info about the current file in zip*/
unz_file_info_internal cur_file_info_internal; /* private info about it*/ unz_file_info_internal cur_file_info_internal; /* private info about it*/
file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current
file if we are decompressing it */ file if we are decompressing it */
} unz_s; } unz_s;
#define UNZ_OK (0) #define UNZ_OK (0)
@ -191,11 +191,11 @@ extern unzFile unzReOpen (const char* path, unzFile file);
/* /*
Open a Zip file. path contain the full pathname (by example, Open a Zip file. path contain the full pathname (by example,
on a Windows NT computer "c:\\zlib\\zlib111.zip" or on an Unix computer on a Windows NT computer "c:\\zlib\\zlib111.zip" or on an Unix computer
"zlib/zlib111.zip". "zlib/zlib111.zip".
If the zipfile cannot be opened (file don't exist or in not valid), the If the zipfile cannot be opened (file don't exist or in not valid), the
return value is NULL. return value is NULL.
Else, the return value is a unzFile Handle, usable with other function Else, the return value is a unzFile Handle, usable with other function
of this unzip package. of this unzip package.
*/ */
@ -204,7 +204,7 @@ extern int unzClose (unzFile file);
/* /*
Close a ZipFile opened with unzipOpen. Close a ZipFile opened with unzipOpen.
If there is files inside the .Zip opened with unzOpenCurrentFile (see later), If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
these files MUST be closed with unzipCloseCurrentFile before call unzipClose. these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
return UNZ_OK if there is no problem. */ return UNZ_OK if there is no problem. */
extern int unzGetGlobalInfo (unzFile file, unz_global_info *pglobal_info); extern int unzGetGlobalInfo (unzFile file, unz_global_info *pglobal_info);
@ -273,7 +273,7 @@ extern int unzGetCurrentFileInfo (unzFile file, unz_file_info *pfile_info, char
/* /*
Get Info about the current file Get Info about the current file
if pfile_info!=NULL, the *pfile_info structure will contain somes info about if pfile_info!=NULL, the *pfile_info structure will contain somes info about
the current file the current file
if szFileName!=NULL, the filemane string will be copied in szFileName if szFileName!=NULL, the filemane string will be copied in szFileName
(fileNameBufferSize is the size of the buffer) (fileNameBufferSize is the size of the buffer)
if extraField!=NULL, the extra field information will be copied in extraField if extraField!=NULL, the extra field information will be copied in extraField
@ -313,7 +313,7 @@ extern int unzReadCurrentFile (unzFile file, void* buf, unsigned len);
return the number of unsigned char copied if somes unsigned chars are copied return the number of unsigned char copied if somes unsigned chars are copied
return 0 if the end of file was reached return 0 if the end of file was reached
return <0 with error code if there is an error return <0 with error code if there is an error
(UNZ_ERRNO for IO error, or zLib error for uncompress error) (UNZ_ERRNO for IO error, or zLib error for uncompress error)
*/ */
extern long unztell(unzFile file); extern long unztell(unzFile file);
@ -333,7 +333,7 @@ extern int unzGetLocalExtrafield (unzFile file, void* buf, unsigned len);
/* /*
Read extra field from the current file (opened by unzOpenCurrentFile) Read extra field from the current file (opened by unzOpenCurrentFile)
This is the local-header version of the extra field (sometimes, there is This is the local-header version of the extra field (sometimes, there is
more info in the local-header version than in the central-header) more info in the local-header version than in the central-header)
if buf==NULL, it return the size of the local extra field if buf==NULL, it return the size of the local extra field

View file

@ -966,7 +966,7 @@ void idUsercmdGenLocal::Mouse( void ) {
if ( numEvents ) { if ( numEvents ) {
// //
// Study each of the buffer elements and process them. // Study each of the buffer elements and process them.
// //
for( i = 0; i < numEvents; i++ ) { for( i = 0; i < numEvents; i++ ) {
int action, value; int action, value;
@ -1015,7 +1015,7 @@ void idUsercmdGenLocal::Keyboard( void ) {
if ( numEvents ) { if ( numEvents ) {
// //
// Study each of the buffer elements and process them. // Study each of the buffer elements and process them.
// //
int key; int key;
bool state; bool state;

View file

@ -203,7 +203,7 @@ void idAsyncNetwork::WriteUserCmdDelta( idBitMsg &msg, const usercmd_t &cmd, con
msg.WriteLong( cmd.gameTime ); msg.WriteLong( cmd.gameTime );
msg.WriteByte( cmd.buttons ); msg.WriteByte( cmd.buttons );
msg.WriteShort( cmd.mx ); msg.WriteShort( cmd.mx );
msg.WriteShort( cmd.my ); msg.WriteShort( cmd.my );
msg.WriteChar( cmd.forwardmove ); msg.WriteChar( cmd.forwardmove );
msg.WriteChar( cmd.rightmove ); msg.WriteChar( cmd.rightmove );
@ -236,8 +236,8 @@ void idAsyncNetwork::ReadUserCmdDelta( const idBitMsg &msg, usercmd_t &cmd, cons
} }
cmd.gameTime = msg.ReadLong(); cmd.gameTime = msg.ReadLong();
cmd.buttons = msg.ReadByte(); cmd.buttons = msg.ReadByte();
cmd.mx = msg.ReadShort(); cmd.mx = msg.ReadShort();
cmd.my = msg.ReadShort(); cmd.my = msg.ReadShort();
cmd.forwardmove = msg.ReadChar(); cmd.forwardmove = msg.ReadChar();
cmd.rightmove = msg.ReadChar(); cmd.rightmove = msg.ReadChar();
@ -510,4 +510,3 @@ void idAsyncNetwork::BuildInvalidKeyMsg( idStr &msg, bool valid[ 2 ] ) {
msg += "\n"; msg += "\n";
msg += common->GetLanguageDict()->GetString( "#str_04304" ); msg += common->GetLanguageDict()->GetString( "#str_04304" );
} }

View file

@ -636,4 +636,3 @@ void idServerScan::SetSorting( serverSort_t sort ) {
// trigger a redraw // trigger a redraw
ApplyFilter(); ApplyFilter();
} }

View file

@ -57,7 +57,7 @@ typedef struct {
short pings[ MAX_ASYNC_CLIENTS ]; short pings[ MAX_ASYNC_CLIENTS ];
int rate[ MAX_ASYNC_CLIENTS ]; int rate[ MAX_ASYNC_CLIENTS ];
int OSMask; int OSMask;
int challenge; int challenge;
} networkServer_t; } networkServer_t;
typedef enum { typedef enum {
@ -122,8 +122,8 @@ public:
int GetChallenge( ); int GetChallenge( );
private: private:
static const int MAX_PINGREQUESTS = 32; // how many servers to query at once static const int MAX_PINGREQUESTS = 32; // how many servers to query at once
static const int REPLY_TIMEOUT = 999; // how long should we wait for a reply from a game server static const int REPLY_TIMEOUT = 999; // how long should we wait for a reply from a game server
static const int INCOMING_TIMEOUT = 1500; // when we got an incoming server list, how long till we decide the list is done static const int INCOMING_TIMEOUT = 1500; // when we got an incoming server list, how long till we decide the list is done
static const int REFRESH_START = 10000; // how long to wait when sending the initial refresh request static const int REFRESH_START = 10000; // how long to wait when sending the initial refresh request

View file

@ -1261,7 +1261,7 @@ void idAF::RemoveBindConstraints( void ) {
name.Strip( "bindConstraint " ); name.Strip( "bindConstraint " );
if ( physicsObj.GetConstraint( name ) ) { if ( physicsObj.GetConstraint( name ) ) {
physicsObj.DeleteConstraint( name ); physicsObj.DeleteConstraint( name );
} }
kv = args.MatchPrefix( "bindConstraint ", kv ); kv = args.MatchPrefix( "bindConstraint ", kv );

View file

@ -2838,7 +2838,7 @@ idRenderModel *idGameEdit::AF_CreateMesh( const idDict &args, idVec3 &meshOrigin
modifiedAxis[ jointNum ] = ( bodyAxis[i] * originalJoints[jointNum].ToMat3().Transpose() ).Transpose() * ( newBodyAxis[i] * meshAxis.Transpose() ); modifiedAxis[ jointNum ] = ( bodyAxis[i] * originalJoints[jointNum].ToMat3().Transpose() ).Transpose() * ( newBodyAxis[i] * meshAxis.Transpose() );
// FIXME: calculate correct modifiedOrigin // FIXME: calculate correct modifiedOrigin
modifiedOrigin[ jointNum ] = originalJoints[ jointNum ].ToVec3(); modifiedOrigin[ jointNum ] = originalJoints[ jointNum ].ToVec3();
} }
} }
// apply joint modifications to the skeleton // apply joint modifications to the skeleton

View file

@ -607,7 +607,7 @@ void idActor::Spawn( void ) {
int headAnim = headAnimator->GetAnim( "def_head" ); int headAnim = headAnimator->GetAnim( "def_head" );
if ( headAnim ) { if ( headAnim ) {
if ( headEnt ) { if ( headEnt ) {
headAnimator->CycleAnim( ANIMCHANNEL_ALL, headAnim, gameLocal.time, 0 ); headAnimator->CycleAnim( ANIMCHANNEL_ALL, headAnim, gameLocal.time, 0 );
} else { } else {
headAnimator->CycleAnim( ANIMCHANNEL_HEAD, headAnim, gameLocal.time, 0 ); headAnimator->CycleAnim( ANIMCHANNEL_HEAD, headAnim, gameLocal.time, 0 );
} }
@ -3197,7 +3197,7 @@ void idActor::Event_NextEnemy( idEntity *ent ) {
} }
} }
idThread::ReturnEntity( NULL ); idThread::ReturnEntity( NULL );
} }
/* /*

View file

@ -386,7 +386,7 @@ bool idBrittleFracture::UpdateRenderEntity( renderEntity_s *renderEntity, const
} }
packedColor = PackColor( idVec4( renderEntity->shaderParms[ SHADERPARM_RED ] * fade, packedColor = PackColor( idVec4( renderEntity->shaderParms[ SHADERPARM_RED ] * fade,
renderEntity->shaderParms[ SHADERPARM_GREEN ] * fade, renderEntity->shaderParms[ SHADERPARM_GREEN ] * fade,
renderEntity->shaderParms[ SHADERPARM_BLUE ] * fade, renderEntity->shaderParms[ SHADERPARM_BLUE ] * fade,
fade ) ); fade ) );
const idWinding &winding = shards[i]->winding; const idWinding &winding = shards[i]->winding;
@ -916,7 +916,7 @@ void idBrittleFracture::DropFloatingIslands( const idVec3 &point, const idVec3 &
continue; continue;
} }
queueStart = 0; queueStart = 0;
queueEnd = 1; queueEnd = 1;
queue[0] = shards[i]; queue[0] = shards[i];
shards[i]->islandNum = numIslands+1; shards[i]->islandNum = numIslands+1;

View file

@ -63,4 +63,3 @@ private:
void Event_Trigger( idEntity *activator ); void Event_Trigger( idEntity *activator );
}; };

View file

@ -151,8 +151,8 @@ ABSTRACT_DECLARATION( idClass, idEntity )
EVENT( EV_GetMins, idEntity::Event_GetMins) EVENT( EV_GetMins, idEntity::Event_GetMins)
EVENT( EV_GetMaxs, idEntity::Event_GetMaxs ) EVENT( EV_GetMaxs, idEntity::Event_GetMaxs )
EVENT( EV_Touches, idEntity::Event_Touches ) EVENT( EV_Touches, idEntity::Event_Touches )
EVENT( EV_SetGuiParm, idEntity::Event_SetGuiParm ) EVENT( EV_SetGuiParm, idEntity::Event_SetGuiParm )
EVENT( EV_SetGuiFloat, idEntity::Event_SetGuiFloat ) EVENT( EV_SetGuiFloat, idEntity::Event_SetGuiFloat )
EVENT( EV_GetNextKey, idEntity::Event_GetNextKey ) EVENT( EV_GetNextKey, idEntity::Event_GetNextKey )
EVENT( EV_SetKey, idEntity::Event_SetKey ) EVENT( EV_SetKey, idEntity::Event_SetKey )
EVENT( EV_GetKey, idEntity::Event_GetKey ) EVENT( EV_GetKey, idEntity::Event_GetKey )
@ -2337,7 +2337,7 @@ void idEntity::JoinTeam( idEntity *teammember ) {
ent->teamChain->teamMaster = master; ent->teamChain->teamMaster = master;
} }
prev->teamChain = this; prev->teamChain = this;
ent->teamChain = next; ent->teamChain = next;
} }
@ -2867,9 +2867,9 @@ explosions and melee attacks.
============ ============
*/ */
bool idEntity::CanDamage( const idVec3 &origin, idVec3 &damagePoint ) const { bool idEntity::CanDamage( const idVec3 &origin, idVec3 &damagePoint ) const {
idVec3 dest; idVec3 dest;
trace_t tr; trace_t tr;
idVec3 midpoint; idVec3 midpoint;
// use the midpoint of the bounds instead of the origin, because // use the midpoint of the bounds instead of the origin, because
// bmodels may have their origin at 0,0,0 // bmodels may have their origin at 0,0,0
@ -4387,9 +4387,9 @@ void idEntity::Event_RestorePosition( void ) {
if ( spawnArgs.GetMatrix( "rotation", "1 0 0 0 1 0 0 0 1", axis ) ) { if ( spawnArgs.GetMatrix( "rotation", "1 0 0 0 1 0 0 0 1", axis ) ) {
angles = axis.ToAngles(); angles = axis.ToAngles();
} else { } else {
angles[ 0 ] = 0; angles[ 0 ] = 0;
angles[ 1 ] = spawnArgs.GetFloat( "angle" ); angles[ 1 ] = spawnArgs.GetFloat( "angle" );
angles[ 2 ] = 0; angles[ 2 ] = 0;
} }
Teleport( org, angles, NULL ); Teleport( org, angles, NULL );

View file

@ -513,12 +513,12 @@ protected:
private: private:
void Event_GetJointHandle( const char *jointname ); void Event_GetJointHandle( const char *jointname );
void Event_ClearAllJoints( void ); void Event_ClearAllJoints( void );
void Event_ClearJoint( jointHandle_t jointnum ); void Event_ClearJoint( jointHandle_t jointnum );
void Event_SetJointPos( jointHandle_t jointnum, jointModTransform_t transform_type, const idVec3 &pos ); void Event_SetJointPos( jointHandle_t jointnum, jointModTransform_t transform_type, const idVec3 &pos );
void Event_SetJointAngle( jointHandle_t jointnum, jointModTransform_t transform_type, const idAngles &angles ); void Event_SetJointAngle( jointHandle_t jointnum, jointModTransform_t transform_type, const idAngles &angles );
void Event_GetJointPos( jointHandle_t jointnum ); void Event_GetJointPos( jointHandle_t jointnum );
void Event_GetJointAngle( jointHandle_t jointnum ); void Event_GetJointAngle( jointHandle_t jointnum );
}; };
#endif /* !__GAME_ENTITY_H__ */ #endif /* !__GAME_ENTITY_H__ */

View file

@ -43,7 +43,7 @@ const idEventDef EV_Fx_KillFx( "_killfx" );
const idEventDef EV_Fx_Action( "_fxAction", "e" ); // implemented by subclasses const idEventDef EV_Fx_Action( "_fxAction", "e" ); // implemented by subclasses
CLASS_DECLARATION( idEntity, idEntityFx ) CLASS_DECLARATION( idEntity, idEntityFx )
EVENT( EV_Activate, idEntityFx::Event_Trigger ) EVENT( EV_Activate, idEntityFx::Event_Trigger )
EVENT( EV_Fx_KillFx, idEntityFx::Event_ClearFx ) EVENT( EV_Fx_KillFx, idEntityFx::Event_ClearFx )
END_CLASS END_CLASS

View file

@ -239,7 +239,7 @@ public:
// Animation system calls for non-game based skeletal rendering. // Animation system calls for non-game based skeletal rendering.
virtual idRenderModel * ANIM_GetModelFromEntityDef( const char *classname ); virtual idRenderModel * ANIM_GetModelFromEntityDef( const char *classname );
virtual const idVec3 &ANIM_GetModelOffsetFromEntityDef( const char *classname ); virtual const idVec3 &ANIM_GetModelOffsetFromEntityDef( const char *classname );
virtual idRenderModel * ANIM_GetModelFromEntityDef( const idDict *args ); virtual idRenderModel * ANIM_GetModelFromEntityDef( const idDict *args );
virtual idRenderModel * ANIM_GetModelFromName( const char *modelName ); virtual idRenderModel * ANIM_GetModelFromName( const char *modelName );
virtual const idMD5Anim * ANIM_GetAnimFromEntityDef( const char *classname, const char *animname ); virtual const idMD5Anim * ANIM_GetAnimFromEntityDef( const char *classname, const char *animname );

View file

@ -176,7 +176,7 @@ void idDragEntity::Update( idPlayer *player ) {
player->GetViewPos( viewPoint, viewAxis ); player->GetViewPos( viewPoint, viewAxis );
// if no entity selected for dragging // if no entity selected for dragging
if ( !dragEnt.GetEntity() ) { if ( !dragEnt.GetEntity() ) {
if ( player->usercmd.buttons & BUTTON_ATTACK ) { if ( player->usercmd.buttons & BUTTON_ATTACK ) {
@ -470,7 +470,7 @@ idEditEntities::RemoveSelectedEntity
============== ==============
*/ */
void idEditEntities::RemoveSelectedEntity( idEntity *ent ) { void idEditEntities::RemoveSelectedEntity( idEntity *ent ) {
if ( selectedEntities.Find( ent ) ) { if ( selectedEntities.Find( ent ) ) {
selectedEntities.Remove( ent ); selectedEntities.Remove( ent );
} }
} }

View file

@ -2029,7 +2029,7 @@ bool idGameLocal::InPlayerPVS( idEntity *ent ) const {
if ( playerPVS.i == -1 ) { if ( playerPVS.i == -1 ) {
return false; return false;
} }
return pvs.InCurrentPVS( playerPVS, ent->GetPVSAreas(), ent->GetNumPVSAreas() ); return pvs.InCurrentPVS( playerPVS, ent->GetPVSAreas(), ent->GetNumPVSAreas() );
} }
/* /*
@ -2043,7 +2043,7 @@ bool idGameLocal::InPlayerConnectedArea( idEntity *ent ) const {
if ( playerConnectedAreas.i == -1 ) { if ( playerConnectedAreas.i == -1 ) {
return false; return false;
} }
return pvs.InCurrentPVS( playerConnectedAreas, ent->GetPVSAreas(), ent->GetNumPVSAreas() ); return pvs.InCurrentPVS( playerConnectedAreas, ent->GetPVSAreas(), ent->GetNumPVSAreas() );
} }
/* /*
@ -2058,7 +2058,7 @@ void idGameLocal::UpdateGravity( void ) {
if ( g_gravity.GetFloat() == 0.0f ) { if ( g_gravity.GetFloat() == 0.0f ) {
g_gravity.SetFloat( 1.0f ); g_gravity.SetFloat( 1.0f );
} }
gravity.Set( 0, 0, -g_gravity.GetFloat() ); gravity.Set( 0, 0, -g_gravity.GetFloat() );
// update all physics objects // update all physics objects
for( ent = spawnedEntities.Next(); ent != NULL; ent = ent->spawnNode.Next() ) { for( ent = spawnedEntities.Next(); ent != NULL; ent = ent->spawnNode.Next() ) {
@ -3285,7 +3285,7 @@ int idGameLocal::GetTargets( const idDict &args, idList< idEntityPtr<idEntity> >
ent = FindEntity( arg->GetValue() ); ent = FindEntity( arg->GetValue() );
if ( ent ) { if ( ent ) {
idEntityPtr<idEntity> &entityPtr = list.Alloc(); idEntityPtr<idEntity> &entityPtr = list.Alloc();
entityPtr = ent; entityPtr = ent;
} }
} }
} }
@ -3546,7 +3546,7 @@ void idGameLocal::RadiusDamage( const idVec3 &origin, idEntity *inflictor, idEnt
idEntity * entityList[ MAX_GENTITIES ]; idEntity * entityList[ MAX_GENTITIES ];
int numListedEntities; int numListedEntities;
idBounds bounds; idBounds bounds;
idVec3 v, damagePoint, dir; idVec3 v, damagePoint, dir;
int i, e, damage, radius, push; int i, e, damage, radius, push;
const idDict *damageDef = FindEntityDefDict( damageDefName, false ); const idDict *damageDef = FindEntityDefDict( damageDefName, false );
@ -4365,4 +4365,3 @@ idGameLocal::GetMapLoadingGUI
=============== ===============
*/ */
void idGameLocal::GetMapLoadingGUI( char gui[ MAX_STRING_CHARS ] ) { } void idGameLocal::GetMapLoadingGUI( char gui[ MAX_STRING_CHARS ] ) { }

View file

@ -1580,7 +1580,7 @@ bool idGameLocal::DownloadRequest( const char *IP, const char *guid, const char
reply += ";"; reply += ";";
} }
if ( pakList[ i ][ 0 ] == '\0' ) { if ( pakList[ i ][ 0 ] == '\0' ) {
if ( i == 0 ) { if ( i == 0 ) {
// pak 0 will always miss when client doesn't ask for game bin // pak 0 will always miss when client doesn't ask for game bin
common->DPrintf( "no game pak request\n" ); common->DPrintf( "no game pak request\n" );
} else { } else {

View file

@ -729,7 +729,7 @@ void idObjective::Event_Trigger( idEntity *activator ) {
//Pickup( player ); //Pickup( player );
if ( spawnArgs.GetString( "inv_objective", NULL ) ) { if ( spawnArgs.GetString( "inv_objective", NULL ) ) {
if ( player && player->hud ) { if ( player && player->hud ) {
idStr shotName = gameLocal.GetMapName(); idStr shotName = gameLocal.GetMapName();
shotName.StripFileExtension(); shotName.StripFileExtension();
shotName += "/"; shotName += "/";
@ -885,7 +885,7 @@ idMoveableItem::Save
================ ================
*/ */
void idMoveableItem::Save( idSaveGame *savefile ) const { void idMoveableItem::Save( idSaveGame *savefile ) const {
savefile->WriteStaticObject( physicsObj ); savefile->WriteStaticObject( physicsObj );
savefile->WriteClipModel( trigger ); savefile->WriteClipModel( trigger );
@ -1310,7 +1310,7 @@ void idObjectiveComplete::Event_Trigger( idEntity *activator ) {
RemoveItem( player ); RemoveItem( player );
if ( spawnArgs.GetString( "inv_objective", NULL ) ) { if ( spawnArgs.GetString( "inv_objective", NULL ) ) {
if ( player->hud ) { if ( player->hud ) {
player->hud->SetStateString( "objective", "2" ); player->hud->SetStateString( "objective", "2" );
player->hud->SetStateString( "objectivetext", spawnArgs.GetString( "objectivetext" ) ); player->hud->SetStateString( "objectivetext", spawnArgs.GetString( "objectivetext" ) );
player->hud->SetStateString( "objectivetitle", spawnArgs.GetString( "objectivetitle" ) ); player->hud->SetStateString( "objectivetitle", spawnArgs.GetString( "objectivetitle" ) );

View file

@ -123,10 +123,10 @@ void idGameEdit::ParseSpawnArgsToRenderLight( const idDict *args, renderLight_t
idMat3 mat; idMat3 mat;
if ( !args->GetMatrix( "light_rotation", "1 0 0 0 1 0 0 0 1", mat ) ) { if ( !args->GetMatrix( "light_rotation", "1 0 0 0 1 0 0 0 1", mat ) ) {
if ( !args->GetMatrix( "rotation", "1 0 0 0 1 0 0 0 1", mat ) ) { if ( !args->GetMatrix( "rotation", "1 0 0 0 1 0 0 0 1", mat ) ) {
args->GetFloat( "angle", "0", angles[ 1 ] ); args->GetFloat( "angle", "0", angles[ 1 ] );
angles[ 0 ] = 0; angles[ 0 ] = 0;
angles[ 1 ] = idMath::AngleNormalize360( angles[ 1 ] ); angles[ 1 ] = idMath::AngleNormalize360( angles[ 1 ] );
angles[ 2 ] = 0; angles[ 2 ] = 0;
mat = angles.ToMat3(); mat = angles.ToMat3();
} }
} }

View file

@ -2907,8 +2907,8 @@ idPhantomObjects::idPhantomObjects
idPhantomObjects::idPhantomObjects() { idPhantomObjects::idPhantomObjects() {
target = NULL; target = NULL;
end_time = 0; end_time = 0;
throw_time = 0.0f; throw_time = 0.0f;
shake_time = 0.0f; shake_time = 0.0f;
shake_ang.Zero(); shake_ang.Zero();
speed = 0.0f; speed = 0.0f;
min_wait = 0; min_wait = 0;
@ -3037,7 +3037,7 @@ void idPhantomObjects::Event_Activate( idEntity *activator ) {
const idVec3 &toPos = target.GetEntity()->GetEyePosition(); const idVec3 &toPos = target.GetEntity()->GetEyePosition();
// calculate the relative times of all the objects // calculate the relative times of all the objects
time = 0.0f; time = 0.0f;
for( i = 0; i < targetTime.Num(); i++ ) { for( i = 0; i < targetTime.Num(); i++ ) {
targetTime[ i ] = SEC2MS( time ); targetTime[ i ] = SEC2MS( time );

View file

@ -479,7 +479,7 @@ void idMoveable::Event_Activate( idEntity *activator ) {
Show(); Show();
if ( !spawnArgs.GetInt( "notPushable" ) ) { if ( !spawnArgs.GetInt( "notPushable" ) ) {
physicsObj.EnableImpact(); physicsObj.EnableImpact();
} }
physicsObj.Activate(); physicsObj.Activate();

View file

@ -522,7 +522,7 @@ idMover::FindGuiTargets
================ ================
*/ */
void idMover::FindGuiTargets( void ) { void idMover::FindGuiTargets( void ) {
gameLocal.GetTargets( spawnArgs, guiTargets, "guiTarget" ); gameLocal.GetTargets( spawnArgs, guiTargets, "guiTarget" );
} }
/* /*
@ -2418,7 +2418,7 @@ idMover_Binary::SetMoverState
=============== ===============
*/ */
void idMover_Binary::SetMoverState( moverState_t newstate, int time ) { void idMover_Binary::SetMoverState( moverState_t newstate, int time ) {
idVec3 delta; idVec3 delta;
moverState = newstate; moverState = newstate;
move_thread = 0; move_thread = 0;
@ -2880,7 +2880,7 @@ idMover_Binary::FindGuiTargets
================ ================
*/ */
void idMover_Binary::FindGuiTargets( void ) { void idMover_Binary::FindGuiTargets( void ) {
gameLocal.GetTargets( spawnArgs, guiTargets, "guiTarget" ); gameLocal.GetTargets( spawnArgs, guiTargets, "guiTarget" );
} }
/* /*
@ -3877,13 +3877,13 @@ void idDoor::Event_Activate( idEntity *activator ) {
} }
} }
if ( syncLock.Length() ) { if ( syncLock.Length() ) {
idEntity *sync = gameLocal.FindEntity( syncLock ); idEntity *sync = gameLocal.FindEntity( syncLock );
if ( sync && sync->IsType( idDoor::Type ) ) { if ( sync && sync->IsType( idDoor::Type ) ) {
if ( static_cast<idDoor *>( sync )->IsOpen() ) { if ( static_cast<idDoor *>( sync )->IsOpen() ) {
return; return;
} }
} }
} }
ActivateTargets( activator ); ActivateTargets( activator );

View file

@ -2977,7 +2977,7 @@ void idMultiplayerGame::ProcessChatMessage( int clientNum, bool team, const char
const char *prefix = NULL; const char *prefix = NULL;
int send_to; // 0 - all, 1 - specs, 2 - team int send_to; // 0 - all, 1 - specs, 2 - team
int i; int i;
idEntity *ent; idEntity *ent;
idPlayer *p; idPlayer *p;
idStr prefixed_name; idStr prefixed_name;
@ -3407,4 +3407,3 @@ idMultiplayerGame::ClientReadWarmupTime
void idMultiplayerGame::ClientReadWarmupTime( const idBitMsg &msg ) { void idMultiplayerGame::ClientReadWarmupTime( const idBitMsg &msg ) {
warmupEndTime = msg.ReadLong(); warmupEndTime = msg.ReadLong();
} }

View file

@ -368,4 +368,3 @@ ID_INLINE bool idMultiplayerGame::IsInGame( int clientNum ) {
} }
#endif /* !__MULTIPLAYERGAME_H__ */ #endif /* !__MULTIPLAYERGAME_H__ */

View file

@ -226,7 +226,7 @@ void idInventory::GetPersistantData( idDict &dict ) {
// armor // armor
dict.SetInt( "armor", armor ); dict.SetInt( "armor", armor );
// don't bother with powerups, maxhealth, maxarmor, or the clip // don't bother with powerups, maxhealth, maxarmor, or the clip
// ammo // ammo
for( i = 0; i < AMMO_NUMTYPES; i++ ) { for( i = 0; i < AMMO_NUMTYPES; i++ ) {
@ -4045,7 +4045,7 @@ void idPlayer::UpdateWeapon( void ) {
} else if ( ActiveGui() ) { } else if ( ActiveGui() ) {
// gui handling overrides weapon use // gui handling overrides weapon use
Weapon_GUI(); Weapon_GUI();
} else if ( focusCharacter && ( focusCharacter->health > 0 ) ) { } else if ( focusCharacter && ( focusCharacter->health > 0 ) ) {
Weapon_NPC(); Weapon_NPC();
} else { } else {
Weapon_Combat(); Weapon_Combat();
@ -4522,7 +4522,7 @@ void idPlayer::UpdateFocus( void ) {
// clamp the mouse to the corner // clamp the mouse to the corner
ev = sys->GenerateMouseMoveEvent( -2000, -2000 ); ev = sys->GenerateMouseMoveEvent( -2000, -2000 );
command = focusUI->HandleEvent( &ev, gameLocal.time ); command = focusUI->HandleEvent( &ev, gameLocal.time );
HandleGuiCommands( focusGUIent, command ); HandleGuiCommands( focusGUIent, command );
// move to an absolute position // move to an absolute position
ev = sys->GenerateMouseMoveEvent( pt.x * SCREEN_WIDTH, pt.y * SCREEN_HEIGHT ); ev = sys->GenerateMouseMoveEvent( pt.x * SCREEN_WIDTH, pt.y * SCREEN_HEIGHT );
@ -4957,7 +4957,7 @@ void idPlayer::AdjustHeartRate( int target, float timeInSecs, float delay, bool
return; return;
} }
lastHeartAdjust = gameLocal.time; lastHeartAdjust = gameLocal.time;
heartInfo.Init( gameLocal.time + delay * 1000, timeInSecs * 1000, heartRate, target ); heartInfo.Init( gameLocal.time + delay * 1000, timeInSecs * 1000, heartRate, target );
} }
@ -5810,7 +5810,7 @@ void idPlayer::AdjustBodyAngles( void ) {
upBlend = -frac; upBlend = -frac;
} }
animator.CurrentAnim( ANIMCHANNEL_TORSO )->SetSyncedAnimWeight( 0, downBlend ); animator.CurrentAnim( ANIMCHANNEL_TORSO )->SetSyncedAnimWeight( 0, downBlend );
animator.CurrentAnim( ANIMCHANNEL_TORSO )->SetSyncedAnimWeight( 1, forwardBlend ); animator.CurrentAnim( ANIMCHANNEL_TORSO )->SetSyncedAnimWeight( 1, forwardBlend );
animator.CurrentAnim( ANIMCHANNEL_TORSO )->SetSyncedAnimWeight( 2, upBlend ); animator.CurrentAnim( ANIMCHANNEL_TORSO )->SetSyncedAnimWeight( 2, upBlend );
@ -6015,7 +6015,7 @@ void idPlayer::Move( void ) {
if ( AI_JUMP ) { if ( AI_JUMP ) {
// bounce the view weapon // bounce the view weapon
loggedAccel_t *acc = &loggedAccel[currentLoggedAccel&(NUM_LOGGED_ACCELS-1)]; loggedAccel_t *acc = &loggedAccel[currentLoggedAccel&(NUM_LOGGED_ACCELS-1)];
currentLoggedAccel++; currentLoggedAccel++;
acc->time = gameLocal.time; acc->time = gameLocal.time;
acc->dir[2] = 200; acc->dir[2] = 200;
@ -6065,7 +6065,7 @@ void idPlayer::UpdateHud( void ) {
inventory.pickupItemNames.RemoveIndex( 0 ); inventory.pickupItemNames.RemoveIndex( 0 );
if (inventory.nextItemNum == 1 ) { if (inventory.nextItemNum == 1 ) {
inventory.onePickupTime = gameLocal.time; inventory.onePickupTime = gameLocal.time;
} else if ( inventory.nextItemNum > 5 ) { } else if ( inventory.nextItemNum > 5 ) {
inventory.nextItemNum = 1; inventory.nextItemNum = 1;
inventory.nextItemPickup = inventory.onePickupTime + 2000; inventory.nextItemPickup = inventory.onePickupTime + 2000;
} else { } else {
@ -6298,7 +6298,7 @@ void idPlayer::Think( void ) {
// service animations // service animations
if ( !spectating && !af.IsActive() && !gameLocal.inCinematic ) { if ( !spectating && !af.IsActive() && !gameLocal.inCinematic ) {
UpdateConditions(); UpdateConditions();
UpdateAnimState(); UpdateAnimState();
CheckBlink(); CheckBlink();
} }
@ -6368,7 +6368,7 @@ void idPlayer::Think( void ) {
if ( !g_stopTime.GetBool() ) { if ( !g_stopTime.GetBool() ) {
UpdateAnimation(); UpdateAnimation();
Present(); Present();
UpdateDamageEffects(); UpdateDamageEffects();
@ -7847,7 +7847,7 @@ void idPlayer::ClientPredictionThink( void ) {
// service animations // service animations
if ( !spectating && !af.IsActive() ) { if ( !spectating && !af.IsActive() ) {
UpdateConditions(); UpdateConditions();
UpdateAnimState(); UpdateAnimState();
CheckBlink(); CheckBlink();
} }

View file

@ -718,4 +718,3 @@ ID_INLINE void idPlayer::SetSelfSmooth( bool b ) {
} }
#endif /* !__GAME_PLAYER_H__ */ #endif /* !__GAME_PLAYER_H__ */

View file

@ -180,4 +180,3 @@ void idPlayerIcon::UpdateIcon( idPlayer *player, const idVec3 &origin, const idM
renderEnt.axis = axis; renderEnt.axis = axis;
gameRenderWorld->UpdateEntityDef( iconHandle, &renderEnt ); gameRenderWorld->UpdateEntityDef( iconHandle, &renderEnt );
} }

View file

@ -60,4 +60,3 @@ public:
#endif /* !_PLAYERICON_H_ */ #endif /* !_PLAYERICON_H_ */

Some files were not shown because too many files have changed in this diff Show more