]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
call ArrayGet*entcs_receiver one time less
authorRudolf Polzer <divverent@xonotic.org>
Sat, 14 May 2011 18:09:29 +0000 (20:09 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 14 May 2011 18:09:29 +0000 (20:09 +0200)
qcsrc/client/miscfunctions.qc

index fdaaf7da6d5ef03c5ee2aaf1918f80f24ba1fb82..c169e6c0e90ba5fa63dbe8518ef73b453a3f88e8 100644 (file)
@@ -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;
 }