log_rd2("AUTO LOGOUT.");
if ($user_cur->subst == 'sitdown' || $user_cur->stat == 'table')
- $this->room_wakeup(&$user_cur);
+ $this->room_wakeup($user_cur);
else if ($user_cur->subst == 'standup')
$this->room_outstandup(&$user_cur);
else
if ($user_cur->laccwr + EXPIRE_TIME_SMAMMA < $curtime) { // lo rimettiamo in piedi
if ($user_cur->stat == 'room' && $user_cur->subst == 'sitdown') {
- $this->room_wakeup(&$user_cur);
+ $this->room_wakeup($user_cur);
$user_cur->comm[$user_cur->step % COMM_N] = "gst.st = ".($user_cur->step+1)."; ";
/* MLANG: <br>Sei stato inattivo per ".(EXPIRE_TIME_SMAMMA/60.0)." minuti. <br><br>Quindi ritorni tra i <b>Giocatori in piedi</b>.", "torna ai tavoli" */
$user_cur->comm[$user_cur->step % COMM_N] .= show_notify($mlang_brisk['tabtout_a'][$G_lang].(EXPIRE_TIME_SMAMMA/60.0).$mlang_brisk['tabtout_b'][$G_lang], 0, $mlang_brisk['btn_backstand'][$G_lang], 400, 100);
}
- function room_wakeup(&$user)
+ function room_wakeup($user)
{
$table_idx = $user->table;
$table = &$this->table[$table_idx];
$table->user_rem(&$this, &$user);
for ($i = 0 ; $i < MAX_PLAYERS ; $i++) {
- $user_cur = &$this->user[$i];
+ $user_cur = $this->user[$i];
if ($user_cur->sess == '' || $user_cur->stat != 'room')
continue;
log_main("table_update: post");
}
- function room_sitdown(&$user, $table_idx)
+ 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];
+ $table = $this->table[$table_idx];
// wagon shutdown
if ($table->wag_own != -1 && $table->player_n == PLAYERS_N) {
}
}
- function chatt_send(&$user, $mesg)
+ function chatt_send($user, $mesg)
{
GLOBAL $G_base, $G_alarm_passwd, $mlang_brisk, $G_lang;
$only_you = FALSE;
if ($to_room != FALSE) {
for ($i = 0 ; $i < MAX_PLAYERS ; $i++) {
- $user_cur = &$this->user[$i];
+ $user_cur = $this->user[$i];
if ($target != "" && $user_cur->name != $target)
continue;
// if ($user_cur->sess == '' || $user_cur->stat != 'room')
function standup_update($user)
{
for ($i = 0 ; $i < MAX_PLAYERS ; $i++) {
- $user_cur = &$this->user[$i];
+ $user_cur = $this->user[$i];
if ($user_cur->sess == '')
continue;
log_main("bunch_make end");
}
- function init(&$userarr)
+ function init($userarr)
{
/* MOVED INTO SPAWN
$this->mazzo = rand(0,PLAYERS_N-1);
*/
for ($i = 0 ; $i < BRISKIN5_PLAYERS_N ; $i++) {
$this->total[$i] = 0;
- $user_cur = &$userarr[$this->player[$i]];
+ $user_cur = $userarr[$this->player[$i]];
$user_cur->exitislock = TRUE;
}
log_main("table::init: ci siamo");
}
- function game_init(&$userarr)
+ function game_init($userarr)
{
log_rd2("GSTART 4");
for ($i = 0 ; $i < BRISKIN5_PLAYERS_N ; $i++) {
$this->asta_pla[$i] = TRUE;
- $user_cur = &$userarr[$this->player[$i]];
+ $user_cur = $userarr[$this->player[$i]];
$user_cur->subst = 'asta';
$user_cur->asta_card = -2;
$user_cur->asta_pnt = -1;
}
- function exitlock_show(&$userarr, $table_pos)
+ function exitlock_show($userarr, $table_pos)
{
- $ct = $this->exitlock_calc(&$userarr, $table_pos);
+ $ct = $this->exitlock_calc($userarr, $table_pos);
$ret = sprintf('exitlock_show(%d, %s);', $ct,
($userarr[$this->player[$table_pos]]->exitislock ? 'true' : 'false'));
exit;
}
- $user =& $room->user;
- $table =& $room->table[$table_idx];
+ $user = $room->user;
+ $table = $room->table[$table_idx];
log_wr("Briskin5 constructor");
for ($i = 0 ; $i < $table->player_n ; $i++) {
$user[$table->player[$i]]->table_token = $table_token;
- $this->user[$i] =& User_briskin5::spawn(&$user[$table->player[$i]], $table_idx, $i);
+ $this->user[$i] =& User_briskin5::spawn($user[$table->player[$i]], $table_idx, $i);
}
$this->table[0] =& Table_briskin5::spawn(&$table);
if ($force || $this->garbage_timeout < $curtime) {
for ($i = 0 ; $i < BRISKIN5_MAX_PLAYERS ; $i++) {
- $user_cur = &$this->user[$i];
+ $user_cur = $this->user[$i];
if ($user_cur->sess == "" ||
($user_cur->stat == 'table' && ($user_cur->subst == 'shutdowned' || $user_cur->subst == 'shutdowner')))
continue;
}
// $user->bantime = $user->laccwr + BAN_TIME;
- $this->table_wakeup(&$user_cur);
+ $this->table_wakeup($user_cur);
}
}
}
}
- function chatt_send(&$user, $mesg)
+ function chatt_send($user, $mesg)
{
GLOBAL $mlang_brisk, $G_lang;
// update local graph
// update remote graphs
for ($i = 0 ; $i < BRISKIN5_MAX_PLAYERS ; $i++) {
- $user_cur = &$this->user[$i];
+ $user_cur = $this->user[$i];
// if ($user_cur->sess == '' || $user_cur->stat != 'room')
if ($user_cur->sess == '')
continue;
}
}
- function table_wakeup(&$user)
+ function table_wakeup($user)
{
$table = &$this->table[0];
function show_table(&$room, &$user, $sendstep, $is_transition, $is_again)
{
$table_idx = $user->table;
- $table = &$room->table[$table_idx];
+ $table = $room->table[$table_idx];
$table_pos = $user->table_pos;
$ret = "table_init();";
GLOBAL $G_lang, $mlang_bin5_bin5;
$ret = "";
- $user = &$room->user[$table->player[$table_pos]];
+ $user = $room->user[$table->player[$table_pos]];
$pnt_min = $table->points_n - MAX_POINTS < 0 ? 0 : $table->points_n - MAX_POINTS;
$noty = sprintf('<table class=\"points\"><tr><th></th>');
}
}
-function log_points($curtime, &$user, $where, $mesg)
+function log_points($curtime, $user, $where, $mesg)
{
GLOBAL $_SERVER;
define(SUBTY_FREQ_HI, 1);
-function placings_show(&$user)
+function placings_show($user)
{
$mtime = placing_time();
$tm = placing_date($mtime);
//
//
-function placing_show_pgsql(&$user, $ty, $subty)
+function placing_show_pgsql($user, $ty, $subty)
{
GLOBAL $G_dbpfx;
return ($ret);
}
-function placing_show(&$user, $ty, $subty)
+function placing_show($user, $ty, $subty)
{
GLOBAL $G_dbasetype;
if ($user->subst == 'sitdown') {
log_load("ROOM WAKEUP");
- $room->room_wakeup(&$user);
+ $room->room_wakeup($user);
}
else if ($user->subst == 'standup')
$room->room_outstandup(&$user);
log_rd2("AUTO LOGOUT.");
if ($user->subst == 'sitdown' || $user->stat == 'table')
- $room->room_wakeup(&$user);
+ $room->room_wakeup($user);
else if ($user->subst == 'standup')
$room->room_outstandup(&$user);
else {
**********************/
else if ($user->subst == 'sitdown') {
if ($argz[0] == 'wakeup') {
- $room->room_wakeup(&$user);
+ $room->room_wakeup($user);
}
else if ($argz[0] == 'logout') {
- $room->room_wakeup(&$user);
+ $room->room_wakeup($user);
$user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; ";
$user->comm[$user->step % COMM_N] .= 'postact_logout();';
$user->the_end = TRUE;