From a8f65efc0151cb4da88691af775a1256fcc6b2f1 Mon Sep 17 00:00:00 2001
From: b_krueger <b_krueger@b956fd51-792f-4845-bead-9b4dfca2ff2c>
Date: Mon, 12 Apr 2010 11:32:06 +0000
Subject: BugFix Plugin 5000points.usdx is now scoring correct Plugin
 teamduel.usdx now shows both player names (from team 1 and team 2) Maybe, the
 lua-plugins are not executed atomic (can go wrong on drawing in gl): please
 verify!

git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2230 b956fd51-792f-4845-bead-9b4dfca2ff2c
---
 src/lua/ULuaParty.pas | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/lua/ULuaParty.pas b/src/lua/ULuaParty.pas
index 883c3aec..69096e97 100644
--- a/src/lua/ULuaParty.pas
+++ b/src/lua/ULuaParty.pas
@@ -197,18 +197,20 @@ begin
 
   for I := 0 to High(R) do
   begin
-    lua_pushInteger(L, I);
+    lua_pushInteger(L, (I+1));
     lua_gettable(L, 1);
 
     R[I].Rank := Length(R);
+    R[I].Team := I;
     if (lua_isnumber(L, -1)) then
     begin
       Rank := lua_toInteger(L, -1);
       if (Rank >= 1) and (Rank <= Length(R)) then
-        R[I].Rank := Rank;
+        R[I].Rank := Rank
     end;
 
     lua_pop(L, 1);
+    
   end;
 
   // pop table
-- 
cgit v1.2.3