From 654fca9e679a74b0dcd82e5f059267ffe50e9512 Mon Sep 17 00:00:00 2001 From: /jedi/ Date: Thu, 6 Oct 2016 04:06:14 +0200 Subject: [PATCH] fix merge --- game/network/session.cpp | 2 ++ 1 file changed, 2 insertions(+) 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") {