Fix all whitespace errors

Excluding 3rd party files.
This commit is contained in:
dhewg 2011-12-06 19:20:15 +01:00 committed by Daniel Gibson
parent eac3112d2d
commit c7c187e4dc
424 changed files with 5695 additions and 5729 deletions

View file

@ -1261,7 +1261,7 @@ void idAF::RemoveBindConstraints( void ) {
name.Strip( "bindConstraint " );
if ( physicsObj.GetConstraint( name ) ) {
physicsObj.DeleteConstraint( name );
physicsObj.DeleteConstraint( name );
}
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() );
// FIXME: calculate correct modifiedOrigin
modifiedOrigin[ jointNum ] = originalJoints[ jointNum ].ToVec3();
}
}
}
// apply joint modifications to the skeleton

View file

@ -627,7 +627,7 @@ void idActor::Spawn( void ) {
int headAnim = headAnimator->GetAnim( "def_head" );
if ( headAnim ) {
if ( headEnt ) {
headAnimator->CycleAnim( ANIMCHANNEL_ALL, headAnim, gameLocal.time, 0 );
headAnimator->CycleAnim( ANIMCHANNEL_ALL, headAnim, gameLocal.time, 0 );
} else {
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,
renderEntity->shaderParms[ SHADERPARM_GREEN ] * fade,
renderEntity->shaderParms[ SHADERPARM_BLUE ] * fade,
renderEntity->shaderParms[ SHADERPARM_BLUE ] * fade,
fade ) );
const idWinding &winding = shards[i]->winding;
@ -946,7 +946,7 @@ void idBrittleFracture::DropFloatingIslands( const idVec3 &point, const idVec3 &
continue;
}
queueStart = 0;
queueStart = 0;
queueEnd = 1;
queue[0] = shards[i];
shards[i]->islandNum = numIslands+1;

View file

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

View file

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

View file

@ -536,12 +536,12 @@ protected:
private:
void Event_GetJointHandle( const char *jointname );
void Event_ClearAllJoints( void );
void Event_ClearJoint( jointHandle_t jointnum );
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_GetJointPos( jointHandle_t jointnum );
void Event_GetJointAngle( jointHandle_t jointnum );
void Event_ClearAllJoints( void );
void Event_ClearJoint( jointHandle_t jointnum );
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_GetJointPos( 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
CLASS_DECLARATION( idEntity, idEntityFx )
EVENT( EV_Activate, idEntityFx::Event_Trigger )
EVENT( EV_Activate, idEntityFx::Event_Trigger )
EVENT( EV_Fx_KillFx, idEntityFx::Event_ClearFx )
END_CLASS

View file

@ -241,7 +241,7 @@ public:
// Animation system calls for non-game based skeletal rendering.
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_GetModelFromName( const char *modelName );
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 );
// if no entity selected for dragging
if ( !dragEnt.GetEntity() ) {
if ( !dragEnt.GetEntity() ) {
if ( player->usercmd.buttons & BUTTON_ATTACK ) {
@ -470,7 +470,7 @@ idEditEntities::RemoveSelectedEntity
==============
*/
void idEditEntities::RemoveSelectedEntity( idEntity *ent ) {
if ( selectedEntities.Find( ent ) ) {
if ( selectedEntities.Find( ent ) ) {
selectedEntities.Remove( ent );
}
}

View file

@ -2240,7 +2240,7 @@ bool idGameLocal::InPlayerPVS( idEntity *ent ) const {
if ( playerPVS.i == -1 ) {
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 ) {
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 ) {
g_gravity.SetFloat( 1.0f );
}
gravity.Set( 0, 0, -g_gravity.GetFloat() );
gravity.Set( 0, 0, -g_gravity.GetFloat() );
// update all physics objects
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() );
if ( ent ) {
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 ];
int numListedEntities;
idBounds bounds;
idVec3 v, damagePoint, dir;
idVec3 v, damagePoint, dir;
int i, e, damage, radius, push;
const idDict *damageDef = FindEntityDefDict( damageDefName, false );
@ -4983,4 +4983,3 @@ idGameLocal::GetMapLoadingGUI
===============
*/
void idGameLocal::GetMapLoadingGUI( char gui[ MAX_STRING_CHARS ] ) { }

View file

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

View file

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

View file

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

View file

@ -2973,8 +2973,8 @@ idPhantomObjects::idPhantomObjects
idPhantomObjects::idPhantomObjects() {
target = NULL;
end_time = 0;
throw_time = 0.0f;
shake_time = 0.0f;
throw_time = 0.0f;
shake_time = 0.0f;
shake_ang.Zero();
speed = 0.0f;
min_wait = 0;
@ -3095,7 +3095,7 @@ void idPhantomObjects::Event_Activate( idEntity *activator ) {
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;
for( i = 0; i < targetTime.Num(); i++ ) {
targetTime[ i ] = SEC2MS( time );

View file

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

View file

@ -524,7 +524,7 @@ idMover::FindGuiTargets
================
*/
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 ) {
idVec3 delta;
idVec3 delta;
moverState = newstate;
move_thread = 0;
@ -2911,7 +2911,7 @@ idMover_Binary::FindGuiTargets
================
*/
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 );
if ( sync && sync->IsType( idDoor::Type ) ) {
if ( static_cast<idDoor *>( sync )->IsOpen() ) {
return;
}
}
return;
}
}
}
ActivateTargets( activator );

View file

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

View file

@ -51,7 +51,7 @@ typedef enum {
GAME_TDM,
GAME_LASTMAN,
#ifdef CTF
GAME_CTF,
GAME_CTF,
GAME_COUNT,
#endif
} gameType_t;
@ -60,10 +60,10 @@ typedef enum {
// Used by the UI
typedef enum {
FLAGSTATUS_INBASE = 0,
FLAGSTATUS_TAKEN = 1,
FLAGSTATUS_STRAY = 2,
FLAGSTATUS_NONE = 3
FLAGSTATUS_INBASE = 0,
FLAGSTATUS_TAKEN = 1,
FLAGSTATUS_STRAY = 2,
FLAGSTATUS_NONE = 3
} flagStatus_t;
#endif
@ -286,14 +286,14 @@ public:
void ServerClientConnect( int clientNum );
#ifdef CTF
void ClearHUDStatus( void );
int GetFlagPoints( int team ); // Team points in CTF
void ClearHUDStatus( void );
int GetFlagPoints( int team ); // Team points in CTF
void SetFlagMsg( bool b ); // allow flag event messages to be sent
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_blue_flag; // Ent num of blue 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
#endif
void PlayerStats( int clientNum, char *data, const int len );
@ -388,7 +388,7 @@ private:
#endif
#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 );
#endif
@ -441,12 +441,12 @@ public:
#ifdef CTF
idItemTeam * GetTeamFlag( int team );
flagStatus_t GetFlagStatus( int team );
flagStatus_t GetFlagStatus( int team );
void TeamScoreCTF( int team, int delta );
void PlayerScoreCTF( int playerIdx, int delta );
// returns entityNum to team flag carrier, -1 if no flag carrier
int GetFlagCarrier( int team );
void UpdateScoreboardFlagStatus( void );
void UpdateScoreboardFlagStatus( void );
void SetBestGametype( const char * map );
void ReloadScoreboard();
@ -480,4 +480,3 @@ ID_INLINE bool idMultiplayerGame::IsInGame( int clientNum ) {
}
#endif /* !__MULTIPLAYERGAME_H__ */

View file

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

View file

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

View file

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

View file

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

View file

@ -1690,7 +1690,7 @@ void FullscreenFXManager::Initialize( idPlayerView *pv ) {
renderSystem->CaptureRenderToImage( "_accum" );
renderSystem->UnCrop();
renderSystem->CropRenderSize( 512, 256, true );
renderSystem->CropRenderSize( 512, 256, true );
renderSystem->CaptureRenderToImage( "_scratch" );
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" );
#ifdef CTF
if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") )
{
light_shader = "lights/midnight_grenade";
}
if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") )
{
light_shader = "lights/midnight_grenade";
}
#endif
if ( *light_shader ) {
@ -925,13 +925,13 @@ void idProjectile::Explode( const trace_t &collision, idEntity *ignore ) {
renderLight.lightRadius[2] = spawnArgs.GetFloat( "explode_light_radius" );
#ifdef CTF
// Midnight ctf
if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") )
{
renderLight.lightRadius[0] =
renderLight.lightRadius[1] =
renderLight.lightRadius[2] = spawnArgs.GetFloat( "explode_light_radius" ) * 2;
}
// Midnight ctf
if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") )
{
renderLight.lightRadius[0] =
renderLight.lightRadius[1] =
renderLight.lightRadius[2] = spawnArgs.GetFloat( "explode_light_radius" ) * 2;
}
#endif
@ -943,12 +943,12 @@ void idProjectile::Explode( const trace_t &collision, idEntity *ignore ) {
renderLight.shaderParms[SHADERPARM_TIMEOFFSET] = -MS2SEC( gameLocal.time );
#ifdef CTF
// Midnight ctf
if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") )
{
light_fadetime = 3.0f;
}
else
// Midnight ctf
if ( gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.serverInfo.GetBool("si_midnight") )
{
light_fadetime = 3.0f;
}
else
#endif
light_fadetime = spawnArgs.GetFloat( "explode_light_fadetime", "0.5" );
lightStartTime = gameLocal.time;

View file

@ -446,7 +446,7 @@ void idSecurityCamera::StartSweep( void ) {
sweepStart = gameLocal.time;
speed = SEC2MS( SweepSpeed() );
sweepEnd = sweepStart + speed;
PostEventMS( &EV_SecurityCam_Pause, speed );
PostEventMS( &EV_SecurityCam_Pause, speed );
StartSound( "snd_moving", SND_CHANNEL_BODY, 0, false, NULL );
}
@ -463,7 +463,7 @@ void idSecurityCamera::Event_ContinueSweep( void ) {
sweepStart = f;
speed = MS2SEC( SweepSpeed() );
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 );
SetAlertMode(SCANNING);
sweeping = true;
@ -510,7 +510,7 @@ void idSecurityCamera::Event_Pause( void ) {
sweeping = false;
StopSound( SND_CHANNEL_ANY, false );
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
// FIXME: smoke.privateStartTime += stage->timeOffset;
// FIXME: smoke.privateStartTime += stage->timeOffset;
int finalParticleTime = stage->cycleMsec * stage->spawnBunching;
int deltaMsec = gameLocal.time - systemStartTime;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -689,8 +689,8 @@ protected:
void Event_AllowHiddenMovement( int enable );
void Event_TriggerParticles( const char *jointName );
void Event_FindActorsInBounds( const idVec3 &mins, const idVec3 &maxs );
void Event_CanReachPosition( const idVec3 &pos );
void Event_CanReachEntity( idEntity *ent );
void Event_CanReachPosition( const idVec3 &pos );
void Event_CanReachEntity( idEntity *ent );
void Event_CanReachEnemy( void );
void Event_GetReachableEntityPosition( idEntity *ent );
#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(),
entPhys->GetClipModel(), entPhys->GetClipMask(), MAX_WORLD_SIZE, NULL, enemyEnt, ai_debugTrajectory.GetBool() ? 4000 : 0, vel ) ) {
idThread::ReturnEntity( ent );
return;
return;
}
}

View file

@ -308,7 +308,7 @@ CLASS_DECLARATION( idActor, idAI )
EVENT( AI_GetReachableEntityPosition, idAI::Event_GetReachableEntityPosition )
#ifdef _D3XP
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_StartEmitter, idAI::Event_StartEmitter )
EVENT( AI_GetEmitter, idAI::Event_GetEmitter )
@ -1853,7 +1853,7 @@ void idAI::Event_TestAnimMoveTowardEnemy( const char *animname ) {
}
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();
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

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 PUSH_OUTSIDE_OBSTACLES = 0.5f;
const float CLIP_BOUNDS_EPSILON = 10.0f;
const int MAX_AAS_WALL_EDGES = 256;
const int MAX_OBSTACLES = 256;
const int MAX_AAS_WALL_EDGES = 256;
const int MAX_OBSTACLES = 256;
const int MAX_PATH_NODES = 256;
const int MAX_OBSTACLE_PATH = 64;
const int MAX_OBSTACLE_PATH = 64;
typedef struct obstacle_s {
idVec2 bounds[2];
@ -425,7 +425,7 @@ int GetObstacles( const idPhysics *physics, const idAAS *aas, const idEntity *ig
lastEdgeNormal.Zero();
nextVerts[0] = nextVerts[1] = 0;
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 );
edgeDir = end.ToVec2() - start.ToVec2();
edgeDir.Normalize();

View file

@ -1192,7 +1192,7 @@ void idAnimBlend::Reset( const idDeclModelDef *_modelDef ) {
blendStartValue = 0.0f;
blendEndValue = 0.0f;
blendStartTime = 0;
blendStartTime = 0;
blendDuration = 0;
}
@ -1292,7 +1292,7 @@ idAnimBlend::SetWeight
void idAnimBlend::SetWeight( float newweight, int currentTime, int blendTime ) {
blendStartValue = GetWeight( currentTime );
blendEndValue = newweight;
blendStartTime = currentTime - 1;
blendStartTime = currentTime - 1;
blendDuration = blendTime;
if ( !newweight ) {
@ -1918,7 +1918,7 @@ bool idAnimBlend::BlendAnim( int currentTime, int channel, int numJoints, idJoin
blendFrame[j].q = jointFrame[j].q;
}
}
} else {
} else {
blendWeight += weight;
lerp = weight / blendWeight;
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.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
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 ) ) ) {
debugInfo = true;
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 {
debugInfo = false;
}
@ -5039,7 +5039,7 @@ idRenderModel *idGameEdit::ANIM_CreateMeshForAnim( idRenderModel *model, const c
const idDict *args;
const char *temp;
idRenderModel *newmodel;
const idMD5Anim *md5anim;
const idMD5Anim *md5anim;
idStr filename;
idStr extension;
const idAnim *anim;

View file

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

View file

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

View file

@ -58,19 +58,19 @@ public:
void TestAnim( const idCmdArgs &args );
void BlendAnim( const idCmdArgs &args );
static void KeepTestModel_f( const idCmdArgs &args );
static void TestModel_f( const idCmdArgs &args );
static void KeepTestModel_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 TestSkin_f( const idCmdArgs &args );
static void TestShaderParm_f( const idCmdArgs &args );
static void TestParticleStopTime_f( const idCmdArgs &args );
static void TestAnim_f( const idCmdArgs &args );
static void TestSkin_f( const idCmdArgs &args );
static void TestShaderParm_f( const idCmdArgs &args );
static void TestParticleStopTime_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 TestBlend_f( const idCmdArgs &args );
static void TestModelNextAnim_f( const idCmdArgs &args );
static void TestModelPrevAnim_f( const idCmdArgs &args );
static void TestModelNextFrame_f( const idCmdArgs &args );
static void TestModelPrevFrame_f( const idCmdArgs &args );
static void TestBlend_f( const idCmdArgs &args );
static void TestModelNextAnim_f( const idCmdArgs &args );
static void TestModelPrevAnim_f( const idCmdArgs &args );
static void TestModelNextFrame_f( const idCmdArgs &args );
static void TestModelPrevFrame_f( const idCmdArgs &args );
private:
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 );
( 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;

View file

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

View file

@ -233,7 +233,7 @@ void idSaveGame::WriteString( const char *string ) {
len = strlen( string );
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
// Append the player's location to team chat messages in CTF
if ( gameLocal.mpGame.IsGametypeFlagBased() && team && player ) {
idLocationEntity *locationEntity = gameLocal.LocationForPoint( player->GetEyePosition() );
// Append the player's location to team chat messages in CTF
if ( gameLocal.mpGame.IsGametypeFlagBased() && team && player ) {
idLocationEntity *locationEntity = gameLocal.LocationForPoint( player->GetEyePosition() );
if ( locationEntity ) {
idStr temp = "[";
temp += locationEntity->GetLocation();
temp += "] ";
temp += text;
text = temp;
}
if ( locationEntity ) {
idStr temp = "[";
temp += locationEntity->GetLocation();
temp += "] ";
temp += text;
text = temp;
}
}
}
#endif

View file

@ -112,7 +112,7 @@ idCVar ui_chat( "ui_chat", "0", CVAR_GAME | CVAR_USERINFO | CVAR_BOOL
// change anytime vars
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_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 void ClearContacts( void ) = 0;
virtual void AddContactEntity( idEntity *e ) = 0;
virtual void RemoveContactEntity( idEntity *e ) = 0;
virtual void RemoveContactEntity( idEntity *e ) = 0;
// ground contacts
virtual bool HasGroundContacts( void ) const = 0;
virtual bool IsGroundEntity( int entityNum ) const = 0;

View file

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

View file

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

View file

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

View file

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

View file

@ -85,7 +85,7 @@ opcode_t idCompiler::opcodes[] = {
{ "!=", "NE_F", 5, false, &def_float, &def_float, &def_float },
{ "!=", "NE_V", 5, false, &def_vector, &def_vector, &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_OE", 5, false, &def_object, &def_entity, &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_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_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_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;
@ -586,7 +586,7 @@ idVarDef *idCompiler::EmitOpcode( const opcode_t *op, idVarDef *var_a, idVarDef
statement = gameLocal.program.AllocStatement();
statement->linenumber = currentLineNumber;
statement->file = currentFileNumber;
statement->file = currentFileNumber;
if ( ( op->type_c == &def_void ) || op->rightAssociative ) {
// 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;
idVarDef *returnDef;
idTypeDef *returnType;
int arg;
int size;
int arg;
int size;
int resultOp;
type = func->TypeDef();
@ -1199,7 +1199,7 @@ idVarDef *idCompiler::LookupDef( const char *name, const idVarDef *baseobj ) {
type_c = field->TypeDef()->ReturnType()->Type();
} else {
type_c = field->TypeDef()->FieldType()->Type(); // field access gets type from field
if ( CheckToken( "++" ) ) {
if ( CheckToken( "++" ) ) {
if ( type_c != ev_float ) {
Error( "Invalid type for ++" );
}
@ -1303,7 +1303,7 @@ idCompiler::GetTerm
*/
idVarDef *idCompiler::GetTerm( void ) {
idVarDef *e;
int op;
int op;
if ( !immediateType && CheckToken( "~" ) ) {
e = GetExpression( TILDE_PRIORITY );
@ -1468,9 +1468,9 @@ idVarDef *idCompiler::GetExpression( int priority ) {
idVarDef *e;
idVarDef *e2;
const idVarDef *oldtype;
etype_t type_a;
etype_t type_b;
etype_t type_c;
etype_t type_a;
etype_t type_b;
etype_t type_c;
if ( priority == 0 ) {
return GetTerm();
@ -1675,8 +1675,8 @@ idCompiler::ParseReturnStatement
*/
void idCompiler::ParseReturnStatement( void ) {
idVarDef *e;
etype_t type_a;
etype_t type_b;
etype_t type_a;
etype_t type_b;
opcode_t *op;
if ( CheckToken( ";" ) ) {
@ -1748,7 +1748,7 @@ void idCompiler::ParseWhileStatement( void ) {
EmitOpcode( OP_GOTO, JumpTo( patch2 ), 0 );
} else {
patch1 = gameLocal.program.NumStatements();
EmitOpcode( OP_IFNOT, e, 0 );
EmitOpcode( OP_IFNOT, e, 0 );
ParseStatement();
EmitOpcode( OP_GOTO, JumpTo( patch2 ), 0 );
gameLocal.program.GetStatement( patch1 ).b = JumpFrom( patch1 );
@ -2116,8 +2116,8 @@ void idCompiler::ParseFunctionDef( idTypeDef *returnType, const char *name ) {
idVarDef *def;
const idVarDef *parm;
idVarDef *oldscope;
int i;
int numParms;
int i;
int numParms;
const idTypeDef *parmType;
function_t *func;
statement_t *pos;
@ -2399,7 +2399,7 @@ void idCompiler::ParseEventDef( idTypeDef *returnType, const char *name ) {
const idTypeDef *expectedType;
idTypeDef *argType;
idTypeDef *type;
int i;
int i;
int num;
const char *format;
const idEventDef *ev;
@ -2483,7 +2483,7 @@ Called at the outer layer and when a local statement is hit
================
*/
void idCompiler::ParseDefs( void ) {
idStr name;
idStr name;
idTypeDef *type;
idVarDef *def;
idVarDef *oldscope;

View file

@ -170,7 +170,7 @@ void idInterpreter::Reset( void ) {
currentFunction = 0;
NextInstruction( 0 );
threadDying = false;
threadDying = false;
doneProcessing = true;
}
@ -389,7 +389,7 @@ idInterpreter::StackTrace
*/
void idInterpreter::StackTrace( void ) const {
const function_t *f;
int i;
int i;
int top;
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 ) {
int c;
int c;
prstack_t *stack;
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.program.GetStatement( instructionPointer ).linenumber, clearStack ? " clear stack" : "" );
} 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 ) {
int i;
int i;
int j;
varEval_t var;
int pos;
int start;
int pos;
int start;
int data[ D_EVENT_MAXARGS ];
const idEventDef *evdef;
const char *format;
@ -852,11 +852,11 @@ idInterpreter::CallSysEvent
================
*/
void idInterpreter::CallSysEvent( const function_t *func, int argsize ) {
int i;
int i;
int j;
varEval_t source;
int pos;
int start;
int pos;
int start;
int data[ D_EVENT_MAXARGS ];
const idEventDef *evdef;
const char *format;
@ -939,7 +939,7 @@ bool idInterpreter::Execute( void ) {
varEval_t var_c;
varEval_t var;
statement_t *st;
int runaway;
int runaway;
idThread *newThread;
float floatVal;
idScriptObject *obj;

View file

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

View file

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

View file

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

View file

@ -85,8 +85,8 @@ private:
idDict spawnArgs;
int threadNum;
idStr threadName;
int threadNum;
idStr threadName;
int lastExecuteTime;
int creationTime;
@ -134,10 +134,10 @@ private:
void Event_SpawnFloat( const char *key, float defaultvalue );
void Event_SpawnVector( const char *key, idVec3 &defaultvalue );
void Event_ClearPersistantArgs( void );
void Event_SetPersistantArg( const char *key, const char *value );
void Event_GetPersistantString( const char *key );
void Event_GetPersistantFloat( const char *key );
void Event_GetPersistantVector( const char *key );
void Event_SetPersistantArg( const char *key, const char *value );
void Event_GetPersistantString( const char *key );
void Event_GetPersistantFloat( const char *key );
void Event_GetPersistantVector( const char *key );
void Event_AngToForward( idAngles &ang );
void Event_AngToRight( idAngles &ang );
void Event_AngToUp( idAngles &ang );
@ -176,17 +176,17 @@ private:
void Event_StartMusic( const char *name );
void Event_Warning( const char *text );
void Event_Error( const char *text );
void Event_StrLen( const char *string );
void Event_StrLeft( const char *string, int num );
void Event_StrRight( 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_StrLen( const char *string );
void Event_StrLeft( const char *string, int num );
void Event_StrRight( 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_StrToFloat( const char *string );
void Event_RadiusDamage( const idVec3 &origin, idEntity *inflictor, idEntity *attacker, idEntity *ignore, const char *damageDefName, float dmgPower );
void Event_IsClient( void );
void Event_IsMultiplayer( void );
void Event_GetFrameTime( void );
void Event_GetTicsPerSecond( void );
void Event_IsMultiplayer( void );
void Event_GetFrameTime( void );
void Event_GetTicsPerSecond( void );
void Event_CacheSoundShader( const char *soundName );
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 );
@ -255,7 +255,7 @@ public:
bool Start( void );
idThread *WaitingOnThread( void );
void SetThreadNum( int num );
int GetThreadNum( void );
int GetThreadNum( void );
void SetThreadName( const char *name );
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
# endif
#endif

View file

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

View file

@ -1261,7 +1261,7 @@ void idAF::RemoveBindConstraints( void ) {
name.Strip( "bindConstraint " );
if ( physicsObj.GetConstraint( name ) ) {
physicsObj.DeleteConstraint( name );
physicsObj.DeleteConstraint( name );
}
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() );
// FIXME: calculate correct modifiedOrigin
modifiedOrigin[ jointNum ] = originalJoints[ jointNum ].ToVec3();
}
}
}
// apply joint modifications to the skeleton

View file

@ -607,7 +607,7 @@ void idActor::Spawn( void ) {
int headAnim = headAnimator->GetAnim( "def_head" );
if ( headAnim ) {
if ( headEnt ) {
headAnimator->CycleAnim( ANIMCHANNEL_ALL, headAnim, gameLocal.time, 0 );
headAnimator->CycleAnim( ANIMCHANNEL_ALL, headAnim, gameLocal.time, 0 );
} else {
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,
renderEntity->shaderParms[ SHADERPARM_GREEN ] * fade,
renderEntity->shaderParms[ SHADERPARM_BLUE ] * fade,
renderEntity->shaderParms[ SHADERPARM_BLUE ] * fade,
fade ) );
const idWinding &winding = shards[i]->winding;
@ -916,7 +916,7 @@ void idBrittleFracture::DropFloatingIslands( const idVec3 &point, const idVec3 &
continue;
}
queueStart = 0;
queueStart = 0;
queueEnd = 1;
queue[0] = shards[i];
shards[i]->islandNum = numIslands+1;

View file

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

View file

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

View file

@ -513,12 +513,12 @@ protected:
private:
void Event_GetJointHandle( const char *jointname );
void Event_ClearAllJoints( void );
void Event_ClearJoint( jointHandle_t jointnum );
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_GetJointPos( jointHandle_t jointnum );
void Event_GetJointAngle( jointHandle_t jointnum );
void Event_ClearAllJoints( void );
void Event_ClearJoint( jointHandle_t jointnum );
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_GetJointPos( jointHandle_t jointnum );
void Event_GetJointAngle( jointHandle_t jointnum );
};
#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
CLASS_DECLARATION( idEntity, idEntityFx )
EVENT( EV_Activate, idEntityFx::Event_Trigger )
EVENT( EV_Activate, idEntityFx::Event_Trigger )
EVENT( EV_Fx_KillFx, idEntityFx::Event_ClearFx )
END_CLASS

View file

@ -239,7 +239,7 @@ public:
// Animation system calls for non-game based skeletal rendering.
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_GetModelFromName( const char *modelName );
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 );
// if no entity selected for dragging
if ( !dragEnt.GetEntity() ) {
if ( !dragEnt.GetEntity() ) {
if ( player->usercmd.buttons & BUTTON_ATTACK ) {
@ -470,7 +470,7 @@ idEditEntities::RemoveSelectedEntity
==============
*/
void idEditEntities::RemoveSelectedEntity( idEntity *ent ) {
if ( selectedEntities.Find( ent ) ) {
if ( selectedEntities.Find( ent ) ) {
selectedEntities.Remove( ent );
}
}

View file

@ -2029,7 +2029,7 @@ bool idGameLocal::InPlayerPVS( idEntity *ent ) const {
if ( playerPVS.i == -1 ) {
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 ) {
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 ) {
g_gravity.SetFloat( 1.0f );
}
gravity.Set( 0, 0, -g_gravity.GetFloat() );
gravity.Set( 0, 0, -g_gravity.GetFloat() );
// update all physics objects
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() );
if ( ent ) {
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 ];
int numListedEntities;
idBounds bounds;
idVec3 v, damagePoint, dir;
idVec3 v, damagePoint, dir;
int i, e, damage, radius, push;
const idDict *damageDef = FindEntityDefDict( damageDefName, false );
@ -4365,4 +4365,3 @@ idGameLocal::GetMapLoadingGUI
===============
*/
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 += ";";
}
if ( pakList[ i ][ 0 ] == '\0' ) {
if ( i == 0 ) {
if ( i == 0 ) {
// pak 0 will always miss when client doesn't ask for game bin
common->DPrintf( "no game pak request\n" );
} else {

View file

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

View file

@ -123,10 +123,10 @@ void idGameEdit::ParseSpawnArgsToRenderLight( const idDict *args, renderLight_t
idMat3 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 ) ) {
args->GetFloat( "angle", "0", angles[ 1 ] );
angles[ 0 ] = 0;
args->GetFloat( "angle", "0", angles[ 1 ] );
angles[ 0 ] = 0;
angles[ 1 ] = idMath::AngleNormalize360( angles[ 1 ] );
angles[ 2 ] = 0;
angles[ 2 ] = 0;
mat = angles.ToMat3();
}
}

View file

@ -2907,8 +2907,8 @@ idPhantomObjects::idPhantomObjects
idPhantomObjects::idPhantomObjects() {
target = NULL;
end_time = 0;
throw_time = 0.0f;
shake_time = 0.0f;
throw_time = 0.0f;
shake_time = 0.0f;
shake_ang.Zero();
speed = 0.0f;
min_wait = 0;
@ -3037,7 +3037,7 @@ void idPhantomObjects::Event_Activate( idEntity *activator ) {
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;
for( i = 0; i < targetTime.Num(); i++ ) {
targetTime[ i ] = SEC2MS( time );

View file

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

View file

@ -522,7 +522,7 @@ idMover::FindGuiTargets
================
*/
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 ) {
idVec3 delta;
idVec3 delta;
moverState = newstate;
move_thread = 0;
@ -2880,7 +2880,7 @@ idMover_Binary::FindGuiTargets
================
*/
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 );
if ( sync && sync->IsType( idDoor::Type ) ) {
if ( static_cast<idDoor *>( sync )->IsOpen() ) {
return;
}
}
return;
}
}
}
ActivateTargets( activator );

View file

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

View file

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

View file

@ -226,7 +226,7 @@ void idInventory::GetPersistantData( idDict &dict ) {
// 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
for( i = 0; i < AMMO_NUMTYPES; i++ ) {
@ -4045,7 +4045,7 @@ void idPlayer::UpdateWeapon( void ) {
} else if ( ActiveGui() ) {
// gui handling overrides weapon use
Weapon_GUI();
} else if ( focusCharacter && ( focusCharacter->health > 0 ) ) {
} else if ( focusCharacter && ( focusCharacter->health > 0 ) ) {
Weapon_NPC();
} else {
Weapon_Combat();
@ -4522,7 +4522,7 @@ void idPlayer::UpdateFocus( void ) {
// clamp the mouse to the corner
ev = sys->GenerateMouseMoveEvent( -2000, -2000 );
command = focusUI->HandleEvent( &ev, gameLocal.time );
HandleGuiCommands( focusGUIent, command );
HandleGuiCommands( focusGUIent, command );
// move to an absolute position
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;
}
lastHeartAdjust = gameLocal.time;
lastHeartAdjust = gameLocal.time;
heartInfo.Init( gameLocal.time + delay * 1000, timeInSecs * 1000, heartRate, target );
}
@ -5810,7 +5810,7 @@ void idPlayer::AdjustBodyAngles( void ) {
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( 2, upBlend );
@ -6015,7 +6015,7 @@ void idPlayer::Move( void ) {
if ( AI_JUMP ) {
// bounce the view weapon
loggedAccel_t *acc = &loggedAccel[currentLoggedAccel&(NUM_LOGGED_ACCELS-1)];
loggedAccel_t *acc = &loggedAccel[currentLoggedAccel&(NUM_LOGGED_ACCELS-1)];
currentLoggedAccel++;
acc->time = gameLocal.time;
acc->dir[2] = 200;
@ -6065,7 +6065,7 @@ void idPlayer::UpdateHud( void ) {
inventory.pickupItemNames.RemoveIndex( 0 );
if (inventory.nextItemNum == 1 ) {
inventory.onePickupTime = gameLocal.time;
} else if ( inventory.nextItemNum > 5 ) {
} else if ( inventory.nextItemNum > 5 ) {
inventory.nextItemNum = 1;
inventory.nextItemPickup = inventory.onePickupTime + 2000;
} else {
@ -6298,7 +6298,7 @@ void idPlayer::Think( void ) {
// service animations
if ( !spectating && !af.IsActive() && !gameLocal.inCinematic ) {
UpdateConditions();
UpdateConditions();
UpdateAnimState();
CheckBlink();
}
@ -6368,7 +6368,7 @@ void idPlayer::Think( void ) {
if ( !g_stopTime.GetBool() ) {
UpdateAnimation();
Present();
Present();
UpdateDamageEffects();
@ -7847,7 +7847,7 @@ void idPlayer::ClientPredictionThink( void ) {
// service animations
if ( !spectating && !af.IsActive() ) {
UpdateConditions();
UpdateConditions();
UpdateAnimState();
CheckBlink();
}

View file

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

View file

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

View file

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

View file

@ -719,4 +719,3 @@ void idPlayerView::RenderPlayerView( idUserInterface *hud ) {
renderSystem->DrawStretchPic( 10.0f, 380.0f, 64.0f, 64.0f, 0.0f, 0.0f, 1.0f, 1.0f, lagoMaterial );
}
}

View file

@ -1419,4 +1419,3 @@ void idPVS::ReadPVS( const pvsHandle_t handle, const idBitMsg &msg ) {
}
#endif

View file

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

View file

@ -202,7 +202,7 @@ bool idSmokeParticles::EmitSmoke( const idDeclParticle *smoke, const int systemS
}
// 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 deltaMsec = gameLocal.time - systemStartTime;

View file

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

View file

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

View file

@ -2276,10 +2276,10 @@ void idWeapon::ReadFromSnapshot( const idBitMsgDelta &msg ) {
idealState = "Fire";
}
// immediately switch back to idle
if ( WEAPON_NETFIRING && !isFiring ) {
idealState = "Idle";
}
// immediately switch back to idle
if ( WEAPON_NETFIRING && !isFiring ) {
idealState = "Idle";
}
WEAPON_NETFIRING = isFiring;
}

View file

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

View file

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

View file

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

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(),
entPhys->GetClipModel(), entPhys->GetClipMask(), MAX_WORLD_SIZE, NULL, enemyEnt, ai_debugTrajectory.GetBool() ? 4000 : 0, vel ) ) {
idThread::ReturnEntity( ent );
return;
return;
}
}

View file

@ -1704,7 +1704,7 @@ void idAI::Event_TestAnimMoveTowardEnemy( const char *animname ) {
}
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();
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 );

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 PUSH_OUTSIDE_OBSTACLES = 0.5f;
const float CLIP_BOUNDS_EPSILON = 10.0f;
const int MAX_AAS_WALL_EDGES = 256;
const int MAX_OBSTACLES = 256;
const int MAX_AAS_WALL_EDGES = 256;
const int MAX_OBSTACLES = 256;
const int MAX_PATH_NODES = 256;
const int MAX_OBSTACLE_PATH = 64;
const int MAX_OBSTACLE_PATH = 64;
typedef struct obstacle_s {
idVec2 bounds[2];
@ -425,7 +425,7 @@ int GetObstacles( const idPhysics *physics, const idAAS *aas, const idEntity *ig
lastEdgeNormal.Zero();
nextVerts[0] = nextVerts[1] = 0;
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 );
edgeDir = end.ToVec2() - start.ToVec2();
edgeDir.Normalize();

View file

@ -1106,7 +1106,7 @@ void idAnimBlend::Reset( const idDeclModelDef *_modelDef ) {
blendStartValue = 0.0f;
blendEndValue = 0.0f;
blendStartTime = 0;
blendStartTime = 0;
blendDuration = 0;
}
@ -1206,7 +1206,7 @@ idAnimBlend::SetWeight
void idAnimBlend::SetWeight( float newweight, int currentTime, int blendTime ) {
blendStartValue = GetWeight( currentTime );
blendEndValue = newweight;
blendStartTime = currentTime - 1;
blendStartTime = currentTime - 1;
blendDuration = blendTime;
if ( !newweight ) {
@ -1832,7 +1832,7 @@ bool idAnimBlend::BlendAnim( int currentTime, int channel, int numJoints, idJoin
blendFrame[j].q = jointFrame[j].q;
}
}
} else {
} else {
blendWeight += weight;
lerp = weight / blendWeight;
SIMDProcessor->BlendJoints( blendFrame, jointFrame, lerp, modelDef->GetChannelJoints( channel ), modelDef->NumJointsOnChannel( channel ) );
@ -3548,7 +3548,7 @@ void idAnimator::SyncAnimChannels( int channelNum, int fromChannelNum, int curre
toBlend.blendStartValue = 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
toBlend.AllowFrameCommands( false );
@ -4204,7 +4204,7 @@ bool idAnimator::CreateFrame( int currentTime, bool force ) {
if ( entity && ( ( g_debugAnim.GetInteger() == entity->entityNumber ) || ( g_debugAnim.GetInteger() == -2 ) ) ) {
debugInfo = true;
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 {
debugInfo = false;
}
@ -4953,7 +4953,7 @@ idRenderModel *idGameEdit::ANIM_CreateMeshForAnim( idRenderModel *model, const c
const idDict *args;
const char *temp;
idRenderModel *newmodel;
const idMD5Anim *md5anim;
const idMD5Anim *md5anim;
idStr filename;
idStr extension;
const idAnim *anim;

View file

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

View file

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

View file

@ -58,19 +58,19 @@ public:
void TestAnim( const idCmdArgs &args );
void BlendAnim( const idCmdArgs &args );
static void KeepTestModel_f( const idCmdArgs &args );
static void TestModel_f( const idCmdArgs &args );
static void KeepTestModel_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 TestSkin_f( const idCmdArgs &args );
static void TestShaderParm_f( const idCmdArgs &args );
static void TestParticleStopTime_f( const idCmdArgs &args );
static void TestAnim_f( const idCmdArgs &args );
static void TestSkin_f( const idCmdArgs &args );
static void TestShaderParm_f( const idCmdArgs &args );
static void TestParticleStopTime_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 TestBlend_f( const idCmdArgs &args );
static void TestModelNextAnim_f( const idCmdArgs &args );
static void TestModelPrevAnim_f( const idCmdArgs &args );
static void TestModelNextFrame_f( const idCmdArgs &args );
static void TestModelPrevFrame_f( const idCmdArgs &args );
static void TestBlend_f( const idCmdArgs &args );
static void TestModelNextAnim_f( const idCmdArgs &args );
static void TestModelPrevAnim_f( const idCmdArgs &args );
static void TestModelNextFrame_f( const idCmdArgs &args );
static void TestModelPrevFrame_f( const idCmdArgs &args );
private:
idEntityPtr<idEntity> head;

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