@@ -18,7 +18,6 @@ public sealed class DreamConnection {
1818 [ Dependency ] private readonly DreamManager _dreamManager = default ! ;
1919 [ Dependency ] private readonly DreamObjectTree _objectTree = default ! ;
2020 [ Dependency ] private readonly DreamResourceManager _resourceManager = default ! ;
21- [ Dependency ] private readonly WalkManager _walkManager = default ! ;
2221 [ Dependency ] private readonly IEntitySystemManager _entitySystemManager = default ! ;
2322 [ Dependency ] private readonly ISharedPlayerManager _playerManager = default ! ;
2423
@@ -66,10 +65,11 @@ [ViewVariables] public DreamObjectMob? Mob {
6665 }
6766
6867 [ ViewVariables ] public DreamObjectMovable ? Eye {
69- get => _eye ;
68+ get ;
7069 set {
71- _eye = value ;
72- _playerManager . SetAttachedEntity ( Session ! , _eye ? . Entity ) ;
70+ field = value ;
71+ if ( Session != null )
72+ _playerManager . SetAttachedEntity ( Session , field ? . Entity ) ;
7373 }
7474 }
7575
@@ -82,7 +82,6 @@ [ViewVariables] public DreamObjectMovable? Eye {
8282 [ ViewVariables ] private int _nextPromptEvent = 1 ;
8383 private readonly Dictionary < string , DreamResource > _permittedBrowseRscFiles = new ( ) ;
8484 private DreamObjectMob ? _mob ;
85- private DreamObjectMovable ? _eye ;
8685
8786 private readonly ISawmill _sawmill = Logger . GetSawmill ( "opendream.connection" ) ;
8887
@@ -119,6 +118,9 @@ public void HandleDisconnection() {
119118 if ( Session == null || Client == null ) // Already disconnected?
120119 return ;
121120
121+ _verbSystem ? . RemoveConnectionFromRepeatingVerbs ( this ) ;
122+ Session = null ;
123+
122124 if ( _mob != null ) {
123125 // Don't null out the ckey here
124126 _mob . SpawnProc ( "Logout" ) ;
@@ -129,12 +131,8 @@ public void HandleDisconnection() {
129131 }
130132 }
131133
132- _verbSystem ? . RemoveConnectionFromRepeatingVerbs ( this ) ;
133-
134134 Client . Delete ( ) ;
135135 Client = null ;
136-
137- Session = null ;
138136 }
139137
140138 public void UpdateStat ( ) {
@@ -391,7 +389,7 @@ public Task<DreamValue> WinGet(string controlId, string queryValue) {
391389 return task ;
392390 }
393391
394- public Task < DreamValue > Alert ( String title , String message , String button1 , String button2 , String button3 ) {
392+ public Task < DreamValue > Alert ( string title , string message , string button1 , string button2 , string button3 ) {
395393 var task = MakePromptTask ( out var promptId ) ;
396394 var msg = new MsgAlert ( ) {
397395 PromptId = promptId ,
@@ -441,7 +439,6 @@ public void HandleBrowseResourceRequest(string filename) {
441439 } else {
442440 _sawmill . Error ( $ "Client({ Session } ) requested a browse_rsc file they had not been permitted to request ({ filename } ).") ;
443441 }
444-
445442 }
446443
447444 public void Browse ( string ? body , string ? options ) {
0 commit comments