mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
Disable graphics, lower CPU & GPU usage (#168)
* Fix local Parabot instructions * Add kick command, and force logout function * Add graphics toggle option * add alias
This commit is contained in:
@@ -31,6 +31,7 @@ import java.util.Date;
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class Game extends RSApplet {
|
||||
private boolean graphicsEnabled = true;
|
||||
|
||||
public static String intToKOrMilLongName(int i) {
|
||||
String s = String.valueOf(i);
|
||||
@@ -4770,6 +4771,9 @@ public class Game extends RSApplet {
|
||||
inputTaken = true;
|
||||
}
|
||||
if ((j == 13 || j == 10) && inputString.length() > 0) {
|
||||
if (inputString.equals("::gfxtgl") || inputString.equals("::tglgfx")) {
|
||||
graphicsEnabled = !graphicsEnabled;
|
||||
}
|
||||
if (myPrivilege == 2) {
|
||||
if (inputString.equals("::clientdrop")) {
|
||||
dropClient();
|
||||
@@ -11483,20 +11487,25 @@ public class Game extends RSApplet {
|
||||
Model.anInt1685 = super.mouseX - 4;
|
||||
Model.anInt1686 = super.mouseY - 4;
|
||||
DrawingArea.setAllPixelsToZero();
|
||||
// xxx disables graphics if(graphicsEnabled){
|
||||
worldController.method313(xCameraPos, yCameraPos, xCameraCurve, zCameraPos, j, yCameraCurve);
|
||||
worldController.clearObj5Cache();
|
||||
updateEntities();
|
||||
drawHeadIcon();
|
||||
if(graphicsEnabled){
|
||||
worldController.method313(xCameraPos, yCameraPos, xCameraCurve, zCameraPos, j, yCameraCurve);
|
||||
worldController.clearObj5Cache();
|
||||
updateEntities();
|
||||
drawHeadIcon();
|
||||
}
|
||||
// Allow tabs to work
|
||||
method37(k2);
|
||||
// Allow stuff inside the tabs to work
|
||||
draw3dScreen();
|
||||
// Show overlays on main screen
|
||||
aRSImageProducer_1165.drawGraphics(4, super.graphics, 4);
|
||||
xCameraPos = l;
|
||||
zCameraPos = i1;
|
||||
yCameraPos = j1;
|
||||
yCameraCurve = k1;
|
||||
xCameraCurve = l1;
|
||||
// }
|
||||
if(graphicsEnabled) {
|
||||
xCameraPos = l;
|
||||
zCameraPos = i1;
|
||||
yCameraPos = j1;
|
||||
yCameraCurve = k1;
|
||||
xCameraCurve = l1;
|
||||
}
|
||||
}
|
||||
|
||||
public void closeOpenInterfaces() {
|
||||
|
||||
Reference in New Issue
Block a user