Skip to content

Commit

Permalink
feat: play different sounds when players goes away from starting line
Browse files Browse the repository at this point in the history
  • Loading branch information
Alystrasz committed Aug 27, 2023
1 parent c601227 commit 9b368c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mod/scripts/vscripts/gamemodes/cl_gamemode_pk.nut
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ void function ServerCallback_ToggleStartIndicatorDisplay( bool show )
RuiSetBool( file.startIndicatorRUI, "isVisible", show )
if (show) {
entity player = GetLocalClientPlayer()
EmitSoundOnEntity( player, "UI_Spawn_FriendlyPilot" )

// Only display warning message once every two minutes
int now = GetUnixTimestamp()
Expand All @@ -282,6 +281,9 @@ void function ServerCallback_ToggleStartIndicatorDisplay( bool show )
string message = format(template, ROBOT_NAME, GetLocalClientPlayer().GetPlayerName())
Chat_GameWriteLine(message)
file.startIndicatorTime = GetUnixTimestamp()
EmitSoundOnEntity( player, "diag_spectre_gs_LeechStart_01_1" )
} else {
EmitSoundOnEntity( player, "UI_Spawn_FriendlyPilot" )
}
}
}
Expand Down

0 comments on commit 9b368c8

Please sign in to comment.