Fun thing to play around with.
Code:
for(;;)
{
self waittill ( "grenade_fire", grenade, weaponName );
grenade_origin = grenade.origin;
grenade_angles = grenade.angles;
while(isDefined(grenade))
{
grenade_origin = grenade.origin;
grenade_angles = grenade.angles;
wait 0.05;
}
a = AnglesToForward( grenade_angles );
location1 = array( (a[0]*30, a[1], a[2]),
(a[0]*21, a[1]*21, a[2]),
(a[0]*13, a[1]*13, a[2]*13),
(a[0], a[1]*21, a[2]*21),
(a[0], a[1], a[2]*30),
(a[0]*21, a[1], a[2]*21),
(a[0], a[1]*30, a[2]),
(a[0]*-30, a[1], a[2]),
(a[0]*-21, a[1]*-21, a[2]),
(a[0]*-13, a[1]*-13, a[2]*-13),
(a[0], a[1]*-21, a[2]*-21),
(a[0], a[1], a[2]*-30),
(a[0]*-21, a[1], a[2]*-21),
(a[0], a[1]*-30, a[2]),
(a[0]*21, a[1]*-21, a[2]),
(a[0]*-21, a[1]*21, a[2]),
(a[0], a[1]*21, a[2]*-21),
(a[0], a[1]*-21, a[2]*21),
(a[0]*-21, a[1], a[2]*21),
(a[0]*21, a[1], a[2]*-21),
(a[0]*-13, a[1]*13, a[2]*-13),
(a[0]*-13, a[1]*13, a[2]*13),
(a[0]*-13, a[1]*-13, a[2]*13),
(a[0]*13, a[1]*-13, a[2]*13),
(a[0]*13, a[1]*-13, a[2]*-13),
(a[0]*13, a[1]*13, a[2]*-13) );
for(i=0;i<26;i++)
{
location2 = (location1[i][0]*1000, location1[i][1]*1000, location1[i][2]*1000);
if(!BulletTracePassed( grenade.origin, grenade_origin+(location2), false ))
{
MagicBullet( "gl_m16_mp", grenade_origin, grenade_origin+location2, self );
}
}
}
Will make grenades spew more grenades upon exploding.