X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex_wr.php;h=c2deba83063ee9ad62137f18f79e72da93b5df51;hb=ff3c49ff3cbad45961f1a8d5264f587598134556;hp=50fed5896c033484aa0fda286ea5456eb6b6c4b2;hpb=10b2ab29444e6c291bf237c3ff15883f73c8a26d;p=brisk.git diff --git a/web/index_wr.php b/web/index_wr.php index 50fed58..c2deba8 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -113,7 +113,7 @@ if (($room = &Room::load_data()) == FALSE) { Room::unlock_data($sem); exit; } -if (($user = &$room->get_user($sess, &$idx)) == FALSE) { +if (($user = $room->get_user($sess, &$idx)) == FALSE) { Room::unlock_data($sem); $argz = explode('|', xcapemesg($mesg)); @@ -494,7 +494,7 @@ else if ($user->stat == 'room') { else if ($user->subst == 'standup') { if ($argz[0] == 'sitdown') { - log_wr("SITDOWN command"); + log_wr("SITDOWN command"); if ($user->the_end == TRUE) { log_wr("INFO:SKIP:argz == sitdown && the_end == TRUE => ignore request."); @@ -571,7 +571,7 @@ else if ($user->stat == 'room') { // // Create new spawned table - $bri_sem = Briskin5::lock_data($table_idx); + $bri_sem = Bin5::lock_data($table_idx); $table_token = uniqid(""); $room->table[$table_idx]->table_token = $table_token; $room->table[$table_idx]->table_start = $curtime; @@ -582,15 +582,17 @@ else if ($user->stat == 'room') { } log_legal($curtime, $user, "STAT:CREATE_GAME", $plist); - if (($bri =& new Briskin5(&$room, $table_idx, $table_token)) == FALSE) + log_wr("pre new Bin5"); + if (($bri = new Bin5($room, $table_idx, $table_token)) == FALSE) log_wr("bri create: FALSE"); else log_wr("bri create: ".serialize($bri)); + log_wr("pre init table"); // init table - $bri_table =& $bri->table[0]; - $bri_table->init(&$bri->user); - $bri_table->game_init(&$bri->user); + $bri_table = $bri->table[0]; + $bri_table->init($bri->user); + $bri_table->game_init($bri->user); // // Init spawned users. // @@ -598,8 +600,8 @@ else if ($user->stat == 'room') { // log_wr("game_init after"); for ($i = 0 ; $i < $table->player_n ; $i++) { - $bri_user_cur = &$bri->user[$i]; - $user_cur = &$room->user[$table->player[$i]]; + $bri_user_cur = $bri->user[$i]; + $user_cur = $room->user[$table->player[$i]]; $bri_user_cur->stat_set('table'); $bri_user_cur->subst = 'asta'; @@ -609,7 +611,6 @@ else if ($user->stat == 'room') { $bri_user_cur->comm[$bri_user_cur->step % COMM_N] = ""; $bri_user_cur->step_inc(); $bri_user_cur->comm[$bri_user_cur->step % COMM_N] = show_table(&$bri,&$bri_user_cur,$bri_user_cur->step+1,TRUE, FALSE); - $bri_user_cur->step_inc(); log_wr("TRY PRESAVE: ".$bri_user_cur->step." TRANS STEP: ".$bri_user_cur->trans_step); @@ -627,23 +628,20 @@ else if ($user->stat == 'room') { $user_cur->trans_step = $user_cur->step + 1; log_wr("TRANS ATTIVATO"); - $user_cur->stat_set('table'); $user_cur->subst = 'asta'; $user_cur->laccwr = $curtime; $user_cur->step_inc(); } log_wr("presave bri"); - Briskin5::save_data($bri); - Briskin5::unlock_data($bri_sem); + Bin5::save_data($bri); + Bin5::unlock_data($bri_sem); log_wr("postsave bri"); } // change room - $room->room_sitdown(&$user, $table_idx); - - log_wr("MOP finish"); - + $room->room_sitdown($user, $table_idx); + log_wr("MOP finish"); } else if ($argz[0] == 'logout') { $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; ";