X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=libs%2Fsplines%2Fsplines.cpp;h=e35d82b7e8b80d3b1ad4665203a93999a7645497;hb=ee4b663ef7227a42b5eb051698265bed514ab3c0;hp=05cb3bf972c09d5b6723be51710b0c088f9fac5a;hpb=62d99f889c0e98be65f779d3983109c84ce58cec;p=xonotic%2Fnetradiant.git diff --git a/libs/splines/splines.cpp b/libs/splines/splines.cpp index 05cb3bf9..e35d82b7 100644 --- a/libs/splines/splines.cpp +++ b/libs/splines/splines.cpp @@ -43,7 +43,7 @@ float Q_fabs( float f ) { // Certainly better ways to do this, but this lets // me get underway quickly with ents that need spline // targets. -#define MAX_CAMERAS 64 +const int MAX_CAMERAS = 64; idCameraDef camera[MAX_CAMERAS]; @@ -638,8 +638,8 @@ bool idCameraDef::waitEvent( int index ) { } -#define NUM_CCELERATION_SEGS 10 -#define CELL_AMT 5 +const int NUM_CCELERATION_SEGS = 10; +const int CELL_AMT = 5; void idCameraDef::buildCamera() { int i; @@ -653,6 +653,7 @@ void idCameraDef::buildCamera() { for ( i = 0; i < events.Num(); i++ ) { events[i]->setTriggered( false ); switch ( events[i]->getType() ) { + default: break; case idCameraEvent::EVENT_TARGET: { targets.Append( i ); break; @@ -1166,7 +1167,7 @@ void idFixedPosition::parse( const char *( *text ) ) { Com_UngetToken(); idStr key = Com_ParseOnLine( text ); - const char *token = Com_Parse( text ); + Com_Parse( text ); if ( Q_stricmp( key.c_str(), "pos" ) == 0 ) { Com_UngetToken(); Com_Parse1DMatrix( text, 3, pos ); @@ -1175,7 +1176,7 @@ void idFixedPosition::parse( const char *( *text ) ) { Com_UngetToken(); idCameraPosition::parseToken( key.c_str(), text ); } - token = Com_Parse( text ); + Com_Parse( text ); } while ( 1 ); @@ -1212,7 +1213,7 @@ void idInterpolatedPosition::parse( const char *( *text ) ) { Com_UngetToken(); idStr key = Com_ParseOnLine( text ); - const char *token = Com_Parse( text ); + Com_Parse( text ); if ( Q_stricmp( key.c_str(), "startPos" ) == 0 ) { Com_UngetToken(); Com_Parse1DMatrix( text, 3, startPos ); @@ -1225,7 +1226,7 @@ void idInterpolatedPosition::parse( const char *( *text ) ) { Com_UngetToken(); idCameraPosition::parseToken( key.c_str(), text ); } - token = Com_Parse( text ); + Com_Parse( text ); } while ( 1 ); @@ -1263,7 +1264,7 @@ void idSplinePosition::parse( const char *( *text ) ) { Com_UngetToken(); idStr key = Com_ParseOnLine( text ); - const char *token = Com_Parse( text ); + Com_Parse( text ); if ( Q_stricmp( key.c_str(), "target" ) == 0 ) { target.parse( text ); } @@ -1271,7 +1272,7 @@ void idSplinePosition::parse( const char *( *text ) ) { Com_UngetToken(); idCameraPosition::parseToken( key.c_str(), text ); } - token = Com_Parse( text ); + Com_Parse( text ); } while ( 1 );