aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
diff options
context:
space:
mode:
authorx3Karma <juliuslimck@gmail.com>2022-01-20 18:12:31 +0800
committerBarichello <artur@barichello.me>2022-01-20 14:58:28 -0300
commit0a169db4ab3db1f05f3a95b73e3b55f0268239c5 (patch)
tree279c03a55cb7bef8248a35e84539e56b15858878 /Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
parent5f66544b5d5d6ad42221d14d5f67235877930e15 (diff)
downloadNorthstarMods-0a169db4ab3db1f05f3a95b73e3b55f0268239c5.tar.gz
NorthstarMods-0a169db4ab3db1f05f3a95b73e3b55f0268239c5.zip
Update _burnmeter.gnut
- fixed infinite map hacks - fixed "SONAR DETECTED" message playing with "MAPHACK DETECTED" - increased the range of the pulse of map hack - for whatever reason, dying while a map hack is going on stops the map hack.
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut35
1 files changed, 25 insertions, 10 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
index d1f4bd80..dcae6bd2 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
@@ -378,25 +378,40 @@ void function PlayerUsesMaphackBurncardThreaded( entity player )
array<entity> aliveplayers = GetPlayerArray()
foreach ( entity otherPlayer in GetPlayerArray() )
{
- Remote_CallFunction_Replay( otherPlayer, "ServerCallback_SonarPulseFromPosition", player.GetOrigin().x, player.GetOrigin().y, player.GetOrigin().z, SONAR_GRENADE_RADIUS )
+ Remote_CallFunction_Replay( otherPlayer, "ServerCallback_SonarPulseFromPosition", player.GetOrigin().x, player.GetOrigin().y, player.GetOrigin().z, 2000)
- if ( otherPlayer.GetTeam() != player.GetTeam() && aliveplayers.find(otherPlayer) != -1 && aliveplayers.find(player) != -1 )
+ if ( otherPlayer.GetTeam() != player.GetTeam() && aliveplayers.find(otherPlayer) != -1 )
{
- StatusEffect_AddTimed( otherPlayer, eStatusEffect.maphack_detected, 1.0, MAPHACK_PULSE_DELAY / 2, 0.0 )
- SonarStart( otherPlayer, player.GetOrigin(), player.GetTeam(), player )
- IncrementSonarPerTeam( player.GetTeam() )
+ MapHackSonar(player, otherPlayer)
}
}
wait MAPHACK_PULSE_DELAY
- foreach ( entity otherPlayer in GetPlayerArray() ) {
- if ( otherPlayer.GetTeam() != player.GetTeam() && aliveplayers.find(otherPlayer) != -1 && aliveplayers.find(player) != -1 ) {
- SonarEnd (otherPlayer, player.GetTeam() )
- DecrementSonarPerTeam( player.GetTeam() )
+ foreach ( entity otherPlayer in GetPlayerArray() )
+ {
+ if ( otherPlayer.GetTeam() != player.GetTeam() && aliveplayers.find(otherPlayer) != -1 ) {
+ MapHackSonarStop(player, otherPlayer)
}
}
}
}
+void function MapHackSonar(entity player, entity otherPlayer)
+{
+ // doing this should prevent infinite map hacks
+ StatusEffect_AddTimed( otherPlayer, eStatusEffect.maphack_detected, 1.0, MAPHACK_PULSE_DELAY / 2, 0.0 )
+ Highlight_SetEnemyHighlight( otherPlayer, "enemy_sonar" )
+ Highlight_SetSonarHighlightWithParam1( otherPlayer, "enemy_sonar", player.GetOrigin() )
+ Highlight_SetSonarHighlightOrigin( otherPlayer, player.GetOrigin() )
+ otherPlayer.HighlightEnableForTeam( player.GetTeam() )
+}
+void function MapHackSonarStop(entity player, entity otherPlayer)
+{
+ otherPlayer.HighlightDisableForTeam( player.GetTeam() )
+ otherPlayer.HighlightSetTeamBitField( 0 )
+ if (Hightlight_HasEnemyHighlight( otherPlayer, "enemy_sonar"))
+ Highlight_ClearEnemyHighlight( otherPlayer )
+}
+
void function PlayerUsesPhaseRewindBurncard( entity player )
{
thread PlayerUsesPhaseRewindBurncardThreaded( player )
@@ -510,4 +525,4 @@ void function PlayerUsesReaperfallBurncard( entity player )
DispatchSpawn( reaper )
thread SuperSpectre_WarpFall( reaper )
-} \ No newline at end of file
+}