From: Rudolf Polzer Date: Sat, 14 May 2011 18:09:29 +0000 (+0200) Subject: call ArrayGet*entcs_receiver one time less X-Git-Tag: xonotic-v0.5.0~256^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2430643a62ea390102da2c40f2169109cc6cb4db;p=xonotic%2Fxonotic-data.pk3dir.git call ArrayGet*entcs_receiver one time less --- diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index fdaaf7da6..c169e6c0e 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -759,10 +759,15 @@ const vector GETPLAYERORIGIN_ERROR = '1123581321 2357111317 3141592653'; // way vector getplayerorigin(float pl) { string s; + entity e; + s = getplayerkey(pl, "TEMPHACK_origin"); if(s != "") return stov(s); - if(entcs_receiver[pl].classname == "entcs_receiver") - return entcs_receiver[pl].origin; + + e = entcs_receiver[pl]; + if(e.classname == "entcs_receiver") + return e.origin; + return GETPLAYERORIGIN_ERROR; }