Dissolver v1.3

Release your plugins here!
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Dissolver v1.3

Postby satoon101 » Sun Feb 28, 2016 2:18 pm

Dissolver causes player ragdolls to dissolve when a player dies. This is an updated version of your-name-here's Dissolver that works for the newest SP version and can be used on more games than just CS:GO and CS:S.

There are config translations involved, and only English and German (thank you, BackRaw) are currently supported. If you have translations, please issue a Pull Request on the repository:
https://github.com/satoon101/Dissolver

This plugin has been tested to work on CS:S, CS:GO, TF2, DOD:S, HL2:DM, and BM:S. The effects on CS:GO aren't very spiffy, but they "work". There's not much we can do about that, unfortunately.

The current configuration allows for setting the dissolve type and the magnitude of the dissolving. There is also a configuration variable for the number of seconds to wait before starting the dissolve. The current default configuration looks like:

Code: Select all

// Options
//   * 0 = NORMAL
//   * 1 = ELECTRICAL
//   * 2 = ELECTRICAL_LIGHT
//   * 3 = CORE
//   * 4 = RANDOM
//   * 5 = REMOVE
// Default Value: 0
// The type of dissolver to use.
   dissolver_type 0


// Default Value: 2
// The magnitude to use when dissolving.
   dissolver_magnitude 2


// Default Value: 0
// The amount of time (in seconds) to wait before dissolving.
   dissolver_delay 0


Setting the dissolve type to REMOVE will simply remove the ragdoll instead of dissolving it. Setting the dissolve type to RANDOM will cause a random dissolve type to be chosen each time.

This plugin requires SP version 265 or newer.
Attachments
dissolver - v1.3.zip
(3.41 KiB) Downloaded 542 times
Image
Jerome69
Member
Posts: 82
Joined: Wed Sep 23, 2015 3:20 pm

Postby Jerome69 » Wed Mar 02, 2016 10:35 am

Hello,

For me the pluggin successfully loads, but I have this error after a dead :

The attachment Dissolver.jpg is no longer available


I'm using this version of SP : Construction #267 (1 mars 2016 14:41:20)
Attachments
Dissolver.jpg
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Postby Ayuto » Wed Mar 02, 2016 10:51 am

You can fix this error by removing the '1' in the string in line 117.
Jerome69
Member
Posts: 82
Joined: Wed Sep 23, 2015 3:20 pm

Postby Jerome69 » Wed Mar 02, 2016 11:43 am

And the same at the line 133 :)

Thanks
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Wed Mar 02, 2016 12:11 pm

Sorry about that, I will fix that shortly.

*Edit: updated to fix those errors. Version 1.1b now available in the first post.
Image
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: Dissolver v1.2

Postby satoon101 » Sat Apr 08, 2017 7:17 pm

Updated plugin for newest SP changes.
Image
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: Dissolver v1.2

Postby decompile » Mon Jun 19, 2017 1:21 am

Hey, looks like something doesnt work right here.

File "..\addons\source-python\plugins\dissolver\dissolver.py", line 115, in _dissolve_ragdoll
entity = Entity(index_from_inthandle(inthandle))

OverflowError: can't convert negative value to unsigned int

CS:S Windows
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Re: Dissolver v1.2

Postby iPlayer » Mon Jun 19, 2017 4:44 pm

What if you replace line 113

Syntax: Select all

if inthandle == INVALID_ENTITY_INTHANDLE:


with this:

Syntax: Select all

if inthandle < 0:

?
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: Dissolver v1.2

Postby satoon101 » Mon Jun 19, 2017 5:52 pm

Well, if I remember correctly, inthandles on Linux can be negative, so that wouldn't fix the issue. It seems more like it could be an issue with index_from_inthandle than specifically with this script, but I could be wrong.
Image
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Dissolver v1.2

Postby Ayuto » Mon Jun 19, 2017 6:39 pm

It depends on how the value of the inthandle is retrieved (int or unsigned int).

What's the output of print(inthandle) in the erroneous situation?
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Re: Dissolver v1.2

Postby iPlayer » Mon Jun 19, 2017 6:44 pm

If I remember correctly, back in the day Invincible explained something incorrect with SP and why INVALID_ENTITY_INTHANDLE doesn't work for checking for inthandle validity, and why -1 works (I might indeed be wrong about negative indexes - those besides -1 - in general).

viewtopic.php?p=7523#p7523

But I'm afraid that post was one of those 3 posts which vanished during vBulletin -> phpBB migration... You told you had the screenshots. You might look up there, I remember there was something important.
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: Dissolver v1.2

Postby satoon101 » Mon Jun 19, 2017 6:56 pm

@decompile - please replace line 115 with the following and post the output here (note that the 'try' should have 4 leading spaces...we really need to fix that issue on the forums):

Syntax: Select all

try:
entity = Entity(index_from_inthandle(inthandle))
except OverflowError:
print('Invalid inthandle:', inthandle)
Image
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: Dissolver v1.2

Postby decompile » Tue Jun 20, 2017 12:52 pm

Output: Invalid inthandle: -1
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: Dissolver v1.2

Postby L'In20Cible » Tue Jun 20, 2017 2:54 pm

iPlayer wrote:If I remember correctly, back in the day Invincible explained something incorrect with SP and why INVALID_ENTITY_INTHANDLE doesn't work for checking for inthandle validity, and why -1 works (I might indeed be wrong about negative indexes - those besides -1 - in general).

viewtopic.php?p=7523#p7523

But I'm afraid that post was one of those 3 posts which vanished during vBulletin -> phpBB migration... You told you had the screenshots. You might look up there, I remember there was something important.

The issue is because the Entity class is reading "raw" values while INVALID_ENTITY_INTHANDLE comparison would works if it was internally using the proxy of the SendProp. See also: viewtopic.php?f=14&t=585&p=4285#p4285
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: Dissolver v1.2

Postby satoon101 » Sun Jun 25, 2017 1:38 pm

decompile wrote:Hey, looks like something doesnt work right here.

File "..\addons\source-python\plugins\dissolver\dissolver.py", line 115, in _dissolve_ragdoll
entity = Entity(index_from_inthandle(inthandle))

OverflowError: can't convert negative value to unsigned int

CS:S Windows

I cannot seem to replicate this issue. It always seems to work fine for my testing on CS:S Windows. What exact scenario happens when this error occurs?
Image
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Re: Dissolver v1.2

Postby iPlayer » Sun Jun 25, 2017 1:52 pm

Maybe they get respawned before dissolving? Then the ragdoll is removed by the game on respawn.
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: Dissolver v1.2

Postby satoon101 » Sun Jun 25, 2017 2:33 pm

Yep, I can replicate it now. So, it would seem to be a setup issue, not an issue with the plugin itself. Try setting the dissolver_delay to a lower value if you have deathmatch enabled. If this is for a plugin where there is no set time before the player is respawned (waves or left-click to respawn), I would suggest implementing the functionality in your plugin directly and calling it prior to respawning any players.
Image
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: Dissolver v1.2

Postby L'In20Cible » Sun Jun 25, 2017 4:31 pm

Could also be fixed easily by retrieving the ragdoll into your player_death event and use Entity.delay on it passing it to the dissolve method instead of passing the player so the delay gets cancelled if the ragdoll entity itself gets removed. This would also fix an exception into Player.from_userid in case the player disconnect prior the delay expires (common rage quit :tongue:).
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: Dissolver v1.2

Postby decompile » Wed Jun 28, 2017 9:04 pm

L'In20Cible wrote:Could also be fixed easily by retrieving the ragdoll into your player_death event and use Entity.delay on it passing it to the dissolve method instead of passing the player so the delay gets cancelled if the ragdoll entity itself gets removed. This would also fix an exception into Player.from_userid in case the player disconnect prior the delay expires (common rage quit :tongue:).


Pretty much this :D

But ye, I tried to add a fast team join plugin, and suddenly respawned right after I switched the team, but had no clue this was the issue, lol.
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: Dissolver v1.3

Postby satoon101 » Sat Jul 01, 2017 1:43 pm

Release 1.3 is now available in the first post. Please try that and let me know if you have any further issues.
Image

Return to “Plugin Releases”

Who is online

Users browsing this forum: No registered users and 19 guests