+
+const vector GETPLAYERORIGIN_ERROR = '1123581321 2357111317 3141592653'; // way out of bounds for anything on the map
+vector getplayerorigin(float pl)
+{
+ string s;
+ entity e;
+
+ s = getplayerkey(pl, "TEMPHACK_origin");
+ if(s != "")
+ return stov(s);
+
+ e = entcs_receiver[pl];
+ if(e)
+ return e.origin;
+
+ return GETPLAYERORIGIN_ERROR;
+}