]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/bot.qc
Remove unused stuff
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / bot.qc
index 951d4adb67cc6e5ff8bfb93f372620b7be9b6ec5..351625bb555cef6c001bd02508161691158a9051 100644 (file)
@@ -529,6 +529,14 @@ void autoskill(float factor)
                head.totalfrags_lastcheck = head.totalfrags;
 }
 
+void bot_calculate_stepheightvec(void)
+{
+       stepheightvec = autocvar_sv_stepheight * '0 0 1';
+       jumpstepheightvec = stepheightvec +
+               ((autocvar_sv_jumpvelocity * autocvar_sv_jumpvelocity) / (2 * autocvar_sv_gravity)) * '0 0 0.85';
+               // 0.75 factor is for safety to make the jumps easy
+}
+
 void bot_serverframe()
 {
        float realplayers, bots, activerealplayers;
@@ -540,7 +548,7 @@ void bot_serverframe()
        if (time < 2)
                return;
 
-       stepheightvec = autocvar_sv_stepheight * '0 0 1';
+       bot_calculate_stepheightvec();
        bot_navigation_movemode = ((autocvar_bot_navigation_ignoreplayers) ? MOVE_NOMONSTERS : MOVE_NORMAL);
 
        if(time > autoskill_nextthink)