grenades -1 reply

Please wait...

TopGunSF

I don't spend enough time here

50 XP

15th May 2005

0 Uploads

15 Posts

0 Threads

#1 13 years ago

does anyone know how to make grenades to so you can shoot them and have them explode? So far I have gotten them to explode if I shoot rockets at them, another grenade detonates near it, an explove barrel goes of near it, or any kind of explosion withing range of the grenade. For some reason only explosions (or fuse running out) will blow them up, bullets wont.




Guest

I didn't make it!

0 XP

 
#2 13 years ago

I think the problem is, somewhere in the code ( havn't found it yet... been looking for the last hour ) if a projecticle collides with another projectile of the same owner, it ignores the collision. This is either a bug or a feature that iD forgot to add for splash damage. If you'll notice, the bfg projectile is supposed to be shootable, but you can't shoot your own. setting "no_contents" to "0" in the bfg projectile will make it explode from splash damage just like the grenade. Gonna keep searching for where this check is EDIT: ah ha. Clip.cpp, line 872 } else if ( cm->owner == passOwner ) { clipModelList[i] = NULL; // don't clip against other missiles from same owner } change that to: } else if ( cm->owner == passOwner ) { if ( cm->entity->GetType() != passEntity->GetType() ) clipModelList[i] = NULL; // don't clip against player } im pretty sure that works w/o any bugs, probably missed something tho that code still won't allow the player to shoot his own bfg ball, but you could change it to check if GetType()->classname == "idBFGProjecticle" or something




Guest

I didn't make it!

0 XP

 
#3 13 years ago

ah ha.

Clip.cpp, line 872

} else if ( cm->owner == passOwner ) { clipModelList[i] = NULL; // don't clip against other missiles from same owner }

change that to:

} else if ( cm->owner == passOwner ) { if ( cm->entity->GetType() != passEntity->GetType() ) clipModelList[i] = NULL; // don't clip against player }

im pretty sure that works w/o any bugs, probably missed something tho

that code still won't allow the player to shoot his own bfg ball, but you could change it to check if GetType()->classname == "idBFGProjecticle" or something