Skip to content

Commit b4cfd5f

Browse files
committed
fix a bug and some warnings
1 parent ae8a668 commit b4cfd5f

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

multiplayer_server/CourseBox.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,11 @@ public function remove($fromE = false, $fromGame = false)
237237
$this->clearSlot($player, true);
238238
}
239239

240-
$this->slot_array = null;
241240
unset($this->slot_array);
242241

243-
$this->room->course_array[$course_id] = null;
244-
unset($this->room->course_array[$course_id]);
242+
if (!empty($room)) {
243+
unset($this->room->course_array[$course_id]);
244+
}
245245

246246
if (!empty($room) && $fromE === false) {
247247
$room->maybeHighlight('remove', $page_number);

multiplayer_server/PR2Client.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class PR2Client extends \chabot\SocketServerClient
1616
public $process = false;
1717
public $ip;
1818
public $id;
19+
public $player;
1920

2021
public function __construct($socket)
2122
{

multiplayer_server/Player.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ class Player
106106
public $super_booster = false;
107107
public $last_save_time = 0;
108108

109+
public $average_vel_x = 0;
110+
public $average_vel_y = 0;
111+
public $race_stats = null;
112+
109113

110114
public function __construct($socket, $login)
111115
{

0 commit comments

Comments
 (0)