// 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];
const idVec3 *idSplineList::getPosition( long t ) {
static idVec3 interpolatedPos;
- static long lastTime = -1;
int count = splineTime.Num();
if ( count == 0 ) {
}
-#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;
- int lastSwitch = 0;
idList<float> waits;
idList<int> targets;
// we have a base time layout for the path and the target path
// now we need to layer on any wait or speed changes
for ( i = 0; i < events.Num(); i++ ) {
- idCameraEvent *ev = events[i];
events[i]->setTriggered( false );
switch ( events[i]->getType() ) {
+ default: break;
case idCameraEvent::EVENT_TARGET: {
targets.Append( i );
break;
bool idCameraDef::load( const char *filename ) {
char *buf;
const char *buf_p;
- int length = FS_ReadFile( filename, (void **)&buf );
+
+ FS_ReadFile( filename, (void **)&buf );
if ( !buf ) {
return false;
}
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 );
Com_UngetToken();
idCameraPosition::parseToken( key.c_str(), text );
}
- token = Com_Parse( text );
+ Com_Parse( text );
} while ( 1 );
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 );
Com_UngetToken();
idCameraPosition::parseToken( key.c_str(), text );
}
- token = Com_Parse( text );
+ Com_Parse( text );
} while ( 1 );
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 );
}
Com_UngetToken();
idCameraPosition::parseToken( key.c_str(), text );
}
- token = Com_Parse( text );
+ Com_Parse( text );
} while ( 1 );
}
void idCameraDef::addTarget( const char *name, idCameraPosition::positionType type ) {
- const char *text = ( name == NULL ) ? va( "target0%d", numTargets() + 1 ) : name;
idCameraPosition *pos = newFromType( type );
if ( pos ) {
pos->setName( name );