X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fbrisk.phh;h=4a595bb0a5ca6ae654e141acf0b456258ee6ab03;hb=1fa5c579ed75be5f76de133e638855d7b966680d;hp=6bdcb84203bd7ccc1ba5d8d32383fe53d32b8ae8;hpb=3130c80cb5f4f2ffb973818c6a0492b200577d5d;p=brisk.git diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 6bdcb84..4a595bb 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -1292,54 +1292,53 @@ class Room function room_sitdown($user, $table_idx) { - log_main("room_sitdown ".($user == FALSE ? "USER: FALSE" : "USER: ".$user->name)); - - $train_app = ""; - - if ($table_idx > -1 && $table_idx < TABLES_N) { - $table = $this->table[$table_idx]; - - // wagon shutdown - if ($table->wag_own != -1 && $table->player_n == PLAYERS_N) { - for ($i = 0 ; $i < TABLES_N ; $i++) { - if ($table->wag_own == $table->player[$i]) { - $train_app = sprintf("tra.rem(%d); ", $table_idx); - $table->wag_reset(time()); - break; - } - } - } - } - - for ($i = 0 ; $i < MAX_PLAYERS ; $i++) { - $ret = ""; - $user_cur = $this->user[$i]; - if ($user_cur->sess == '' || $user_cur->stat != 'room') - continue; + log_main("room_sitdown ".($user == FALSE ? "USER: FALSE" : "USER: ".$user->name)); - $ret = "gst.st = ".($user_cur->step+1)."; ".$train_app; - if ($table_idx > -1) - $ret .= $this->table_content($user_cur, $table_idx); - $ret .= $this->standup_content($user_cur); + $train_app = ""; - if ($user->idx_get() == $i) { - $ret .= 'subst = "sitdown"; tra.hide(); '; - // clean the action buttons in other tables - for ($e = 0 ; $e < TABLES_N ; $e++) { - // $ret .= table_act_content(FALSE, 0, $e, $user_cur->table, FALSE); - $ret .= $this->table[$e]->act_content($user_cur); - } + if ($table_idx > -1 && $table_idx < TABLES_N) { + $table = $this->table[$table_idx]; + + // wagon shutdown + if ($table->wag_own != -1 && $table->player_n == PLAYERS_N) { + for ($i = 0 ; $i < TABLES_N ; $i++) { + if ($table->wag_own == $table->player[$i]) { + $train_app = sprintf("tra.rem(%d); ", $table_idx); + $table->wag_reset(time()); + break; + } + } + } } - else if ($table_idx > -1) { - if ($table->player_n == PLAYERS_N) { - // $ret .= table_act_content(($user_cur->subst == 'standup'), PLAYERS_N, $table_idx, $user_cur->table, - /// ($table->auth_only == FALSE ? TRUE : $user_cur->flags & USER_FLAG_AUTH)); - $ret .= $table->act_content($user_cur); - } + + for ($i = 0 ; $i < MAX_PLAYERS ; $i++) { + $ret = ""; + $user_cur = $this->user[$i]; + if ($user_cur->sess == '' || $user_cur->stat != 'room') + continue; + + $ret = "gst.st = ".($user_cur->step+1)."; ".$train_app; + if ($table_idx > -1) + $ret .= $this->table_content($user_cur, $table_idx); + $ret .= $this->standup_content($user_cur); + + if ($user->idx_get() == $i) { + $ret .= 'subst = "sitdown"; tra.hide(); '; + // clean the action buttons in other tables + for ($e = 0 ; $e < TABLES_N ; $e++) { + $ret .= $this->table[$e]->act_content($user_cur); + } + } + else if ($table_idx > -1) { + if ($table->player_n == PLAYERS_N) { + // $ret .= table_act_content(($user_cur->subst == 'standup'), PLAYERS_N, $table_idx, $user_cur->table, + /// ($table->auth_only == FALSE ? TRUE : $user_cur->flags & USER_FLAG_AUTH)); + $ret .= $table->act_content($user_cur); + } + } + $user_cur->comm[$user_cur->step % COMM_N] = $ret; + $user_cur->step_inc(); } - $user_cur->comm[$user_cur->step % COMM_N] = $ret; - $user_cur->step_inc(); - } } function chatt_send($user, $mesg)