diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-01-12 01:47:49 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-01-12 01:47:49 +0000 |
commit | 24b9bfc941fcd84604d040443cc65f70602d920b (patch) | |
tree | 9eac2d3e01c01de8e4ae502d741f6bd06e5489ea /Northstar.CustomServers/mod | |
parent | 7dedffbf358edb4d3b9222c41b3d61b50d8a4e64 (diff) | |
download | NorthstarMods-24b9bfc941fcd84604d040443cc65f70602d920b.tar.gz NorthstarMods-24b9bfc941fcd84604d040443cc65f70602d920b.zip |
fix pilot voices
Diffstat (limited to 'Northstar.CustomServers/mod')
3 files changed, 24 insertions, 4 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut index 961816c7..0fee4f2c 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut @@ -4,14 +4,16 @@ global function TryPlayWeaponBattleChatterLine void function BattleChatter_Init() { - //ShBattleChatter_Init() + AddCallback_OnPlayerGetsNewPilotLoadout( UpdatePlayerVoiceIndex ) } void function PlayBattleChatterLine( entity player, string conversationType ) { + int conversationIndex = GetConversationIndex( conversationType ) + foreach( entity otherPlayer in GetPlayerArray() ) if ( ShouldPlayBattleChatter( conversationType, otherPlayer, player ) && player != otherPlayer ) - Remote_CallFunction_NonReplay( otherPlayer, "ServerCallback_PlayBattleChatter", GetConversationIndex( conversationType ), player.GetEncodedEHandle() ) + Remote_CallFunction_Replay( otherPlayer, "ServerCallback_PlayBattleChatter", conversationIndex, player.GetEncodedEHandle() ) } void function TryPlayWeaponBattleChatterLine( entity player, entity weapon ) @@ -22,4 +24,22 @@ void function TryPlayWeaponBattleChatterLine( entity player, entity weapon ) expect string( chatterEvent ) PlayBattleChatterLine( player, chatterEvent ) +} + +void function UpdatePlayerVoiceIndex( entity player, PilotLoadoutDef voiceIndex ) +{ + if ( IsPlayerFemale( player ) ) + { + if ( player.IsMechanical() ) + player.SetPlayerNetInt( "battleChatterVoiceIndex", SelectRandomAndroidFemaleBattleChatterVoice() ) + else + player.SetPlayerNetInt( "battleChatterVoiceIndex", SelectRandomFemaleBattleChatterVoice() ) + } + else + { + if ( player.IsMechanical() ) + player.SetPlayerNetInt( "battleChatterVoiceIndex", SelectRandomAndroidMaleBattleChatterVoice() ) + else + player.SetPlayerNetInt( "battleChatterVoiceIndex", SelectRandomMaleBattleChatterVoice() ) + } }
\ No newline at end of file diff --git a/Northstar.CustomServers/mod/scripts/vscripts/conversation/_grunt_chatter_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_grunt_chatter_mp.gnut index b638e92b..1a70c289 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/conversation/_grunt_chatter_mp.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_grunt_chatter_mp.gnut @@ -14,5 +14,5 @@ void function PlayGruntChatterMPLine( entity grunt, string conversationType ) foreach ( entity player in GetPlayerArray() ) if ( ShouldPlayGruntChatterMPLine( conversationType, player, grunt ) ) - Remote_CallFunction_NonReplay( player, "ServerCallback_PlayGruntChatterMP", GetConversationIndex( conversationType ), grunt.GetEncodedEHandle() ) + Remote_CallFunction_Replay( player, "ServerCallback_PlayGruntChatterMP", GetConversationIndex( conversationType ), grunt.GetEncodedEHandle() ) }
\ No newline at end of file diff --git a/Northstar.CustomServers/mod/scripts/vscripts/conversation/_spectre_chatter_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_spectre_chatter_mp.gnut index 2f9e0f84..74ba5371 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/conversation/_spectre_chatter_mp.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_spectre_chatter_mp.gnut @@ -14,5 +14,5 @@ void function PlaySpectreChatterMPLine( entity spectre, string conversationType foreach ( entity player in GetPlayerArray() ) if ( ShouldPlaySpectreChatterMPLine( conversationType, player, spectre ) ) - Remote_CallFunction_NonReplay( player, "ServerCallback_PlaySpectreChatterMP", GetConversationIndex( conversationType ), spectre.GetEncodedEHandle() ) + Remote_CallFunction_Replay( player, "ServerCallback_PlaySpectreChatterMP", GetConversationIndex( conversationType ), spectre.GetEncodedEHandle() ) }
\ No newline at end of file |