racing: disable mouse pointing

This commit is contained in:
Zeno Rogue 2019-01-17 01:02:02 +01:00
parent 6e13da5800
commit c313f59c87
2 changed files with 3 additions and 2 deletions

View File

@ -148,7 +148,8 @@ bool read_ghosts(string seed, int mcode) {
println(hlog, "trying to read ghosts from: ", fname);
fhstream f(fname, "rb");
if(!f.f) return false;
f.get<int> ();
int vernum = f.get<int> ();
if(vernum <= 0xA600) return true; // scores removed due to the possibility of cheating
hread(f, ghostset());
return true;
}

View File

@ -1634,7 +1634,7 @@ void movePlayer(monster *m, int delta) {
#if CAP_SDL
Uint8 *keystate = SDL_GetKeyState(NULL);
bool forcetarget = (keystate[SDLK_RSHIFT] | keystate[SDLK_LSHIFT]);
if(((mousepressed && !forcetarget) || facemouse) && delta > 0 && !mouseout()) {
if(((mousepressed && !forcetarget) || facemouse) && delta > 0 && !mouseout() && !racing::on) {
// playermoved = true;
hyperpoint h = inverse(m->pat) * mouseh;
playerturn[cpid] = -atan2(h[1], h[0]);