From 42da061f2f1d383cb5e5933baa84b325d0ee9e19 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 1 Sep 2017 23:01:10 +0200 Subject: [PATCH] Protection from accidentally activating Flash/Lightning (not implemented) --- game.cpp | 4 ++++ hyper.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/game.cpp b/game.cpp index d5aaa565..aa30c0a2 100644 --- a/game.cpp +++ b/game.cpp @@ -6401,6 +6401,7 @@ bool movepcto(int d, int subdir, bool checkonly) { if(!passable(c2, cwt.c, P_ISPLAYER | P_MIRROR | P_USEBOAT | P_FRIENDSWAP) && items[itOrbFlash]) { if(checkonly) return true; + if(orbProtection(itOrbFlash)) return true; activateFlash(); bfs(); if(multi::players > 1) { multi::whereto[multi::cpid].d = MD_UNDECIDED; return false; } @@ -6410,6 +6411,7 @@ bool movepcto(int d, int subdir, bool checkonly) { if(!passable(c2, cwt.c, P_ISPLAYER | P_MIRROR | P_USEBOAT | P_FRIENDSWAP) && items[itOrbLightning]) { if(checkonly) return true; + if(orbProtection(itOrbLightning)) return true; activateLightning(); keepLightning = true; bfs(); @@ -6724,6 +6726,7 @@ bool movepcto(int d, int subdir, bool checkonly) { if(items[itOrbFlash]) { if(checkonly) return true; + if(orbProtection(itOrbFlash)) return true; activateFlash(); checkmove(); return true; @@ -6731,6 +6734,7 @@ bool movepcto(int d, int subdir, bool checkonly) { if(items[itOrbLightning]) { if(checkonly) return true; + if(orbProtection(itOrbLightning)) return true; activateLightning(); checkmove(); return true; diff --git a/hyper.h b/hyper.h index 15330ffc..d6c9425f 100644 --- a/hyper.h +++ b/hyper.h @@ -1530,3 +1530,5 @@ void selectLanguageScreen(); bool inscreenrange(cell *c); bool allowIncreasedSight(); + +static bool orbProtection(eItem it) { return false; } // not implemented