Skip to content

Commit

Permalink
Fix crash when ctrl+scrolling outside of the game.
Browse files Browse the repository at this point in the history
  • Loading branch information
hellrage committed Feb 4, 2022
1 parent 69ff443 commit bb9da3e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Gemsmith/GCCSGemsmith.as
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ package Gemsmith
import com.giab.games.gccs.steam.SB;
import com.giab.games.gccs.steam.constants.ActionStatus;
import com.giab.games.gccs.steam.constants.GemComponentType;
import com.giab.games.gccs.steam.constants.IngameStatus;
import com.giab.games.gccs.steam.entity.Gem;
import com.giab.games.gccs.steam.entity.Trap;
import com.giab.games.gccs.steam.mcDyn.McInfoPanel;
Expand Down Expand Up @@ -783,7 +784,7 @@ package Gemsmith

public function eh_ingameWheelScrolled(e: MouseEvent): void
{
if (!ctrlKeyHeld || !GV.ingameCore.controller.getGemUnderPointer(false))
if (!ctrlKeyHeld || GV.ingameCore.ingameStatus != IngameStatus.PLAYING || !GV.ingameCore.controller.getGemUnderPointer(false))
return;

if (e.delta > 0)
Expand Down
5 changes: 2 additions & 3 deletions src/Gemsmith/GCFWGemsmith.as
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ package Gemsmith
import com.giab.games.gcfw.SB;
import com.giab.games.gcfw.constants.ActionStatus;
import com.giab.games.gcfw.constants.GemComponentType;
import com.giab.games.gcfw.constants.IngameStatus;
import com.giab.games.gcfw.entity.Gem;
import com.giab.games.gcfw.entity.Trap;
import com.giab.games.gcfw.ingame.IngameCore;
import com.giab.games.gcfw.mcDyn.McInfoPanel;
import com.giab.games.gcfw.mcStat.CntIngame;
import flash.display.MovieClip;
import flash.events.*;
import flash.filesystem.*;
Expand Down Expand Up @@ -809,7 +808,7 @@ package Gemsmith

public function eh_ingameWheelScrolled(e: MouseEvent): void
{
if (!ctrlKeyHeld || !GV.ingameCore.controller.getGemUnderPointer(false))
if (!ctrlKeyHeld || GV.ingameCore.ingameStatus != IngameStatus.PLAYING || !GV.ingameCore.controller.getGemUnderPointer(false))
return;

if (e.delta > 0)
Expand Down
2 changes: 1 addition & 1 deletion src/Gemsmith/GemsmithMod.as
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ package Gemsmith
public class GemsmithMod extends MovieClip implements BezelMod
{

public function get VERSION():String { return "1.14"; }
public function get VERSION():String { return "1.15"; }
public function get BEZEL_VERSION():String { return "2.0.0"; }
public function get MOD_NAME():String { return "Gemsmith"; }

Expand Down

0 comments on commit bb9da3e

Please sign in to comment.