File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ export class BuildingSite {
135135 }
136136
137137 update ( elapsedMs : number ) {
138+ if ( this . canceled ) return
138139 this . placeDownTimer += elapsedMs
139140 if ( this . placeDownTimer < 100 ) return
140141 if ( this . primarySurface . isBlocked ( ) || this . secondarySurface ?. isBlocked ( ) ) {
@@ -146,7 +147,7 @@ export class BuildingSite {
146147 this . teleportIn ( )
147148 }
148149
149- teleportIn ( ) {
150+ private teleportIn ( ) {
150151 this . worldMgr . entityMgr . completedBuildingSites . remove ( this )
151152 this . surfaces . forEach ( ( s ) => s . site = undefined )
152153 this . onSiteByType . forEach ( ( byType : MaterialEntity [ ] ) => byType . forEach ( ( item : MaterialEntity ) => {
@@ -163,6 +164,7 @@ export class BuildingSite {
163164
164165 cancelSite ( ) {
165166 this . worldMgr . entityMgr . buildingSites . remove ( this )
167+ this . worldMgr . entityMgr . completedBuildingSites . remove ( this )
166168 this . canceled = true
167169 this . surfaces . forEach ( ( s ) => {
168170 s . site = undefined
You can’t perform that action at this time.
0 commit comments