Raised This Month: $ Target: $400
 0% 

[TF2] Show crit effect Market Gardener (v1.2.1)


Post New Thread Reply   
 
Thread Tools Display Modes
V1VID
New Member
Join Date: Jul 2010
Old 06-17-2012 , 15:17   Re: [TF2] Show crit effect Market Gardener (v1.2)
Reply With Quote #11

Oh, it's probably some weird floating-point thing, then, or might be on Updater's end. Thanks for checking them out, and for the quick response.
V1VID is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 06-23-2012 , 13:28   Re: [TF2] Show crit effect Market Gardener (v1.2.1)
Reply With Quote #12

Code:
L 06/23/2012 - 21:20:20: [SM] Native "GetEntProp" reported: Entity -1 (-1) is invalid
L 06/23/2012 - 21:20:20: [SM] Displaying call stack trace for plugin "tf_market_crit.smx":
L 06/23/2012 - 21:20:20: [SM]   [0]  Line 156, tf_market_crit.sp::GetItemIndex()
L 06/23/2012 - 21:20:20: [SM]   [1]  Line 129, tf_market_crit.sp::OnWeaponSwitch()
Leonardo is offline
Minoost
SourceMod Donor
Join Date: Aug 2011
Old 06-24-2012 , 01:34   Re: [TF2] Show crit effect Market Gardener (v1.2.1)
Reply With Quote #13

Quote:
Originally Posted by Leonardo View Post
Code:
L 06/23/2012 - 21:20:20: [SM] Native "GetEntProp" reported: Entity -1 (-1) is invalid
L 06/23/2012 - 21:20:20: [SM] Displaying call stack trace for plugin "tf_market_crit.smx":
L 06/23/2012 - 21:20:20: [SM]   [0]  Line 156, tf_market_crit.sp::GetItemIndex()
L 06/23/2012 - 21:20:20: [SM]   [1]  Line 129, tf_market_crit.sp::OnWeaponSwitch()
This can be easily done by check valid entity
PHP Code:
public Action:OnWeaponSwitch(clientweapon)
{
    if (!
IsClientInGame(client) || !IsPlayerAlive(client))
        return 
Plugin_Continue;
    
    if (!
IsValidEdict(weapon))
        return 
Plugin_Continue;
    
    new 
iNextEquip GetItemIndex(weapon); 
i'll fix it when next update (If you using Updater, Already updated to 1.2.1.1)

Last edited by Minoost; 06-24-2012 at 01:36.
Minoost is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 06-24-2012 , 07:37   Re: [TF2] Show crit effect Market Gardener (v1.2.1)
Reply With Quote #14

There's a slight issue with this. The crits that the Market Gardener deals are only dealt while the client remains in midair. If you swing while in midair, but only hit after you've landed (due to the slight delay between swinging and hitting), you do not crit.
However, with this plugin installed, because you're critboosted while you swing, it appears you do crit even after you've landed (regardless of whether the critboost is still there or not). This is a deviation from normal Market Gardener behavior.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge is offline
humbugtheman
Member
Join Date: Jan 2012
Old 07-18-2012 , 07:04   Re: [TF2] Show crit effect Market Gardener (v1.2)
Reply With Quote #15

Quote:
Originally Posted by FlaminSarge View Post
I believe the weapon switch hook does not fire when a player is forced to switch weapons due to running out of ammo, etc. Just a heads up.
I just tested this out, and it appears that it does fire when a player is forced to switch weapons due to running out of ammo.
humbugtheman is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 07-18-2012 , 16:07   Re: [TF2] Show crit effect Market Gardener (v1.2.1)
Reply With Quote #16

Interesting. Might have changed, as when I had the VisibleWeapons plugin a long while ago, it didn't seem to fire when you automatically switched weapons.

Minoost: In order to prevent the bug I mentioned a few posts up where the MG crits where it shouldn't, why not use cond 46, the focus effect? It causes the weapon to have electricity around it, etc. In fact, you could even safely use TFCond_Buffed (though you'd have to account for actual Buff Banners then), as the minicrit damage only applies while the cond is active (whereas currently you'll crit as long as you swing before the crit disappears regardless of whether you cause damage after the crit disappears).
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 07-18-2012 at 16:09.
FlaminSarge is offline
Minoost
SourceMod Donor
Join Date: Aug 2011
Old 07-21-2012 , 09:09   Re: [TF2] Show crit effect Market Gardener (v1.2.1)
Reply With Quote #17

Quote:
Originally Posted by FlaminSarge View Post
Interesting. Might have changed, as when I had the VisibleWeapons plugin a long while ago, it didn't seem to fire when you automatically switched weapons.

Minoost: In order to prevent the bug I mentioned a few posts up where the MG crits where it shouldn't, why not use cond 46, the focus effect? It causes the weapon to have electricity around it, etc. In fact, you could even safely use TFCond_Buffed (though you'd have to account for actual Buff Banners then), as the minicrit damage only applies while the cond is active (whereas currently you'll crit as long as you swing before the crit disappears regardless of whether you cause damage after the crit disappears).
hmm, why i didn't know that. i'm stupid.
anyway, i'll fix it next update.
Minoost is offline
Lanc
Member
Join Date: Oct 2011
Old 09-01-2012 , 06:44   Re: [TF2] Show crit effect Market Gardener (v1.2.1)
Reply With Quote #18

I have a little problem with this plugin. It constantly showing errors in sourcemod logs. I have the latest version of this plugin. Here is log
Code:
 09/01/2012 - 05:24:38: [SM] Displaying call stack trace for plugin "tf_market_crit.smx":
L 09/01/2012 - 05:24:38: [SM]   [0]  Line 156, C:\Users\ąĚłë\Desktop\ąĚłë\ŔÚ·á ą× ŔŰľ÷\ŔŰľ÷\ĆŔ Ć÷Ć®¸®˝ş 2 Ľ*ąö ŔŰľ÷ ą× ŔÚ·á\ÇĂ·Ż±×ŔÎ\addons\sourcemod\scripting\tf_market_crit.sp::GetItemIndex()
L 09/01/2012 - 05:24:38: [SM]   [1]  Line 129, C:\Users\ąĚłë\Desktop\ąĚłë\ŔÚ·á ą× ŔŰľ÷\ŔŰľ÷\ĆŔ Ć÷Ć®¸®˝ş 2 Ľ*ąö ŔŰľ÷ ą× ŔÚ·á\ÇĂ·Ż±×ŔÎ\addons\sourcemod\scripting\tf_market_crit.sp::OnWeaponSwitch()
L 09/01/2012 - 05:24:38: [SM] Native "GetEntProp" reported: Entity -1 (-1) is invalid
L 09/01/2012 - 05:24:38: [SM] Displaying call stack trace for plugin "tf_market_crit.smx":
L 09/01/2012 - 05:24:38: [SM]   [0]  Line 156, C:\Users\ąĚłë\Desktop\ąĚłë\ŔÚ·á ą× ŔŰľ÷\ŔŰľ÷\ĆŔ Ć÷Ć®¸®˝ş 2 Ľ*ąö ŔŰľ÷ ą× ŔÚ·á\ÇĂ·Ż±×ŔÎ\addons\sourcemod\scripting\tf_market_crit.sp::GetItemIndex()
L 09/01/2012 - 05:24:38: [SM]   [1]  Line 129, C:\Users\ąĚłë\Desktop\ąĚłë\ŔÚ·á ą× ŔŰľ÷\ŔŰľ÷\ĆŔ Ć÷Ć®¸®˝ş 2 Ľ*ąö ŔŰľ÷ ą× ŔÚ·á\ÇĂ·Ż±×ŔÎ\addons\sourcemod\scripting\tf_market_crit.sp::OnWeaponSwitch()
L 09/01/2012 - 05:36:49: [SM] Native "GetEntProp" reported: Entity -1 (-1) is invalid
L 09/01/2012 - 05:36:49: [SM] Displaying call stack trace for plugin "tf_market_crit.smx":
L 09/01/2012 - 05:36:49: [SM]   [0]  Line 156, C:\Users\ąĚłë\Desktop\ąĚłë\ŔÚ·á ą× ŔŰľ÷\ŔŰľ÷\ĆŔ Ć÷Ć®¸®˝ş 2 Ľ*ąö ŔŰľ÷ ą× ŔÚ·á\ÇĂ·Ż±×ŔÎ\addons\sourcemod\scripting\tf_market_crit.sp::GetItemIndex()
L 09/01/2012 - 05:36:49: [SM]   [1]  Line 129, C:\Users\ąĚłë\Desktop\ąĚłë\ŔÚ·á ą× ŔŰľ÷\ŔŰľ÷\ĆŔ Ć÷Ć®¸®˝ş 2 Ľ*ąö ŔŰľ÷ ą× ŔÚ·á\ÇĂ·Ż±×ŔÎ\addons\sourcemod\scripting\tf_market_crit.sp::OnWeaponSwitch()
L 09/01/2012 - 05:36:49: [SM] Native "GetEntProp" reported: Entity -1 (-1) is invalid
L 09/01/2012 - 05:36:49: [SM] Displaying call stack trace for plugin "tf_market_crit.smx":
L 09/01/2012 - 05:36:49: [SM]   [0]  Line 156, C:\Users\ąĚłë\Desktop\ąĚłë\ŔÚ·á ą× ŔŰľ÷\ŔŰľ÷\ĆŔ Ć÷Ć®¸®˝ş 2 Ľ*ąö ŔŰľ÷ ą× ŔÚ·á\ÇĂ·Ż±×ŔÎ\addons\sourcemod\scripting\tf_market_crit.sp::GetItemIndex()
L 09/01/2012 - 05:36:49: [SM]   [1]  Line 129, C:\Users\ąĚłë\Desktop\ąĚłë\ŔÚ·á ą× ŔŰľ÷\ŔŰľ÷\ĆŔ Ć÷Ć®¸®˝ş 2 Ľ*ąö ŔŰľ÷ ą× ŔÚ·á\ÇĂ·Ż±×ŔÎ\addons\sourcemod\scripting\tf_market_crit.sp::OnWeaponSwitch()

Last edited by Lanc; 09-01-2012 at 06:47.
Lanc is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 09-17-2012 , 06:05   Re: [TF2] Show crit effect Market Gardener (v1.2.1)
Reply With Quote #19

I did a few fixups (mainly the invalid entity thing) and made it use cond 46 instead of actual crits. This should add the crit sparks but not cause it to crit when the client's already landed. The weapon won't glow, however. Nothing to do about that.
Attached Files
File Type: sp Get Plugin or Get Source (tf_market_crit.sp - 261 views - 4.1 KB)
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge 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 22:55.


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