File tree Expand file tree Collapse file tree 4 files changed +18
-4
lines changed
src/main/java/com/simsilica Expand file tree Collapse file tree 4 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -341,6 +341,19 @@ public void endFrame( long time ) {
341
341
it .remove ();
342
342
idIndex .retireId (so .getNetworkId ());
343
343
344
+ // Dear future-Paul, if you are here because you are trying
345
+ // to figure out why a removed object didn't actually get
346
+ // removed from the activeIds (and thus not removed on the client)
347
+ // note that if there are no other moving objects in the space
348
+ // the frame updates stop happening. There are no frame times
349
+ // and so StateCollector stops calling us at all.
350
+ // I've left it this way because it is extremely unreastic
351
+ // that NO objects would be moving anywhere in the space...
352
+ // especially since typically the player itself is an object
353
+ // moving in the space. Fixing it is non-trivial and incurs
354
+ // a small overhead all the time just to support this unlikely
355
+ // use-case. But hopefully this comment will save you a couple
356
+ // hours of debug logging if you forget why it's like that.
344
357
activeIds .remove (so .getEntityId ());
345
358
} else {
346
359
activeIds .add (so .getEntityId ());
Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ protected void publishFrame( StateFrame frame ) {
208
208
}
209
209
l .beginFrame (frame .getTime ());
210
210
}
211
-
211
+
212
212
for ( StateBlock b : frame ) {
213
213
publish ( b );
214
214
}
@@ -248,7 +248,7 @@ protected void collect() {
248
248
for ( StateFrame f : frames ) {
249
249
if ( f == null ) {
250
250
continue ;
251
- }
251
+ }
252
252
publishFrame (f );
253
253
}
254
254
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ public void beginUpdate( long time ) {
231
231
for ( Long id : pendingRemoval ) {
232
232
if ( log .isDebugEnabled () ) {
233
233
log .debug ("ZONE: --- delayed deactivation:" + id );
234
- }
234
+ }
235
235
ZoneRange range = index .remove (id );
236
236
if ( log .isDebugEnabled () ) {
237
237
log .debug ("range:" + range );
@@ -439,7 +439,7 @@ public void remove( Long id ) {
439
439
ZoneRange range = index .get (id );
440
440
if ( log .isDebugEnabled () ) {
441
441
log .debug ("range:" + range );
442
- }
442
+ }
443
443
if ( range == null ) {
444
444
return ;
445
445
}
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ public Set<E> getTransaction() {
95
95
* Called from the writing thread to apply the buffer changes
96
96
* to the readable view.
97
97
*/
98
+ @ SuppressWarnings ("unchecked" )
98
99
public void commit () {
99
100
assert checkThread () : badThreadMessage ();
100
101
delegate = buffer ;
You can’t perform that action at this time.
0 commit comments