mirror of
https://github.com/UberGames/rpgxEF.git
synced 2024-11-10 07:11:34 +00:00
More reformating and cleanup
This commit is contained in:
parent
14a2f98330
commit
f2b7356ed4
3 changed files with 80 additions and 895 deletions
|
@ -181,10 +181,7 @@ void CG_RankList_cmd( void ) {
|
||||||
CG_Printf( S_COLOR_GREEN "Console Name \t - \t Formal Name\n" );
|
CG_Printf( S_COLOR_GREEN "Console Name \t - \t Formal Name\n" );
|
||||||
|
|
||||||
/* Loop thru each val and print them */
|
/* Loop thru each val and print them */
|
||||||
for ( i = 0; i < MAX_RANKS; i++ ) {
|
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] )
|
if ( cgs.ranksData[i].consoleName[0] )
|
||||||
CG_Printf( "%s \t - \t %s\n", cgs.ranksData[i].consoleName, cgs.ranksData[i].formalName );
|
CG_Printf( "%s \t - \t %s\n", cgs.ranksData[i].consoleName, cgs.ranksData[i].formalName );
|
||||||
else
|
else
|
||||||
|
@ -207,10 +204,7 @@ void CG_ClassList_cmd( void ) {
|
||||||
CG_Printf( S_COLOR_GREEN "Formal Name\n" );
|
CG_Printf( S_COLOR_GREEN "Formal Name\n" );
|
||||||
|
|
||||||
/* Loop thru each val and print them */
|
/* Loop thru each val and print them */
|
||||||
for ( i = 0; i < MAX_CLASSES; i++ ) {
|
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] )
|
if ( cgs.classData[i].formalName[0] )
|
||||||
CG_Printf( "%s\n", cgs.classData[i].formalName );
|
CG_Printf( "%s\n", cgs.classData[i].formalName );
|
||||||
else
|
else
|
||||||
|
@ -275,8 +269,6 @@ void CG_Emote_f( void ) {
|
||||||
int i;
|
int i;
|
||||||
animation_t *anims;
|
animation_t *anims;
|
||||||
int animLength;
|
int animLength;
|
||||||
/* int animLengthUpper;
|
|
||||||
int animLengthLower; */
|
|
||||||
qboolean emoteFound=qfalse;
|
qboolean emoteFound=qfalse;
|
||||||
|
|
||||||
argStr = CG_Argv( 1 );
|
argStr = CG_Argv( 1 );
|
||||||
|
@ -301,32 +293,16 @@ void CG_Emote_f( void ) {
|
||||||
/* find out emote in the list
|
/* find out emote in the list
|
||||||
value of numEmotes calced in bg_misc.c
|
value of numEmotes calced in bg_misc.c
|
||||||
or if an int was supplied as an arg, use that */
|
or if an int was supplied as an arg, use that */
|
||||||
/*if ( !argStr[0] >= '0' && argStr[0] <= '9' )
|
for ( i = 0; i < bg_numEmotes; i++ )
|
||||||
{
|
{
|
||||||
i = atoi( argStr );
|
emote = &bg_emoteList[i];
|
||||||
|
|
||||||
if ( i > 0 || i < bg_numEmotes ) {
|
if ( emote && !Q_stricmp( emote->name, argStr ) )
|
||||||
emote = &bg_emoteList[i];
|
{
|
||||||
emoteFound = qtrue;
|
emoteFound = qtrue;
|
||||||
}
|
break;
|
||||||
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 ) )
|
|
||||||
{
|
|
||||||
emoteFound = qtrue;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*} */
|
|
||||||
|
|
||||||
if ( !emoteFound ) {
|
if ( !emoteFound ) {
|
||||||
CG_Printf( S_COLOR_RED "ERROR: Specified emote not found\n" );
|
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 */
|
/* Anim length for lower model */
|
||||||
if ( !( emote->animFlags & EMOTE_LOOP_UPPER ) && !( emote->animFlags & EMOTE_LOOP_LOWER ) ) {
|
if ( !( emote->animFlags & EMOTE_LOOP_UPPER ) && !( emote->animFlags & EMOTE_LOOP_LOWER ) ) {
|
||||||
/* numFrames * (1000 / fps = frameLerp ) = time length */
|
|
||||||
animLength = anims->numFrames * anims->frameLerp;
|
animLength = anims->numFrames * anims->frameLerp;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -644,7 +619,6 @@ void CG_ThirdPersonRevert_f ( void ) {
|
||||||
for (i = 0; i < 5; i++ ){
|
for (i = 0; i < 5; i++ ){
|
||||||
trap_Cvar_VariableStringBuffer ( cVars[i], value, sizeof( value ) );
|
trap_Cvar_VariableStringBuffer ( cVars[i], value, sizeof( value ) );
|
||||||
TPSVars[i]->value = atof( 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 ) );
|
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 {
|
typedef struct {
|
||||||
|
@ -772,15 +720,12 @@ static consoleCommand_t commands[] = {
|
||||||
{ "loaddefered", CG_LoadDeferredPlayers }, /* spelled wrong, but not changing for demo... */
|
{ "loaddefered", CG_LoadDeferredPlayers }, /* spelled wrong, but not changing for demo... */
|
||||||
{ "+analysis", CG_ObjectivesDown_f },
|
{ "+analysis", CG_ObjectivesDown_f },
|
||||||
{ "-analysis", CG_ObjectivesUp_f },
|
{ "-analysis", CG_ObjectivesUp_f },
|
||||||
/*{ "+shake", CG_ShakeCamera_cmd },*/
|
|
||||||
{ "iloverpg-x", CG_Cough_cmd },
|
{ "iloverpg-x", CG_Cough_cmd },
|
||||||
/*{ "commandList", CG_CmdList_cmd },*/
|
|
||||||
{ "rankList", CG_RankList_cmd },
|
{ "rankList", CG_RankList_cmd },
|
||||||
{ "locationList", CG_BeamList_cmd },
|
{ "locationList", CG_BeamList_cmd },
|
||||||
{ "classList", CG_ClassList_cmd },
|
{ "classList", CG_ClassList_cmd },
|
||||||
{ "emote", CG_Emote_f },
|
{ "emote", CG_Emote_f },
|
||||||
{ "locedit", CG_LocEdit_f },
|
{ "locedit", CG_LocEdit_f },
|
||||||
/*{ "fileID", CG_LoadBinaryData }*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -836,7 +781,6 @@ void CG_InitConsoleCommands( void ) {
|
||||||
trap_AddCommand ("say_team");
|
trap_AddCommand ("say_team");
|
||||||
/* START MOD */
|
/* START MOD */
|
||||||
trap_AddCommand ("say_class");
|
trap_AddCommand ("say_class");
|
||||||
/*trap_AddCommand ("giveTo");*/
|
|
||||||
trap_AddCommand ("forceName");
|
trap_AddCommand ("forceName");
|
||||||
trap_AddCommand ("forceKill");
|
trap_AddCommand ("forceKill");
|
||||||
trap_AddCommand ("forceKillRadius");
|
trap_AddCommand ("forceKillRadius");
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -216,8 +216,6 @@ void PM_StepSlideMove( qboolean gravity ) {
|
||||||
vec3_t down_o, down_v;
|
vec3_t down_o, down_v;
|
||||||
vec3_t slideMove, stepUpMove;
|
vec3_t slideMove, stepUpMove;
|
||||||
trace_t trace;
|
trace_t trace;
|
||||||
// float down_dist, up_dist;
|
|
||||||
// vec3_t delta, delta2;
|
|
||||||
vec3_t up, down;
|
vec3_t up, down;
|
||||||
playerState_t *ps = pm->ps;
|
playerState_t *ps = pm->ps;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue