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

Impulse Grenade


Post New Thread Reply   
 
Thread Tools Display Modes
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-14-2018 , 04:21   Re: Impulse Grenade
Reply With Quote #11

1.
Quote:
Originally Posted by NiHiLaNTh View Post
Its 2018, why you still change viewmodels with CurWeapon event?
Fix this.

2.Don't use FM_Touch when you want to catch specific touches between entities, register_touch from engine or Ham_Touch should be better in this case because filtering is doing in the module.

3.
PHP Code:
#define SMOKE_ID            26 
Don't hardcode that, use precache_event with createsmoke.sc.

4.Use real offset names OFFSET_GRENADE - > m_usEvent

5.Don't duplicate code, create a private function for this:
PHP Code:
    new iColor[3], iCvar get_pcvar_num(g_pCvarExplosionColor)
    
iColor[0] = (iCvar 1000000)
    
iCvar %= 1000000
    iColor
[1] = (iCvar 1000)
    
iColor[2] = (iCvar 1000
6.I don't think you have to check both isGrenade and isAvaliableGrenade, isAvaliableGrenade should be enough.
__________________

Last edited by HamletEagle; 07-14-2018 at 04:21.
HamletEagle is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-14-2018 , 10:13   Re: Impulse Grenade
Reply With Quote #12

I'm still without understand what's the problem with CurWeapon. The rest are done.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 07-14-2018 , 11:43   Re: Impulse Grenade
Reply With Quote #13

Because CurWeapon is called everytime a weapon is fired or weapon changed (or clip ammo changed to be precise).
iceeedr is offline
Send a message via Skype™ to iceeedr
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-14-2018 , 11:49   Re: Impulse Grenade
Reply With Quote #14

Quote:
Originally Posted by EFFx View Post
I'm still without understand what's the problem with CurWeapon. The rest are done.
If you look at how game works you will see it changes models during Deploy, so this is the right moment to set them. By using CurWeapon you update the models way more times than it's actually needed and in moments where you should not be updating them.
That's like saying using preThink to detect IN_ATTACK is fine instead of using PrimaryAttack.
__________________

Last edited by HamletEagle; 07-14-2018 at 11:49.
HamletEagle is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-14-2018 , 12:56   Re: Impulse Grenade
Reply With Quote #15

Quote:
Originally Posted by HamletEagle View Post
If you look at how game works you will see it changes models during Deploy, so this is the right moment to set them. By using CurWeapon you update the models way more times than it's actually needed and in moments where you should not be updating them.
That's like saying using preThink to detect IN_ATTACK is fine instead of using PrimaryAttack.
I get it now. I actually was using just because it's the easier format to use.

Updated to v1.3:

- Code optimized.
. Added impulsegrenade_impactmode cvar to turn on/off impact mode.

Off:
Incrível a cara de pau, "PerfectPug", sma toda bugada, Premier até usou a minha
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 07-14-2018 at 13:12.
EFFx is offline
Old 07-14-2018, 18:32
CrazY.
This message has been deleted by HamletEagle. Reason: Offtopic
Old 07-14-2018, 20:17
EFFx
This message has been deleted by HamletEagle. Reason: Offtopic
Old 07-14-2018, 22:06
CrazY.
This message has been deleted by HamletEagle. Reason: Offtopic
Old 07-15-2018, 03:43
HamletEagle
This message has been deleted by HamletEagle. Reason: Offtopic
Old 07-15-2018, 04:40
Mordekay
This message has been deleted by HamletEagle. Reason: Offtopic
Old 07-15-2018, 05:55
Supergirl
This message has been deleted by HamletEagle. Reason: Offtopic
Old 07-15-2018, 06:58
Mordekay
This message has been deleted by HamletEagle. Reason: Offtopic
Old 07-15-2018, 10:20
CrazY.
This message has been deleted by HamletEagle. Reason: Offtopic
Old 07-15-2018, 10:51
Mordekay
This message has been deleted by HamletEagle. Reason: Offtopic
Old 07-15-2018, 10:58
CrazY.
This message has been deleted by HamletEagle. Reason: Offtopic
wilianmaique
BANNED
Join Date: Nov 2016
Old 07-16-2018 , 16:43   Re: Impulse Grenade
Reply With Quote #16

brazil is toxic
wilianmaique is offline
Send a message via Skype™ to wilianmaique
RaZ_HU
Senior Member
Join Date: May 2015
Location: Hungary
Old 07-26-2018 , 16:54   Re: Impulse Grenade
Reply With Quote #17

Nice plugin, +1
RaZ_HU is offline
joy0406
Junior Member
Join Date: Nov 2013
Location: INDIA
Old 07-27-2018 , 02:55   Re: Impulse Grenade
Reply With Quote #18

Server Crashes for some reason as soon as the grenade is thrown.
__________________
GOD while sending me to earth

#include <awesomeness>
#include <cool>
joy0406 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-27-2018 , 03:23   Re: Impulse Grenade
Reply With Quote #19

I was getting sometimes as well, try this one:
Attached Files
File Type: sma Get Plugin or Get Source (impulseGrenade.sma - 576 views - 9.5 KB)
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
RaZ_HU
Senior Member
Join Date: May 2015
Location: Hungary
Old 07-31-2018 , 13:41   Re: Impulse Grenade
Reply With Quote #20

Quote:
Originally Posted by joy0406 View Post
Server Crashes for some reason as soon as the grenade is thrown.
Same for me. I mean on windows server (homemade for testing) it is fine, but on dedicated linux it crashes.


Quote:
Originally Posted by EFFx View Post
I was getting sometimes as well, try this one:
Going to test this now.

Update:
Thanks for the fix, it is working now

Last edited by RaZ_HU; 07-31-2018 at 15:55.
RaZ_HU is offline
Reply


Thread Tools
Display Modes

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 15:47.


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