diff options
author | Maya <11448698+RoyalBlue1@users.noreply.github.com> | 2023-01-13 17:20:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 17:20:12 +0100 |
commit | 9bbe6832460aaabd96fef18d6e4ebb05779bb71d (patch) | |
tree | 196b38f2f90e1b004776977155413f885d8c1586 /Northstar.CustomServers/mod | |
parent | 3b2049a933b0831e65283b89c0ecca865ebe985c (diff) | |
download | NorthstarMods-1.12.0.tar.gz NorthstarMods-1.12.0.zip |
Fortwar fixes from #564 with my requested changes (#571)v1.12.1-rc1v1.12.1v1.12.0-rc5v1.12.0
* Initial commit
* add playlistvar "fw_harvester_regen_time"
* adding friendly highlights
* Scale Damage before shield Health but let other damage callbacks run
* Make Gamemode 8v8 again
* Fix NotifyEnterEnemyArea Callback
Co-authored-by: DBmaoha <56738369+DBmaoha@users.noreply.github.com>
Diffstat (limited to 'Northstar.CustomServers/mod')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut | 15 | ||||
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/titan/_replacement_titans.gnut | 27 |
2 files changed, 14 insertions, 28 deletions
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 ca8dc5f1..ec426754 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut @@ -19,6 +19,8 @@ global function ShouldEntTakeDamage_SPMP global function GetTitanBuildTime global function TitanPlayerHotDropsIntoLevel +global function SetRecalculateRespawnAsTitanStartPointCallback + struct { bool killcamsEnabled = true bool playerDeathsHidden = false @@ -26,6 +28,8 @@ struct { entity intermissionCamera array<entity> specCams + + entity functionref( entity player, entity basePoint ) recalculateRespawnAsTitanStartPointCallback } file void function BaseGametype_Init_MPSP() @@ -443,6 +447,9 @@ void function RespawnAsTitan( entity player, bool manualPosition = false ) player.isSpawning = true entity spawnpoint = FindSpawnPoint( player, true, ( ShouldStartSpawn( player ) || Flag( "ForceStartSpawn" ) ) && !IsFFAGame() ) + if ( file.recalculateRespawnAsTitanStartPointCallback != null ) + spawnpoint = file.recalculateRespawnAsTitanStartPointCallback( player, spawnpoint ) + TitanLoadoutDef titanLoadout = GetTitanLoadoutForPlayer( player ) asset model = GetPlayerSettingsAssetForClassName( titanLoadout.setFile, "bodymodel" ) @@ -500,7 +507,7 @@ void function RespawnAsTitan( entity player, bool manualPosition = false ) titan.Destroy() // pilotbecomestitan leaves an npc titan that we need to delete else RespawnAsPilot( player ) // this is 100% an edgecase, just avoid softlocking if we ever hit it in playable gamestates - + camera.Fire( "Disable", "!activator", 0, player ) camera.Destroy() }) @@ -509,6 +516,7 @@ void function RespawnAsTitan( entity player, bool manualPosition = false ) player.RespawnPlayer( null ) // spawn player as pilot so they get their pilot loadout on embark player.SetOrigin( titan.GetOrigin() ) + ClearTitanAvailable( player ) // titanfall succeed, clear titan availability // don't make player titan when entity batteryContainer is not valid. // This will prevent a servercrash that sometimes occur when evac is disabled and somebody is calling a titan in the defeat screen. @@ -577,6 +585,11 @@ void function CheckForAutoTitanDeath( entity victim, entity attacker, var damage } } +void function SetRecalculateRespawnAsTitanStartPointCallback( entity functionref( entity player, entity basePoint ) callbackFunc ) +{ + file.recalculateRespawnAsTitanStartPointCallback = callbackFunc +} + // stuff to change later bool function ShouldEntTakeDamage_SPMP( entity ent, var damageInfo ) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/titan/_replacement_titans.gnut b/Northstar.CustomServers/mod/scripts/vscripts/titan/_replacement_titans.gnut index 349f9131..57361362 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/titan/_replacement_titans.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/titan/_replacement_titans.gnut @@ -20,7 +20,6 @@ global function req global function ReplacementTitan global function TryAnnounceTitanfallWarningToEnemyTeam global function GetTitanForPlayer -global function TryPlayTitanfallNegativeSoundToPlayer global function ShouldSetTitanRespawnTimer @@ -539,32 +538,6 @@ bool function ClientCommand_RequestTitan( entity player, array<string> args ) return true } -bool function TryPlayTitanfallNegativeSoundToPlayer( entity player ) -{ - if( !( "lastNegativeSound" in player.s ) ) - player.s.lastNegativeSound <- 0.0 // float - if( player.s.lastNegativeSound + 3.0 > Time() ) // in sound cooldown - return false - - EmitSoundOnEntityOnlyToPlayer( player, player, "titan_dryfire" ) - player.s.lastNegativeSound = Time() - - return true -} - -/* // serverSideRUI can't handle localized strings -void function CreateCustomMessageForRefusingTitanfall( entity player ) -{ - if( !( "lastMessageSend" in player.s ) ) - player.s.lastMessageSend <- 0.0 // float - if( player.s.lastMessageSend + 10 > Time() ) // in message cooldown - return - - NSSendInfoMessageToPlayer( player, "#FW_OBJECTIVE_TITANFALL" ) - player.s.lastMessageSend = Time() -} -*/ - // This a baseline titan request function; the only things that prevent this from happening are // common cases; wrong gamestate, already has a titan, is currently dead, etc... bool function RequestTitan( entity player ) |