AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Impulse Grenade (https://forums.alliedmods.net/showthread.php?t=307526)

HamletEagle 07-14-2018 04:21

Re: Impulse Grenade
 
1.
Quote:

Originally Posted by NiHiLaNTh (Post 2596791)
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.

EFFx 07-14-2018 10:13

Re: Impulse Grenade
 
I'm still without understand what's the problem with CurWeapon. The rest are done.

iceeedr 07-14-2018 11:43

Re: Impulse Grenade
 
Because CurWeapon is called everytime a weapon is fired or weapon changed (or clip ammo changed to be precise).

HamletEagle 07-14-2018 11:49

Re: Impulse Grenade
 
Quote:

Originally Posted by EFFx (Post 2603538)
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.

EFFx 07-14-2018 12:56

Re: Impulse Grenade
 
Quote:

Originally Posted by HamletEagle (Post 2603574)
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 :3

wilianmaique 07-16-2018 16:43

Re: Impulse Grenade
 
brazil is toxic :(

RaZ_HU 07-26-2018 16:54

Re: Impulse Grenade
 
Nice plugin, +1

joy0406 07-27-2018 02:55

Re: Impulse Grenade
 
Server Crashes for some reason as soon as the grenade is thrown.

EFFx 07-27-2018 03:23

Re: Impulse Grenade
 
1 Attachment(s)
I was getting sometimes as well, try this one:

RaZ_HU 07-31-2018 13:41

Re: Impulse Grenade
 
Quote:

Originally Posted by joy0406 (Post 2606370)
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 (Post 2606372)
I was getting sometimes as well, try this one:

Going to test this now.

Update:
Thanks for the fix, it is working now :)


All times are GMT -4. The time now is 06:02.

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