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

Forward for plugin end?


Post New Thread Reply   
 
Thread Tools Display Modes
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 01-25-2017 , 07:20   Re: Forward for plugin end?
Reply With Quote #31

Quote:
Originally Posted by Neuro Toxin View Post
Can someone confirm if this is an easy thing to accomplish. I've been looking at source but dont have a clue.
This function would need to change to include an optional boolean parameter to error on INVALID plugin handle or not:

https://github.com/alliedmodders/sou..._core.cpp#L266
https://github.com/alliedmodders/sou..._core.cpp#L282
__________________
WildCard65 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-25-2017 , 08:22   Re: Forward for plugin end?
Reply With Quote #32

Quote:
Originally Posted by Neuro Toxin View Post
Been thinking could I request:

bool GetPluginStatusEx(Handle plugin, PluginStatus &status);

Returns true if status found, return false on invalid handle.
Unfortunately that is not viable without all the other stuff I enumerated before - plugin handles would need to be made cloneable first. It is not safe to unwrap a released handle, the error checking does its best to error when you do, but it's entirely possible for the handle to have been assigned to a different plugin. It is no different than trying to use a free'd pointer in C.
__________________
asherkin is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 01-25-2017 , 20:21   Re: Forward for plugin end?
Reply With Quote #33

Completely understood.

It appears my best two options are:

1. Having forward OnPluginUnload(Handle plugin) created
2. The private forward patch in the Dynamic thread

Would there be a massive issue adding a public forward for OnPluginUnload to Sourcemod?

Yes yes, I'm a broken record atm
__________________
Neuro Toxin 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 19:09.


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