mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-11 07:37:56 -05:00
Grief: remove enemy players triggering Claymores
This commit is contained in:
@ -415,6 +415,7 @@
|
|||||||
* Meleeing enemy players that are prone pushes 16.67% of the amount when standing
|
* Meleeing enemy players that are prone pushes 16.67% of the amount when standing
|
||||||
* Meleeing enemy players that are already stunned will push them
|
* Meleeing enemy players that are already stunned will push them
|
||||||
* Ballistic knife projectile pushes enemy players
|
* Ballistic knife projectile pushes enemy players
|
||||||
|
* Claymores are no longer triggered by enemy players
|
||||||
* Stun fx is linked to the player
|
* Stun fx is linked to the player
|
||||||
* Stun fx shows in the correct position for projectiles
|
* Stun fx shows in the correct position for projectiles
|
||||||
* Stunning enemy players steals 100 points from them
|
* Stunning enemy players steals 100 points from them
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include scripts/zm/replaced/_zm_equipment;
|
#include scripts/zm/replaced/_zm_equipment;
|
||||||
#include scripts/zm/replaced/_zm_spawner;
|
#include scripts/zm/replaced/_zm_spawner;
|
||||||
#include scripts/zm/replaced/_zm_ai_basic;
|
#include scripts/zm/replaced/_zm_ai_basic;
|
||||||
|
#include scripts/zm/replaced/_zm_weap_claymore;
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
@ -59,6 +60,7 @@ main()
|
|||||||
replaceFunc(maps/mp/zombies/_zm_equipment::placed_equipment_think, scripts/zm/replaced/_zm_equipment::placed_equipment_think);
|
replaceFunc(maps/mp/zombies/_zm_equipment::placed_equipment_think, scripts/zm/replaced/_zm_equipment::placed_equipment_think);
|
||||||
replaceFunc(maps/mp/zombies/_zm_spawner::head_should_gib, scripts/zm/replaced/_zm_spawner::head_should_gib);
|
replaceFunc(maps/mp/zombies/_zm_spawner::head_should_gib, scripts/zm/replaced/_zm_spawner::head_should_gib);
|
||||||
replaceFunc(maps/mp/zombies/_zm_ai_basic::inert_wakeup, scripts/zm/replaced/_zm_ai_basic::inert_wakeup);
|
replaceFunc(maps/mp/zombies/_zm_ai_basic::inert_wakeup, scripts/zm/replaced/_zm_ai_basic::inert_wakeup);
|
||||||
|
replaceFunc(maps/mp/zombies/_zm_weap_claymore::claymore_detonation, scripts/zm/replaced/_zm_weap_claymore::claymore_detonation);
|
||||||
}
|
}
|
||||||
|
|
||||||
init()
|
init()
|
||||||
|
60
scripts/zm/replaced/_zm_weap_claymore.gsc
Normal file
60
scripts/zm/replaced/_zm_weap_claymore.gsc
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#include maps\mp\_utility;
|
||||||
|
#include common_scripts\utility;
|
||||||
|
#include maps\mp\zombies\_zm_utility;
|
||||||
|
#include maps/mp/zombies/_zm_weap_claymore;
|
||||||
|
|
||||||
|
claymore_detonation()
|
||||||
|
{
|
||||||
|
self endon( "death" );
|
||||||
|
self waittill_not_moving();
|
||||||
|
detonateradius = 96;
|
||||||
|
damagearea = spawn( "trigger_radius", self.origin + ( 0, 0, 0 - detonateradius ), 4, detonateradius, detonateradius * 2 );
|
||||||
|
damagearea setexcludeteamfortrigger( self.team );
|
||||||
|
damagearea enablelinkto();
|
||||||
|
damagearea linkto( self );
|
||||||
|
if ( is_true( self.isonbus ) )
|
||||||
|
{
|
||||||
|
damagearea setmovingplatformenabled( 1 );
|
||||||
|
}
|
||||||
|
self.damagearea = damagearea;
|
||||||
|
self thread delete_claymores_on_death( self.owner, damagearea );
|
||||||
|
self.owner.claymores[ self.owner.claymores.size ] = self;
|
||||||
|
while ( 1 )
|
||||||
|
{
|
||||||
|
damagearea waittill( "trigger", ent );
|
||||||
|
if ( isDefined( self.owner ) && ent == self.owner )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ( isDefined( ent.pers ) && isDefined( ent.pers[ "team" ] ) && ent.pers[ "team" ] == self.team )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ( isDefined( ent.pers ) && isDefined( ent.pers[ "team" ] ) && ent.pers[ "team" ] == getOtherTeam( self.team ) )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ( isDefined( ent.ignore_claymore ) && ent.ignore_claymore )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ( !ent shouldaffectweaponobject( self ) )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ( ent damageconetrace( self.origin, self ) > 0 )
|
||||||
|
{
|
||||||
|
self playsound( "wpn_claymore_alert" );
|
||||||
|
wait 0.4;
|
||||||
|
if ( isDefined( self.owner ) )
|
||||||
|
{
|
||||||
|
self detonate( self.owner );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self detonate( undefined );
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user