mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-07 08:39:07 +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")
|
@SuppressWarnings("serial")
|
||||||
public class Game extends RSApplet {
|
public class Game extends RSApplet {
|
||||||
|
private boolean graphicsEnabled = true;
|
||||||
|
|
||||||
public static String intToKOrMilLongName(int i) {
|
public static String intToKOrMilLongName(int i) {
|
||||||
String s = String.valueOf(i);
|
String s = String.valueOf(i);
|
||||||
@@ -4770,6 +4771,9 @@ public class Game extends RSApplet {
|
|||||||
inputTaken = true;
|
inputTaken = true;
|
||||||
}
|
}
|
||||||
if ((j == 13 || j == 10) && inputString.length() > 0) {
|
if ((j == 13 || j == 10) && inputString.length() > 0) {
|
||||||
|
if (inputString.equals("::gfxtgl") || inputString.equals("::tglgfx")) {
|
||||||
|
graphicsEnabled = !graphicsEnabled;
|
||||||
|
}
|
||||||
if (myPrivilege == 2) {
|
if (myPrivilege == 2) {
|
||||||
if (inputString.equals("::clientdrop")) {
|
if (inputString.equals("::clientdrop")) {
|
||||||
dropClient();
|
dropClient();
|
||||||
@@ -11483,20 +11487,25 @@ public class Game extends RSApplet {
|
|||||||
Model.anInt1685 = super.mouseX - 4;
|
Model.anInt1685 = super.mouseX - 4;
|
||||||
Model.anInt1686 = super.mouseY - 4;
|
Model.anInt1686 = super.mouseY - 4;
|
||||||
DrawingArea.setAllPixelsToZero();
|
DrawingArea.setAllPixelsToZero();
|
||||||
// xxx disables graphics if(graphicsEnabled){
|
if(graphicsEnabled){
|
||||||
worldController.method313(xCameraPos, yCameraPos, xCameraCurve, zCameraPos, j, yCameraCurve);
|
worldController.method313(xCameraPos, yCameraPos, xCameraCurve, zCameraPos, j, yCameraCurve);
|
||||||
worldController.clearObj5Cache();
|
worldController.clearObj5Cache();
|
||||||
updateEntities();
|
updateEntities();
|
||||||
drawHeadIcon();
|
drawHeadIcon();
|
||||||
|
}
|
||||||
|
// Allow tabs to work
|
||||||
method37(k2);
|
method37(k2);
|
||||||
|
// Allow stuff inside the tabs to work
|
||||||
draw3dScreen();
|
draw3dScreen();
|
||||||
|
// Show overlays on main screen
|
||||||
aRSImageProducer_1165.drawGraphics(4, super.graphics, 4);
|
aRSImageProducer_1165.drawGraphics(4, super.graphics, 4);
|
||||||
xCameraPos = l;
|
if(graphicsEnabled) {
|
||||||
zCameraPos = i1;
|
xCameraPos = l;
|
||||||
yCameraPos = j1;
|
zCameraPos = i1;
|
||||||
yCameraCurve = k1;
|
yCameraPos = j1;
|
||||||
xCameraCurve = l1;
|
yCameraCurve = k1;
|
||||||
// }
|
xCameraCurve = l1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void closeOpenInterfaces() {
|
public void closeOpenInterfaces() {
|
||||||
|
|||||||
Reference in New Issue
Block a user