More reformating and cleanup

This commit is contained in:
Walter Julius Hennecke 2012-10-17 16:26:50 +02:00
parent 14a2f98330
commit f2b7356ed4
3 changed files with 80 additions and 895 deletions

View File

@ -182,9 +182,6 @@ void CG_RankList_cmd( void ) {
/* Loop thru each val and print them */
for ( i = 0; i < MAX_RANKS; i++ ) {
/*if ( strlen( cgs.ranksData[i].consoleName ) < 1 || strlen( cgs.ranksData[i].formalName ) < 1 )
return; */
if ( cgs.ranksData[i].consoleName[0] )
CG_Printf( "%s \t - \t %s\n", cgs.ranksData[i].consoleName, cgs.ranksData[i].formalName );
else
@ -208,9 +205,6 @@ void CG_ClassList_cmd( void ) {
/* Loop thru each val and print them */
for ( i = 0; i < MAX_CLASSES; i++ ) {
/* if ( strlen( cgs.ranksData[i].consoleName ) < 1 || strlen( cgs.ranksData[i].formalName ) < 1 )
return; */
if ( cgs.classData[i].formalName[0] )
CG_Printf( "%s\n", cgs.classData[i].formalName );
else
@ -275,8 +269,6 @@ void CG_Emote_f( void ) {
int i;
animation_t *anims;
int animLength;
/* int animLengthUpper;
int animLengthLower; */
qboolean emoteFound=qfalse;
argStr = CG_Argv( 1 );
@ -301,23 +293,8 @@ void CG_Emote_f( void ) {
/* find out emote in the list
value of numEmotes calced in bg_misc.c
or if an int was supplied as an arg, use that */
/*if ( !argStr[0] >= '0' && argStr[0] <= '9' )
{
i = atoi( argStr );
if ( i > 0 || i < bg_numEmotes ) {
emote = &bg_emoteList[i];
emoteFound = qtrue;
}
else {
CG_Printf( S_COLOR_RED "ERROR: An invalid emote number was given.\n" );
return;
}
}
else
{*/
for ( i = 0; i < bg_numEmotes; i++ )
{ /* i < sizeof( emoteList ) / sizeof( emoteList[0] ) */
{
emote = &bg_emoteList[i];
if ( emote && !Q_stricmp( emote->name, argStr ) )
@ -326,7 +303,6 @@ void CG_Emote_f( void ) {
break;
}
}
/*} */
if ( !emoteFound ) {
CG_Printf( S_COLOR_RED "ERROR: Specified emote not found\n" );
@ -343,7 +319,6 @@ void CG_Emote_f( void ) {
/* Anim length for lower model */
if ( !( emote->animFlags & EMOTE_LOOP_UPPER ) && !( emote->animFlags & EMOTE_LOOP_LOWER ) ) {
/* numFrames * (1000 / fps = frameLerp ) = time length */
animLength = anims->numFrames * anims->frameLerp;
}
else {
@ -644,7 +619,6 @@ void CG_ThirdPersonRevert_f ( void ) {
for (i = 0; i < 5; i++ ){
trap_Cvar_VariableStringBuffer ( cVars[i], value, sizeof( value ) );
TPSVars[i]->value = atof( value );
/* Q_strncpyz( TPSVars[i]->string, value, 256 ); */
}
}
@ -687,32 +661,6 @@ void CG_ToggleThirdPerson_f ( void ) {
trap_Cvar_Set( "cg_thirdPerson", va( "%i", value ) );
}
/*TiM - Test the ability to handle binary data streams
void CG_LoadBinaryData( void )
{
const char *fileRoute = "rpgx.idkey";
fileHandle_t f;
int len;
byte buffer[SECURITY_SIZE];
rpgxSecurityFile_t *c;
if (!fileRoute)
return;
len = trap_FS_FOpenFile( fileRoute, &f, FS_READ );
if ( !len )
return;
trap_FS_Read( buffer, len, f );
trap_FS_FCloseFile( f );
c = (rpgxSecurityFile_t *)((byte *)buffer);
CG_Printf( "ID: %i, Hash: %i, PID: %i\n", c->ID, c->hash > 0xFFFF ? 1 : 0, c->playerID > 0xFFFF ? 1 : 0);
CG_Printf( "%i\n", (unsigned)atoi( sv_securityHash.string ) > 0xFFFF ? 1 : 0 );
}*/
/*================================================================================*/
typedef struct {
@ -772,15 +720,12 @@ static consoleCommand_t commands[] = {
{ "loaddefered", CG_LoadDeferredPlayers }, /* spelled wrong, but not changing for demo... */
{ "+analysis", CG_ObjectivesDown_f },
{ "-analysis", CG_ObjectivesUp_f },
/*{ "+shake", CG_ShakeCamera_cmd },*/
{ "iloverpg-x", CG_Cough_cmd },
/*{ "commandList", CG_CmdList_cmd },*/
{ "rankList", CG_RankList_cmd },
{ "locationList", CG_BeamList_cmd },
{ "classList", CG_ClassList_cmd },
{ "emote", CG_Emote_f },
{ "locedit", CG_LocEdit_f },
/*{ "fileID", CG_LoadBinaryData }*/
};
@ -836,7 +781,6 @@ void CG_InitConsoleCommands( void ) {
trap_AddCommand ("say_team");
/* START MOD */
trap_AddCommand ("say_class");
/*trap_AddCommand ("giveTo");*/
trap_AddCommand ("forceName");
trap_AddCommand ("forceKill");
trap_AddCommand ("forceKillRadius");

File diff suppressed because it is too large Load Diff

View File

@ -216,8 +216,6 @@ void PM_StepSlideMove( qboolean gravity ) {
vec3_t down_o, down_v;
vec3_t slideMove, stepUpMove;
trace_t trace;
// float down_dist, up_dist;
// vec3_t delta, delta2;
vec3_t up, down;
playerState_t *ps = pm->ps;