]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
Factor out animation decisions and gameplay
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index 726f2b50316799555901a7e31f97733703588634..20828800deebfdd3d7d0407269179ec0037489a8 100644 (file)
@@ -99,6 +99,8 @@ string STR_OBSERVER = "observer";
 #define FOR_EACH_REALPLAYER(v) FOR_EACH_REALCLIENT(v) if(v.classname == STR_PLAYER)
 #endif
 
+#define CENTER_OR_VIEWOFS(ent) (ent.origin + ((ent.classname == STR_PLAYER) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5)))
+
 // copies a string to a tempstring (so one can strunzone it)
 string strcat1(string s) = #115; // FRIK_FILE