mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 22:05:44 +00:00
Claymore fix
This commit is contained in:
parent
797e7095b2
commit
bc37334d90
@ -554,6 +554,11 @@ onGrenadeFire()
|
||||
grenade.name = weaponName;
|
||||
if(weaponName == "smoke_grenade_mp")
|
||||
grenade thread AddToSmokeList();
|
||||
|
||||
if ( weaponName == "claymore" || weaponName == "claymore_mp" )
|
||||
{
|
||||
grenade thread claymoreDetonationBotFix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,12 +150,11 @@ onPlayerSpawned()
|
||||
self thread fireHack();
|
||||
self thread stanceHack();
|
||||
self thread moveHack();
|
||||
self thread emptyClipShoot();
|
||||
|
||||
self thread UseRunThink();
|
||||
self thread watchUsingRemote();
|
||||
|
||||
// grenades (pick up too), knife (players and ents), stinger, footsounds, claymore hack
|
||||
// grenades (pick up too), knife (players and ents), stinger, footsounds
|
||||
|
||||
self thread spawned();
|
||||
}
|
||||
@ -801,6 +800,8 @@ spawned()
|
||||
|
||||
wait self.pers["bots"]["skill"]["spawn_time"];
|
||||
|
||||
self thread emptyClipShoot();
|
||||
|
||||
self thread target();
|
||||
self thread aim();
|
||||
self thread check_reload();
|
||||
|
@ -1714,3 +1714,47 @@ botPlayerModelForWeapon( weapon, secondary )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
claymoreDetonationBotFix()
|
||||
{
|
||||
self endon( "death" );
|
||||
|
||||
self waittill( "missile_stuck" );
|
||||
|
||||
damagearea = spawn( "trigger_radius", self.origin + ( 0, 0, 0 - level.claymoreDetonateRadius ), 0, level.claymoreDetonateRadius, level.claymoreDetonateRadius * 2 );
|
||||
self thread maps\mp\gametypes\_weapons::deleteOnDeath( damagearea );
|
||||
|
||||
while ( 1 )
|
||||
{
|
||||
damagearea waittill( "trigger", player );
|
||||
|
||||
if (!player is_bot())
|
||||
continue;
|
||||
|
||||
if ( getdvarint( "scr_claymoredebug" ) != 1 )
|
||||
{
|
||||
if ( isdefined( self.owner ) && player == self.owner )
|
||||
continue;
|
||||
if ( !maps\mp\gametypes\_weapons::friendlyFireCheck( self.owner, player, 0 ) )
|
||||
continue;
|
||||
}
|
||||
if ( lengthsquared( player getBotVelocity() ) < 10 )
|
||||
continue;
|
||||
|
||||
if ( !player maps\mp\gametypes\_weapons::shouldAffectClaymore( self ) )
|
||||
continue;
|
||||
|
||||
if ( player damageConeTrace( self.origin, self ) > 0 )
|
||||
break;
|
||||
}
|
||||
|
||||
self playsound ("claymore_activated");
|
||||
|
||||
|
||||
if ( player _hasPerk( "specialty_delaymine" ) )
|
||||
wait 3.0;
|
||||
else
|
||||
wait level.claymoreDetectionGracePeriod;
|
||||
|
||||
self detonate();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user