From 3470b4996347fffef54d56999bf945062e8dec58 Mon Sep 17 00:00:00 2001 From: aurhat Date: Sat, 24 Jan 2015 12:21:51 +0100 Subject: [PATCH] Fix spawn issues in bot modes It fixes https://github.com/assaultcube/AC/issues/62 : "Respawning in bot modes doesn't reset camera". Also only 1 click will be needed to spawn, because it looks, that note in: https://github.com/assaultcube/AC/commit/f9ec71cbab638189ea4fa3f664e2584605e2ba0e isn't true now. --- source/src/clientgame.cpp | 1 - source/src/main.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index 205cc815..ebd5b5e2 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -729,7 +729,6 @@ void respawnself() if(team_isspect(player1->team)) { addmsg(SV_SWITCHTEAM, "ri", m_teammode ? teamatoi(BotManager.GetBotTeam()) : rnd(2)); - return; } showscores(false); setscope(false); diff --git a/source/src/main.cpp b/source/src/main.cpp index afe44a12..0d57c0c6 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -883,7 +883,7 @@ void checkinput() break; } } - mousemove(tdx, tdy); + if(tdx || tdy) mousemove(tdx, tdy); } VARF(gamespeed, 10, 100, 1000, if(multiplayer()) gamespeed = 100);