glGetFloatv(GL_MODELVIEW_MATRIX, @ModM[0]);

you get the current modelview matrix

savedvect.x:=modm[12];
savedvect.y:=modm[13];
savedvect.z:=modm[14];

savedvect contains the translation of the current matrix

CAMMATRIX := MatrixInverse(CAMMATRIX);

you inverse cammatrix

SAVEDVECT := VectorMatrixMult(CAMMATRIX, SAVEDVECT);

you multiply translation with inverse cammatrix... if the current matrix is multiplied with the cammatrix in some way then savedvect would contain translation of current matrix in local space

heh i took five minutes trying to figure out how to explain that and i'm not really sure it's correct