diff --git a/game/network/session.cpp b/game/network/session.cpp index 91886d1..6bd360d 100644 --- a/game/network/session.cpp +++ b/game/network/session.cpp @@ -56,6 +56,8 @@ bool Session::parse(std::string s) } else if (s.size()>=3&&s[0]=='v'&&s[1]==' ') { //set speed double speed = atof(s.substr(2).c_str()); + if(speed<0)speed=0; + if(speed>3)speed=3; m_state->setSpeed(m_pid, speed); } else if (token == "dev") {