games/mines: add missing checks for UseGhost

front
aiju 2018-07-03 07:22:19 +00:00
parent 2e05af858e
commit ac891003ea
1 changed files with 4 additions and 4 deletions

View File

@ -534,7 +534,7 @@ void main(int argc, char **argv) {
Event Event; Event Event;
Point CurrentCell, Cell = Pt(-1, -1); Point CurrentCell, Cell = Pt(-1, -1);
GhostInit(); if(UseGhost) GhostInit();
Etimer = etimer(0, UseGhost ? 10 : 1000); Etimer = etimer(0, UseGhost ? 10 : 1000);
LastAction = nsec(); LastAction = nsec();
@ -543,7 +543,7 @@ void main(int argc, char **argv) {
if(Key == Etimer) { if(Key == Etimer) {
if(nsec() - LastAction > 1000000000ULL && LastMouse.buttons == 0) if(UseGhost && nsec() - LastAction > 1000000000ULL && LastMouse.buttons == 0)
GhostMode(); GhostMode();
if(++Counter == (UseGhost ? 100 : 1)){ if(++Counter == (UseGhost ? 100 : 1)){
@ -558,7 +558,7 @@ void main(int argc, char **argv) {
if(Key == Emouse) { if(Key == Emouse) {
if(!GhostCheck(Event.mouse.xy) || LastMouse.buttons != Event.mouse.buttons){ if(UseGhost && !GhostCheck(Event.mouse.xy) || LastMouse.buttons != Event.mouse.buttons){
LastAction = nsec(); LastAction = nsec();
LastMouse = Event.mouse; LastMouse = Event.mouse;
GhostReset(Event.mouse.buttons != 0); GhostReset(Event.mouse.buttons != 0);
@ -668,7 +668,7 @@ void main(int argc, char **argv) {
if(Key == Ekeyboard) { if(Key == Ekeyboard) {
LastAction = nsec(); LastAction = nsec();
GhostReset(1); if(UseGhost) GhostReset(1);
switch(Event.kbdc) { switch(Event.kbdc) {
case 'n': case 'n':