Quote:
Originally Posted by ElijahDD
Do you know any plugin where I can see granade throw logic?
|
Look at this thread:
https://forums.alliedmods.net/showthread.php?t=270408, especially
https://forums.alliedmods.net/showpo...7&postcount=55
You don't have to use okapi if you don't want to. Instead of calling CGrenade_ShootTimed2/CGrenade_ShootTimed/CGrenade_ShootSmokeGrenade you can create a fake grenade entity, set it's origin(vecSrc) and velocity(vecThrow) and then recode the explosion effects/damage, but this is not very smart/efficient.
Another way would be to simply recode CGrenade_ShootTimed2 in pawn(I assume you want to throw hegrenades), it's not hard, I did that before.
https://github.com/s1lentq/ReGameDLL...enade.cpp#L876
The only tricky part is this:
PHP Code:
pGrenade->SetTouch(&CGrenade::BounceTouch);
pGrenade->SetThink(&CGrenade::TumbleThink);
But this can be done either with orpheu or doing what connor does here:
https://forums.alliedmods.net/showthread.php?p=1920279 to retrieve BounceTouch and TumbleThink address. Then you simply set it to m_pfnThink and m_pfnTouch offsets(set_pdata_int).
__________________