Compare commits
47
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd0aaf9da9 | ||
|
|
325e95e9be | ||
|
|
c2e31deb78 | ||
|
|
c944ef18b3 | ||
|
|
14af0bae82 | ||
|
|
efba7bd82a | ||
|
|
6da2f6c8ed | ||
|
|
9e6f7a9e89 | ||
|
|
d0ab3e7bd6 | ||
|
|
a6d5212ee9 | ||
|
|
79bb037b66 | ||
|
|
ea3f491a8e | ||
|
|
aa27b10232 | ||
|
|
1ebf70b450 | ||
|
|
3a499036ac | ||
|
|
6b92f18a86 | ||
|
|
60757dde1c | ||
|
|
d5fc57316e | ||
|
|
1b47398e38 | ||
|
|
70f42dee65 | ||
|
|
08db476476 | ||
|
|
b1353e2ca4 | ||
|
|
6be9c770fe | ||
|
|
83a77bca08 | ||
|
|
1ff913c38f | ||
|
|
5383a0596a | ||
|
|
a81776f92c | ||
|
|
bcef7365b0 | ||
|
|
9e882783f9 | ||
|
|
00a663c1a3 | ||
|
|
5c047ad04b | ||
|
|
5e64de198a | ||
|
|
b92e4ff688 | ||
|
|
224d54aadd | ||
|
|
bcc6581c1c | ||
|
|
68c752bf6d | ||
|
|
a0bfda89d8 | ||
|
|
55cadc7738 | ||
|
|
4d9e94373f | ||
|
|
516c140810 | ||
|
|
6cfced238c | ||
|
|
27c73d4e3e | ||
|
|
4818aee7b9 | ||
|
|
65f52a3cad | ||
|
|
49a568bd59 | ||
|
|
1575ddb3f3 | ||
|
|
f9cdc421c3 |
+678
@@ -1,5 +1,683 @@
|
|||||||
SourceMod Changelog
|
SourceMod Changelog
|
||||||
|
|
||||||
|
SourceMod 1.7.0 [2015-02-04]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.7.0_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
- Updated game compatibility for TF2, CS:GO, and Dota 2.
|
||||||
|
- Fixed regression in SM 1.6.3 causing load failure on games older than Orangebox. (PR 237)
|
||||||
|
- Rewrote internal Steam auth ID handling (PR 147, PR 153, PR 155, PR 162, PR 204, PR 210, PR 222, PR 246).
|
||||||
|
--- admins.cfg now supports Steam2, Steam3, and SteamID 64 formats for the Steam auth provider.
|
||||||
|
--- admins-simple.ini now supports Steam3 auth IDs in addition to Steam2 IDs.
|
||||||
|
--- Command targeting now supports both Steam3 auth IDs in addition to Steam2 IDs.
|
||||||
|
- Added default timeout for MySQL connections to avoid hangs. (PR 248).
|
||||||
|
- SDKTools' gamerules gamedata is now far less likely to break on updates (PR 220).
|
||||||
|
- Fixed crash with sm_dump_admcache on Windows (PR 163).
|
||||||
|
- Fixed SDKHooks causing crash on player join/leave or plugin load/unload if gamedata missing (PR 236).
|
||||||
|
- Changed default sm_trigger_show ConVar value to 0 / disabled.
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
- Added new SourcePawn Transitional Syntax!
|
||||||
|
--- New methodmap-based APIs have been added for many existing functions and handle types.
|
||||||
|
--- New work-in-progress API doc page.
|
||||||
|
- Added Blocked hook type to SDKHooks (PR 119) (VoiDeD).
|
||||||
|
- Added OnTakeDamage_Alive hook type to SDKHooks (PR 149).
|
||||||
|
- Many more File natives now support Valve FS (PR 120, PR 169, PR 178).
|
||||||
|
- Added SetFilePermissions native (PR 43) (hlstriker).
|
||||||
|
- Added API for iterating StringMaps (formerly "tries").
|
||||||
|
- Added natives for accessing command line parameters (PR 164) (VoiDeD).
|
||||||
|
- Exposed engine Message_DetermineMulticastRecipients as GetClientsInRange native. (PR 234).
|
||||||
|
- CloseHandle (or delete) on INVALID_HANDLE is now a no-op, instead of an error (PR 74).
|
||||||
|
- GetClientAuthString is now deprecated. Use GetClientAuthId instead.
|
||||||
|
- Added OnCoreMapEnd to extension interface (PR 127).
|
||||||
|
- Fixed IThreader threads leaking if they're not joined. (bug 3460, PR 241).
|
||||||
|
- TFHoliday updates no longer require a plugin recompile (PR 217).
|
||||||
|
- Fixed FindFlagChar returning false when passing AdminFlag_Custom6 (bug 6248, PR 203).
|
||||||
|
- Added support for (entity) CLASSPTR and EDICT Prop_Data fields with GetEntPropEnt and SetEntPropEnt (PR 83).
|
||||||
|
- Doubled maximum handle count per plugin to 32,768 (PR 215), (Thordin).
|
||||||
|
- Added support for custom default values with GetEvent* natives, rather than using ""/0 for unset fields (PR 157) (VoiDeD).
|
||||||
|
- Removed old profiler, and added new, pluggable profiler (with hooks to VProf) (PR 54).
|
||||||
|
- Added command to dump profiler output (PR 128) (VoiDeD).
|
||||||
|
- Fixed ICommandLine and related features being reported as unavailable on Dark Messiah.
|
||||||
|
- Fixed OnPlayerRunCommand forward in SDKTools being unavailable on Dark Messiah.
|
||||||
|
- SourceMod now uses some C++11 and has newer compiler requirements.
|
||||||
|
- Added --disable-auto-versioning option to ambuild configure script.
|
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
SourceMod 1.6.3 [2014-11-25]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.6.3_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
- Updated game support for TF2, CS:GO, No More Room in Hell, Insurgency, PVK2 and Fistful of Frags.
|
||||||
|
- Made changes to make TF2, CSS, DoDS, HL2DM, and SDK 2013 mods less likely to break on game update (PR 174, PR 192).
|
||||||
|
- Added support for longer key names in languages.cfg (to fix Portuguese) (bug 6282, PR 208).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
- Updated TF2 player condition and holiday enums (Ross "Powerlord" Bemrose) (PR 183, PR 181).
|
||||||
|
- Add support for TF2 player conditions >= 96 for condition functions/forwards (PR 205).
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
SourceMod 1.6.2 [2014-09-20]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.6.2_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
- Updated game support for TF2, CS:GO, No More Room in Hell and Fistful of Frags.
|
||||||
|
- Added compatibility shim to force Steam player auth strings to be in "Steam2" rendered format (PR 136).
|
||||||
|
- Fixed possible performance regression in DBI handling.
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
- Added new GetClientAuthId native to retrieve player auth strings in desired format (PR 159).
|
||||||
|
- Updated TF2 weapon and player condition enums (FlaminSarge).
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
SourceMod 1.6.1 [2014-08-17]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.6.1_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
- Updated game support for CS:GO and Fistful of Frags.
|
||||||
|
- Added support for Romanian language.
|
||||||
|
- Re-added languages.cfg, missing from 1.6.0, causing all clients to use server language.
|
||||||
|
- Fixed a regression in version 1.6.0 that caused certain SDKHooks usage patterns to cause a server crash (PR 107).
|
||||||
|
- Improved error reporting in basebans plugin when banreasons.txt is missing (PR 115).
|
||||||
|
- Fixed incorrect logged gravity value for sm_gravity command (Ryan "VoiDeD" Stecker) (PR 116).
|
||||||
|
- Fixed a regression in version 1.6.0 causing SDKHook_ReloadPost hooks to not fire in plugins (Peace-Maker) (PR 96).
|
||||||
|
- Added workaround for game bug in TF2_RemoveWeaponSlot to avoid wearable entities left on map (Ryan "VoiDeD" Stecker) (bug 6206, PR 121).
|
||||||
|
- Removed DisableJIT option from core.cfg. (It was never meant for normal use.)
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
- Added new TF2_RemoveWearable native (Ryan "VoiDeD" Stecker, WildCard65) (PR 114).
|
||||||
|
- Added new functions for interacting with and playing scripted game sounds (Ross "Powerlord" Bemrose) (bug 5942, PR 65).
|
||||||
|
- Added new StringToKeyValues natives (Ryan "VoiDeD" Stecker) (PR 74).
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
SourceMod 1.6.0 [2014-07-03]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.6.0_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
- Added support for Dota 2 (bug 5656, bug 6068).
|
||||||
|
- Added support for Source SDK 2013 mods (bug 5917).
|
||||||
|
- Added support for Insurgency (bug 5951).
|
||||||
|
- Added support for Contagion (bug 6007).
|
||||||
|
- Added support for Blade Symphony (bug 5949).
|
||||||
|
- Updated support for some mods that moved to SDK 2013 - No More Room In Hell, Fistful of Frags, Empires, Synergy.
|
||||||
|
- Updated gamedata and other support for TF2, DoD:S, HL2:DM, CS:S, CS:GO, Left 4 Dead, and Nuclear Dawn.
|
||||||
|
- Added support for customizing ban reasons in basebans.sp (bug 5762) (Matthias "House" Kollek).
|
||||||
|
- Added support for searching all gameinfo search paths when seeking mapcycle file (bug 5839).
|
||||||
|
- Added sm_reload_translations command (bug 5750).
|
||||||
|
- Added support for single-file gamedata custom overrides (bug 5386) (Ondrej "RavuAlHemio" Hošek).
|
||||||
|
- Re-enabled SteamAuthstringValidation config option by default (bug 5791, PR 20).
|
||||||
|
- Fixed plugins not reaching ext dep lists, making dependent plugin not unload on ext unload (bug 5851) (Peace-Maker).
|
||||||
|
- Added printing of SendProp flags to netprop dumps (bug 6082).
|
||||||
|
- Removed support for obsolete plugin_settings.cfg (bug 5605).
|
||||||
|
- Fixed topmenu sorting not getting refreshed after reloading sorting config (bug 6032) (Peace-Maker).
|
||||||
|
- Fixed error log filename date sometimes being incorrect (bug 5761) (Matheus "M28" Valadares).
|
||||||
|
- Dump handle information when a plugin is forcefully unloaded. (bug 5666).
|
||||||
|
- Fixed sm_cancelvote not resetting rtv state. (bug 5808) (Peace-Maker).
|
||||||
|
- Fixed Mapchooser dying on single map rotation servers (bug 5179).
|
||||||
|
- Fixed various problems with unloading ClientPrefs and SourceMod (bug 5874).
|
||||||
|
- Fixed "sm version" command reporting incorrect compile time in many cases (bug 6078) (SystematicMania).
|
||||||
|
- Clear default database driver reference if backing extension is unloaded (bug 5934) (Peace-Maker).
|
||||||
|
- Moved funcommands material and sound definitions to gamedata for easier cross-game support (bug 6085).
|
||||||
|
- Implement a watchdog timer for scripts that take too long to execute (bug 5837).
|
||||||
|
- Use Linux game data for offsets and signatures/symbols on OS X if Mac-specific data is not available (bug 6056).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
- Added an API for off-thread SQL transactions. (bug 3775, PR 26).
|
||||||
|
- Added string literal concatenation using ellipses "..." (bug 4261, PR 5) (Peace-Maker).
|
||||||
|
- Added support for nested datatables. (bug 5446).
|
||||||
|
- Added PbRemoveRepeatedFieldValue native (bug 6066).
|
||||||
|
- Added support for getting/setting protobuf enum values with PbGetInt, PbSetInt, and PbAddInt natives.
|
||||||
|
- Removed deprecated PbReadRepeated natives that existed briefly in 1.5.0-dev prerelease versions.
|
||||||
|
- Added RequestFrame native for one-off next-frame actions (bug 5965).
|
||||||
|
- Added CS_DMG_HEADSHOT define for CS:S and CS:GO (PR 7) (Bara20).
|
||||||
|
- Added CS_SLOT_KNIFE define for CS:S and CS:GO (bug 6131).
|
||||||
|
- Updated TF_WEAPON enum (PR 37) (FlaminSarge).
|
||||||
|
- Added TFHoliday_AprilFools to TFHoliday enum (bug 6092) (Ross "Powerlord" Bemrose).
|
||||||
|
- Added new TF2_IsHolidayActive native to TF2 Ext (bug 6095) (Ross "Powerlord" Bemrose).
|
||||||
|
- Switch TF2 extension to hook CTFGameRules::IsHolidayActive for holiday forward (bug 6137, PR 42).
|
||||||
|
- Added GetPlayerJingleFile native. (bug 5690) (FlaminSarge).
|
||||||
|
- Added PrepSDKCall_SetAddress and Address support to PrepSDKCall_SetFromConf (bug 5261).
|
||||||
|
- Added ability to disable TopMenu Title Caching (bug 6034) (Peace-Maker).
|
||||||
|
- Added DisplayTopMenuCategory native (bug 6033) (Peace-Maker).
|
||||||
|
- Added support for Valve search paths to GetFileSize native (bug 5931).
|
||||||
|
- Fixed invalid entities sometimes passed to OnEntityCreated and OnEntityDestroyed (bug 6119).
|
||||||
|
- Fixed inconsistencies with OnClientDisconnected foward calls (bug 5988, PR 16).
|
||||||
|
- Changed OnClientSayCommand to now pass non-silent chat triggers onward (bug 5926) (SystematicMania).
|
||||||
|
- Changed OnClientSayCommand forwards to strip quotes from chat (bug 5986) (SystematicMania).
|
||||||
|
- Fixed FindStringIndex native not returning INVALID_STRING_INDEX when string not found (bug 6144, PR 40).
|
||||||
|
- Fixed GroundEntChanged hooks not being called (bug 6050) (Peace-Maker).
|
||||||
|
- Fixed INetChannelInfo natives to no longer require clients to be ingame (bug 5775) (SystematicMania).
|
||||||
|
- Fixed replace param being respected inconsistently in SetTrieArray (bug 6113).
|
||||||
|
- Fixed crash creating a timer when there are no handles available. (bug 5317) (Peace-Maker).
|
||||||
|
- Fixed crash in ReconnectClient and InactivateClient natives when IServer ptr is null (bug 6122).
|
||||||
|
- Fixed StoreFromAddress and LoadFromAddress continuing with bad values, usually crashing after error (bug 6080).
|
||||||
|
- Fixed compiler bug with multidimensional array variable release (bug 6100).
|
||||||
|
- Changed float comparison operators to return false for NaN (bug 6107).
|
||||||
|
- Added support in spcomp for sp/inc files > 32767 lines (bug 5959).
|
||||||
|
- Fixed FindFlagChar returning '?' for Admin_Custom6.
|
||||||
|
- Fixed AllPluginsLoaded activities happening before SM is loaded.
|
||||||
|
- Deduplicated a number of files used by extensions by moving them to the public directory (bug 5341).
|
||||||
|
- Removed 'state' keyword from compiler (bug 4572) (Ryan "VoiDeD" Stecker).
|
||||||
|
- Removed LogMessageEx definition from logging.inc because it never existed (bug 5897) (Peace-Maker).
|
||||||
|
- Removed native override API (bug 5852).
|
||||||
|
- Call OnLibraryAdded for all available libraries (bug 5925, PR 4).
|
||||||
|
- Made IGameConfig::GetMemSig return value clearer (bug 6081).
|
||||||
|
- Switched StringToInt(Ex) from using strtol to strtoul internally (bug 5939).
|
||||||
|
- Added an spcomp option to print #included files (bug 5997).
|
||||||
|
- Recompiled Regex extension libpcre against v8.32, enabling utf8, unicode props, and jit (bug 5593).
|
||||||
|
- Optimized native calls if statically bound (bug 5842).
|
||||||
|
|
||||||
|
Internal Changes:
|
||||||
|
- Now using new AlliedModders Template Library (AMTL) in many places, https://github.com/alliedmodders/amtl
|
||||||
|
- Ported buildscripts to new AMBuild2 platform, https://github.com/alliedmodders/ambuild
|
||||||
|
- Moved much logic from core to logic binary to reduce file sizes and compile times (bug 5606, bug 5607, bug 5680, bug 5953, PR 12, PR 13).
|
||||||
|
- Refactored the JIT to use a newer, simpler macro assembler. (bug 5827).
|
||||||
|
- Added sourcepawn interpreter (bug 5902).
|
||||||
|
- Added support for compiling spcomp with emscripten.
|
||||||
|
- Rewrite IThreader implementation around new synchronization primitives (bug 5862).
|
||||||
|
- Rewrite DBManager to use the new synchronization primitives (bug 5870).
|
||||||
|
- Overhauled internals of ClientPrefs extension for improved stability (bug 5538).
|
||||||
|
- Changed ShareSys to store C++ native lists more optimally (bug 5852).
|
||||||
|
- Simplified NativeEntry state (bug 5852).
|
||||||
|
- Changed NativeEntry to use Refcounted to manage (bug 5852).
|
||||||
|
- Switched Translator and GameConfigs to hash tables (bug 5878).
|
||||||
|
- Switched numerous subsystems from KTrie to AMTL NameHashSet (bug 5884).
|
||||||
|
- Refactored Trie natives to use AMTL HashMap instead of KTrie (bug 5892).
|
||||||
|
- Removed usages of memtables from many subsystems (bug 5899).
|
||||||
|
- Changed EventHook name storage to use AMTL AString (bug 6188).
|
||||||
|
- Replaced SH List usages in game extensions with AMTL variants (PR 23).
|
||||||
|
- Replaced SourceHook list usages in clientprefs with AMTL (PR 25).
|
||||||
|
- Changed floating-point operations to use SSE when available (bug 5841).
|
||||||
|
- Moved tracker related opcodes entirely to C++.
|
||||||
|
- Statically align the stack at function boundaries (bug 5842).
|
||||||
|
- Removed InfoVars, reassigned DAT from EBP to ESI to preserve C++ stacktraces in JIT code (5844).
|
||||||
|
- Fixed dereferencing potential null pointer in CPlugin::GetProperty (bug 5725).
|
||||||
|
- Fixed memory corruption when parsing natives. (bug 5840).
|
||||||
|
- Fixed some memory errors (bug 5904).
|
||||||
|
- Fixed unaligned memory access in spcomp.
|
||||||
|
- Move versioning to a static library to improve trivial build speed (bug 5997).
|
||||||
|
- Added many missing handle security checks (bug 5595).
|
||||||
|
- Made GetEntityClassname get and cache m_iClassname offset from worldspawn for ents not having it in datadesc (bug 5654).
|
||||||
|
- Cache m_iEFlags offset for datamaps dump instead of getting for each ent (bug 5657).
|
||||||
|
- Fixed mismatched delete [] on thunks in JIT CompData dtor (bug 5639).
|
||||||
|
- Fixed various memory issues. (bug 5766).
|
||||||
|
- Added reference counting and use it for CGameConfig and IDatabase (bug 5876).
|
||||||
|
- Added atomic reference counting and port DBI (bug 5876).
|
||||||
|
- Replaced usages of deprecated Sourcehook Add/Remove macros (bug 5631).
|
||||||
|
- Fixed SDKHooks hook ent validation missing first datatable name (bug 5881).
|
||||||
|
- Fixed case where bots leave server without disconnect notice (hibernation) (PR 20).
|
||||||
|
- Changed FindConVar to utilize convar cache for improved performance (PR 27) (VoiDeD).
|
||||||
|
- Gave define value (of 1) to PLATFORM defs to match the same-name defs in some SDKs (PR 10).
|
||||||
|
- Wrapped ClientPrintf into IGamePlayer (bug 6021).
|
||||||
|
- Consolidated FileExists usage in logic bin (bug 5931).
|
||||||
|
- Removed hardcoded paths to tier0/vstdlib in ICommandLine lookup.
|
||||||
|
- Use updated IServerTools iface on TF2 for getting tempent list and FindEntityByClassname (PR 33).
|
||||||
|
- Added early exit in entity output detour if entity has no classname to prevent crash.
|
||||||
|
- Updated SDKTools entity output functions to use core's GetEntityClassname instead of own (PR 39).
|
||||||
|
- Consolidated SDKTools entity factory lookups.
|
||||||
|
- Changed SDKTools PlayerRunCmd to a global vtable hook to improve performance (bug 6051).
|
||||||
|
- Changed SDKHooks to use global vtable hooks to improve performance (bug 6070).
|
||||||
|
- Added client validation checks to EmitSound SoundsHooks (bug 5873).
|
||||||
|
- Added missing meta results to some pre-hooks in SDKHooks.
|
||||||
|
- Replaced magic numbers for sm_show_activity with named constants (PR 14).
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
SourceMod 1.5.3 [2014-03-22]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.5.3_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
- Updated support for CS:GO after multiple breaking game updates.
|
||||||
|
- Updated gamedata support for GoldenEye: Source (Peace-Maker).
|
||||||
|
- Fixed crash on SDKHooks extension load in Alien Swarm (bug 6059).
|
||||||
|
- Fixed memory leak from unmanaged forwards never being freed (bug 6025).
|
||||||
|
- Fixed possible crash when unloading the CStrike extension.
|
||||||
|
- Fixed crash in SDKHooks Reload post-hook (Peace-Maker).
|
||||||
|
- Fixed FakeClientCommandEx always leaking memory (bug 5678).
|
||||||
|
- Fixed extra entity networking occuring with SetEntProp natives on some games.
|
||||||
|
- Fixed being able to nominate same map multiple times (bug 5109).
|
||||||
|
- Fixed spurious FindEntityByClassname error being logged on some games and platforms.
|
||||||
|
- Fixed an Anti-Flood bypass exploit (bug 5394).
|
||||||
|
- Removed part of Addresses gamedata error handling which could cause false errors to be logged (bug 6044).
|
||||||
|
- Fixed mapchooser not resetting nominations count when clearing nominations list (bug 5359).
|
||||||
|
- Improved performances of client convar query handling (bug 6003).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
- Added GiveAmmo native to SDKTools (bug 6039) (Peace-Maker).
|
||||||
|
- Added SQL_SetCharset native to (re)set charset even after reconnect (bug 5786) (Peace-Maker).
|
||||||
|
- Added support for entity references in SDKHooks natives (bug 6069).
|
||||||
|
- Added support for server passwords to DisplayAskConnectBox stock (bug 5984) (FlaminSarge).
|
||||||
|
- Renamed SortFunc2D parameters to match documentation (bug 6014) (Peace-Maker).
|
||||||
|
- Fixed param order in AddToTopMenu function doc (bug 6035) (Peace-Maker).
|
||||||
|
- Added |any| tag to WritePackCell and ReadPackCell native param/return values (bug 6001).
|
||||||
|
- Updated SDKHook_TakeDamage native for game updates.
|
||||||
|
- Added default infinite value for TF2_AddCondition duration.
|
||||||
|
- Added support for conditions >= 64 in TF2_OnConditionAdded/Removed (bug 5565, bug 5976) (FlaminSarge).
|
||||||
|
- Updated TFCond and TF customkill enum values (bug 6012) (FlaminSarge).
|
||||||
|
- Fixed regression causing incorrect return and inability to block in TF2_OnCalcIsAttackCritical forward.
|
||||||
|
- Fixed TE_* natives operating on incorrect data for some tempents (bug 6072).
|
||||||
|
- Fixed CS_AliasToWeaponID not returning a valid weaponID for cz75a.
|
||||||
|
- Fixed CS_GetWeaponPrice returning incorrect value for M4A1 in CS:GO (bug 6045).
|
||||||
|
- Increased max gamedata byte signature length.
|
||||||
|
- Ported SM build scripts to AMBuild2 (bug 5997).
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
SourceMod 1.5.2 [2013-10-29]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.5.2_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
- Updated gamedata support for TF2, CS:S, CS:GO, and HL2:DM.
|
||||||
|
- Fixed crash from regression in SDKTools SetClientListening hook refcounting (bug 5956) (KyleS).
|
||||||
|
- Fixed potential crash when having maps with format characters in name.
|
||||||
|
- Fixed some nextmap issues with long map names.
|
||||||
|
- SDKTools no longer requires gamedata for sm_dump_datamaps on TF2, CS:S, HL2:DM, and DoD:S (bug 5968).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
- Updated TFCond and TF custom dmg enums.
|
||||||
|
- Updated TF2 critical hit detection logic in TF2_OnCalcIsAttackCritical to handle more cases, including when criticals are disabled (bug 5894).
|
||||||
|
- Fixed GetEngineVersion native returning a bad value when running on MM:S 1.9.x or earlier (bug 5697).
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
SourceMod 1.5.1 [2013-09-10]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.5.1_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
- Updated gamedata support for TF2.
|
||||||
|
- Added missing DispatchKeyValue gamedata for HL2 CTF (bug 5114) (peace-maker).
|
||||||
|
- Fixed translations not being loaded if identifier was not two or three characters (fixes Portuguese) (bug 5888).
|
||||||
|
- Fixed runoff voting occurring when receiving the exact number of required votes (bug 5890).
|
||||||
|
- Fixed reserve slot plugin hiding too many slots on Orangebox gamesif SourceTV and/or Replay are present (bug 5499).
|
||||||
|
- Fixed some crashes in TF2 and unexpected behavior in all games with SDKHook_TakeDamage due to uninitialized var.
|
||||||
|
- Fixed attempted triggers from gagged users displaying in chat (bug 5918).
|
||||||
|
- Fixed errors in Italian translation (Oktober).
|
||||||
|
- Added Norwegian translation (checkster).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
- Added CS_UpdateClientModel native to CStrike extension for CS:S and CS:GO (bug 5905) (Drifter).
|
||||||
|
- Fixed setting weapon param in SDKHook_TakeDamage overwriting attacker instead of setting weapon (bug 5911) (KyleS)
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
SourceMod 1.5.0 [2013-08-25]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.5.0_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
|
||||||
|
- Added support for Counter-Strike: Global Offensive (bug 5299, bug 5579).
|
||||||
|
- Split CS:S, TF2, DoD:S, HL2:DM, and ND to separate binaries (bug 5370, bug 5813).
|
||||||
|
- Added support for runoff voting in mapchooser (bug 4218).
|
||||||
|
- Added option to require Steam validation before granting admin access (bug 4837) (VoiDeD).
|
||||||
|
- Added localization support for many more core and base plugin messages (bug 5120, bug 5146).
|
||||||
|
- Added the ability to override RegConsoleCommand-created commands (bug 5199).
|
||||||
|
- Added support for "fuzzy" (partial) map names in map-related natives and cmds for L4D and later (bug 5599).
|
||||||
|
- Updated Reserved Slots to use max humans as max count (bug 5444).
|
||||||
|
- Added support for custom maxitems on radio menus (bug 5371).
|
||||||
|
- Improved console config editing (bug 5470).
|
||||||
|
- Increased map name buffer sizes in mapchooser to better account for nested maps (bug 5609) (Peace-Maker).
|
||||||
|
- Fixed JIT conflicts with SELinux (bug 5581).
|
||||||
|
- Added logged error when PlayerRunCommand offset lookup fails (bug 5535) (GoD-Tony).
|
||||||
|
- Fixed double print when sending psay to self (bug 5649) (Peace-Maker).
|
||||||
|
- Fixed check against uninitialized string in extension loader (bug 5546) (KyleS).
|
||||||
|
- Fixed possible runtime errors in basetriggers for not-ingame clients (bug 5191) (Peace-Maker).
|
||||||
|
- Check all possible mapcycle paths on newer orangebox games (bug 5719).
|
||||||
|
- Fixed ReadMapList not seeing maps in all valve search paths (bug 5715) (VoiDeD).
|
||||||
|
- Fixed typo in too-many-params native error message (Peace-Maker).
|
||||||
|
- Fixed various issues in clientprefs (bug 5538) (KyleS).
|
||||||
|
- Removed debug printout from PerformGravity (bug 5679) (KyleS).
|
||||||
|
- Fixed broken translating in some plugins and natives (bug 5612) (KyleS).
|
||||||
|
- Fixed issues with COMMAND_FILTER_NO_BOTS and @bots multi-target.
|
||||||
|
- Fixed crash in SDKHooks when throwing bad ent type error on logical ent (KyleS).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
|
||||||
|
- Added support for CS:GO to the CStrike extension (bug 5299) (Drifter).
|
||||||
|
- Added support for new protobuf usermessages used in newer games (bug 5579, bug 5588, bug 5590, bug 5633).
|
||||||
|
- Added latest SDKHooks version as first-party extension.
|
||||||
|
- Updated SQLite to version 3.7.15.1 (bug 5235).
|
||||||
|
- Added natives for changing team score and mvp stars on CSS/CSGO (bug 5295) (Drifter).
|
||||||
|
- Added global pre and post forwards for client chat (bug 5394) (KyleS).
|
||||||
|
- Added TF2_CanPlayerTeleport forward to the TF2 game extension (bug 5283) (VoiDeD).
|
||||||
|
- Added GetEntityAddress native (bug 5269) (ProdigySim).
|
||||||
|
- Added more parameters to PlayerRunCommand forward (bug 5346) (GoD-Tony).
|
||||||
|
- Added forwards to basecomm plugin (bug 5466) (Drifter).
|
||||||
|
- Added symbol lookup support to gamedata on Windows (bug 5511) (GoD-Tony).
|
||||||
|
- Exposed GetLanguageInfo in ITranslator interface (bug 5249) (VoiDeD).
|
||||||
|
- Increase maximum .sp line length to 4095 characters. (bug 5347) (theY4Kman).
|
||||||
|
- Improved netprop dump output (bug 5471).
|
||||||
|
- Added int64 typename to netprop dumps (bug 5655).
|
||||||
|
- Added GetMaxHumanPlayers native exposing IServerGameClients func (bug 5551).
|
||||||
|
- Added WeaponIDToAlias native to CStrike extension (bug 5460) (KyleS).
|
||||||
|
- Fixed OnLibraryAdded/Removed not being called in all plugins (bug 5431).
|
||||||
|
- Made thread worker processing limits configurable at runtime (bug 5326).
|
||||||
|
- Added support in TF2 ext for detection of player conds >= 64 (bug 5565).
|
||||||
|
- Updated button defines in entity_prop_stocks (bug 5564).
|
||||||
|
- Added GetPlayerResourceEntity to SDKTools to replace old, semi-broken TF2-only version (bug 5491).
|
||||||
|
- Exposed third parameter of TF2's AddCond in TF2_AddCondition (bug 5641) (FlaminSarge).
|
||||||
|
- Added GetSteamAccountID function to IPlayerHelpers and native for sp (bug 5548) (KyleS).
|
||||||
|
- Added ISDKHooks interface with entity listeners (bug 5602) (GoD-Tony).
|
||||||
|
- Added file upload support to webternet extension.
|
||||||
|
- Added more alternative names for TFClass_Heavy (bug 5338) (Afronanny).
|
||||||
|
- Throw error instead of crash when calling SetTeamScore between maps (bug 5718) (KyleS).
|
||||||
|
- Fixed clients not being marked as in kick queue in some cases (bug 5746) (SystematicMania).
|
||||||
|
- Made compile.sh set working dir to own dir (bug 5710) (KyleS).
|
||||||
|
- Added CS_IsValidWeaponID native and validity checks to other natives (bug 5566) (Drifter).
|
||||||
|
- Numerous code documentation fixups (bug 5720) (Tsunami).
|
||||||
|
- Fixed cmd listener callback return behavior to match func doc (bug 5882).
|
||||||
|
|
||||||
|
Internal Changes:
|
||||||
|
|
||||||
|
- Fixed handle misuse in clientprefs plugin (bug 5805) (KyleS).
|
||||||
|
- Removed call to getchar() in debug build of compiler (bug 5626) (KyleS).
|
||||||
|
- Fixed instability issues with cloned handles (bug 5245, bug 5240) (KyleS).
|
||||||
|
- Changed extension unload order to avoid exposing finalization window (bug 5556) (KyleS).
|
||||||
|
- Call OnPluginEnd before finalizer hooks have run (bug 4519).
|
||||||
|
- Fixed potential for reading out of library bounds in MemoryUtils::FindPattern.
|
||||||
|
- Fixed typo in TF2 ext asm.c causing accidental assignment instead of compare.
|
||||||
|
- Overhauled versioning information (bug 5453).
|
||||||
|
- Changed from RemoveEdict to using the Kill input for TF2_RemoveWeapon.
|
||||||
|
- Fixed accidental assignment in each of SDKTools and sp compiler (bug 5745) (KyleS).
|
||||||
|
- Fixed potential deadlock in HandleSystem::TryAndFreeSomeHandles (bug 5665) (KyleS).
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
SourceMod 1.4.7 [2013-02-06]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.4.7_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
|
||||||
|
- Updated support for latest Source 2009 engine changes (CS:S, DoD:S, TF2, HL2DM).
|
||||||
|
- Updated gamedata for Left 4 Dead 2, Nuclear Dawn, No More Room in Hell, Zombie Panic Source, CSPromod, GoldenEye Source, Synergy, The Hidden, and PVKII.
|
||||||
|
- Added system to block malware or illegal plugins (bug 5289).
|
||||||
|
- Fixed a potential crash when a bad entity index is passed to certain functions (bug 5539) (KyleS).
|
||||||
|
- Added an error message for when auto plugin configs fail to be created due to write error (bug 5465) (Drifter).
|
||||||
|
- Fixed an issue where a malformed plugin could cause crashes (bug 5478).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
|
||||||
|
- Added new values to the TFCond TF2 conditions enum (bug 5537) (FlaminSarge).
|
||||||
|
- Updated TFHoliday TF2 holidays enum (bug 5526) (Powerlord).
|
||||||
|
- Fixed regression in SourceMod 1.3.0 causing GetEntPropEnt, GetEntDataEnt2, and GameRules_GetPropEnt to possibly return stale (incorrect) entity indexes in place of -1.
|
||||||
|
- Added support for < 32-bit unsigned sign extension to GameRules_GetProp lookup (already in GetEntProp since SM 1.4.0).
|
||||||
|
- Fixed < 32-bit unsigned sign extension in GetEntProp not being applied for array prop elements (bug 5591).
|
||||||
|
- Fixed value size auto-detection in GetEntProp and GameRules_GetProp for ep2v's new SPROP_VARINT sendprops.
|
||||||
|
- Fixed Sort_Random sort type not including first value in array sorting functions (bug 4292) (Peace-Maker).
|
||||||
|
- Fixed GameRules_SetPropVector writing data to unexpected addresses instead of to the gamerules proxy entity (bug 5592) (ProdigySim).
|
||||||
|
- Fixed VoteMenuToAll stock adding bots to list (bug 5253 (VoiDeD).
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
SourceMod 1.4.6 [2012-09-04]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.4.6_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
|
||||||
|
- Fixed extraneous errors resulting from a bug in 1.4.5.
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
|
||||||
|
SourceMod 1.4.5 [2012-09-03]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.4.5_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
|
||||||
|
- Updated support for latest Source 2009 engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
|
||||||
|
- Updated Nuclear Dawn, Dino D-Day, and Zombie Panic gamedata.
|
||||||
|
- Added compatibility for running on Metamod:Source 1.9.0.
|
||||||
|
- Fixed very minor memory leaks in CStrike extension (bug 5456) (KyleS).
|
||||||
|
- Fixed crash from plugins accessing netprops too early (bug 5297) (KyleS).
|
||||||
|
- Fixed crash from plugins trying to access nested datadesc members (bug 5446).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
|
||||||
|
- Added new TF2 weapon and custom dmg defines.
|
||||||
|
- Added new TF2 TFHoliday value (bug 5436) (Powerlord).
|
||||||
|
- Fixed IClientListener::InterceptClientConnect not being able to properly block connections (bug 5461) (PimpinJuice).
|
||||||
|
- Fixed PrepSDKCall_SetSignature native not working with symbol names on L4D2 linux (bug 5440).
|
||||||
|
- Fixed resolution of GetProfilerTime native on non-Windows platforms.
|
||||||
|
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
SourceMod 1.4.4 [2012-07-03]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.4.4_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
|
||||||
|
- Updated support for latest Source 2009 engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
|
||||||
|
- Updated Nuclear Dawn gamedata.
|
||||||
|
- Fixed a crash that could occur when selecting an option on a clientprefs prefab menu (bug 5374).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
|
||||||
|
- Added new TF2 weapon and custom dmg defines.
|
||||||
|
- Added new TF2 TFHoliday value (bug 5364) (Powerlord).
|
||||||
|
- Updated sample extension to properly fill ninvoke with INativeInvoker ptr (bug 5340) (Afronanny).
|
||||||
|
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
SourceMod 1.4.3 [2012-06-09]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.4.3_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
|
||||||
|
- Updated support for latest OrangeBox engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
|
||||||
|
- Made clientprefs attempt to reconnect to the database on map change (bug 4745).
|
||||||
|
- Log functions now respect sv_logecho (bug 5135).
|
||||||
|
- Fixed client console vote output (bug 5290, bug 5205) (FlaminSarge).
|
||||||
|
- Fixed error when reloading dependant plugins using aliased natives (bug 5302).
|
||||||
|
- Fixed intermittent crash when looking for an invalid signature (bug 5301).
|
||||||
|
- Fixed possible crash when reloading a plugin with an invalid binary (bug 5288).
|
||||||
|
- Exposed extensions list to clients (bug 5221) (VoiDeD).
|
||||||
|
- Fixed intermittent crashes in clientprefs (bug 4660).
|
||||||
|
- Fixed crash when passing an invalid entity reference to ReferenceToEntity (bug 5330).
|
||||||
|
- Fixed cstrike extension crash on shutdown (bug 5328).
|
||||||
|
- Lowered threading API think time to 20ms, making threaded MySQL queries complete faster (bug 4733).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
|
||||||
|
- Fixed client serials not being unique on Windows (bug 5285).
|
||||||
|
- Fixed broken SourceTV detection on L4D1 (bug 5216).
|
||||||
|
- Fixed Float negation operator (bug 5292).
|
||||||
|
- Updated TF2 condition defines (bug 5259) (FlaminSarge).
|
||||||
|
- Adding missing SetMenuNoVoteButton native declaration (bug 4522) (GoD-Tony).
|
||||||
|
- Fixed erroneous const-qualification of name param of GetAdminUsername (bug 5267).
|
||||||
|
- Added GetGameTickCount native (bug 5209) (GoD-Tony).
|
||||||
|
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
SourceMod 1.4.2 [2011-04-13]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.4.2_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
- Updated support for latest OrangeBox engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
|
||||||
|
- Fixed regression in SourceMod 1.4.0 causing SM to cause load errors on The Ship (bug 5216).
|
||||||
|
- Fixed toggling and player lag issues with sm_drug command (bugs 5217, 5218) (FlaminSarge).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
- Updated TF2-specific defines and enums (bug 5194).
|
||||||
|
- Fixed StoreToAddress always writing 32 bits and throwing an error (bug 5248) (ProdigySim).
|
||||||
|
- Fixed crash with StoreToAddress if memory wasn't writable (bug 5252) (Dr!fter).
|
||||||
|
- Fixed return value of VoteMenuToAll (bug 5254) (VoiDeD).
|
||||||
|
- Fixed bug in command lower-casing API guarantee
|
||||||
|
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
SourceMod 1.4.1 [2011-12-07]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.4.1_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
|
||||||
|
- Updated support for latest OrangeBox engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
|
||||||
|
- Added gamedata for Adrenaline Gamer 2 and No More Room in Hell.
|
||||||
|
- Fixed "not connected" error in reserve slots plugin (bug 5158) (ostrel).
|
||||||
|
- Fixed ff trigger output printing to all in triggerer's language (rather than viewer's language) (bug 5161).
|
||||||
|
- Fixed typo in one of basebans ban reasons (bug 5188).
|
||||||
|
- Fixed formatting error in Swedish "Vote Count" phrase (bug 5174).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
|
||||||
|
- Fixed sp MaxClients not being updated on map changes after load (bug 5160).
|
||||||
|
- Removed GLIBC_2.7 dependency from spcomp.
|
||||||
|
- Increased buffer for sm_rcon command to fit larger responses (bug 5169).
|
||||||
|
- BaseComm now properly registers a library allowing it to be required by other plugins (bug 5156).
|
||||||
|
- Fixed TFHoliday enum values (bug 5155).
|
||||||
|
- Updated TF2_OnIsHolidayActive ret behavior to match doc (bug 5155).
|
||||||
|
- Added new TF2 deathflag and dmg custom defines (bug 5157).
|
||||||
|
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
SourceMod 1.4.0 [2011-10-28]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.4.0_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
|
||||||
|
- Added support for Max OS X (bug 4392).
|
||||||
|
- Added support for Bloody Good Time (bug 4780).
|
||||||
|
- Added support for E.Y.E Divine Cybermancy (bug 5035).
|
||||||
|
- Added gamedata for Nuclear Dawn.
|
||||||
|
- Added gamedata for International Online Soccer: Source (bug 5019).
|
||||||
|
- Added gamedata for Half-Life 2 Capture the Flag (bug 5114).
|
||||||
|
- Updated mapchooser and other base plugins with Nuclear Dawn specific fixes (bug 5117).
|
||||||
|
- Fixed ServerLang value not being read properly on startup (bug 4675).
|
||||||
|
- Added support for aliases in languages.cfg (bug 4858).
|
||||||
|
- Added output display to sm_rcon command (bug 5018).
|
||||||
|
- Flood protection bypass access can now be overridden with command name sm_flood_access (bug 4584).
|
||||||
|
- Added a reset argument to sm cvars command to revset cvar values to default (bug 5043).
|
||||||
|
- Fixed incorrect language identifiers for Chinese (both Trad. and Simplified) and Brazilian Portuguese not matching cl_language values (bug 5067).
|
||||||
|
- Added translation support for Bulgarian (bg).
|
||||||
|
- Fixed incorrect number of slots being hidden for reserve with sm_hideslots on Source 2009 with SourceTV or replay (bug 5094).
|
||||||
|
- sm_hideslots changes now take effect immediately instead of waiting until a client joins or leaves (bug 5094).
|
||||||
|
- Fixed sv_visiblemaxplayers getting stuck at previous max clients in some cases with reserves and SourceTV or replay (bug 5094).
|
||||||
|
- Removed error logging if an optional extension is not found (bug 5112).
|
||||||
|
- Fixed bots with semicolon in name being unkickable (bug 5120).
|
||||||
|
- Changed strings in ice-related funcommands to be translatable (bug 4540).
|
||||||
|
- Changed Bintools extension to use a single build for every engine (bug 4548).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
- Provided native interface for basecomm (bug 2594).
|
||||||
|
- Client language detection is too late. (bug 3714) (Tony A. "GoD-Tony").
|
||||||
|
- Added ServerCommandEx native to execute server command and retrieve output (bug 3873).
|
||||||
|
- Added ability to update clientprefs cookies values on clients not currently connected (bug 3882) (databomb).
|
||||||
|
- Added library "matchmaking_ds" support to gamedata lookups (bug 4158).
|
||||||
|
- Rooted menu handles to callbacks (bug 4353).
|
||||||
|
- Fixed corner cases with ExplodeString (bug 4629). (Michael "LumiStance").
|
||||||
|
- Fixed return omission with else-after-return (bug 4852).
|
||||||
|
- Added OnConditionAdded and OnConditionRemoved forwards to TF2 extension (bug 4851).
|
||||||
|
- Added new natives and forward to the cstrike extension (bug 4732, bug 4985) (Dr!fter).
|
||||||
|
- Added WaitingForPlayers forwards to the TF2 extension (bug 4704) (CrimsonGT).
|
||||||
|
- Updated and added more TF2 condition, weapon, and damagecustom defines (multiple bug#s).
|
||||||
|
- Fixed TF2_RemoveCondition not always removing conditions (bug 4981).
|
||||||
|
- Fixed MaxClients not being updated correctly in some places with SourceTV or replay active (bug 4986).
|
||||||
|
- Fixed some vars not being marked for init on first compile pass (bug 4643).
|
||||||
|
- Increased symbol name limit to 63 characters (bug 4564) (javalia).
|
||||||
|
- Fixed crash when dynamic arrays run out of memory (bug 4632).
|
||||||
|
- Fixed a crash that could happen from looking up out-of-bounds edict or entity indexes (bug 5080).
|
||||||
|
- Fixed client serials not getting cleared on disconnect (bug 5121).
|
||||||
|
- Added error on declaring arrays that the compiler is too buggy to handle (bug 4977).
|
||||||
|
- Removed reliance on gamedata for multiple SDKTools functions in ep2 and later (bug 4899).
|
||||||
|
- Added InvalidateClient and ReconnectClient natives to SDKTools (bug 4931) (Brian "Afronanny" Simon).
|
||||||
|
- Added ability to lookup and set values on the gamerules class (bug 4983.
|
||||||
|
- BaseComm now uses AddCommandListener for chat hooks (bug 4991).
|
||||||
|
- Fixed shutdown bug in SDKTools (bug 5063).
|
||||||
|
- Fixed MM-enabled extensions continuing to load after failing MM attach (bug 5042).
|
||||||
|
- Added GetDistGainFromSoundLevel native to SDKTools (bug 5066) (javalia).
|
||||||
|
- Added CheckAccess native to check an AdminId's command access (bug 5083).
|
||||||
|
- Fixed GetEntProp not sign-extending unsigned values less than 32 bits (bug 5105).
|
||||||
|
- Fixed crashing when calling CreateEntityByName or CreateFakeClient when no map is running (now errors) (bug 5119).
|
||||||
|
- Fixed erring in kick function (e. bad translation) causing client to become unkickable until disconnect (bug 5120).
|
||||||
|
- Fixed KickClientEx not immediately kicking client if client was in kick queue (bug 5120).
|
||||||
|
- Added IsClientSourceTV and IsClientReplay natives (bug 5124).
|
||||||
|
- Added support for getting and setting individual array elements with Get/Set EntProp functions (bug 4160).
|
||||||
|
- Added support for threaded query handles to SQL_GetInsertId and SQL_GetAffectedRows (bug 4699) (Nephyrin).
|
||||||
|
- Added a GetGameRules function to ISDKTools for extensions to easily get the GameRules class pointer (bug 4707).
|
||||||
|
- Added GetMessageName to IUserMessages (bug 4573) (Zach "theY4Kman" Kanzler)
|
||||||
|
- Added HintTextMsg to IGameHelpers (bug 4950).
|
||||||
|
- Added ProcessTargetString simple filter API (bug 4404).
|
||||||
|
- Moved much functionality from core bins to logic bin (bug 4406, bug 4402).
|
||||||
|
- Fixed bogus asserts in sp compiler (bug 4486, bug 4487).
|
||||||
|
- Greatly improved sp compiler performance (~5x overall speedup) (bug 3820, bug 4493, bug 4495).
|
||||||
|
- Changed entity output detours to use CDetour (bug 4416).
|
||||||
|
- Enhanced nominations API (bug 4677) (CrimsonGT).
|
||||||
|
- Added Linux support for profiling natives (bug 4927).
|
||||||
|
- Added a new ValveCallType that allows for arbitrary |this| parameters, as well as associated features in gamedata and for reading/writing memory (bug 3520) (Downtown1).
|
||||||
|
- Updated TF2 extension to handle Valve's changes to the "holiday" system (bug 5150).
|
||||||
|
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
SourceMod 1.3.8 [2011-06-23]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.3.8_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
|
||||||
|
- Updated support for latest OrangeBox engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
|
||||||
|
- Updated support for various games, including Garry's Mod, Zombie Panic, and Dino D-Day.
|
||||||
|
- Added gamedata for Eternal Silence.
|
||||||
|
- Fixed libgcc_s.so.1 load error present on some systems (bug 4876).
|
||||||
|
- Handle leak notices now print to error log (in addition fatal log) (bug 4929).
|
||||||
|
- Translator now properly falls back on bad server language (bug 4861).
|
||||||
|
- Fixed invalid client errors from bad MaxClients value when SourceTV is late-loaded (bug 4881).
|
||||||
|
- Fixed crash on plugin unload when two commands exist with same name, different casing (bug 4698).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
|
||||||
|
- Updated TF2 condition defines (bug 4916).
|
||||||
|
- Fixed var names and docs for TF2_MakeBleed native (bug 4928).
|
||||||
|
- Removed compiler double include check (bug 4863).
|
||||||
|
- Fixed plugin compile errors when using GetEntityClassname (bug 4798).
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
SourceMod 1.3.7 [2011-04-15]
|
||||||
|
|
||||||
|
URL: http://wiki.alliedmods.net/SourceMod_1.3.7_Release_Notes
|
||||||
|
|
||||||
|
User Changes:
|
||||||
|
|
||||||
|
- Updated support for latest OrangeBox engine changes (CS:S, DoD:S, TF2, HL2DM, GMod).
|
||||||
|
- Updated support for various games, including Zombie Panic, CS ProMod, Empires, and GoldenEye: Source.
|
||||||
|
- Added gamedata for Dino D-Day.
|
||||||
|
- Fix precedence of voice mute flag versus specific client overrides (bug 4826).
|
||||||
|
- Fix mistaken unhooking of voice hooks (bug 4804).
|
||||||
|
- Fixed graphical glitches with funcommands effects in L4D1 (bug 3486).
|
||||||
|
- Fixed bug in nominations that could cause "Unknown command" error (bug 4797).
|
||||||
|
- Removed tv_enable hook to fix rare max client count issue (bug 4791).
|
||||||
|
- Added missing unhooking of ClientConnect in PlayerManager (bug 4749).
|
||||||
|
- Fixed sm_rtv printing "unknown command" (bug 4730).
|
||||||
|
- Fixed voting crash when client console, chat, and SourceTV are enabled (bug 4676).
|
||||||
|
- Fixed CDetour crash in TF2 extension when last plugin using forward is unloaded (bug 4713).
|
||||||
|
|
||||||
|
Developer Changes:
|
||||||
|
|
||||||
|
- SetEntProp now marks edict state as changed (bug 4855).
|
||||||
|
- Added GetEntityClassname stock (bug 4798).
|
||||||
|
- Fix compiler hanging when #including a directory (bug 4822).
|
||||||
|
- Added GetEntityFlags and SetEntityFlags natives for better cross-engine compatibility. (bug 4809).
|
||||||
|
- Fixed ClientPrefs natives not being marked optional when REQUIRE_EXTENSIONS not defined (bug 4839).
|
||||||
|
- Changed some instances of LogMessage to LogAction (bug 4649).
|
||||||
|
- Added some new language natives (bug 4613).
|
||||||
|
- Fixed SetTeamScore not updating score on client (bug 2736).
|
||||||
|
- Raised MAXPLAYERS from 64 to 65 (bug 4490).
|
||||||
|
- Added and updated many TF2-specific defines in tf2.inc and tf2_stocks.inc.
|
||||||
|
- Fixed TF2_GetPlayerConditionFlags no longer necessarily returning all set flags (bug 4726).
|
||||||
|
- Fixed profiler flush not clearing, added 'report' and 'clear' (bug 4674).
|
||||||
|
- Fixed GetPlayerDecalFile crash on L4D and L4D2 (bug 4729).
|
||||||
|
- Fixed TF2_OnGetHoliday detour no longer firing under all circumstances (bug 4700).
|
||||||
|
- Added TF2_IsPlayerInDuel native to TF2 extension (bug 4695).
|
||||||
|
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
SourceMod 1.3.6 [2010-10-31]
|
SourceMod 1.3.6 [2010-10-31]
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ for sdk_name in SM.sdks:
|
|||||||
]
|
]
|
||||||
elif sdk.name == 'dota':
|
elif sdk.name == 'dota':
|
||||||
compiler.cxxincludes += [
|
compiler.cxxincludes += [
|
||||||
os.path.join(sdk.path, 'common', 'protobuf-2.5.0', 'src'),
|
os.path.join(sdk.path, 'common', 'protobuf-2.6.1', 'src'),
|
||||||
os.path.join(sdk.path, 'public', 'engine', 'protobuf'),
|
os.path.join(sdk.path, 'public', 'engine', 'protobuf'),
|
||||||
os.path.join(sdk.path, 'public', 'game', 'shared', 'protobuf'),
|
os.path.join(sdk.path, 'public', 'game', 'shared', 'protobuf'),
|
||||||
os.path.join(sdk.path, 'public', 'game', 'shared', 'dota', 'protobuf')
|
os.path.join(sdk.path, 'public', 'game', 'shared', 'dota', 'protobuf')
|
||||||
|
|||||||
+2
-1
@@ -234,7 +234,7 @@ void CHalfLife2::InitLogicalEntData()
|
|||||||
void CHalfLife2::InitCommandLine()
|
void CHalfLife2::InitCommandLine()
|
||||||
{
|
{
|
||||||
char error[256];
|
char error[256];
|
||||||
|
#if SOURCE_ENGINE != SE_DARKMESSIAH
|
||||||
if (!is_original_engine)
|
if (!is_original_engine)
|
||||||
{
|
{
|
||||||
ke::AutoPtr<ILibrary> lib(g_LibSys.OpenLibrary(TIER0_NAME, error, sizeof(error)));
|
ke::AutoPtr<ILibrary> lib(g_LibSys.OpenLibrary(TIER0_NAME, error, sizeof(error)));
|
||||||
@@ -253,6 +253,7 @@ void CHalfLife2::InitCommandLine()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
ke::AutoPtr<ILibrary> lib(g_LibSys.OpenLibrary(VSTDLIB_NAME, error, sizeof(error)));
|
ke::AutoPtr<ILibrary> lib(g_LibSys.OpenLibrary(VSTDLIB_NAME, error, sizeof(error)));
|
||||||
if (lib == NULL)
|
if (lib == NULL)
|
||||||
|
|||||||
+10
-3
@@ -536,7 +536,7 @@ bool PlayerManager::OnClientConnect(edict_t *pEntity, const char *pszName, const
|
|||||||
|
|
||||||
if (res)
|
if (res)
|
||||||
{
|
{
|
||||||
if (!pPlayer->IsAuthorized())
|
if (!pPlayer->IsAuthorized() && !pPlayer->IsFakeClient())
|
||||||
{
|
{
|
||||||
m_AuthQueue[++m_AuthQueue[0]] = client;
|
m_AuthQueue[++m_AuthQueue[0]] = client;
|
||||||
}
|
}
|
||||||
@@ -622,8 +622,6 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
|||||||
char error[255];
|
char error[255];
|
||||||
|
|
||||||
pPlayer->m_bFakeClient = true;
|
pPlayer->m_bFakeClient = true;
|
||||||
pPlayer->UpdateAuthIds();
|
|
||||||
pPlayer->Authorize();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* While we're already filtered to just bots, we'll do other checks to
|
* While we're already filtered to just bots, we'll do other checks to
|
||||||
@@ -710,6 +708,8 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
|||||||
cell_t res;
|
cell_t res;
|
||||||
m_clconnect_post->PushCell(client);
|
m_clconnect_post->PushCell(client);
|
||||||
m_clconnect_post->Execute(&res, NULL);
|
m_clconnect_post->Execute(&res, NULL);
|
||||||
|
|
||||||
|
pPlayer->Authorize();
|
||||||
|
|
||||||
const char *steamId = pPlayer->GetSteam2Id();
|
const char *steamId = pPlayer->GetSteam2Id();
|
||||||
|
|
||||||
@@ -2003,6 +2003,13 @@ void CPlayer::UpdateAuthIds()
|
|||||||
#else
|
#else
|
||||||
authstr = engine->GetPlayerNetworkIDString(m_pEdict);
|
authstr = engine->GetPlayerNetworkIDString(m_pEdict);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (!authstr)
|
||||||
|
{
|
||||||
|
// engine doesn't have the client's auth string just yet, we can't do anything
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_AuthID.compare(authstr) == 0)
|
if (m_AuthID.compare(authstr) == 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+22
-18
@@ -39,15 +39,16 @@
|
|||||||
#include "AdminCache.h"
|
#include "AdminCache.h"
|
||||||
#include "Translator.h"
|
#include "Translator.h"
|
||||||
#include "common_logic.h"
|
#include "common_logic.h"
|
||||||
|
#include "stringutil.h"
|
||||||
|
|
||||||
#define LEVEL_STATE_NONE 0
|
#define LEVEL_STATE_NONE 0
|
||||||
#define LEVEL_STATE_LEVELS 1
|
#define LEVEL_STATE_LEVELS 1
|
||||||
#define LEVEL_STATE_FLAGS 2
|
#define LEVEL_STATE_FLAGS 2
|
||||||
|
|
||||||
AdminCache g_Admins;
|
AdminCache g_Admins;
|
||||||
char g_ReverseFlags[26];
|
char g_ReverseFlags[AdminFlags_TOTAL];
|
||||||
AdminFlag g_FlagLetters[26];
|
AdminFlag g_FlagLetters[26];
|
||||||
bool g_FlagSet[26];
|
bool g_FlagCharSet[26];
|
||||||
|
|
||||||
/* Default flags */
|
/* Default flags */
|
||||||
AdminFlag g_DefaultFlags[26] =
|
AdminFlag g_DefaultFlags[26] =
|
||||||
@@ -71,9 +72,9 @@ public:
|
|||||||
memcpy(g_FlagLetters, g_DefaultFlags, sizeof(AdminFlag) * 26);
|
memcpy(g_FlagLetters, g_DefaultFlags, sizeof(AdminFlag) * 26);
|
||||||
for (unsigned int i=0; i<20; i++)
|
for (unsigned int i=0; i<20; i++)
|
||||||
{
|
{
|
||||||
g_FlagSet[i] = true;
|
g_FlagCharSet[i] = true;
|
||||||
}
|
}
|
||||||
g_FlagSet[25] = true;
|
g_FlagCharSet[25] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
@@ -103,7 +104,7 @@ private:
|
|||||||
{
|
{
|
||||||
m_LevelState = LEVEL_STATE_NONE;
|
m_LevelState = LEVEL_STATE_NONE;
|
||||||
m_IgnoreLevel = 0;
|
m_IgnoreLevel = 0;
|
||||||
memset(g_FlagSet, 0, sizeof(g_FlagSet));
|
memset(g_FlagCharSet, 0, sizeof(g_FlagCharSet));
|
||||||
}
|
}
|
||||||
SMCResult ReadSMC_NewSection(const SMCStates *states, const char *name)
|
SMCResult ReadSMC_NewSection(const SMCStates *states, const char *name)
|
||||||
{
|
{
|
||||||
@@ -163,7 +164,7 @@ private:
|
|||||||
return SMCResult_Continue;
|
return SMCResult_Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_FlagSet[c] = true;
|
g_FlagCharSet[c] = true;
|
||||||
|
|
||||||
return SMCResult_Continue;
|
return SMCResult_Continue;
|
||||||
}
|
}
|
||||||
@@ -1063,22 +1064,29 @@ bool AdminCache::GetMethodIndex(const char *name, unsigned int *_index)
|
|||||||
bool AdminCache::GetUnifiedSteamIdentity(const char *ident, char *out, size_t maxlen)
|
bool AdminCache::GetUnifiedSteamIdentity(const char *ident, char *out, size_t maxlen)
|
||||||
{
|
{
|
||||||
int len = strlen(ident);
|
int len = strlen(ident);
|
||||||
/* If the id was a steam id strip off the STEAM_*: part */
|
if (!strcmp(ident, "BOT"))
|
||||||
if (len >= 11 && !strncmp(ident, "STEAM_", 6) && ident[8] != '_')
|
|
||||||
{
|
{
|
||||||
// non-bot/lan Steam2 Id
|
// Bots
|
||||||
|
strncopy(out, ident, maxlen);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (len >= 11 && !strncmp(ident, "STEAM_", 6) && ident[8] != '_')
|
||||||
|
{
|
||||||
|
// non-bot/lan Steam2 Id, strip off the STEAM_* part
|
||||||
snprintf(out, maxlen, "%s", &ident[8]);
|
snprintf(out, maxlen, "%s", &ident[8]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (len >= 7 && !strncmp(ident, "[U:", 3) && ident[len-1] == ']')
|
else if (len >= 7 && !strncmp(ident, "[U:", 3) && ident[len-1] == ']')
|
||||||
{
|
{
|
||||||
// Steam3 Id
|
// Steam3 Id, replicate the Steam2 Post-"STEAM_" part
|
||||||
uint32_t accountId = strtoul(&ident[5], nullptr, 10);
|
uint32_t accountId = strtoul(&ident[5], nullptr, 10);
|
||||||
snprintf(out, maxlen, "%u:%u", accountId & 1, accountId >> 1);
|
snprintf(out, maxlen, "%u:%u", accountId & 1, accountId >> 1);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// 64-bit CSteamID, replicate the Steam2 Post-"STEAM_" part
|
||||||
|
|
||||||
// some constants from steamclientpublic.h
|
// some constants from steamclientpublic.h
|
||||||
static const uint32_t k_EAccountTypeIndividual = 1;
|
static const uint32_t k_EAccountTypeIndividual = 1;
|
||||||
static const int k_EUniverseInvalid = 0;
|
static const int k_EUniverseInvalid = 0;
|
||||||
@@ -1577,7 +1585,7 @@ bool AdminCache::FindFlag(char c, AdminFlag *pAdmFlag)
|
|||||||
{
|
{
|
||||||
if (c < 'a'
|
if (c < 'a'
|
||||||
|| c > 'z'
|
|| c > 'z'
|
||||||
|| !g_FlagSet[(unsigned)c - (unsigned)'a'])
|
|| !g_FlagCharSet[(unsigned)c - (unsigned)'a'])
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1592,17 +1600,13 @@ bool AdminCache::FindFlag(char c, AdminFlag *pAdmFlag)
|
|||||||
|
|
||||||
bool AdminCache::FindFlagChar(AdminFlag flag, char *c)
|
bool AdminCache::FindFlagChar(AdminFlag flag, char *c)
|
||||||
{
|
{
|
||||||
if (!g_FlagSet[flag])
|
char flagchar = g_ReverseFlags[flag];
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (c)
|
if (c)
|
||||||
{
|
{
|
||||||
*c = g_ReverseFlags[flag];
|
*c = flagchar;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return flagchar != '?';
|
||||||
}
|
}
|
||||||
|
|
||||||
FlagBits AdminCache::ReadFlagString(const char *flags, const char **end)
|
FlagBits AdminCache::ReadFlagString(const char *flags, const char **end)
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
#include <am-string.h>
|
#include <am-string.h>
|
||||||
#include "common_logic.h"
|
#include "common_logic.h"
|
||||||
|
|
||||||
#define HANDLESYS_MAX_HANDLES (1<<14)
|
#define HANDLESYS_MAX_HANDLES (1<<15)
|
||||||
#define HANDLESYS_MAX_TYPES (1<<9)
|
#define HANDLESYS_MAX_TYPES (1<<9)
|
||||||
#define HANDLESYS_MAX_SUBTYPES 0xF
|
#define HANDLESYS_MAX_SUBTYPES 0xF
|
||||||
#define HANDLESYS_SUBTYPE_MASK 0xF
|
#define HANDLESYS_SUBTYPE_MASK 0xF
|
||||||
|
|||||||
@@ -597,7 +597,7 @@ REGISTER_NATIVES(cellArrayNatives)
|
|||||||
{"ArrayList.Set", SetArrayCell},
|
{"ArrayList.Set", SetArrayCell},
|
||||||
{"ArrayList.SetString", SetArrayString},
|
{"ArrayList.SetString", SetArrayString},
|
||||||
{"ArrayList.SetArray", SetArrayArray},
|
{"ArrayList.SetArray", SetArrayArray},
|
||||||
{"ArrayList.Erease", RemoveFromArray},
|
{"ArrayList.Erase", RemoveFromArray},
|
||||||
{"ArrayList.ShiftUp", ShiftArrayUp},
|
{"ArrayList.ShiftUp", ShiftArrayUp},
|
||||||
{"ArrayList.SwapAt", SwapArrayItems},
|
{"ArrayList.SwapAt", SwapArrayItems},
|
||||||
{"ArrayList.Clone", CloneArray},
|
{"ArrayList.Clone", CloneArray},
|
||||||
|
|||||||
@@ -334,9 +334,9 @@ public:
|
|||||||
{
|
{
|
||||||
m_pDatabase->Close();
|
m_pDatabase->Close();
|
||||||
}
|
}
|
||||||
m_pFunction->PushCell(BAD_HANDLE);
|
|
||||||
if (m_ACM == ACM_Old)
|
if (m_ACM == ACM_Old)
|
||||||
m_pFunction->PushCell(BAD_HANDLE);
|
m_pFunction->PushCell(BAD_HANDLE);
|
||||||
|
m_pFunction->PushCell(BAD_HANDLE);
|
||||||
m_pFunction->PushString("Driver is unloading");
|
m_pFunction->PushString("Driver is unloading");
|
||||||
m_pFunction->PushCell(m_Data);
|
m_pFunction->PushCell(m_Data);
|
||||||
m_pFunction->Execute(NULL);
|
m_pFunction->Execute(NULL);
|
||||||
@@ -355,9 +355,9 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pFunction->PushCell(m_pDriver->GetHandle());
|
|
||||||
if (m_ACM == ACM_Old)
|
if (m_ACM == ACM_Old)
|
||||||
m_pFunction->PushCell(hndl);
|
m_pFunction->PushCell(m_pDriver->GetHandle());
|
||||||
|
m_pFunction->PushCell(hndl);
|
||||||
m_pFunction->PushString(hndl == BAD_HANDLE ? error : "");
|
m_pFunction->PushString(hndl == BAD_HANDLE ? error : "");
|
||||||
m_pFunction->PushCell(m_Data);
|
m_pFunction->PushCell(m_Data);
|
||||||
m_pFunction->Execute(NULL);
|
m_pFunction->Execute(NULL);
|
||||||
|
|||||||
@@ -572,6 +572,47 @@ static cell_t ReferenceToBCompatRef(IPluginContext *pContext, const cell_t *para
|
|||||||
return g_HL2.ReferenceToBCompatRef(params[1]);
|
return g_HL2.ReferenceToBCompatRef(params[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Must match ClientRangeType enum in halflife.inc
|
||||||
|
enum class ClientRangeType : cell_t
|
||||||
|
{
|
||||||
|
Visibility = 0,
|
||||||
|
Audibility,
|
||||||
|
};
|
||||||
|
|
||||||
|
static cell_t GetClientsInRange(IPluginContext *pContext, const cell_t *params)
|
||||||
|
{
|
||||||
|
cell_t *origin;
|
||||||
|
pContext->LocalToPhysAddr(params[1], &origin);
|
||||||
|
|
||||||
|
Vector vOrigin(sp_ctof(origin[0]), sp_ctof(origin[1]), sp_ctof(origin[2]));
|
||||||
|
|
||||||
|
ClientRangeType rangeType = (ClientRangeType) params[2];
|
||||||
|
|
||||||
|
CBitVec<ABSOLUTE_PLAYER_LIMIT> players;
|
||||||
|
engine->Message_DetermineMulticastRecipients(rangeType == ClientRangeType::Audibility, vOrigin, players);
|
||||||
|
|
||||||
|
cell_t *outPlayers;
|
||||||
|
pContext->LocalToPhysAddr(params[3], &outPlayers);
|
||||||
|
|
||||||
|
int maxPlayers = params[4];
|
||||||
|
int curPlayers = 0;
|
||||||
|
|
||||||
|
int index = players.FindNextSetBit(0);
|
||||||
|
while (index > -1 && curPlayers < maxPlayers)
|
||||||
|
{
|
||||||
|
int entidx = index + 1;
|
||||||
|
CPlayer *pPlayer = g_Players.GetPlayerByIndex(entidx);
|
||||||
|
if (pPlayer && pPlayer->IsInGame())
|
||||||
|
{
|
||||||
|
outPlayers[curPlayers++] = entidx;
|
||||||
|
}
|
||||||
|
|
||||||
|
index = players.FindNextSetBit(index + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return curPlayers;
|
||||||
|
}
|
||||||
|
|
||||||
REGISTER_NATIVES(halflifeNatives)
|
REGISTER_NATIVES(halflifeNatives)
|
||||||
{
|
{
|
||||||
{"CreateFakeClient", CreateFakeClient},
|
{"CreateFakeClient", CreateFakeClient},
|
||||||
@@ -607,5 +648,6 @@ REGISTER_NATIVES(halflifeNatives)
|
|||||||
{"EntIndexToEntRef", IndexToReference},
|
{"EntIndexToEntRef", IndexToReference},
|
||||||
{"EntRefToEntIndex", ReferenceToIndex},
|
{"EntRefToEntIndex", ReferenceToIndex},
|
||||||
{"MakeCompatEntRef", ReferenceToBCompatRef},
|
{"MakeCompatEntRef", ReferenceToBCompatRef},
|
||||||
|
{"GetClientsInRange", GetClientsInRange},
|
||||||
{NULL, NULL},
|
{NULL, NULL},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -51,7 +51,9 @@ IPlayerInfoManager *playerinfo = NULL;
|
|||||||
IBaseFileSystem *basefilesystem = NULL;
|
IBaseFileSystem *basefilesystem = NULL;
|
||||||
IFileSystem *filesystem = NULL;
|
IFileSystem *filesystem = NULL;
|
||||||
IEngineSound *enginesound = NULL;
|
IEngineSound *enginesound = NULL;
|
||||||
|
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||||
IServerTools *servertools = NULL;
|
IServerTools *servertools = NULL;
|
||||||
|
#endif
|
||||||
IServerPluginHelpers *serverpluginhelpers = NULL;
|
IServerPluginHelpers *serverpluginhelpers = NULL;
|
||||||
IServerPluginCallbacks *vsp_interface = NULL;
|
IServerPluginCallbacks *vsp_interface = NULL;
|
||||||
int vsp_version = 0;
|
int vsp_version = 0;
|
||||||
@@ -70,7 +72,9 @@ bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen
|
|||||||
GET_V_IFACE_CURRENT(GetFileSystemFactory, basefilesystem, IBaseFileSystem, BASEFILESYSTEM_INTERFACE_VERSION);
|
GET_V_IFACE_CURRENT(GetFileSystemFactory, basefilesystem, IBaseFileSystem, BASEFILESYSTEM_INTERFACE_VERSION);
|
||||||
GET_V_IFACE_CURRENT(GetFileSystemFactory, filesystem, IFileSystem, FILESYSTEM_INTERFACE_VERSION);
|
GET_V_IFACE_CURRENT(GetFileSystemFactory, filesystem, IFileSystem, FILESYSTEM_INTERFACE_VERSION);
|
||||||
GET_V_IFACE_CURRENT(GetEngineFactory, enginesound, IEngineSound, IENGINESOUND_SERVER_INTERFACE_VERSION);
|
GET_V_IFACE_CURRENT(GetEngineFactory, enginesound, IEngineSound, IENGINESOUND_SERVER_INTERFACE_VERSION);
|
||||||
|
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||||
GET_V_IFACE_CURRENT(GetServerFactory, servertools, IServerTools, VSERVERTOOLS_INTERFACE_VERSION);
|
GET_V_IFACE_CURRENT(GetServerFactory, servertools, IServerTools, VSERVERTOOLS_INTERFACE_VERSION);
|
||||||
|
#endif
|
||||||
#if SOURCE_ENGINE != SE_DOTA
|
#if SOURCE_ENGINE != SE_DOTA
|
||||||
GET_V_IFACE_CURRENT(GetEngineFactory, serverpluginhelpers, IServerPluginHelpers, INTERFACEVERSION_ISERVERPLUGINHELPERS);
|
GET_V_IFACE_CURRENT(GetEngineFactory, serverpluginhelpers, IServerPluginHelpers, INTERFACEVERSION_ISERVERPLUGINHELPERS);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -102,7 +102,9 @@ extern IPlayerInfoManager *playerinfo;
|
|||||||
extern IBaseFileSystem *basefilesystem;
|
extern IBaseFileSystem *basefilesystem;
|
||||||
extern IFileSystem *filesystem;
|
extern IFileSystem *filesystem;
|
||||||
extern IEngineSound *enginesound;
|
extern IEngineSound *enginesound;
|
||||||
|
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||||
extern IServerTools *servertools;
|
extern IServerTools *servertools;
|
||||||
|
#endif
|
||||||
extern IServerPluginHelpers *serverpluginhelpers;
|
extern IServerPluginHelpers *serverpluginhelpers;
|
||||||
extern IServerPluginCallbacks *vsp_interface;
|
extern IServerPluginCallbacks *vsp_interface;
|
||||||
extern int vsp_version;
|
extern int vsp_version;
|
||||||
|
|||||||
@@ -61,9 +61,21 @@ DETOUR_DECL_MEMBER1(DetourHandleBuy, int, const char *, weapon)
|
|||||||
|
|
||||||
#if SOURCE_ENGINE != SE_CSGO
|
#if SOURCE_ENGINE != SE_CSGO
|
||||||
DETOUR_DECL_MEMBER0(DetourWeaponPrice, int)
|
DETOUR_DECL_MEMBER0(DetourWeaponPrice, int)
|
||||||
|
#elif defined(WIN32)
|
||||||
|
DETOUR_DECL_MEMBER2(DetourWeaponPrice, int, CEconItemView *, pEconItem, int, iUnknown)
|
||||||
|
#else
|
||||||
|
DETOUR_DECL_MEMBER3(DetourWeaponPrice, int, CEconItemView *, pEconItem, int, iUnknown, float, fUnknown)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int price = DETOUR_MEMBER_CALL(DetourWeaponPrice)();
|
|
||||||
|
|
||||||
|
#if SOURCE_ENGINE != SE_CSGO
|
||||||
|
int price = DETOUR_MEMBER_CALL(DetourWeaponPrice)();
|
||||||
|
#elif defined(WIN32)
|
||||||
|
int price = DETOUR_MEMBER_CALL(DetourWeaponPrice)(pEconItem, iUnknown);
|
||||||
|
#else
|
||||||
|
int price = DETOUR_MEMBER_CALL(DetourWeaponPrice)(pEconItem, iUnknown, fUnknown);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (lastclient == -1)
|
if (lastclient == -1)
|
||||||
return price;
|
return price;
|
||||||
|
|
||||||
@@ -71,19 +83,6 @@ DETOUR_DECL_MEMBER0(DetourWeaponPrice, int)
|
|||||||
|
|
||||||
return CallPriceForward(lastclient, weapon_name, price);
|
return CallPriceForward(lastclient, weapon_name, price);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
DETOUR_DECL_MEMBER2(DetourWeaponPrice, int, const char *, szAttribute, CEconItemView *, pEconItem)
|
|
||||||
{
|
|
||||||
int price = DETOUR_MEMBER_CALL(DetourWeaponPrice)(szAttribute, pEconItem);
|
|
||||||
|
|
||||||
if(lastclient == -1 || strcmp(szAttribute, "in game price") != 0)
|
|
||||||
return price;
|
|
||||||
|
|
||||||
const char *weapon_name = reinterpret_cast<char *>(this+weaponNameOffset);
|
|
||||||
|
|
||||||
return CallPriceForward(lastclient, weapon_name, price);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if SOURCE_ENGINE != SE_CSGO || !defined(WIN32)
|
#if SOURCE_ENGINE != SE_CSGO || !defined(WIN32)
|
||||||
DETOUR_DECL_MEMBER2(DetourTerminateRound, void, float, delay, int, reason)
|
DETOUR_DECL_MEMBER2(DetourTerminateRound, void, float, delay, int, reason)
|
||||||
@@ -201,8 +200,15 @@ bool CreateWeaponPriceDetour()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
#if SOURCE_ENGINE == SE_CSGO && defined(WIN32)
|
||||||
DWeaponPrice = DETOUR_CREATE_MEMBER(DetourWeaponPrice, "GetAttributeInt");
|
void *pGetWeaponPriceAddress = GetWeaponPriceFunction();
|
||||||
|
|
||||||
|
if(!pGetWeaponPriceAddress)
|
||||||
|
{
|
||||||
|
g_pSM->LogError(myself, "GetWeaponPrice detour could not be initialized - Disabled OnGetWeaponPrice forward.");
|
||||||
|
}
|
||||||
|
|
||||||
|
DWeaponPrice = DETOUR_CREATE_MEMBER(DetourWeaponPrice, pGetWeaponPriceAddress);
|
||||||
#else
|
#else
|
||||||
DWeaponPrice = DETOUR_CREATE_MEMBER(DetourWeaponPrice, "GetWeaponPrice");
|
DWeaponPrice = DETOUR_CREATE_MEMBER(DetourWeaponPrice, "GetWeaponPrice");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -419,6 +419,7 @@ static cell_t CS_GetTranslatedWeaponAlias(IPluginContext *pContext, const cell_t
|
|||||||
|
|
||||||
static cell_t CS_GetWeaponPrice(IPluginContext *pContext, const cell_t *params)
|
static cell_t CS_GetWeaponPrice(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!IsValidWeaponID(params[2]))
|
if (!IsValidWeaponID(params[2]))
|
||||||
return pContext->ThrowNativeError("Invalid WeaponID passed for this game");
|
return pContext->ThrowNativeError("Invalid WeaponID passed for this game");
|
||||||
|
|
||||||
@@ -426,6 +427,7 @@ static cell_t CS_GetWeaponPrice(IPluginContext *pContext, const cell_t *params)
|
|||||||
|
|
||||||
//Hard code return values for weapons that dont call GetWeaponPrice and always use default value.
|
//Hard code return values for weapons that dont call GetWeaponPrice and always use default value.
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
#if SOURCE_ENGINE == SE_CSGO
|
||||||
|
|
||||||
if (id == WEAPON_C4 || id == WEAPON_KNIFE || id == WEAPON_KNIFE_GG)
|
if (id == WEAPON_C4 || id == WEAPON_KNIFE || id == WEAPON_KNIFE_GG)
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
@@ -458,23 +460,49 @@ static cell_t CS_GetWeaponPrice(IPluginContext *pContext, const cell_t *params)
|
|||||||
#if SOURCE_ENGINE == SE_CSGO
|
#if SOURCE_ENGINE == SE_CSGO
|
||||||
static ICallWrapper *pWrapper = NULL;
|
static ICallWrapper *pWrapper = NULL;
|
||||||
|
|
||||||
|
#if defined(WIN32)
|
||||||
|
if(!pWrapper)
|
||||||
|
{
|
||||||
|
void *pGetWeaponPrice = GetWeaponPriceFunction();
|
||||||
|
if(!pGetWeaponPrice)
|
||||||
|
{
|
||||||
|
return pContext->ThrowNativeError("Failed to locate function");
|
||||||
|
}
|
||||||
|
|
||||||
|
PassInfo pass[2];
|
||||||
|
PassInfo ret;
|
||||||
|
pass[0].flags = PASSFLAG_BYVAL;
|
||||||
|
pass[0].type = PassType_Basic;
|
||||||
|
pass[0].size = sizeof(CEconItemView *);
|
||||||
|
pass[1].flags = PASSFLAG_BYVAL;
|
||||||
|
pass[1].type = PassType_Basic;
|
||||||
|
pass[1].size = sizeof(int);
|
||||||
|
ret.flags = PASSFLAG_BYVAL;
|
||||||
|
ret.type = PassType_Basic;
|
||||||
|
ret.size = sizeof(int);
|
||||||
|
pWrapper = g_pBinTools->CreateCall(pGetWeaponPrice, CallConv_ThisCall, &ret, pass, 2);
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (!pWrapper)
|
if (!pWrapper)
|
||||||
{
|
{
|
||||||
REGISTER_NATIVE_ADDR("GetAttributeInt",
|
REGISTER_NATIVE_ADDR("GetWeaponPrice",
|
||||||
PassInfo pass[2]; \
|
PassInfo pass[3]; \
|
||||||
PassInfo ret; \
|
PassInfo ret; \
|
||||||
pass[0].flags = PASSFLAG_BYVAL; \
|
pass[0].flags = PASSFLAG_BYVAL; \
|
||||||
pass[0].type = PassType_Basic; \
|
pass[0].type = PassType_Basic; \
|
||||||
pass[0].size = sizeof(char *); \
|
pass[0].size = sizeof(CEconItemView *); \
|
||||||
pass[1].flags = PASSFLAG_BYVAL; \
|
pass[1].flags = PASSFLAG_BYVAL; \
|
||||||
pass[1].type = PassType_Basic; \
|
pass[1].type = PassType_Basic; \
|
||||||
pass[1].size = sizeof(CEconItemView *); \
|
pass[1].size = sizeof(int); \
|
||||||
|
pass[2].flags = PASSFLAG_BYVAL; \
|
||||||
|
pass[2].type = PassType_Float; \
|
||||||
|
pass[2].size = sizeof(float); \
|
||||||
ret.flags = PASSFLAG_BYVAL; \
|
ret.flags = PASSFLAG_BYVAL; \
|
||||||
ret.type = PassType_Basic; \
|
ret.type = PassType_Basic; \
|
||||||
ret.size = sizeof(int); \
|
ret.size = sizeof(int); \
|
||||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, &ret, pass, 2))
|
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, &ret, pass, 3))
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// Get a CEconItemView for the m4
|
// Get a CEconItemView for the m4
|
||||||
// Found in CCSPlayer::HandleCommand_Buy_Internal
|
// Found in CCSPlayer::HandleCommand_Buy_Internal
|
||||||
// Linux a1 - CCSPlayer *pEntity, v5 - Player Team, a3 - ItemLoadoutSlot -1 use default loadoutslot:
|
// Linux a1 - CCSPlayer *pEntity, v5 - Player Team, a3 - ItemLoadoutSlot -1 use default loadoutslot:
|
||||||
@@ -552,14 +580,22 @@ static cell_t CS_GetWeaponPrice(IPluginContext *pContext, const cell_t *params)
|
|||||||
pGetView->Execute(vstk_view, &view);
|
pGetView->Execute(vstk_view, &view);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char vstk[sizeof(void *) * 2 + sizeof(char *)];
|
#if defined(WIN32)
|
||||||
|
unsigned char vstk[sizeof(void *) * 2 + sizeof(int)];
|
||||||
|
#else
|
||||||
|
unsigned char vstk[sizeof(void *) * 2 + sizeof(int) + sizeof(float)];
|
||||||
|
#endif
|
||||||
unsigned char *vptr = vstk;
|
unsigned char *vptr = vstk;
|
||||||
|
|
||||||
*(void **)vptr = info;
|
*(void **)vptr = info;
|
||||||
vptr += sizeof(void *);
|
vptr += sizeof(void *);
|
||||||
*(const char **)vptr = "in game price";
|
|
||||||
vptr += sizeof(const char *);
|
|
||||||
*(CEconItemView **)vptr = view;
|
*(CEconItemView **)vptr = view;
|
||||||
|
vptr += sizeof(CEconItemView *);
|
||||||
|
*(int *)vptr = 0;
|
||||||
|
#if !defined(WIN32)
|
||||||
|
vptr += sizeof(int);
|
||||||
|
*(float *)vptr = 1.0;
|
||||||
|
#endif
|
||||||
|
|
||||||
int price = 0;
|
int price = 0;
|
||||||
pWrapper->Execute(vstk, &price);
|
pWrapper->Execute(vstk, &price);
|
||||||
|
|||||||
@@ -229,6 +229,56 @@ const char *WeaponIDToAlias(int weaponID)
|
|||||||
#endif
|
#endif
|
||||||
return alias;
|
return alias;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if SOURCE_ENGINE == SE_CSGO && defined(WIN32)
|
||||||
|
void *GetWeaponPriceFunction()
|
||||||
|
{
|
||||||
|
static void *pGetWeaponPriceAddress = NULL;
|
||||||
|
|
||||||
|
if(pGetWeaponPriceAddress == NULL)
|
||||||
|
{
|
||||||
|
void *pAddress = NULL;
|
||||||
|
int offset = 0;
|
||||||
|
int callOffset = 0;
|
||||||
|
const char* byteCheck = NULL;
|
||||||
|
|
||||||
|
if(!g_pGameConf->GetMemSig("GetWeaponPrice", &pAddress) || pAddress == NULL)
|
||||||
|
{
|
||||||
|
g_pSM->LogError(myself, "Failed to get GetWeaponPrice address.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!g_pGameConf->GetOffset("GetWeaponPriceFunc", &offset))
|
||||||
|
{
|
||||||
|
g_pSM->LogError(myself, "Failed to get GetWeaponPriceFunc offset.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
byteCheck = g_pGameConf->GetKeyValue("GetWeaponPriceByteCheck");
|
||||||
|
|
||||||
|
if(byteCheck == NULL)
|
||||||
|
{
|
||||||
|
g_pSM->LogError(myself, "Failed to get GetWeaponPriceByteCheck keyvalue.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t iByte = strtoul(byteCheck, NULL, 16);
|
||||||
|
|
||||||
|
if(iByte != *(uint8_t *)((intptr_t)pAddress + (offset-1)))
|
||||||
|
{
|
||||||
|
g_pSM->LogError(myself, "GetWeaponPrice Byte check failed.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
callOffset = *(uint32_t *)((intptr_t)pAddress + offset);
|
||||||
|
|
||||||
|
pGetWeaponPriceAddress = (void *)((intptr_t)pAddress + offset + callOffset + sizeof(int));
|
||||||
|
}
|
||||||
|
|
||||||
|
return pGetWeaponPriceAddress;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int GetRealWeaponID(int weaponId)
|
int GetRealWeaponID(int weaponId)
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE == SE_CSGO
|
#if SOURCE_ENGINE == SE_CSGO
|
||||||
|
|||||||
@@ -165,4 +165,6 @@ int GetFakeWeaponID(int weaponId);
|
|||||||
|
|
||||||
bool IsValidWeaponID(int weaponId);
|
bool IsValidWeaponID(int weaponId);
|
||||||
|
|
||||||
|
void *GetWeaponPriceFunction();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -96,11 +96,16 @@ MYSQL *Connect(const DatabaseInfo *info, char *error, size_t maxlength)
|
|||||||
MYSQL *mysql = mysql_init(NULL);
|
MYSQL *mysql = mysql_init(NULL);
|
||||||
const char *host = NULL, *socket = NULL;
|
const char *host = NULL, *socket = NULL;
|
||||||
|
|
||||||
|
decltype(info->maxTimeout) timeout = 60;
|
||||||
if (info->maxTimeout > 0)
|
if (info->maxTimeout > 0)
|
||||||
{
|
{
|
||||||
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&(info->maxTimeout));
|
timeout = info->maxTimeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&timeout);
|
||||||
|
mysql_options(mysql, MYSQL_OPT_READ_TIMEOUT, (const char *)&timeout);
|
||||||
|
mysql_options(mysql, MYSQL_OPT_WRITE_TIMEOUT, (const char *)&timeout);
|
||||||
|
|
||||||
/* Have MySQL automatically reconnect if it times out or loses connection.
|
/* Have MySQL automatically reconnect if it times out or loses connection.
|
||||||
* This will prevent "MySQL server has gone away" errors after a while.
|
* This will prevent "MySQL server has gone away" errors after a while.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -219,6 +219,26 @@ bool SDKHooks::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buffer[0] = '\0';
|
||||||
|
if (!gameconfs->LoadGameConfigFile("sdkhooks.games", &g_pGameConf, buffer, sizeof(buffer)))
|
||||||
|
{
|
||||||
|
if (buffer[0])
|
||||||
|
{
|
||||||
|
g_pSM->Format(error, maxlength, "Could not read sdkhooks.games gamedata: %s", buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CUtlVector<IEntityListener *> *entListeners = EntListeners();
|
||||||
|
if (!entListeners)
|
||||||
|
{
|
||||||
|
g_pSM->Format(error, maxlength, "Failed to setup entity listeners");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
entListeners->AddToTail(this);
|
||||||
|
|
||||||
sharesys->AddDependency(myself, "bintools.ext", true, true);
|
sharesys->AddDependency(myself, "bintools.ext", true, true);
|
||||||
sharesys->AddNatives(myself, g_Natives);
|
sharesys->AddNatives(myself, g_Natives);
|
||||||
sharesys->RegisterLibrary(myself, "sdkhooks");
|
sharesys->RegisterLibrary(myself, "sdkhooks");
|
||||||
@@ -237,26 +257,6 @@ bool SDKHooks::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
|||||||
#endif
|
#endif
|
||||||
g_pOnLevelInit = forwards->CreateForward("OnLevelInit", ET_Hook, 2, NULL, Param_String, Param_String);
|
g_pOnLevelInit = forwards->CreateForward("OnLevelInit", ET_Hook, 2, NULL, Param_String, Param_String);
|
||||||
|
|
||||||
buffer[0] = '\0';
|
|
||||||
if (!gameconfs->LoadGameConfigFile("sdkhooks.games", &g_pGameConf, buffer, sizeof(buffer)))
|
|
||||||
{
|
|
||||||
if (buffer[0])
|
|
||||||
{
|
|
||||||
g_pSM->Format(error, maxlength, "Could not read sdkhooks.games gamedata: %s", buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
CUtlVector<IEntityListener *> *entListeners = EntListeners();
|
|
||||||
if (!entListeners)
|
|
||||||
{
|
|
||||||
g_pSM->Format(error, maxlength, "Failed to setup entity listeners");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
entListeners->AddToTail(this);
|
|
||||||
|
|
||||||
SetupHooks();
|
SetupHooks();
|
||||||
|
|
||||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||||
@@ -894,9 +894,6 @@ bool SDKHooks::Hook_LevelInit(char const *pMapName, char const *pMapEntities, ch
|
|||||||
g_pOnLevelInit->PushStringEx(g_szMapEntities, sizeof(g_szMapEntities), SM_PARAM_STRING_COPY, SM_PARAM_COPYBACK);
|
g_pOnLevelInit->PushStringEx(g_szMapEntities, sizeof(g_szMapEntities), SM_PARAM_STRING_COPY, SM_PARAM_COPYBACK);
|
||||||
g_pOnLevelInit->Execute(&result);
|
g_pOnLevelInit->Execute(&result);
|
||||||
|
|
||||||
if(result >= Pl_Handled)
|
|
||||||
RETURN_META_VALUE(MRES_SUPERCEDE, false);
|
|
||||||
|
|
||||||
if(result == Pl_Changed)
|
if(result == Pl_Changed)
|
||||||
RETURN_META_VALUE_NEWPARAMS(MRES_HANDLED, true, &IServerGameDLL::LevelInit, (pMapName, g_szMapEntities, pOldLevel, pLandmarkName, loadGame, background));
|
RETURN_META_VALUE_NEWPARAMS(MRES_HANDLED, true, &IServerGameDLL::LevelInit, (pMapName, g_szMapEntities, pOldLevel, pLandmarkName, loadGame, background));
|
||||||
|
|
||||||
|
|||||||
@@ -80,12 +80,15 @@ TopMenu::~TopMenu()
|
|||||||
delete m_Config.cats[i];
|
delete m_Config.cats[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sweep players */
|
if (m_clients != NULL)
|
||||||
for (size_t i = 0; i <= (size_t)m_max_clients; i++)
|
|
||||||
{
|
{
|
||||||
TearDownClient(&m_clients[i]);
|
/* Sweep players */
|
||||||
|
for (size_t i = 0; i <= (size_t)m_max_clients; i++)
|
||||||
|
{
|
||||||
|
TearDownClient(&m_clients[i]);
|
||||||
|
}
|
||||||
|
free(m_clients);
|
||||||
}
|
}
|
||||||
free(m_clients);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int TopMenu::CalcMemUsage()
|
unsigned int TopMenu::CalcMemUsage()
|
||||||
|
|||||||
@@ -29,13 +29,6 @@
|
|||||||
"windows" "11"
|
"windows" "11"
|
||||||
"linux" "13"
|
"linux" "13"
|
||||||
}
|
}
|
||||||
|
|
||||||
"EntInfo"
|
|
||||||
{
|
|
||||||
"windows" "4"
|
|
||||||
"linux" "4"
|
|
||||||
"mac" "4"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
"Signatures"
|
"Signatures"
|
||||||
@@ -71,13 +64,6 @@
|
|||||||
{
|
{
|
||||||
"windows" "11"
|
"windows" "11"
|
||||||
}
|
}
|
||||||
|
|
||||||
"EntInfo"
|
|
||||||
{
|
|
||||||
"windows" "4"
|
|
||||||
"linux" "4"
|
|
||||||
"mac" "4"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
"Signatures"
|
"Signatures"
|
||||||
@@ -102,5 +88,15 @@
|
|||||||
{
|
{
|
||||||
"UseInvalidUniverseInSteam2IDs" "1"
|
"UseInvalidUniverseInSteam2IDs" "1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"Offsets"
|
||||||
|
{
|
||||||
|
"EntInfo"
|
||||||
|
{
|
||||||
|
"windows" "4"
|
||||||
|
"linux" "4"
|
||||||
|
"mac" "4"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -297,6 +297,10 @@
|
|||||||
{
|
{
|
||||||
"windows" "32"
|
"windows" "32"
|
||||||
}
|
}
|
||||||
|
"PlayerRunCmd"
|
||||||
|
{
|
||||||
|
"windows" "327"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"Signatures"
|
"Signatures"
|
||||||
|
|||||||
@@ -13,6 +13,10 @@
|
|||||||
{
|
{
|
||||||
"csgo"
|
"csgo"
|
||||||
{
|
{
|
||||||
|
"Keys"
|
||||||
|
{
|
||||||
|
"GetWeaponPriceByteCheck" "E9"
|
||||||
|
}
|
||||||
"Offsets"
|
"Offsets"
|
||||||
{
|
{
|
||||||
//Offset of szClassName in CCSWeaponInfo
|
//Offset of szClassName in CCSWeaponInfo
|
||||||
@@ -62,6 +66,15 @@
|
|||||||
"linux" "9"
|
"linux" "9"
|
||||||
"mac" "9"
|
"mac" "9"
|
||||||
}
|
}
|
||||||
|
"GetWeaponPriceFunc"
|
||||||
|
{
|
||||||
|
"windows" "84"
|
||||||
|
}
|
||||||
|
//This is GetWeaponPriceFunc offset -1 (only used by GDC)
|
||||||
|
"GetWeaponPriceFuncGDC"
|
||||||
|
{
|
||||||
|
"windows" "83"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"Signatures"
|
"Signatures"
|
||||||
{
|
{
|
||||||
@@ -143,13 +156,13 @@
|
|||||||
"linux" "@_ZN9CCSPlayer10SetClanTagEPKc"
|
"linux" "@_ZN9CCSPlayer10SetClanTagEPKc"
|
||||||
"mac" "@_ZN9CCSPlayer10SetClanTagEPKc"
|
"mac" "@_ZN9CCSPlayer10SetClanTagEPKc"
|
||||||
}
|
}
|
||||||
//Wild card first 6 bytes since we call it and detour it.
|
//In windows this is CCSPlayer::GetWeaponPrice NOT CCSWeaponInfo::GetWeaponPrice
|
||||||
"GetAttributeInt"
|
"GetWeaponPrice"
|
||||||
{
|
{
|
||||||
"library" "server"
|
"library" "server"
|
||||||
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x83\xEC\x1C\x53\x8B\x5D\x0C\xC7\x44\x24\x04\x00\x00\x00\x00\x56\x8B\xF1\x89\x74\x24\x0C\x57\x8B\x7D\x08\x85\xDB\x74\x2A\x80\x7B\x2A\x2A\x74\x2A\xE8\x2A\x2A\x2A\x2A\x57"
|
"windows" "\x55\x8B\xEC\x8B\xD1\x8B\x4D\x08\x83\xF9\x33\x75\x2A\x83\xBA"
|
||||||
"linux" "@_ZNK16FileWeaponInfo_t15GetAttributeIntEPKcPK13CEconItemView"
|
"linux" "@_ZNK13CCSWeaponInfo14GetWeaponPriceEPK13CEconItemViewif"
|
||||||
"mac" "@_ZNK16FileWeaponInfo_t15GetAttributeIntEPKcPK13CEconItemView"
|
"mac" "@_ZNK13CCSWeaponInfo14GetWeaponPriceEPK13CEconItemViewif"
|
||||||
}
|
}
|
||||||
"SetModelFromClass"
|
"SetModelFromClass"
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public OnPluginStart()
|
|||||||
LoadTranslations("common.phrases");
|
LoadTranslations("common.phrases");
|
||||||
LoadTranslations("basetriggers.phrases");
|
LoadTranslations("basetriggers.phrases");
|
||||||
|
|
||||||
g_Cvar_TriggerShow = CreateConVar("sm_trigger_show", "1", "Display triggers message to all players? (0 off, 1 on, def. 1)", 0, true, 0.0, true, 1.0);
|
g_Cvar_TriggerShow = CreateConVar("sm_trigger_show", "0", "Display triggers message to all players? (0 off, 1 on, def. 0)", 0, true, 0.0, true, 1.0);
|
||||||
g_Cvar_TimeleftInterval = CreateConVar("sm_timeleft_interval", "0.0", "Display timeleft every x seconds. Default 0.", 0, true, 0.0, true, 1800.0);
|
g_Cvar_TimeleftInterval = CreateConVar("sm_timeleft_interval", "0.0", "Display timeleft every x seconds. Default 0.", 0, true, 0.0, true, 1800.0);
|
||||||
g_Cvar_FriendlyFire = FindConVar("mp_friendlyfire");
|
g_Cvar_FriendlyFire = FindConVar("mp_friendlyfire");
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ methodmap ArrayList < Handle {
|
|||||||
public native ArrayList(int blocksize=1, int startsize=0);
|
public native ArrayList(int blocksize=1, int startsize=0);
|
||||||
|
|
||||||
// Clears an array of all entries. This is the same as Resize(0).
|
// Clears an array of all entries. This is the same as Resize(0).
|
||||||
public native void ClearArray();
|
public native void Clear();
|
||||||
|
|
||||||
// Clones an array, returning a new handle with the same size and data.
|
// Clones an array, returning a new handle with the same size and data.
|
||||||
// This should NOT be confused with CloneHandle. This is a completely new
|
// This should NOT be confused with CloneHandle. This is a completely new
|
||||||
|
|||||||
@@ -477,13 +477,13 @@ stock Database SQLite_UseDatabase(const char[] database,
|
|||||||
char[] error,
|
char[] error,
|
||||||
maxlength)
|
maxlength)
|
||||||
{
|
{
|
||||||
new Handle kv, Handle db;
|
Handle kv, db;
|
||||||
|
|
||||||
kv = CreateKeyValues("");
|
kv = CreateKeyValues("");
|
||||||
KvSetString(kv, "driver", "sqlite");
|
KvSetString(kv, "driver", "sqlite");
|
||||||
KvSetString(kv, "database", database);
|
KvSetString(kv, "database", database);
|
||||||
|
|
||||||
db = SQL_ConnectCustom(kv, error, int maxlength, false);
|
db = SQL_ConnectCustom(kv, error, maxlength, false);
|
||||||
|
|
||||||
CloseHandle(kv);
|
CloseHandle(kv);
|
||||||
|
|
||||||
@@ -641,7 +641,7 @@ stock bool SQL_QuoteString(Handle database,
|
|||||||
maxlength,
|
maxlength,
|
||||||
&written=0)
|
&written=0)
|
||||||
{
|
{
|
||||||
return SQL_EscapeString(database, string, buffer, int maxlength, written);
|
return SQL_EscapeString(database, string, buffer, maxlength, written);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -624,3 +624,21 @@ native EntRefToEntIndex(ref);
|
|||||||
*/
|
*/
|
||||||
native MakeCompatEntRef(ref);
|
native MakeCompatEntRef(ref);
|
||||||
|
|
||||||
|
|
||||||
|
enum ClientRangeType
|
||||||
|
{
|
||||||
|
RangeType_Visibility = 0,
|
||||||
|
RangeType_Audibility,
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find clients that are potentially in range of a position.
|
||||||
|
*
|
||||||
|
* @param origin Coordinates from which to test range.
|
||||||
|
* @param rangeType Range type to use for filtering clients.
|
||||||
|
* @param clients Array to which found client indexes will be written.
|
||||||
|
* @param size Maximum size of clients array.
|
||||||
|
* @return Number of client indexes written to clients array.
|
||||||
|
*/
|
||||||
|
native int GetClientsInRange(float origin[3], ClientRangeType rangeType, int[] clients, int size);
|
||||||
|
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ methodmap Menu < Handle
|
|||||||
int[] players = new int[MaxClients];
|
int[] players = new int[MaxClients];
|
||||||
for (int i = 1; i <= MaxClients; i++) {
|
for (int i = 1; i <= MaxClients; i++) {
|
||||||
if (!IsClientInGame(i) || IsFakeClient(i))
|
if (!IsClientInGame(i) || IsFakeClient(i))
|
||||||
continue
|
continue;
|
||||||
players[total++] = i;
|
players[total++] = i;
|
||||||
}
|
}
|
||||||
return this.DisplayVote(players, total, time, flags);
|
return this.DisplayVote(players, total, time, flags);
|
||||||
|
|||||||
@@ -264,7 +264,9 @@ typeset SDKHookCB
|
|||||||
// OnTakeDamagePost
|
// OnTakeDamagePost
|
||||||
// OnTakeDamageAlivePost
|
// OnTakeDamageAlivePost
|
||||||
function void (int victim, int attacker, int inflictor, float damage, int damagetype);
|
function void (int victim, int attacker, int inflictor, float damage, int damagetype);
|
||||||
function void (int victim, int attacker, int inflictor, float damage, int damagetype, const float damageForce[3], const float damagePosition[3]);
|
function void (int victim, int attacker, int inflictor, float damage, int damagetype, int weapon, const float damageForce[3], const float damagePosition[3]);
|
||||||
|
function void (int victim, int attacker, int inflictor, float damage, int damagetype, int weapon,
|
||||||
|
const float damageForce[3], const float damagePosition[3], int damagecustom);
|
||||||
|
|
||||||
// FireBulletsPost
|
// FireBulletsPost
|
||||||
function void (int client, int shots, const char[] weaponname);
|
function void (int client, int shots, const char[] weaponname);
|
||||||
|
|||||||
+10
-1
@@ -107,7 +107,7 @@ enum TFCond
|
|||||||
TFCond_RegenBuffed,
|
TFCond_RegenBuffed,
|
||||||
TFCond_MarkedForDeath,
|
TFCond_MarkedForDeath,
|
||||||
TFCond_NoHealingDamageBuff,
|
TFCond_NoHealingDamageBuff,
|
||||||
TFCond_SpeedBuffAlly, //32
|
TFCond_SpeedBuffAlly, // 32
|
||||||
TFCond_HalloweenCritCandy,
|
TFCond_HalloweenCritCandy,
|
||||||
TFCond_CritCanteen,
|
TFCond_CritCanteen,
|
||||||
TFCond_CritDemoCharge,
|
TFCond_CritDemoCharge,
|
||||||
@@ -164,6 +164,15 @@ enum TFCond
|
|||||||
TFCond_SwimmingCurse,
|
TFCond_SwimmingCurse,
|
||||||
TFCond_HalloweenKartNoTurn,
|
TFCond_HalloweenKartNoTurn,
|
||||||
TFCond_HalloweenKartCage,
|
TFCond_HalloweenKartCage,
|
||||||
|
TFCond_HasRune,
|
||||||
|
TFCond_RuneStrength,
|
||||||
|
TFCond_RuneHaste,
|
||||||
|
TFCond_RuneRegen,
|
||||||
|
TFCond_RuneResist,
|
||||||
|
TFCond_RuneVampire,
|
||||||
|
TFCond_RuneWarlock,
|
||||||
|
TFCond_RunePrecision, // 96
|
||||||
|
TFCond_RuneAgility,
|
||||||
};
|
};
|
||||||
|
|
||||||
const Float:TFCondDuration_Infinite = -1.0;
|
const Float:TFCondDuration_Infinite = -1.0;
|
||||||
|
|||||||
@@ -151,19 +151,39 @@ native Handle:StartMessageEx(UserMsg:msg, clients[], numClients, flags=0);
|
|||||||
native EndMessage();
|
native EndMessage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a message is hooked
|
* Hook function types for user messages.
|
||||||
*
|
*/
|
||||||
* @param msg_id Message index.
|
typeset MsgHook
|
||||||
* @param msg Handle to the input bit buffer or protobuf.
|
{
|
||||||
* @param players Array containing player indexes.
|
/**
|
||||||
* @param playersNum Number of players in the array.
|
* Called when a bit buffer based usermessage is hooked
|
||||||
* @param reliable True if message is reliable, false otherwise.
|
*
|
||||||
* @param init True if message is an initmsg, false otherwise.
|
* @param msg_id Message index.
|
||||||
* @return Ignored for normal hooks. For intercept hooks, Plugin_Handled
|
* @param msg Handle to the input bit buffer.
|
||||||
* blocks the message from being sent, and Plugin_Continue
|
* @param players Array containing player indexes.
|
||||||
* resumes normal functionality.
|
* @param playersNum Number of players in the array.
|
||||||
*/
|
* @param reliable True if message is reliable, false otherwise.
|
||||||
typedef MsgHook = function Action (UserMsg msg_id, Handle msg, const int[] players, int playersNum, bool reliable, bool init);
|
* @param init True if message is an initmsg, false otherwise.
|
||||||
|
* @return Ignored for normal hooks. For intercept hooks, Plugin_Handled
|
||||||
|
* blocks the message from being sent, and Plugin_Continue
|
||||||
|
* resumes normal functionality.
|
||||||
|
*/
|
||||||
|
function Action (UserMsg msg_id, BfRead msg, const int[] players, int playersNum, bool reliable, bool init);
|
||||||
|
/**
|
||||||
|
* Called when a protobuf based usermessage is hooked
|
||||||
|
*
|
||||||
|
* @param msg_id Message index.
|
||||||
|
* @param msg Handle to the input protobuf.
|
||||||
|
* @param players Array containing player indexes.
|
||||||
|
* @param playersNum Number of players in the array.
|
||||||
|
* @param reliable True if message is reliable, false otherwise.
|
||||||
|
* @param init True if message is an initmsg, false otherwise.
|
||||||
|
* @return Ignored for normal hooks. For intercept hooks, Plugin_Handled
|
||||||
|
* blocks the message from being sent, and Plugin_Continue
|
||||||
|
* resumes normal functionality.
|
||||||
|
*/
|
||||||
|
function Action (UserMsg msg_id, Protobuf msg, const int[] players, int playersNum, bool reliable, bool init);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a message hook has completed.
|
* Called when a message hook has completed.
|
||||||
|
|||||||
+2
-1
@@ -63,7 +63,8 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
|
|||||||
|| StrEqual(game, "left4dead2", false)
|
|| StrEqual(game, "left4dead2", false)
|
||||||
|| StrEqual(game, "garrysmod", false)
|
|| StrEqual(game, "garrysmod", false)
|
||||||
|| StrEqual(game, "swarm", false)
|
|| StrEqual(game, "swarm", false)
|
||||||
|| StrEqual(game, "dota", false))
|
|| StrEqual(game, "dota", false)
|
||||||
|
|| GetEngineVersion() == Engine_Insurgency)
|
||||||
{
|
{
|
||||||
strcopy(error, err_max, "Nextmap is incompatible with this game");
|
strcopy(error, err_max, "Nextmap is incompatible with this game");
|
||||||
return APLRes_SilentFailure;
|
return APLRes_SilentFailure;
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
1.7.0-dev
|
1.7.0
|
||||||
|
|||||||
@@ -58,6 +58,23 @@ CDetour *CDetourManager::CreateDetour(void *callbackfunction, void **trampoline,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CDetour *CDetourManager::CreateDetour(void *callbackfunction, void **trampoline, void *pAddress)
|
||||||
|
{
|
||||||
|
CDetour *detour = new CDetour(callbackfunction, trampoline, pAddress);
|
||||||
|
if (detour)
|
||||||
|
{
|
||||||
|
if (!detour->Init(spengine, gameconf))
|
||||||
|
{
|
||||||
|
delete detour;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return detour;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
CDetour::CDetour(void *callbackfunction, void **trampoline, const char *signame)
|
CDetour::CDetour(void *callbackfunction, void **trampoline, const char *signame)
|
||||||
{
|
{
|
||||||
enabled = false;
|
enabled = false;
|
||||||
@@ -71,6 +88,19 @@ CDetour::CDetour(void *callbackfunction, void **trampoline, const char *signame)
|
|||||||
this->trampoline = trampoline;
|
this->trampoline = trampoline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CDetour::CDetour(void*callbackfunction, void **trampoline, void *pAddress)
|
||||||
|
{
|
||||||
|
enabled = false;
|
||||||
|
detoured = false;
|
||||||
|
detour_address = pAddress;
|
||||||
|
detour_trampoline = NULL;
|
||||||
|
this->signame = NULL;
|
||||||
|
this->detour_callback = callbackfunction;
|
||||||
|
spengine = NULL;
|
||||||
|
gameconf = NULL;
|
||||||
|
this->trampoline = trampoline;
|
||||||
|
}
|
||||||
|
|
||||||
bool CDetour::Init(ISourcePawnEngine *spengine, IGameConfig *gameconf)
|
bool CDetour::Init(ISourcePawnEngine *spengine, IGameConfig *gameconf)
|
||||||
{
|
{
|
||||||
this->spengine = spengine;
|
this->spengine = spengine;
|
||||||
@@ -100,11 +130,16 @@ bool CDetour::IsEnabled()
|
|||||||
|
|
||||||
bool CDetour::CreateDetour()
|
bool CDetour::CreateDetour()
|
||||||
{
|
{
|
||||||
if (!gameconf->GetMemSig(signame, &detour_address))
|
if (signame && !gameconf->GetMemSig(signame, &detour_address))
|
||||||
{
|
{
|
||||||
g_pSM->LogError(myself, "Could not locate %s - Disabling detour", signame);
|
g_pSM->LogError(myself, "Could not locate %s - Disabling detour", signame);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else if(!detour_address)
|
||||||
|
{
|
||||||
|
g_pSM->LogError(myself, "Invalid detour address passed - Disabling detour to prevent crashes");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!detour_address)
|
if (!detour_address)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
CDetour(void *callbackfunction, void **trampoline, const char *signame);
|
CDetour(void *callbackfunction, void **trampoline, const char *signame);
|
||||||
|
CDetour(void*callbackfunction, void **trampoline, void *pAddress);
|
||||||
|
|
||||||
bool Init(ISourcePawnEngine *spengine, IGameConfig *gameconf);
|
bool Init(ISourcePawnEngine *spengine, IGameConfig *gameconf);
|
||||||
private:
|
private:
|
||||||
@@ -239,6 +240,7 @@ public:
|
|||||||
* Note we changed the netadr_s reference into a void* to avoid needing to define the type
|
* Note we changed the netadr_s reference into a void* to avoid needing to define the type
|
||||||
*/
|
*/
|
||||||
static CDetour *CreateDetour(void *callbackfunction, void **trampoline, const char *signame);
|
static CDetour *CreateDetour(void *callbackfunction, void **trampoline, const char *signame);
|
||||||
|
static CDetour *CreateDetour(void *callbackfunction, void **trampoline, void *pAddress);
|
||||||
|
|
||||||
friend class CBlocker;
|
friend class CBlocker;
|
||||||
friend class CDetour;
|
friend class CDetour;
|
||||||
|
|||||||
@@ -174,6 +174,11 @@ class Thread
|
|||||||
if (!initialized_)
|
if (!initialized_)
|
||||||
delete data;
|
delete data;
|
||||||
}
|
}
|
||||||
|
~Thread() {
|
||||||
|
if (!Succeeded())
|
||||||
|
return;
|
||||||
|
pthread_detach(thread_);
|
||||||
|
}
|
||||||
|
|
||||||
bool Succeeded() const {
|
bool Succeeded() const {
|
||||||
return initialized_;
|
return initialized_;
|
||||||
@@ -183,6 +188,7 @@ class Thread
|
|||||||
if (!Succeeded())
|
if (!Succeeded())
|
||||||
return;
|
return;
|
||||||
pthread_join(thread_, NULL);
|
pthread_join(thread_, NULL);
|
||||||
|
initialized_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
+2
-2
@@ -3,7 +3,7 @@ joys of buildbot, part 2: buildbot and the very lonely square-shaped duck
|
|||||||
joys of buildbot, part 3: an accidental event proves troublesome for a psychic fish
|
joys of buildbot, part 3: an accidental event proves troublesome for a psychic fish
|
||||||
joys of buildbot, part 4: a transient mummy is perplexed by a broken wand
|
joys of buildbot, part 4: a transient mummy is perplexed by a broken wand
|
||||||
buildbot has horrible blugs
|
buildbot has horrible blugs
|
||||||
i am the very model of a modern major general
|
I am the very model of a modern major general
|
||||||
It's no wonder the build always falls over when we call it pushing.
|
It's no wonder the build always falls over when we call it pushing.
|
||||||
h
|
h
|
||||||
i
|
i
|
||||||
@@ -21,7 +21,7 @@ Invaders' blood marches through my veins, like GIANT RADIOACTIVE RUBBER PANTS!
|
|||||||
This file sure has gotten big.
|
This file sure has gotten big.
|
||||||
sawce is rukia and loves anime, sushi, and macs
|
sawce is rukia and loves anime, sushi, and macs
|
||||||
ur
|
ur
|
||||||
she calls it a mayonegg
|
oh, it's so cute. she calls it a mayonegg
|
||||||
not me
|
not me
|
||||||
javaliabuf64k..
|
javaliabuf64k..
|
||||||
"line 29" rhymes... kinda. <-- CONFIRMED
|
"line 29" rhymes... kinda. <-- CONFIRMED
|
||||||
|
|||||||
@@ -79,10 +79,6 @@ typedef struct s_arginfo { /* function argument info */
|
|||||||
unsigned char hasdefault; /* bit0: is there a default value? bit6: "tagof"; bit7: "sizeof" */
|
unsigned char hasdefault; /* bit0: is there a default value? bit6: "tagof"; bit7: "sizeof" */
|
||||||
union {
|
union {
|
||||||
cell val; /* default value */
|
cell val; /* default value */
|
||||||
struct {
|
|
||||||
char *symname; /* name of another symbol */
|
|
||||||
short level; /* indirection level for that symbol */
|
|
||||||
} size; /* used for "sizeof" default value */
|
|
||||||
struct {
|
struct {
|
||||||
cell *data; /* values of default array */
|
cell *data; /* values of default array */
|
||||||
int size; /* complete length of default array */
|
int size; /* complete length of default array */
|
||||||
@@ -230,10 +226,6 @@ typedef struct s_symbol {
|
|||||||
|
|
||||||
#define flgDEPRECATED 0x01 /* symbol is deprecated (avoid use) */
|
#define flgDEPRECATED 0x01 /* symbol is deprecated (avoid use) */
|
||||||
|
|
||||||
#define uCOUNTOF 0x20 /* set in the "hasdefault" field of the arginfo struct */
|
|
||||||
#define uTAGOF 0x40 /* set in the "hasdefault" field of the arginfo struct */
|
|
||||||
#define uSIZEOF 0x80 /* set in the "hasdefault" field of the arginfo struct */
|
|
||||||
|
|
||||||
#define uMAINFUNC "main"
|
#define uMAINFUNC "main"
|
||||||
#define uENTRYFUNC "entry"
|
#define uENTRYFUNC "entry"
|
||||||
|
|
||||||
@@ -487,7 +479,6 @@ enum TokenKind {
|
|||||||
tpDEFINE,
|
tpDEFINE,
|
||||||
tpELSE, /* #else */
|
tpELSE, /* #else */
|
||||||
tpELSEIF, /* #elseif */
|
tpELSEIF, /* #elseif */
|
||||||
tpEMIT,
|
|
||||||
tpENDIF,
|
tpENDIF,
|
||||||
tpENDINPUT,
|
tpENDINPUT,
|
||||||
tpENDSCRPT,
|
tpENDSCRPT,
|
||||||
|
|||||||
+31
-94
@@ -1445,12 +1445,25 @@ static void dodecl(const token_t *tok)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int fpublic = (tok->id == tPUBLIC);
|
int fpublic = FALSE, fstock = FALSE, fstatic = FALSE, fconst = FALSE;
|
||||||
int fstock = (tok->id == tSTOCK);
|
switch (tok->id) {
|
||||||
int fstatic = (tok->id == tSTATIC);
|
case tPUBLIC:
|
||||||
|
fpublic = TRUE;
|
||||||
|
break;
|
||||||
|
case tSTOCK:
|
||||||
|
fstock = TRUE;
|
||||||
|
if (matchtoken(tSTATIC))
|
||||||
|
fstatic = TRUE;
|
||||||
|
break;
|
||||||
|
case tSTATIC:
|
||||||
|
fstatic = TRUE;
|
||||||
|
|
||||||
if (fstatic && matchtoken(tSTOCK))
|
// For compatibility, we must include this case. Though "stock" should
|
||||||
fstock = TRUE;
|
// come first.
|
||||||
|
if (matchtoken(tSTOCK))
|
||||||
|
fstock = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
int flags = DECLFLAG_MAYBE_FUNCTION | DECLFLAG_VARIABLE | DECLFLAG_ENUMROOT;
|
int flags = DECLFLAG_MAYBE_FUNCTION | DECLFLAG_VARIABLE | DECLFLAG_ENUMROOT;
|
||||||
if (tok->id == tNEW)
|
if (tok->id == tNEW)
|
||||||
@@ -1462,7 +1475,13 @@ static void dodecl(const token_t *tok)
|
|||||||
decl.type.tag = 0;
|
decl.type.tag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!decl.opertok && (tok->id == tNEW || decl.type.has_postdims || !lexpeek('('))) {
|
// Hacky bag o' hints as to whether this is a variable decl.
|
||||||
|
bool probablyVariable = tok->id == tNEW ||
|
||||||
|
decl.type.has_postdims ||
|
||||||
|
!lexpeek('(') ||
|
||||||
|
((decl.type.usage & uCONST) == uCONST);
|
||||||
|
|
||||||
|
if (!decl.opertok && probablyVariable) {
|
||||||
if (tok->id == tNEW && decl.type.is_new)
|
if (tok->id == tNEW && decl.type.is_new)
|
||||||
error(143);
|
error(143);
|
||||||
if (decl.type.tag & STRUCTTAG) {
|
if (decl.type.tag & STRUCTTAG) {
|
||||||
@@ -4628,9 +4647,9 @@ static void decl_enum(int vclass)
|
|||||||
char *str;
|
char *str;
|
||||||
int tag,explicittag;
|
int tag,explicittag;
|
||||||
cell increment,multiplier;
|
cell increment,multiplier;
|
||||||
constvalue *enumroot;
|
|
||||||
LayoutSpec spec;
|
LayoutSpec spec;
|
||||||
symbol *enumsym = nullptr;
|
symbol *enumsym = nullptr;
|
||||||
|
constvalue *enumroot = nullptr;
|
||||||
|
|
||||||
/* get an explicit tag, if any (we need to remember whether an explicit
|
/* get an explicit tag, if any (we need to remember whether an explicit
|
||||||
* tag was passed, even if that explicit tag was "_:", so we cannot call
|
* tag was passed, even if that explicit tag was "_:", so we cannot call
|
||||||
@@ -5515,7 +5534,7 @@ static int newfunc(declinfo_t *decl, const int *thistag, int fpublic, int fstati
|
|||||||
// Check that return tags match.
|
// Check that return tags match.
|
||||||
if ((sym->usage & uPROTOTYPED) && !compare_tag(sym->tag, decl->type.tag)) {
|
if ((sym->usage & uPROTOTYPED) && !compare_tag(sym->tag, decl->type.tag)) {
|
||||||
int old_fline = fline;
|
int old_fline = fline;
|
||||||
fline = sym->lnumber;
|
fline = funcline;
|
||||||
error(25);
|
error(25);
|
||||||
fline = old_fline;
|
fline = old_fline;
|
||||||
}
|
}
|
||||||
@@ -5593,12 +5612,7 @@ static int argcompare(arginfo *a1,arginfo *a2)
|
|||||||
* Pawn currently does not forbid them) */
|
* Pawn currently does not forbid them) */
|
||||||
} else {
|
} else {
|
||||||
if (result) {
|
if (result) {
|
||||||
if ((a1->hasdefault & uSIZEOF)!=0 || (a1->hasdefault & uTAGOF)!=0 || (a1->hasdefault & uCOUNTOF)!=0)
|
result= a1->defvalue.val==a2->defvalue.val;
|
||||||
result= a1->hasdefault==a2->hasdefault
|
|
||||||
&& strcmp(a1->defvalue.size.symname,a2->defvalue.size.symname)==0
|
|
||||||
&& a1->defvalue.size.level==a2->defvalue.size.level;
|
|
||||||
else
|
|
||||||
result= a1->defvalue.val==a2->defvalue.val;
|
|
||||||
} /* if */
|
} /* if */
|
||||||
} /* if */
|
} /* if */
|
||||||
if (result)
|
if (result)
|
||||||
@@ -5735,9 +5749,6 @@ static int declargs(symbol *sym, int chkshadow, const int *thistag)
|
|||||||
/* may need to free default array argument and the tag list */
|
/* may need to free default array argument and the tag list */
|
||||||
if (arg.ident==iREFARRAY && arg.hasdefault)
|
if (arg.ident==iREFARRAY && arg.hasdefault)
|
||||||
free(arg.defvalue.array.data);
|
free(arg.defvalue.array.data);
|
||||||
else if ((arg.ident==iVARIABLE
|
|
||||||
&& ((arg.hasdefault & uSIZEOF)!=0 || (arg.hasdefault & uTAGOF)!=0)) || (arg.hasdefault & uCOUNTOF)!=0)
|
|
||||||
free(arg.defvalue.size.symname);
|
|
||||||
free(arg.tags);
|
free(arg.tags);
|
||||||
} /* if */
|
} /* if */
|
||||||
argcnt++;
|
argcnt++;
|
||||||
@@ -5745,47 +5756,6 @@ static int declargs(symbol *sym, int chkshadow, const int *thistag)
|
|||||||
/* if the next token is not ",", it should be ")" */
|
/* if the next token is not ",", it should be ")" */
|
||||||
needtoken(')');
|
needtoken(')');
|
||||||
} /* if */
|
} /* if */
|
||||||
/* resolve any "sizeof" arguments (now that all arguments are known) */
|
|
||||||
assert(sym->dim.arglist!=NULL);
|
|
||||||
arglist=sym->dim.arglist;
|
|
||||||
for (idx=0; idx<argcnt && arglist[idx].ident!=0; idx++) {
|
|
||||||
if ((arglist[idx].hasdefault & uSIZEOF)!=0
|
|
||||||
|| (arglist[idx].hasdefault & uTAGOF)!=0
|
|
||||||
|| (arglist[idx].hasdefault & uCOUNTOF)!=0) {
|
|
||||||
int altidx;
|
|
||||||
/* Find the argument with the name mentioned after the "sizeof". Note
|
|
||||||
* that we cannot use findloc here because we need the arginfo struct,
|
|
||||||
* not the symbol.
|
|
||||||
*/
|
|
||||||
ptr=arglist[idx].defvalue.size.symname;
|
|
||||||
assert(ptr!=NULL);
|
|
||||||
for (altidx=0; altidx<argcnt && strcmp(ptr,arglist[altidx].name)!=0; altidx++)
|
|
||||||
/* nothing */;
|
|
||||||
if (altidx>=argcnt) {
|
|
||||||
error(17,ptr); /* undefined symbol */
|
|
||||||
} else {
|
|
||||||
assert(arglist[idx].defvalue.size.symname!=NULL);
|
|
||||||
/* check the level against the number of dimensions */
|
|
||||||
if (arglist[idx].defvalue.size.level>0
|
|
||||||
&& arglist[idx].defvalue.size.level>=arglist[altidx].numdim)
|
|
||||||
error(28,arglist[idx].name); /* invalid subscript */
|
|
||||||
/* check the type of the argument whose size to take; for a iVARIABLE
|
|
||||||
* or a iREFERENCE, this is always 1 (so the code is redundant)
|
|
||||||
*/
|
|
||||||
assert(arglist[altidx].ident!=iVARARGS);
|
|
||||||
if (arglist[altidx].ident!=iREFARRAY
|
|
||||||
&& (((arglist[idx].hasdefault & uSIZEOF)!=0)
|
|
||||||
|| (arglist[idx].hasdefault & uCOUNTOF)!=0)) {
|
|
||||||
if ((arglist[idx].hasdefault & uTAGOF)!=0) {
|
|
||||||
error(81,arglist[idx].name); /* cannot take "tagof" an indexed array */
|
|
||||||
} else {
|
|
||||||
assert(arglist[altidx].ident==iVARIABLE || arglist[altidx].ident==iREFERENCE);
|
|
||||||
error(223,ptr); /* redundant sizeof */
|
|
||||||
} /* if */
|
|
||||||
} /* if */
|
|
||||||
} /* if */
|
|
||||||
} /* if */
|
|
||||||
} /* for */
|
|
||||||
|
|
||||||
sym->usage|=uPROTOTYPED;
|
sym->usage|=uPROTOTYPED;
|
||||||
errorset(sRESET,0); /* reset error flag (clear the "panic mode")*/
|
errorset(sRESET,0); /* reset error flag (clear the "panic mode")*/
|
||||||
@@ -5883,42 +5853,9 @@ static void doarg(declinfo_t *decl, int offset, int fpublic, int chkshadow, argi
|
|||||||
unsigned char size_tag_token;
|
unsigned char size_tag_token;
|
||||||
assert(type->ident==iVARIABLE || type->ident==iREFERENCE);
|
assert(type->ident==iVARIABLE || type->ident==iREFERENCE);
|
||||||
arg->hasdefault=TRUE; /* argument has a default value */
|
arg->hasdefault=TRUE; /* argument has a default value */
|
||||||
size_tag_token=(unsigned char)(matchtoken(tSIZEOF) ? uSIZEOF : 0);
|
exprconst(&arg->defvalue.val,&arg->defvalue_tag,NULL);
|
||||||
if (size_tag_token==0)
|
assert(type->numtags <= 1);
|
||||||
size_tag_token=(unsigned char)(matchtoken(tTAGOF) ? uTAGOF : 0);
|
matchtag(type->tags[0], arg->defvalue_tag, TRUE);
|
||||||
if (size_tag_token==0)
|
|
||||||
size_tag_token=(unsigned char)(matchtoken(tCELLSOF) ? uCOUNTOF : 0);
|
|
||||||
if (size_tag_token!=0) {
|
|
||||||
int paranthese;
|
|
||||||
if (type->ident==iREFERENCE)
|
|
||||||
error(66, decl->name); /* argument may not be a reference */
|
|
||||||
paranthese=0;
|
|
||||||
while (matchtoken('('))
|
|
||||||
paranthese++;
|
|
||||||
if (needtoken(tSYMBOL)) {
|
|
||||||
/* save the name of the argument whose size id to take */
|
|
||||||
char *name;
|
|
||||||
cell val;
|
|
||||||
tokeninfo(&val,&name);
|
|
||||||
if ((arg->defvalue.size.symname=duplicatestring(name)) == NULL)
|
|
||||||
error(FATAL_ERROR_OOM); /* insufficient memory */
|
|
||||||
arg->defvalue.size.level=0;
|
|
||||||
if (size_tag_token==uSIZEOF || size_tag_token==uCOUNTOF) {
|
|
||||||
while (matchtoken('[')) {
|
|
||||||
arg->defvalue.size.level+=(short)1;
|
|
||||||
needtoken(']');
|
|
||||||
} /* while */
|
|
||||||
} /* if */
|
|
||||||
if (type->ident==iVARIABLE) /* make sure we set this only if not a reference */
|
|
||||||
arg->hasdefault |= size_tag_token; /* uSIZEOF or uTAGOF */
|
|
||||||
} /* if */
|
|
||||||
while (paranthese--)
|
|
||||||
needtoken(')');
|
|
||||||
} else {
|
|
||||||
exprconst(&arg->defvalue.val,&arg->defvalue_tag,NULL);
|
|
||||||
assert(type->numtags > 0);
|
|
||||||
matchtag(type->tags[0], arg->defvalue_tag, TRUE);
|
|
||||||
} /* if */
|
|
||||||
} /* if */
|
} /* if */
|
||||||
} /* if */
|
} /* if */
|
||||||
arg->ident=(char)type->ident;
|
arg->ident=(char)type->ident;
|
||||||
|
|||||||
+1
-128
@@ -1036,10 +1036,6 @@ static int command(void)
|
|||||||
} /* if */
|
} /* if */
|
||||||
if (!cp_set(name))
|
if (!cp_set(name))
|
||||||
error(FATAL_ERROR_NO_CODEPAGE);
|
error(FATAL_ERROR_NO_CODEPAGE);
|
||||||
} else if (strcmp(str,"compress")==0) {
|
|
||||||
cell val;
|
|
||||||
preproc_expr(&val,NULL);
|
|
||||||
sc_compress=(int)val; /* switch code packing on/off */
|
|
||||||
} else if (strcmp(str,"ctrlchar")==0) {
|
} else if (strcmp(str,"ctrlchar")==0) {
|
||||||
while (*lptr<=' ' && *lptr!='\0')
|
while (*lptr<=' ' && *lptr!='\0')
|
||||||
lptr++;
|
lptr++;
|
||||||
@@ -1059,70 +1055,6 @@ static int command(void)
|
|||||||
lptr=(unsigned char*)strchr((char*)lptr,'\0'); /* skip to end (ignore "extra characters on line") */
|
lptr=(unsigned char*)strchr((char*)lptr,'\0'); /* skip to end (ignore "extra characters on line") */
|
||||||
} else if (strcmp(str,"dynamic")==0) {
|
} else if (strcmp(str,"dynamic")==0) {
|
||||||
preproc_expr(&pc_stksize,NULL);
|
preproc_expr(&pc_stksize,NULL);
|
||||||
} else if (!strcmp(str,"library")
|
|
||||||
||!strcmp(str,"reqclass")
|
|
||||||
||!strcmp(str,"loadlib")
|
|
||||||
||!strcmp(str,"explib")
|
|
||||||
||!strcmp(str,"expclass")
|
|
||||||
||!strcmp(str,"defclasslib")) {
|
|
||||||
char name[sNAMEMAX+1],sname[sNAMEMAX+1];
|
|
||||||
const char *prefix="";
|
|
||||||
sname[0]='\0';
|
|
||||||
sname[1]='\0';
|
|
||||||
if (!strcmp(str,"library"))
|
|
||||||
prefix="??li_";
|
|
||||||
else if (!strcmp(str,"reqclass"))
|
|
||||||
prefix="??rc_";
|
|
||||||
else if (!strcmp(str,"loadlib"))
|
|
||||||
prefix="??f_";
|
|
||||||
else if (!strcmp(str,"explib"))
|
|
||||||
prefix="??el_";
|
|
||||||
else if (!strcmp(str,"expclass"))
|
|
||||||
prefix="??ec_";
|
|
||||||
else if (!strcmp(str,"defclasslib"))
|
|
||||||
prefix="??d_";
|
|
||||||
while (*lptr<=' ' && *lptr!='\0')
|
|
||||||
lptr++;
|
|
||||||
if (*lptr=='"') {
|
|
||||||
lptr=getstring((unsigned char*)name,sizeof name,lptr);
|
|
||||||
} else {
|
|
||||||
int i;
|
|
||||||
for (i=0; i<sizeof name && (alphanum(*lptr) || *lptr=='-'); i++,lptr++)
|
|
||||||
name[i]=*lptr;
|
|
||||||
name[i]='\0';
|
|
||||||
if (!strncmp(str,"exp",3) || !strncmp(str,"def",3)) {
|
|
||||||
while (*lptr && isspace(*lptr))
|
|
||||||
lptr++;
|
|
||||||
for (i=1; i<sizeof sname && alphanum(*lptr); i++,lptr++)
|
|
||||||
sname[i]=*lptr;
|
|
||||||
sname[i]='\0';
|
|
||||||
if (!sname[1]) {
|
|
||||||
error(45);
|
|
||||||
} else {
|
|
||||||
sname[0]='_';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} /* if */
|
|
||||||
if (strlen(name)==0) {
|
|
||||||
curlibrary=NULL;
|
|
||||||
} else if (strcmp(name,"-")==0) {
|
|
||||||
pc_addlibtable=FALSE;
|
|
||||||
} else {
|
|
||||||
/* add the name if it does not yet exist in the table */
|
|
||||||
char newname[sNAMEMAX+1];
|
|
||||||
if (strlen(name)+strlen(prefix)+strlen(sname)<=sNAMEMAX) {
|
|
||||||
strcpy(newname,prefix);
|
|
||||||
strcat(newname,name);
|
|
||||||
strcat(newname,sname);
|
|
||||||
if (find_constval(&libname_tab,newname,0)==NULL) {
|
|
||||||
if (!strcmp(str,"library") || !strcmp(str,"reqclass")) {
|
|
||||||
curlibrary=append_constval(&libname_tab,newname,1,0);
|
|
||||||
} else {
|
|
||||||
append_constval(&libname_tab,newname,1,0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} /* if */
|
|
||||||
} else if (strcmp(str,"rational")==0) {
|
} else if (strcmp(str,"rational")==0) {
|
||||||
char name[sNAMEMAX+1];
|
char name[sNAMEMAX+1];
|
||||||
cell digits=0;
|
cell digits=0;
|
||||||
@@ -1222,62 +1154,6 @@ static int command(void)
|
|||||||
inpf=NULL;
|
inpf=NULL;
|
||||||
} /* if */
|
} /* if */
|
||||||
break;
|
break;
|
||||||
#if !defined NOEMIT
|
|
||||||
case tpEMIT: {
|
|
||||||
/* write opcode to output file */
|
|
||||||
char name[40];
|
|
||||||
int i;
|
|
||||||
while (*lptr<=' ' && *lptr!='\0')
|
|
||||||
lptr++;
|
|
||||||
for (i=0; i<40 && (isalpha(*lptr) || *lptr=='.'); i++,lptr++)
|
|
||||||
name[i]=(char)tolower(*lptr);
|
|
||||||
name[i]='\0';
|
|
||||||
stgwrite("\t");
|
|
||||||
stgwrite(name);
|
|
||||||
stgwrite(" ");
|
|
||||||
code_idx+=opcodes(1);
|
|
||||||
/* write parameter (if any) */
|
|
||||||
while (*lptr<=' ' && *lptr!='\0')
|
|
||||||
lptr++;
|
|
||||||
if (*lptr!='\0') {
|
|
||||||
symbol *sym;
|
|
||||||
tok=lex(&val,&str);
|
|
||||||
switch (tok) {
|
|
||||||
case tNUMBER:
|
|
||||||
case tRATIONAL:
|
|
||||||
outval(val,FALSE);
|
|
||||||
code_idx+=opargs(1);
|
|
||||||
break;
|
|
||||||
case tSYMBOL:
|
|
||||||
sym=findloc(str);
|
|
||||||
if (sym==NULL)
|
|
||||||
sym=findglb(str,sSTATEVAR);
|
|
||||||
if (sym==NULL || (sym->ident!=iFUNCTN && sym->ident!=iREFFUNC && (sym->usage & uDEFINE)==0)) {
|
|
||||||
error(17,str); /* undefined symbol */
|
|
||||||
} else {
|
|
||||||
outval(sym->addr,FALSE);
|
|
||||||
/* mark symbol as "used", unknown whether for read or write */
|
|
||||||
markusage(sym,uREAD | uWRITTEN);
|
|
||||||
code_idx+=opargs(1);
|
|
||||||
} /* if */
|
|
||||||
break;
|
|
||||||
default: {
|
|
||||||
char s2[20];
|
|
||||||
extern const char *sc_tokens[];/* forward declaration */
|
|
||||||
if (tok<256)
|
|
||||||
sprintf(s2,"%c",(char)tok);
|
|
||||||
else
|
|
||||||
strcpy(s2,sc_tokens[tok-tFIRST]);
|
|
||||||
error(1,sc_tokens[tSYMBOL-tFIRST],s2);
|
|
||||||
break;
|
|
||||||
} /* case */
|
|
||||||
} /* switch */
|
|
||||||
} /* if */
|
|
||||||
stgwrite("\n");
|
|
||||||
check_empty(lptr);
|
|
||||||
break;
|
|
||||||
} /* case */
|
|
||||||
#endif
|
|
||||||
#if !defined NO_DEFINE
|
#if !defined NO_DEFINE
|
||||||
case tpDEFINE: {
|
case tpDEFINE: {
|
||||||
ret=CMD_DEFINE;
|
ret=CMD_DEFINE;
|
||||||
@@ -2047,7 +1923,7 @@ const char *sc_tokens[] = {
|
|||||||
"volatile",
|
"volatile",
|
||||||
"while",
|
"while",
|
||||||
"with",
|
"with",
|
||||||
"#assert", "#define", "#else", "#elseif", "#emit", "#endif", "#endinput",
|
"#assert", "#define", "#else", "#elseif", "#endif", "#endinput",
|
||||||
"#endscript", "#error", "#file", "#if", "#include", "#line", "#pragma",
|
"#endscript", "#error", "#file", "#if", "#include", "#line", "#pragma",
|
||||||
"#tryinclude", "#undef",
|
"#tryinclude", "#undef",
|
||||||
";", ";", "-integer value-", "-rational value-", "-identifier-",
|
";", ";", "-integer value-", "-rational value-", "-identifier-",
|
||||||
@@ -2858,9 +2734,6 @@ static void free_symbol(symbol *sym)
|
|||||||
for (arg=sym->dim.arglist; arg->ident!=0; arg++) {
|
for (arg=sym->dim.arglist; arg->ident!=0; arg++) {
|
||||||
if (arg->ident==iREFARRAY && arg->hasdefault)
|
if (arg->ident==iREFARRAY && arg->hasdefault)
|
||||||
free(arg->defvalue.array.data);
|
free(arg->defvalue.array.data);
|
||||||
else if (arg->ident==iVARIABLE
|
|
||||||
&& ((arg->hasdefault & uSIZEOF)!=0 || (arg->hasdefault & uTAGOF)!=0))
|
|
||||||
free(arg->defvalue.size.symname);
|
|
||||||
assert(arg->tags!=NULL);
|
assert(arg->tags!=NULL);
|
||||||
free(arg->tags);
|
free(arg->tags);
|
||||||
} /* for */
|
} /* for */
|
||||||
|
|||||||
+16
-56
@@ -2227,7 +2227,11 @@ restart:
|
|||||||
* from the field and save the size of the field too.
|
* from the field and save the size of the field too.
|
||||||
*/
|
*/
|
||||||
assert(lval2.sym==NULL || lval2.sym->dim.array.level==0);
|
assert(lval2.sym==NULL || lval2.sym->dim.array.level==0);
|
||||||
if (lval2.sym!=NULL && lval2.sym->dim.array.length>0 && sym->dim.array.level==0) {
|
if (lval2.sym &&
|
||||||
|
lval2.sym->parent &&
|
||||||
|
lval2.sym->dim.array.length > 0 &&
|
||||||
|
sym->dim.array.level==0)
|
||||||
|
{
|
||||||
lval1->tag=lval2.sym->x.tags.index;
|
lval1->tag=lval2.sym->x.tags.index;
|
||||||
lval1->constval=lval2.sym->dim.array.length;
|
lval1->constval=lval2.sym->dim.array.length;
|
||||||
} /* if */
|
} /* if */
|
||||||
@@ -2280,8 +2284,11 @@ restart:
|
|||||||
* from the field and save the size of the field too. Otherwise, the
|
* from the field and save the size of the field too. Otherwise, the
|
||||||
* tag is the one from the array symbol.
|
* tag is the one from the array symbol.
|
||||||
*/
|
*/
|
||||||
if (lval2.ident==iCONSTEXPR && lval2.sym!=NULL
|
if (lval2.ident==iCONSTEXPR &&
|
||||||
&& lval2.sym->dim.array.length>0 && sym->dim.array.level==0)
|
lval2.sym &&
|
||||||
|
lval2.sym->parent &&
|
||||||
|
lval2.sym->dim.array.length > 0 &&
|
||||||
|
sym->dim.array.level == 0)
|
||||||
{
|
{
|
||||||
lval1->tag=lval2.sym->x.tags.index;
|
lval1->tag=lval2.sym->x.tags.index;
|
||||||
lval1->constval=lval2.sym->dim.array.length;
|
lval1->constval=lval2.sym->dim.array.length;
|
||||||
@@ -2310,15 +2317,17 @@ restart:
|
|||||||
lval1->constval=0;
|
lval1->constval=0;
|
||||||
} /* if */
|
} /* if */
|
||||||
|
|
||||||
|
/* a cell in an array is an lvalue, a character in an array is not
|
||||||
|
* always a *valid* lvalue */
|
||||||
|
lvalue = TRUE;
|
||||||
|
|
||||||
// If there's a call/fetch coming up, keep parsing.
|
// If there's a call/fetch coming up, keep parsing.
|
||||||
if (matchtoken('.')) {
|
if (matchtoken('.')) {
|
||||||
lexpush();
|
lexpush();
|
||||||
goto restart;
|
goto restart;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* a cell in an array is an lvalue, a character in an array is not
|
return lvalue;
|
||||||
* always a *valid* lvalue */
|
|
||||||
return TRUE;
|
|
||||||
} else { /* tok=='(' -> function(...) */
|
} else { /* tok=='(' -> function(...) */
|
||||||
svalue thisval;
|
svalue thisval;
|
||||||
thisval.val = *lval1;
|
thisval.val = *lval1;
|
||||||
@@ -2334,6 +2343,7 @@ restart:
|
|||||||
implicitthis = &thisval;
|
implicitthis = &thisval;
|
||||||
break;
|
break;
|
||||||
case FER_Accessor:
|
case FER_Accessor:
|
||||||
|
lvalue = TRUE;
|
||||||
goto restart;
|
goto restart;
|
||||||
default:
|
default:
|
||||||
assert(false);
|
assert(false);
|
||||||
@@ -2999,13 +3009,6 @@ static int nesting=0;
|
|||||||
for (argidx=0; arg[argidx].ident!=0 && arg[argidx].ident!=iVARARGS; argidx++) {
|
for (argidx=0; arg[argidx].ident!=0 && arg[argidx].ident!=iVARARGS; argidx++) {
|
||||||
if (arglist[argidx]==ARG_DONE)
|
if (arglist[argidx]==ARG_DONE)
|
||||||
continue; /* already seen and handled this argument */
|
continue; /* already seen and handled this argument */
|
||||||
/* in this first stage, we also skip the arguments with uSIZEOF and uTAGOF;
|
|
||||||
* these are handled last
|
|
||||||
*/
|
|
||||||
if ((arg[argidx].hasdefault & uSIZEOF)!=0 || (arg[argidx].hasdefault & uTAGOF)!=0) {
|
|
||||||
assert(arg[argidx].ident==iVARIABLE);
|
|
||||||
continue;
|
|
||||||
} /* if */
|
|
||||||
stgmark((char)(sEXPRSTART+argidx));/* mark beginning of new expression in stage */
|
stgmark((char)(sEXPRSTART+argidx));/* mark beginning of new expression in stage */
|
||||||
if (arg[argidx].hasdefault) {
|
if (arg[argidx].hasdefault) {
|
||||||
if (arg[argidx].ident==iREFARRAY) {
|
if (arg[argidx].ident==iREFARRAY) {
|
||||||
@@ -3053,49 +3056,6 @@ static int nesting=0;
|
|||||||
nargs++;
|
nargs++;
|
||||||
arglist[argidx]=ARG_DONE;
|
arglist[argidx]=ARG_DONE;
|
||||||
} /* for */
|
} /* for */
|
||||||
/* now a second loop to catch the arguments with default values that are
|
|
||||||
* the "sizeof" or "tagof" of other arguments
|
|
||||||
*/
|
|
||||||
for (argidx=0; arg[argidx].ident!=0 && arg[argidx].ident!=iVARARGS; argidx++) {
|
|
||||||
constvalue *asz;
|
|
||||||
cell array_sz;
|
|
||||||
if (arglist[argidx]==ARG_DONE)
|
|
||||||
continue; /* already seen and handled this argument */
|
|
||||||
stgmark((char)(sEXPRSTART+argidx));/* mark beginning of new expression in stage */
|
|
||||||
assert(arg[argidx].ident==iVARIABLE); /* if "sizeof", must be single cell */
|
|
||||||
/* if unseen, must be "sizeof" or "tagof" */
|
|
||||||
assert((arg[argidx].hasdefault & uSIZEOF)!=0 || (arg[argidx].hasdefault & uTAGOF)!=0);
|
|
||||||
if ((arg[argidx].hasdefault & uSIZEOF)!=0) {
|
|
||||||
/* find the argument; if it isn't found, the argument's default value
|
|
||||||
* was a "sizeof" of a non-array (a warning for this was already given
|
|
||||||
* when declaring the function)
|
|
||||||
*/
|
|
||||||
asz=find_constval(&arrayszlst,arg[argidx].defvalue.size.symname,
|
|
||||||
arg[argidx].defvalue.size.level);
|
|
||||||
if (asz!=NULL) {
|
|
||||||
array_sz=asz->value;
|
|
||||||
if (array_sz==0)
|
|
||||||
error(163,arg[argidx].name); /* indeterminate array size in "sizeof" expression */
|
|
||||||
} else {
|
|
||||||
array_sz=1;
|
|
||||||
} /* if */
|
|
||||||
} else {
|
|
||||||
asz=find_constval(&taglst,arg[argidx].defvalue.size.symname,
|
|
||||||
arg[argidx].defvalue.size.level);
|
|
||||||
if (asz != NULL) {
|
|
||||||
array_sz=asz->value; /* must be set, because it just was exported */
|
|
||||||
} else {
|
|
||||||
array_sz=0;
|
|
||||||
} /* if */
|
|
||||||
} /* if */
|
|
||||||
ldconst(array_sz,sPRI);
|
|
||||||
pushreg(sPRI); /* store the function argument on the stack */
|
|
||||||
markexpr(sPARM,NULL,0);
|
|
||||||
nest_stkusage++;
|
|
||||||
if (arglist[argidx]==ARG_UNHANDLED)
|
|
||||||
nargs++;
|
|
||||||
arglist[argidx]=ARG_DONE;
|
|
||||||
} /* for */
|
|
||||||
stgmark(sENDREORDER); /* mark end of reversed evaluation */
|
stgmark(sENDREORDER); /* mark end of reversed evaluation */
|
||||||
pushval((cell)nargs /* *sizeof(cell)*/ );
|
pushval((cell)nargs /* *sizeof(cell)*/ );
|
||||||
nest_stkusage++;
|
nest_stkusage++;
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
(2) : error 141: natives, forwards, and public functions cannot return arrays
|
(2) : error 141: natives, forwards, and public functions cannot return arrays
|
||||||
(3) : error 143: new-style declarations should not have "new"
|
(3) : error 143: new-style declarations should not have "new"
|
||||||
(5) : error 121: cannot specify array dimensions on both type and name
|
(5) : error 121: cannot specify array dimensions on both type and name
|
||||||
(9) : error 025: function heading differs from prototype
|
(11) : error 025: function heading differs from prototype
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
stock void crab(int[] eggs, int numEggs = sizeof(eggs))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public main()
|
||||||
|
{
|
||||||
|
int eggs[12];
|
||||||
|
crab(eggs);
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
(1) : error 163: indeterminate array size in "sizeof" expression (symbol "eggs")
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
static stock const X = 5;
|
||||||
|
stock static const Y = 6;
|
||||||
|
|
||||||
|
public main()
|
||||||
|
{}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
static stock const X = 5;
|
||||||
|
stock static const Y = 6;
|
||||||
|
|
||||||
|
public main()
|
||||||
|
{
|
||||||
|
return X + Y;
|
||||||
|
}
|
||||||
@@ -1 +1 @@
|
|||||||
dev
|
rel
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ ismac=0
|
|||||||
iswin=0
|
iswin=0
|
||||||
|
|
||||||
archive_ext=tar.gz
|
archive_ext=tar.gz
|
||||||
decomp="tar zxvf"
|
decomp="tar zxf"
|
||||||
|
|
||||||
if [ `uname` = "Darwin" ]; then
|
if [ `uname` = "Darwin" ]; then
|
||||||
ismac=1
|
ismac=1
|
||||||
|
|||||||
@@ -324,6 +324,8 @@
|
|||||||
"CalcDominationAndRevenge_Offset" "CalcDomRevPatch"
|
"CalcDominationAndRevenge_Offset" "CalcDomRevPatch"
|
||||||
"CalcDominationAndRevenge_Byte_Win" "0F"
|
"CalcDominationAndRevenge_Byte_Win" "0F"
|
||||||
"CalcDominationAndRevenge_Byte_Lin" "74"
|
"CalcDominationAndRevenge_Byte_Lin" "74"
|
||||||
|
"GetWeaponPrice_Offset" "GetWeaponPriceFuncGDC"
|
||||||
|
"GetWeaponPrice_Byte_Win" "E9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user