Merge branch 'master' into param
This commit is contained in:
@@ -26,9 +26,9 @@
|
||||
description = "RuneLite Mixins"
|
||||
|
||||
dependencies {
|
||||
compileOnly(Libraries.guava)
|
||||
compileOnly(Libraries.javaxInject)
|
||||
compileOnly(Libraries.slf4jApi)
|
||||
compileOnly(group = "com.google.guava", name = "guava", version = "28.2-jre")
|
||||
compileOnly(group = "javax.inject", name = "javax.inject", version = "1")
|
||||
compileOnly(group = "org.slf4j", name = "slf4j-api", version = "1.7.30")
|
||||
compileOnly(project(":injection-annotations"))
|
||||
compileOnly(project(":runescape-api"))
|
||||
}
|
||||
|
||||
@@ -178,6 +178,12 @@ public abstract class RSClientMixin implements RSClient
|
||||
@Inject
|
||||
private static RSTileItem lastItemDespawn;
|
||||
|
||||
@Inject
|
||||
private static boolean invertPitch;
|
||||
|
||||
@Inject
|
||||
private static boolean invertYaw;
|
||||
|
||||
@Inject
|
||||
private boolean gpu;
|
||||
|
||||
@@ -1087,16 +1093,21 @@ public abstract class RSClientMixin implements RSClient
|
||||
@Inject
|
||||
public static void boostedSkillLevelsChanged(int idx)
|
||||
{
|
||||
Skill[] skills = Skill.values();
|
||||
|
||||
if (idx >= 0 && idx < skills.length - 1)
|
||||
if (idx == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int changedSkillIdx = idx - 1 & 31;
|
||||
int skillIdx = client.getChangedSkillLevels()[changedSkillIdx];
|
||||
Skill[] skills = Skill.values();
|
||||
if (skillIdx >= 0 && skillIdx < skills.length - 1)
|
||||
{
|
||||
Skill updatedSkill = skills[idx];
|
||||
StatChanged statChanged = new StatChanged(
|
||||
updatedSkill,
|
||||
client.getSkillExperience(updatedSkill),
|
||||
client.getRealSkillLevel(updatedSkill),
|
||||
client.getBoostedSkillLevel(updatedSkill)
|
||||
skills[skillIdx],
|
||||
client.getSkillExperiences()[skillIdx],
|
||||
client.getRealSkillLevels()[skillIdx],
|
||||
client.getBoostedSkillLevels()[skillIdx]
|
||||
);
|
||||
client.getCallbacks().post(StatChanged.class, statChanged);
|
||||
}
|
||||
@@ -1885,4 +1896,39 @@ public abstract class RSClientMixin implements RSClient
|
||||
|
||||
return widgetClickMask;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@FieldHook("camAngleDX")
|
||||
private static void onCamAngleDXChange(int index)
|
||||
{
|
||||
if (invertPitch && client.getMouseCurrentButton() == 4 && client.isMouseCam())
|
||||
{
|
||||
client.setCamAngleDX(-client.getCamAngleDX());
|
||||
}
|
||||
}
|
||||
|
||||
@Inject
|
||||
@FieldHook("camAngleDY")
|
||||
private static void onCamAngleDYChange(int index)
|
||||
{
|
||||
if (invertYaw && client.getMouseCurrentButton() == 4 && client.isMouseCam())
|
||||
{
|
||||
client.setCamAngleDY(-client.getCamAngleDY());
|
||||
}
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public void setInvertPitch(boolean state)
|
||||
{
|
||||
invertPitch = state;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public void setInvertYaw(boolean state)
|
||||
{
|
||||
invertYaw = state;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user