From: Mattia Basaglia Date: Mon, 13 Mar 2017 22:42:46 +0000 (+0000) Subject: Fix more commented out code X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2FMelanosuchus%2Fcleanup;p=xonotic%2Fnetradiant.git Fix more commented out code --- diff --git a/libs/generic/callback.cpp b/libs/generic/callback.cpp index 82e02c36..db04d53e 100644 --- a/libs/generic/callback.cpp +++ b/libs/generic/callback.cpp @@ -32,6 +32,7 @@ public: int value; void printValue() const { + // print this->value here; } void setValue(){ @@ -67,6 +68,7 @@ namespace ExampleReferenceCaller { // ReferenceCaller example void Int_printValue( const int& value ){ + // print value here; } void Int_setValue( int& value ){ diff --git a/libs/splines/splines.cpp b/libs/splines/splines.cpp index 99f1999a..004e06e8 100644 --- a/libs/splines/splines.cpp +++ b/libs/splines/splines.cpp @@ -155,8 +155,6 @@ void splineDraw() { void debugLine( idVec3 &color, float x, float y, float z, float x2, float y2, float z2 ) { - idVec3 from( x, y, z ); - idVec3 to( x2, y2, z2 ); } void idSplineList::addToRenderer() { @@ -478,39 +476,6 @@ void idSplineList::write( fileHandle_t file, const char *p ) { void idCameraDef::getActiveSegmentInfo( int segment, idVec3 &origin, idVec3 &direction, float *fov ) { -#if 0 - if ( !cameraSpline.validTime() ) { - buildCamera(); - } - double d = (double)segment / numSegments(); - getCameraInfo( d * totalTime * 1000, origin, direction, fov ); -#endif -/* - if (!cameraSpline.validTime()) { - buildCamera(); - } - origin = *cameraSpline.getSegmentPoint(segment); - - - idVec3 temp; - - int numTargets = getTargetSpline()->controlPoints.Num(); - int count = cameraSpline.splineTime.Num(); - if (numTargets == 0) { - // follow the path - if (cameraSpline.getActiveSegment() < count - 1) { - temp = *cameraSpline.splinePoints[cameraSpline.getActiveSegment()+1]; - } - } else if (numTargets == 1) { - temp = *getTargetSpline()->controlPoints[0]; - } else { - temp = *getTargetSpline()->getSegmentPoint(segment); - } - - temp -= origin; - temp.Normalize(); - direction = temp; - */ } bool idCameraDef::getCameraInfo( long time, idVec3 &origin, idVec3 &direction, float *fv ) { @@ -530,8 +495,6 @@ bool idCameraDef::getCameraInfo( long time, idVec3 &origin, idVec3 &direction, f getActiveTarget()->start( startTime + events[i]->getTime() ); } else if ( events[i]->getType() == idCameraEvent::EVENT_TRIGGER ) { - //if (ent) { - //} } else if ( events[i]->getType() == idCameraEvent::EVENT_FOV ) { memset( buff, 0, sizeof( buff ) ); @@ -581,21 +544,7 @@ bool idCameraDef::getCameraInfo( long time, idVec3 &origin, idVec3 &direction, f idVec3 temp = origin; int numTargets = targetPositions.Num(); - if ( numTargets == 0 ) { -/* - // follow the path - if (cameraSpline.getActiveSegment() < count - 1) { - temp = *cameraSpline.splinePoints[cameraSpline.getActiveSegment()+1]; - if (temp == origin) { - int index = cameraSpline.getActiveSegment() + 2; - while (temp == origin && index < count - 1) { - temp = *cameraSpline.splinePoints[index++]; - } - } - } - */ - } - else { + if ( numTargets != 0 ) { if ( getActiveTarget()->numPoints() > 0 ) { temp = *getActiveTarget()->getPosition( time ); }