Raised This Month: $51 Target: $400
 12% 

HEs destroy grenades 1.1.1


Post New Thread Reply   
 
Thread Tools Display Modes
BeasT
Senior Member
Join Date: Apr 2007
Location: Lithuania
Old 12-05-2013 , 14:01   Re: HEs destroy grenades 1.1
Reply With Quote #31

But that way, SGs that otherwise should not be destroyed, but are still in the air while the dmgtime ends, will also get destroyed.
BeasT is offline
Send a message via Skype™ to BeasT
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-05-2013 , 15:34   Re: HEs destroy grenades 1.1
Reply With Quote #32

I'm not sure to follow. Maybe I've misunderstood something.

A HE grenade explodes :

- You search all grenades around a radius
- You set a new dmgtime for these ones.

Let's say you set 2 smoke grenades which have not yet exploded, one on the ground, another in the air.
Let's say also you check dmgtime in SG_TumbleThink as post.

- SG_TumbleThink is called. dmgtime is checked. Not the time yet. Your hook is called, not the time. Nothing happens.
- SG_TumbleThink is called. dmgtime is checked. Time is up. FL_ONGROUND is checked.
---- The first grenade explosion is triggered from there.
---- The second grenade in the air is ignored.
- Your callback is called. dmgtime is checked. Time is up
---- The second grenade explosion is triggered from there.

What SGs grenades you're talking about exactly, the one which should not be destroyed ?
__________________
Arkshine is offline
BeasT
Senior Member
Join Date: Apr 2007
Location: Lithuania
Old 12-05-2013 , 16:24   Re: HEs destroy grenades 1.1
Reply With Quote #33

The ones that are NOT in the HE explosion radius.
For example, I throw a SG high in the air, it's dmgtime ends, but it is still in the air. Then my callback is called and OrpheuCall(handle_SG_Detonate, sg) is called, but it shouldn't explode yet, because normaly in CS, SGs don't explode untill they land on the ground and stop.

PHP Code:
public OrpheuHookReturn:CGrenade_SG_TumbleThink(sg)
{
    if(!
pev_valid(sg))
        return 
OrpheuIgnored
    
    
static Float:dmgTime
    
    pev
(sgpev_dmgtimedmgTime)
    
    if(
get_gametime() >= dmgTime)
    {    
        if(~
pev(sgpev_flags) & FL_ONGROUND)
            
OrpheuCall(handle_SG_Detonatesg)
    }
        
    return 
OrpheuIgnored


Last edited by BeasT; 12-05-2013 at 17:59.
BeasT is offline
Send a message via Skype™ to BeasT
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-05-2013 , 16:51   Re: HEs destroy grenades 1.1
Reply With Quote #34

Ah, oops. My bad. Just hit now. Sorry about that.
__________________
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-24-2014 , 05:21   Re: HEs destroy grenades 1.1
Reply With Quote #35

  • CGrenade_Detonate3 is not called often, using static is not really needed.
  • Linux symbols need to be updated for latest HLDS. Just add a new entry in each orpheu config file:
    • Detonate3
      Code:
      _ZN8CGrenade9Detonate3Ev
    • SG_Detonate
      Code:
      _ZN8CGrenade11SG_DetonateEv
    • SG_TumbleThink
      Code:
      _ZN8CGrenade14SG_TumbleThinkEv

Apart that, this looks ok.
__________________
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-25-2015 , 05:23   Re: HEs destroy grenades 1.1
Reply With Quote #36

Mind to update BeasT, since you are online?
__________________
Arkshine is offline
BeasT
Senior Member
Join Date: Apr 2007
Location: Lithuania
Old 01-25-2015 , 11:40   Re: HEs destroy grenades 1.1.1
Reply With Quote #37

Thanks again. Updated.
BeasT is offline
Send a message via Skype™ to BeasT
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-25-2015 , 11:53   Re: HEs destroy grenades 1.1.1
Reply With Quote #38

Thanks. Approved.
__________________
Arkshine is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 01-25-2015 , 12:00   Re: HEs destroy grenades 1.1.1
Reply With Quote #39

Congrats.

This plugin is very cool. ;)

Last edited by zmd94; 01-25-2015 at 12:01.
zmd94 is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 01-26-2015 , 17:05   Re: HEs destroy grenades 1.1.1
Reply With Quote #40

Congrats for the approval. So I have some other suggestions (again). What about other exploding stuff ?
other suggestions about the hdg_survival_chance - cvar: it should be relative. closer nades should have less survival chances.

ps. if you don't want to make your plugin complicated or to change the main idea, just a question: Are all those ideas possible, can you (or someone else) make such a realistic plugin ?
__________________
ANTICHRISTUS is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode