update 'stat' and 'subst' in more proper functions
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Thu, 31 Oct 2013 17:09:02 +0000 (18:09 +0100)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Thu, 31 Oct 2013 17:09:02 +0000 (18:09 +0100)
web/briskin5/Obj/briskin5.phh
web/briskin5/index_wr.php
web/index_wr.php

index df851cc..9eadb62 100644 (file)
@@ -407,6 +407,7 @@ class Bin5_table extends Table {
         for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
             $this->total[$i] = 0;
             $user_cur = $userarr[$this->player[$i]];
+            $user_cur->stat_set('table');
             $user_cur->exitislock = TRUE;
         }
 
@@ -497,7 +498,7 @@ class Bin5_table extends Table {
         return ($ct);
     }
 
-    function rules_engine($bri, $curtime, $action, $user)
+    function rules_engine(&$bri, $curtime, $action, $user)
     {
         GLOBAL $G_all_points, $G_dbasetype;
 
index c44834c..3ededa9 100644 (file)
@@ -257,8 +257,6 @@ function bin5_index_wr_main(&$bri, $remote_addr_full, $get, $post, $cookie)
                         }
                     }
 
-
-
                     if ($again) { // Qualcosa non andato bene, rifare
                         $ret = sprintf('gst.st = %d; asta_pnt_set(%d);', $user->step+1,
                                        ($table->asta_pnt > 60 ? $table->asta_pnt + 1 : 61) );
index 91eb8f3..61d6b82 100644 (file)
@@ -667,10 +667,7 @@ function index_wr_main(&$room, $remote_addr_full, $get, $post, $cookie)
                         $bri_user_cur = $bri->user[$i];
                         $user_cur = $room->user[$table->player[$i]];
                         
-                        $bri_user_cur->stat_set('table');
-                        $bri_user_cur->subst = 'asta';
                         $bri_user_cur->laccwr = $curtime;
-                        
                         $bri_user_cur->trans_step = $user_cur->step + 1;
                         $bri_user_cur->comm[$bri_user_cur->step % COMM_N] = "";
                         $bri_user_cur->step_inc();