Significantly improved the performance of video rendering by using the magic of multithreading

This commit is contained in:
Marius Metzger
2015-04-05 02:10:44 +02:00
parent 9df94fd789
commit e7c2a462f3
5 changed files with 22 additions and 12 deletions

View File

@@ -615,11 +615,13 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
CameraEntity cent = ReplayHandler.getCameraEntity();
if(!allowMovement && !((Math.abs(cent.posX - ppl.func_148932_c()) > ReplayMod.TP_DISTANCE_LIMIT) ||
(Math.abs(cent.posZ - ppl.func_148933_e()) > ReplayMod.TP_DISTANCE_LIMIT))) {
return;
} else {
allowMovement = false;
if(cent != null) {
if(!allowMovement && !((Math.abs(cent.posX - ppl.func_148932_c()) > ReplayMod.TP_DISTANCE_LIMIT) ||
(Math.abs(cent.posZ - ppl.func_148933_e()) > ReplayMod.TP_DISTANCE_LIMIT))) {
return;
} else {
allowMovement = false;
}
}
Thread t = new Thread(new Runnable() {