diff --git a/raw/scripts/mp/botwarfare.gsc b/raw/scripts/mp/botwarfare.gsc index d0b0c3f..158e0a4 100644 --- a/raw/scripts/mp/botwarfare.gsc +++ b/raw/scripts/mp/botwarfare.gsc @@ -12,6 +12,15 @@ #include maps\mp\_utility; #include common_scripts\utility; +/* + Replace func stuff +*/ +main() +{ + // fix bot grenade launcher usage + replaceFunc( maps\mp\bots\_bot_combat::bot_should_hip_fire, ::bot_should_hip_fire_replaced ); +} + /* Entry point to the bots */ @@ -92,6 +101,65 @@ init() thread handleBots(); } +/* + Fixes gl usage +*/ +bot_should_hip_fire_replaced() +{ + enemy = self.bot.threat.entity; + weapon = self getcurrentweapon(); + + if ( weapon == "none" ) + return 0; + + if ( weaponisdualwield( weapon ) ) + return 1; + + class = weaponclass( weapon ); + + if ( isplayer( enemy ) && class == "spread" ) + return 1; + + if ( class == "grenade" ) // added + return 1; + + distsq = distancesquared( self.origin, enemy.origin ); + distcheck = 0; + + switch ( class ) + { + case "mg": + distcheck = 250; + break; + + case "smg": + distcheck = 350; + break; + + case "spread": + distcheck = 400; + break; + + case "pistol": + distcheck = 200; + break; + + case "rocketlauncher": + distcheck = 0; + break; + + case "rifle": + default: + distcheck = 300; + break; + } + + if ( isweaponscopeoverlay( weapon ) ) + distcheck = 500; + + return distsq < distcheck * distcheck; +} + /* Adds sd to bot logic */ @@ -681,11 +749,7 @@ getConeDot( to, from, dir ) return vectordot( dirToTarget, forward ); } -botMovementOverride( a, b ) {} -botClearMovementOverride() {} -botClearButtonOverride( a ) {} -botButtonOverride( a, b ) {} -botClearOverrides( a ) {} + /* custom movement stuff diff --git a/z_server.bat b/z_server.bat index 677e9e9..3cfdc3c 100644 --- a/z_server.bat +++ b/z_server.bat @@ -3,25 +3,37 @@ set key= ::RemoteCONtrol password, needed for most management tools like IW4MADMIN and B3. Do not skip if you installing IW4MADMIN. set rcon_password= -::Name of the config file the server should use. (default: dedicated.cfg) +::Name of the config file the server should use. set cfg=dedicated.cfg ::Name of the server shown in the title of the cmd window. This will NOT bet shown ingame. -set name=T6 Bot Warfare +set name=PlutoniumT6MP Bot Warfare ::Port used by the server (default: 4976) set port=4980 ::What ip to bind too set ip=0.0.0.0 -::Only change this when you don't want to keep the bat files in the game folder. MOST WON'T NEED TO EDIT THIS! -set gamepath=%cd% +:: current dir of this .bat file +SET mypath=%~dp0 +SET mypath=%mypath:~0,-1% +::Only change this when you don't want to keep the bat files in the game folder. MOST WON'T NEED TO EDIT THIS! %cd% +set gamepath=%mypath% +::Your plutonium install path (leave default!) +set pluto_path=%localappdata%\Plutonium +:: Gamemode; oneof t4sp, t4mp, t5sp, t5mp, iw5mp, t6mp, t6zm +set pluto_game_mode=t6mp +:: Other things to send to cmd +set cmd_extras= +:: Exe dedi path (leave default!) +set exe_path=bin\plutonium-bootstrapper-win32.exe -title PlutoniumT6 - %name% - Server restarter + +title PlutoniumT6MP - %name% - Server restarter echo Visit plutonium.pw / Join the Discord (a6JM2Tv) for NEWS and Updates! echo Server "%name%" will load "%cfg%" and listen on port "%port%" UDP with IP "%ip%"! echo To shut down the server close this window first! echo (%date%) - (%time%) %name% server start. -cd /D %LOCALAPPDATA%\Plutonium +cd /D %pluto_path% :server -start /wait /abovenormal "%name%" "bin\plutonium-bootstrapper-win32.exe" t6mp "%gamepath%" -dedicated -sv_config "%cfg%" -key "%key%" -net_ip "%ip%" -net_port "%port%" -rcon_password "%rcon_password%" +start /wait /abovenormal "%name%" "%exe_path%" %pluto_game_mode% "%gamepath%" -dedicated -sv_config "%cfg%" -key "%key%" -net_ip "%ip%" -net_port "%port%" -rcon_password "%rcon_password%" %cmd_extras% echo (%date%) - (%time%) WARNING: %name% server closed or dropped... server restarts. goto server