X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fbot.qc;h=351625bb555cef6c001bd02508161691158a9051;hb=9bb58eae14f07b733b3a1bf97df10982869f5159;hp=8be71a3cf09f1f1dadbec0069f10099ebadd22d9;hpb=f09691075c4a61f4ab4b81b4354cff95be9ea26f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index 8be71a3cf..351625bb5 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -453,7 +453,7 @@ void bot_removenewest() local float besttime; local entity best, head; - if(teams_matter) + if(teamplay) { bot_removefromlargestteam(); return; @@ -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) @@ -567,7 +575,7 @@ void bot_serverframe() // But don't remove bots immediately on level change, as the real players // usually haven't rejoined yet bots_would_leave = FALSE; - if (teams_matter && autocvar_bot_vs_human && (c3==-1 && c4==-1)) + if (teamplay && autocvar_bot_vs_human && (c3==-1 && c4==-1)) bots = min(ceil(fabs(autocvar_bot_vs_human) * activerealplayers), maxclients - realplayers); else if ((realplayers || autocvar_bot_join_empty || (currentbots > 0 && time < 5))) {