diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-06 21:52:34 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-06 21:52:34 +0000 |
commit | 1f534d940670d6df826be68b39fcaa846f139a81 (patch) | |
tree | b5c08b6f8a12a2047455e9b1066d855bf803e632 /Northstar.CustomServers | |
parent | f1a07e1b01923b45f7a82c063d25b8dea5b13d53 (diff) | |
download | NorthstarMods-1f534d940670d6df826be68b39fcaa846f139a81.tar.gz NorthstarMods-1f534d940670d6df826be68b39fcaa846f139a81.zip |
some bugfixes from playtest
Diffstat (limited to 'Northstar.CustomServers')
5 files changed, 38 insertions, 21 deletions
diff --git a/Northstar.CustomServers/mod/cfg/autoexec_ns_server.cfg b/Northstar.CustomServers/mod/cfg/autoexec_ns_server.cfg index 66efa13d..0e55312d 100644 --- a/Northstar.CustomServers/mod/cfg/autoexec_ns_server.cfg +++ b/Northstar.CustomServers/mod/cfg/autoexec_ns_server.cfg @@ -1,5 +1,9 @@ -//ns_auth_allow_insecure 1 -ns_server_name "boba server (very cool)" -ns_server_desc "fucign badass dude " -ns_masterserver_hostname "192.248.160.3" -everything_unlocked 1
\ No newline at end of file +ns_server_name "Unnamed Northstar Server" // server name +ns_server_desc "Default server description" // server description +ns_server_password "" // server password +ns_report_server_to_masterserver 1 // whether this server should report itself to the masterserver +ns_report_sp_server_to_masterserver 0 // whether this server should report itself to the masterserver if started on a singleplayer map + +ns_auth_allow_insecure 0 // keep this to 0 unless you want to allow people to join without masterserver auth/persistence +ns_erase_auth_info 1 // keep this to 1 unless you're testing and crashing alot, so you don't have to go through the northstar lobby to reauth +ns_player_auth_port 8081 // this can be whatever, make sure it's portforwarded over tcp diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut index dad94f67..09caa48d 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut @@ -71,21 +71,24 @@ void function RateSpawnpoints_CTF( int checkClass, array<entity> spawnpoints, in // get average startspawn position and max dist between spawns // could probably cache this, tbh, not like it should change outside of halftimes vector averageFriendlySpawns - float maxFriendlySpawnDist + float averageFriendlySpawnDist + + int averageDistCount foreach ( entity spawn in startSpawns ) { foreach ( entity otherSpawn in startSpawns ) { float dist = Distance2D( spawn.GetOrigin(), otherSpawn.GetOrigin() ) - if ( dist > maxFriendlySpawnDist ) - maxFriendlySpawnDist = dist + averageFriendlySpawnDist += dist + averageDistCount++ } averageFriendlySpawns += spawn.GetOrigin() } averageFriendlySpawns /= startSpawns.len() + averageFriendlySpawnDist /= averageDistCount // get average enemy startspawn position vector averageEnemySpawns @@ -97,7 +100,7 @@ void function RateSpawnpoints_CTF( int checkClass, array<entity> spawnpoints, in // from here, rate spawns float baseDistance = Distance2D( averageFriendlySpawns, averageEnemySpawns ) - float spawnIterations = ( baseDistance / maxFriendlySpawnDist ) / 2 + float spawnIterations = ( baseDistance / averageFriendlySpawnDist ) / 2 foreach ( entity spawn in spawnpoints ) { @@ -108,11 +111,11 @@ void function RateSpawnpoints_CTF( int checkClass, array<entity> spawnpoints, in for ( int i = 0; i < spawnIterations; i++ ) { - vector zonePos = averageFriendlySpawns + Normalize( averageEnemySpawns - averageFriendlySpawns ) * ( i * maxFriendlySpawnDist ) + vector zonePos = averageFriendlySpawns + Normalize( averageEnemySpawns - averageFriendlySpawns ) * ( i * averageFriendlySpawnDist ) float zonePower foreach ( entity player in enemyPlayers ) - if ( Distance2D( player.GetOrigin(), zonePos ) < maxFriendlySpawnDist ) + if ( Distance2D( player.GetOrigin(), zonePos ) < averageFriendlySpawnDist ) zonePower += 1.0 / enemyPlayers.len() zonePower = min( zonePower, remainingZonePower ) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_private_lobby_modes_init.gnut b/Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_private_lobby_modes_init.gnut index 5cd4de50..a7d6152b 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_private_lobby_modes_init.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/lobby/sh_private_lobby_modes_init.gnut @@ -31,6 +31,7 @@ void function PrivateMatchModesInit() AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_RIFF", "featured_mode_amped_tacticals", [ "Disabled", "Enabled" ], "0" ) AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_RIFF", "featured_mode_rocket_arena", [ "Disabled", "Enabled" ], "0" ) AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_RIFF", "featured_mode_shotguns_snipers", [ "Disabled", "Enabled" ], "0" ) + AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_RIFF", "iron_rules", [ "Disabled", "Enabled" ], "0" ) // gamemode settings AddPrivateMatchModeSettingEnum( "#GAMEMODE_cp", "cp_amped_capture_points", [ "Disabled", "Enabled" ], "1" ) // would've been nice to use amped_capture_points, but this var is already used ingame and its value is default 0 diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut index 70fa148e..fcad7d31 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut @@ -415,7 +415,6 @@ void function RespawnAsPilot( entity player, bool manualPosition = false ) void function RespawnAsTitan( entity player, bool manualPosition = false ) { player.isSpawning = true - entity spawnpoint = FindSpawnPoint( player, true, ShouldStartSpawn( player ) && !IsFFAGame() ) TitanLoadoutDef titanLoadout = GetTitanLoadoutForPlayer( player ) @@ -429,7 +428,6 @@ void function RespawnAsTitan( entity player, bool manualPosition = false ) player.SetPetTitan( null ) // prevent embark prompt from showing up AddCinematicFlag( player, CE_FLAG_HIDE_MAIN_HUD ) // hide hud - player.HolsterWeapon() // hide crosshair // do titanfall scoreevent AddPlayerScore( player, "Titanfall", player ) @@ -449,20 +447,27 @@ void function RespawnAsTitan( entity player, bool manualPosition = false ) camera.SetLocalAngles( < camera.GetAngles().x, spawnpoint.GetAngles().y, camera.GetAngles().z > ) // this straight up just does not work lol camera.Fire( "Enable", "!activator", 0, player ) - waitthread TitanHotDrop( titan, "at_hotdrop_01", spawnpoint.GetOrigin(), spawnpoint.GetAngles(), player, camera ) // do hotdrop anim + player.EndSignal( "OnDestroy" ) + OnThreadEnd( function() : ( player, titan, camera ) + { + if ( IsValid( player ) ) + { + RemoveCinematicFlag( player, CE_FLAG_HIDE_MAIN_HUD ) // show hud + player.isSpawning = false + } + + titan.Destroy() // pilotbecomestitan leaves an npc titan that we need to delete + camera.Fire( "Disable", "!activator", 0, player ) + camera.Destroy() + }) - camera.Fire( "Disable", "!activator", 0, player ) // stop using the camera - camera.Destroy() - RemoveCinematicFlag( player, CE_FLAG_HIDE_MAIN_HUD ) // show hud - player.DeployWeapon() // let them use weapons again - player.isSpawning = false + waitthread TitanHotDrop( titan, "at_hotdrop_01", spawnpoint.GetOrigin(), spawnpoint.GetAngles(), player, camera ) // do hotdrop anim player.RespawnPlayer( null ) // spawn player as pilot so they get their pilot loadout on embark player.SetOrigin( titan.GetOrigin() ) WaitFrame() PilotBecomesTitan( player, titan ) // make player titan - titan.Destroy() // pilotbecomestitan leaves an npc titan that we need to delete } diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut index 1766a216..70d1e527 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut @@ -139,6 +139,10 @@ entity function FindSpawnPoint( entity player, bool isTitan, bool useStartSpawnp InitRatings( player, team ) + // don't think this is necessary since we call discardratings + //foreach ( entity spawnpoint in spawnpoints ) + // spawnpoint.CalculateRating( isTitan ? TD_TITAN : TD_PILOT, team, 0.0, 0.0 ) + void functionref( int, array<entity>, int, entity ) ratingFunc = isTitan ? GameMode_GetTitanSpawnpointsRatingFunc( GAMETYPE ) : GameMode_GetPilotSpawnpointsRatingFunc( GAMETYPE ) ratingFunc( isTitan ? TD_TITAN : TD_PILOT, spawnpoints, team, player ) @@ -165,7 +169,7 @@ entity function FindSpawnPoint( entity player, bool isTitan, bool useStartSpawnp spawnpoint.s.lastUsedTime = Time() player.SetLastSpawnPoint( spawnpoint ) - + return spawnpoint } |