Is there a shorter solution than this?
Code:
if(c_trace(camera.x, vector(camera.x, camera.y, camera.z-1000), USE_POLYGON|SCAN_TEXTURE) > 0)
{
	if(HIT_TARGET)
	{
		BMAP *bmap_;
		bmap_ = ent_getskin(you, ent_status(you, 8));
		var format = bmap_lock(bmap_, 0);
		var pixel = pixel_for_bmap(bmap_, hit->v->u2*bmap_width(bmap_), hit->v->v2*bmap_height(bmap_));
		bmap_unlock(bmap_);
		pixel_to_vec(&color, NULL, format, pixel);
	}
}



Because hit.u2 and hit.v2 don´t seem to have the correct values and hit.skin2 is NULL.
The lightmap is displayed with the default material, thus I believe that everything is setup correctly.