Added disable_nuke_effects

This commit is contained in:
Resxt 2022-02-09 23:37:15 +01:00
parent e6b8562a0e
commit 7615e4ddf6
5 changed files with 116 additions and 0 deletions

View File

@ -0,0 +1,15 @@
# Disable Nuke Effects
Only put one script at a time otherwise they might override each other and cause undesired behavior.
## disable_nuke_effects_vision.gsc
Disables the brown-ish vision applied after a M.O.A.B detonates
## disable_nuke_effects_slowmo.gsc
Disables the slow motion effect happening while a M.O.A.B is detonating
## disable_nuke_effects_vision_and_slowmo.gsc
Disables both the vision and the slow motion effects
## disable_nuke_effects_all.gsc
Disables the vision and the slow motion and remove the fog/smoke appearing on the map for a few seconds after the M.O.A.B detonation. This removes all visual effects. The M.O.A.B will just kill every enemies without any added visual effect.

View File

@ -0,0 +1,24 @@
#include maps\mp\killstreaks\_nuke;
main()
{
replacefunc(maps\mp\killstreaks\_nuke::nukeVision, ::disableNukeVision);
replacefunc(maps\mp\killstreaks\_nuke::nukeSlowMo, ::disableNukeSlowMo);
replacefunc(maps\mp\killstreaks\_nuke::nukeEffects, ::disableNukeEffects);
}
disableNukeVision()
{
}
disableNukeSlowMo()
{
}
disableNukeEffects()
{
level endon( "nuke_cancelled" );
setdvar( "ui_bomb_timer", 0 );
}

View File

@ -0,0 +1,11 @@
#include maps\mp\killstreaks\_nuke;
main()
{
replacefunc(maps\mp\killstreaks\_nuke::nukeSlowMo, ::disableNukeSlowMo);
}
disableNukeSlowMo()
{
}

View File

@ -0,0 +1,30 @@
#include maps\mp\killstreaks\_nuke;
main()
{
replacefunc(maps\mp\killstreaks\_nuke::nukeVision, ::disableNukeVision);
replacefunc(maps\mp\killstreaks\_nuke::nukeEffects, ::disableNukeEffects);
}
disableNukeVision()
{
}
disableNukeEffects()
{
level endon( "nuke_cancelled" );
setdvar( "ui_bomb_timer", 0 );
foreach ( var_1 in level.players )
{
var_2 = anglestoforward( var_1.angles );
var_2 = ( var_2[0], var_2[1], 0 );
var_2 = vectornormalize( var_2 );
var_3 = 5000;
var_4 = spawn( "script_model", var_1.origin + var_2 * var_3 );
var_4 setmodel( "tag_origin" );
var_4.angles = ( 0, var_1.angles[1] + 180, 90 );
var_4 thread nukeEffect( var_1 );
}
}

View File

@ -0,0 +1,36 @@
#include maps\mp\killstreaks\_nuke;
main()
{
replacefunc(maps\mp\killstreaks\_nuke::nukeVision, ::disableNukeVision);
replacefunc(maps\mp\killstreaks\_nuke::nukeSlowMo, ::disableNukeSlowMo);
replacefunc(maps\mp\killstreaks\_nuke::nukeEffects, ::disableNukeEffects);
}
disableNukeVision()
{
}
disableNukeSlowMo()
{
}
disableNukeEffects()
{
level endon( "nuke_cancelled" );
setdvar( "ui_bomb_timer", 0 );
foreach ( var_1 in level.players )
{
var_2 = anglestoforward( var_1.angles );
var_2 = ( var_2[0], var_2[1], 0 );
var_2 = vectornormalize( var_2 );
var_3 = 5000;
var_4 = spawn( "script_model", var_1.origin + var_2 * var_3 );
var_4 setmodel( "tag_origin" );
var_4.angles = ( 0, var_1.angles[1] + 180, 90 );
var_4 thread nukeEffect( var_1 );
}
}