]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/util.qc
Merge remote-tracking branch 'origin/master' into TimePath/combined_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / util.qc
index 33d7074ecf79a8914ceed5f392858f9df43310e4..4a8aef6517828548d6acae346bec671b5b51ec80 100644 (file)
@@ -2576,6 +2576,30 @@ void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t
                queue_start.FindConnectedComponent_processing = 0;
 }
 
+#ifdef SVQC
+vector combine_to_vector(float x, float y, float z)
+{
+       vector result; result_x = x; result_y = y; result_z = z;
+       return result;
+}
+
+vector get_corner_position(entity box, float corner)
+{
+       switch(corner)
+       {
+               case 1: return combine_to_vector(box.absmin_x, box.absmin_y, box.absmin_z);
+               case 2: return combine_to_vector(box.absmax_x, box.absmin_y, box.absmin_z);
+               case 3: return combine_to_vector(box.absmin_x, box.absmax_y, box.absmin_z);
+               case 4: return combine_to_vector(box.absmin_x, box.absmin_y, box.absmax_z);
+               case 5: return combine_to_vector(box.absmax_x, box.absmax_y, box.absmin_z);
+               case 6: return combine_to_vector(box.absmin_x, box.absmax_y, box.absmax_z);
+               case 7: return combine_to_vector(box.absmax_x, box.absmin_y, box.absmax_z);
+               case 8: return combine_to_vector(box.absmax_x, box.absmax_y, box.absmax_z);
+               default: return '0 0 0';
+       }
+}
+#endif
+
 // todo: this sucks, lets find a better way to do backtraces?
 void backtrace(string msg)
 {