aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut24
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/conversation/_grunt_chatter_mp.gnut2
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/conversation/_spectre_chatter_mp.gnut2
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