sourcemod/core/logic
Peace-Maker 2c8614c639 Keep optional natives optional after reloading
Bug 6518

Starting from no plugins loaded, after the final step of the following,
basetriggers will be marked as errored because mapchooser is missing:

Load basetriggers
Load mapchooser
Unload mapchooser
Load mapchooser
Unload mapchooser

We lose the SP_NTVFLAG_OPTIONAL when removing a WeakNative. The
__pl_mapchooser_SetNTVOptional() is only called in basetriggers when it
is loaded. It adds the OPTIONAL flag to the mapchooser natives the
basetrigger plugin uses.
When mapchooser is loaded, the native is overwritten and the OPTIONAL
flag consumed (WeakNative registered), but not preserved. Later when
mapchooser is unloaded the WeakNative is removed in
CNativeOwner::UnbindWeakRef, but the OPTIONAL flag isn't added again.
The next time mapchooser is loaded, the natives aren't optional anymore
and will cause a real dependency.

The change in ShareSys isn't needed to fix the error, but is included to
keep the SP_NTVFLAG_OPTIONAL flag consistent.
2016-07-21 01:52:47 +02:00
..
thread Update to the latest SourcePawn and AMTL. 2016-03-13 16:29:11 -07:00
AdminCache.cpp Move sm_dump_admcache to AdminCache. 2015-09-20 14:33:02 -07:00
AdminCache.h Fix crash on Windows when dumping admin cache to file. 2014-10-08 17:31:02 -07:00
ADTFactory.cpp Move ADTFactory from core to logic (bug 5953, r=fyren). 2013-10-09 08:43:08 -04:00
ADTFactory.h Move ADTFactory from core to logic (bug 5953, r=fyren). 2013-10-09 08:43:08 -04:00
AMBuilder Add support for retrieving game server Steam Id (bug 6404). (#495) 2016-04-26 23:17:08 -04:00
CDataPack.cpp Move CDataPack from core to logic. 2015-09-06 11:02:52 -07:00
CDataPack.h Move CDataPack from core to logic. 2015-09-06 11:02:52 -07:00
CellArray.h Import of core modularization plan (bug 3599). 2009-05-13 21:55:50 -04:00
common_logic.cpp Move the "sm" command to core/logic. 2015-09-20 14:33:17 -07:00
common_logic.h Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
Database.cpp Update to the latest SourcePawn and AMTL. 2016-03-13 16:29:11 -07:00
Database.h Update to the latest SourcePawn and AMTL. 2016-03-13 16:29:11 -07:00
DebugReporter.cpp Update SP and use BlamePluginError in sdkhooks. 2015-11-18 01:24:31 +00:00
DebugReporter.h Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
ExtensionSys.cpp Fix printing dependent extension name 2016-02-27 21:22:09 +01:00
ExtensionSys.h Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
ForwardSys.cpp Switch to re-entrant lists in ForwardSys and CForward. 2015-09-21 01:07:34 -07:00
ForwardSys.h Switch to re-entrant lists in ForwardSys and CForward. 2015-09-21 01:07:34 -07:00
frame_tasks.cpp Don't use server commands to flush plugin unloads. 2015-09-15 19:43:41 -07:00
frame_tasks.h Don't use server commands to flush plugin unloads. 2015-09-15 19:43:41 -07:00
GameConfigs.cpp Add info message when loading custom gamedata 2016-01-03 22:28:24 +01:00
GameConfigs.h Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
handle_helpers.h Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
HandleSys.cpp Move sm_dump_handles to core/logic. 2015-09-20 14:33:10 -07:00
HandleSys.h Move sm_dump_handles to core/logic. 2015-09-20 14:33:10 -07:00
LibrarySys.cpp Update to the latest AMTL - Rename Ref to RefPtr. 2015-11-08 13:14:57 -08:00
LibrarySys.h Update to the latest AMTL - Rename Ref to RefPtr. 2015-11-08 13:14:57 -08:00
Logger.cpp Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
Logger.h Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
MemoryUtils.cpp Fixed potential for reading out of library bounds in MemoryUtils;:FindPattern (r=asherkin). 2013-01-23 14:05:35 -05:00
MemoryUtils.h Fixed crash in MemoryUtils::ResolveSymbol() on OS X Lion (10.7) (bug 4951, r=dvander). 2011-06-15 16:02:05 -05:00
MersenneTwister.h Added better random number generator (bug 3831, r=fyren). 2009-10-26 23:59:59 -07:00
Native.h Update to the latest AMTL - Rename Ref to RefPtr. 2015-11-08 13:14:57 -08:00
NativeOwner.cpp Keep optional natives optional after reloading 2016-07-21 01:52:47 +02:00
NativeOwner.h Update to the latest AMTL - Rename Ref to RefPtr. 2015-11-08 13:14:57 -08:00
PhraseCollection.cpp Move gnprintf/atcprintf from core to logic. 2015-08-30 19:32:46 -07:00
PhraseCollection.h Move translator from logic to core (bug 4406 part 6, r=ds). 2010-05-14 19:43:53 -07:00
PluginSys.cpp Slightly better handling of plugin reloading. 2016-06-06 22:26:34 +00:00
PluginSys.h Slightly better handling of plugin reloading. 2016-06-06 22:26:34 +00:00
ProfileTools.cpp Replace the AddRootConsoleCommand API to not expose internal structures. 2015-08-30 21:01:03 -07:00
ProfileTools.h Replace the AddRootConsoleCommand API to not expose internal structures. 2015-08-30 21:01:03 -07:00
RootConsoleMenu.cpp Move the "sm" command to core/logic. 2015-09-20 14:33:17 -07:00
RootConsoleMenu.h Move RootConsoleMenu into core/logic. 2015-08-30 21:01:46 -07:00
ShareSys.cpp Keep optional natives optional after reloading 2016-07-21 01:52:47 +02:00
ShareSys.h Update to the latest AMTL: remove PassRef. 2015-11-08 13:51:22 -08:00
sm_crc32.cpp Mercurial queues... oh, how terrible. 2010-01-18 03:20:44 -08:00
sm_crc32.h Mercurial queues... oh, how terrible. 2010-01-18 03:20:44 -08:00
sm_simple_prioqueue.h Move DBManager and DB natives from core to logic (bug 5953, r=fyren). 2013-10-09 08:43:08 -04:00
sm_symtable.h Move memutils from core to logic (bug 4406, r=ds). 2010-05-14 16:14:59 -07:00
sm_trie.cpp Move adminsys and more natives from core to logic. 2014-05-29 13:31:12 -04:00
sm_trie.h Move adminsys and more natives from core to logic. 2014-05-29 13:31:12 -04:00
smn_admin.cpp Purge Purge. 2015-03-05 10:56:36 -08:00
smn_adt_array.cpp Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
smn_adt_stack.cpp Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
smn_adt_trie.cpp Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
smn_banning.cpp Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
smn_console.cpp Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
smn_core.cpp Rename CPlugin::SetErrorState to EvictWithError. 2015-10-31 17:25:59 -07:00
smn_database.cpp Update to the latest AMTL - Rename Ref to RefPtr. 2015-11-08 13:14:57 -08:00
smn_datapacks.cpp Move CDataPack from core to logic. 2015-09-06 11:02:52 -07:00
smn_fakenatives.cpp Separate the top of UnloadPlugin into a precursor function. 2015-09-14 12:50:39 -07:00
smn_filesystem.cpp Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
smn_float.cpp Remove half-up rounding. 2016-06-22 12:54:36 -07:00
smn_functions.cpp Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
smn_gameconfigs.cpp Moved gameconf code from core to logic (bug 4406 part 11, r=ds). 2010-05-14 23:35:42 -07:00
smn_halflife.cpp Add support for retrieving game server Steam Id (bug 6404). (#495) 2016-04-26 23:17:08 -04:00
smn_handles.cpp Allow CloseHandle() on nulls. 2014-07-05 13:52:44 -07:00
smn_lang.cpp Remove Format/FormatArgs from the core/logic bridge. 2015-08-30 18:03:31 -07:00
smn_maplists.cpp Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
smn_menus.cpp Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
smn_players.cpp Add support for retrieving game server Steam Id (bug 6404). (#495) 2016-04-26 23:17:08 -04:00
smn_profiler.cpp Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
smn_sorting.cpp Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
smn_string.cpp Move gnprintf/atcprintf from core to logic. 2015-08-30 19:32:46 -07:00
smn_textparse.cpp Port SMC parsing API to transitional syntax. 2014-11-09 12:33:07 -08:00
smn_timers.cpp Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
sprintf.cpp Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
sprintf.h Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
stringutil.cpp Fix UTIL_ReplaceAll not properly tracking length. 2016-06-06 06:29:53 +00:00
stringutil.h Move TrimWhitespace from core to logic. 2015-08-30 18:42:25 -07:00
TextParsers.cpp Remove Format/FormatArgs from the core/logic bridge. 2015-08-30 18:03:31 -07:00
TextParsers.h Import of core modularization plan (bug 3599). 2009-05-13 21:55:50 -04:00
ThreadSupport.cpp Import of core modularization plan (bug 3599). 2009-05-13 21:55:50 -04:00
ThreadSupport.h Rename ke_* headers to am-* 2013-08-22 17:10:59 -07:00
Translator.cpp Move sm_reload_translations to Translator. 2015-09-20 14:33:06 -07:00
Translator.h Clean up CPlugin member variables. 2015-09-14 12:55:42 -07:00
version.rc Overhauled versioning information (bug 5453, r=dvander). 2012-08-26 01:33:54 +01:00