Compare commits

...
Author SHA1 Message Date
BotoX 0bda47d85b Added hack to make plugins open a menu with all possible targets on ReplyToTargetError COMMAND_TARGET_AMBIGUOUS.
Explanation:
There are two clients in the server, one named gene, the other one "Ene ~special characters~".
An admin issues "sm_slay Ene" and gets following error message: More than one client matched the given pattern.
What this hack will do is: Use GetCmdArg(0, ...); to get the command name "sm_slay".
Use GetCmdArgString(...); to get the arguments supplied to the command.
Use GetLastProcessTargetString(...); (which was implemented in this commit) to retrieve the arguments that were passed to the last ProcessTargetString call.
It will then pass this data to the DynamicTargeting plugin through its AmbiguousMenu native.
The plugin will open up a menu on the client and list all targets which match the pattern that was supplied to ProcessTargetString.
If the client selects a menu entry, FakeClientCommand will be used to re-execute the command with the correct target.
2019-09-10 11:27:18 +02:00
BotoX d93f6984cc cstrike: Fix wrong timeleft calculation (#1072)
* Fix wrong timeleft calculation

* reorder function calls
2019-09-02 15:33:28 -07:00
42 207584818f Add RequestFrameCallback optional data param (#1068) 2019-09-02 14:00:22 -07:00
Asher Baker 7a42d6b564 Fix build with latest hl2sdk-csgo 2019-09-02 21:45:04 +01:00
David Anderson 94b3ca08a2 Update SourcePawn & amtl submodules (#1067) 2019-09-01 13:24:39 -07:00
RumbleFrog ab5f00b65b Correct FrameIterator retval regression (#1066) 2019-08-26 19:26:51 -07:00
JoinedSenses b8fd7db58d Create menu if multiple nom matches found (#983)
This change checks the nomination against the map arraylist. If the nomination matches multiple results, those results are then added to a menu to allow the client to select available maps. The maps added to the menu go against the same checks as the normal nomination menu and wont allow nomination of disabled maps.

Example image of /nominate jump_b
https://i.imgur.com/ZdzB0gk.png

If reply source is console, menus wont be generated and it will attempt to nominate as normal.
2019-08-01 13:48:10 +01:00
hydrogen-mvm 22635d8d35 Add File.Flush methodmap (#1056)
This allows us to do FileHandle.Flush() instead of FlushFile(FileHandle) and maintain consistency in always using methodmaps for file I/O operations.
2019-07-31 22:18:07 +00:00
hydrogen-mvm fb9b284bcf Correct malformed Regex documentation (#1055) 2019-07-31 10:48:46 -07:00
David Anderson 5868ffd04e Merge pull request #1050 from alliedmodders/update-sp-093edef
Update SourcePawn to 093edef
2019-07-24 09:38:43 -07:00
Asher Baker 8ce99e0540 Link pthread library for Linux binaries 2019-07-24 14:47:13 +01:00
Asher Baker efb02755bc Update SourcePawn to 093edef 2019-07-24 13:51:15 +01:00
Asher Baker fcafd0784c Workaround CS:GO Stringtable bug (#1046)
The cause of the infamous "Index error writing string table baseline"
error appears to be a timing issue between the engine's network message
processing, the stringtable encoding, and command processing when adding
stringtable entries in OnConfigsExecuted.

When the first client connects the map is re-loaded which causes a full
refresh, the game's stringtable entries are added at tick 65, the client
connection is registered at tick 66, and stringtable entries added in
OnConfigsExecuted are registered as being added in tick 67. The engine
later calls WriteBaselines with the client's signon tick, and neglects
to encode the SM added entries as it considers them from the future.

To avoid this, always pass INT_MAX as the current tick when encoding
the baseline, so all stringtable entries are included regardless of when
they were added. Tested on both Windows and Linux.
2019-07-19 09:13:34 +01:00
42 199802150b Update TF2_IgnitePlayer to support setting duration of fire (#1038)
Related to #713
2019-07-05 22:37:25 +01:00
MartLegion e47c1a840a Pad plugin ID based on the total plugin count (#1027)
Closes #994
2019-06-17 01:06:03 +01:00
Nicholas Hastings 14227c04b8 Fix matchmaking_ds bin not being found for gamedata (#1006). (#1028) 2019-06-01 14:30:22 -04:00
Batfoxkid cf0a49881e TFCond Descriptions (#1005)
This is mainly for API (https://sm.alliedmods.net/new-api/tf2/TFCond) to show description of the condition.
2019-06-01 15:43:06 +01:00
JoinedSenses 527a998740 Fix whitespace regression from #1012 (#1026) 2019-05-30 20:11:43 -07:00
JoinedSenses 352f078b07 Add Cookie methodmap (#1012) 2019-05-30 18:27:14 -07:00
JoinedSenses 4f3c3175e6 Create GlobalForward & PrivateForward methodmaps (#1004) 2019-05-29 14:17:42 -07:00
JoinedSenses 81dc80fbd1 Correct Plugin API Documentation Formatting (#1019) 2019-05-28 18:38:58 -07:00
Headline 28036966a6 Fix Miscellaneous Regressions and UBs (#1022) 2019-05-28 18:04:08 -07:00
Headline 2164f5191e Fix GCC 9 Builds (#1024) 2019-05-28 17:57:40 -07:00
Asher Baker 216ba8b4e9 Create FUNDING.yml 2019-05-27 17:15:04 +01:00
Bara 9c55eed549 Add Shield and Bumpmine to cstrike.inc (#991) 2019-05-24 06:03:42 -07:00
Amine B f9ce25a7fe PassType typo fixup (#1018)
* PassType typo fixup

Just some little observations, I will look up for more in other files whenever I can

* Update natives.cpp

* Update outputnatives.cpp
2019-05-15 07:22:34 -04:00
Nicholas Hastings 7e418933e7 Re-add missing GetEconItemView param (fixes #1001). (#1017) 2019-05-14 20:55:44 -04:00
Nicholas Hastings 05b3fc0fb9 Re-add float cast on TF2_AddCondition param (fixes #1013). (#1016)
Broken by ArgScuffer
2019-05-14 19:22:43 -04:00
Bruno Ronning d7990596f9 Update CS:GO "Reload" offset. (#1011) 2019-05-14 18:56:14 -04:00
Kyle Sanderson 86f974f242 NPOTB: Enable cstrike builds w/ Travis-CI. (#1014)
Travis-CI seems to have finally improved their environment so we should be okay to test this unique code-path now with CI.
2019-05-14 11:38:20 -07:00
Loïc 6addc5c8dd Fix wrong formatting to "Vote Delay Minutes" when delay above 60s (#1009)
Fixes #1007
2019-05-13 00:20:47 +01:00
David Anderson 15a7faeafd Merge pull request #1008 from alliedmodders/update-sp
Update SourcePawn to 4cba235.
2019-05-11 14:13:28 -07:00
David Anderson 626963fc49 Update SourcePawn to 4cba235. 2019-05-11 13:53:09 -07:00
JoinedSenses 2e72fc115d Fix malformed documentation indentation in Array.FindValue (#1002)
Modified indention for uniformity
2019-05-09 16:56:17 -07:00
JoinedSenses 26462f2848 Add Sort and SortCustom to ArrayList methodmap (#1003) 2019-05-09 18:44:31 +01:00
Michael Flaherty 9cd2a74271 Fix ArgBuffer String Serialization (#999) 2019-05-04 01:46:55 -07:00
iNilo e1648ba8f9 Add missing semicolon to profiler.inc (#996) 2019-05-03 02:11:03 -07:00
Michael Flaherty dae6d13f06 Fix CSS Builds (#992) 2019-05-01 17:29:55 -04:00
PerfectLaugh ccf1d7abbd Remove unneeded paramter in CS_DropWeapon (#988)
Updated in 4/30/2019 csgo update
2019-05-01 11:38:02 -04:00
Nick Hastings b92381505a Update Linux CSWeaponDropBB signature. 2019-05-01 11:35:13 -04:00
Nicholas Hastings 5ba6b1426b Revert "Update CS:GO CSWeaponDrop Signature (#985)" (#990)
This reverts commit fc7453a6c7.
2019-05-01 11:31:26 -04:00
Anthony fc7453a6c7 Update CS:GO CSWeaponDrop Signature (#985) 2019-04-30 23:36:39 -07:00
404UNF ae00144e84 Add new custom kill identifier for TF2 (#972) 2019-04-22 22:53:31 +01:00
Playa 59baaf1123 Fix param order in CancelClientMenu documentation (#982) 2019-04-22 20:33:27 +01:00
Michael Flaherty e2eac382c0 Add templated helper class to promote type-safety (#965) 2019-04-12 12:10:37 -07:00
Michael Flaherty dd81d7c78f Incorperate Licensing Into Project Tree (#961) 2019-04-12 12:10:13 -07:00
peace-maker e3f4d239f1 IBinTools: Block loading incompatible interface versions (#979)
In #705 SourceMod received support for x64 binaries. The `IBinTools` interface was updated to call functions in 64bit binaries. The `PassInfo` struct's size was increased and the `Create(V)Call()` functions signatures changed, thus making the interface incompatible for consumers which were compiled against an earlier version.

`SMInterface::IsVersionCompatible` wasn't adjusted to that fact, so extensions compiled against pre SM 1.10 could request an `IBinTools` interface pointer, but crash when they try to use it.

This change makes requests to older interface versions invalid, thus letting `RequestInterface` return `NULL` for older extensions. It doesn't fix the backwards incompatibility, but at least makes the problem more blatant, so extensions can handle it themselves.
2019-04-11 14:51:38 -07:00
⭐ B3none 8f0527487f SQL-Admin-Manager: style clean-up (#974)
* Switched to sizeof instead of hard-coding for loop size

* Switched back to pre-increment.

* Dynamically pad variables
2019-04-06 11:47:21 -07:00
Nicholas Hastings 318b36cdcf Trigger build for hl2sdk-csgo update. 2019-03-28 20:00:20 -04:00
TheRandomLabs f4b9dfb2e7 Fix misspelling of "runoff" in mapchooser (#973) 2019-03-23 18:21:54 -07:00
David Anderson 2e11d3400e Fix MSVC2015 build. 2019-03-16 17:25:36 -07:00
David Anderson 364cd094d9 Trigger a build. 2019-03-16 16:57:22 -07:00
David Anderson 2af7600057 Switch to MSVC2015 builders. 2019-03-16 16:21:57 -07:00
komashchenko 8031e42bda pb: Add natives to work with 64 bit values (#943)
* Add natives to work with 64 bit Protobuf values

* Fix linux build

* FIX alignment requirements

* FIX alignment requirements V2

* Remove legacy API

* Inattention
2019-03-04 09:06:43 -08:00
Ҝờţأķ 7f9ceaac06 basevotes: Fix buffer size for workshop obtained levels. (#956) 2019-03-03 15:00:24 -08:00
David Anderson ae0a03d438 Merge pull request #964 from Bara/patch-5
Add missing semicolon
2019-02-19 21:49:07 -08:00
Bara d105ce778d Add missing semicolon
Otherwise you'll get this error:
regex.inc(182) : error 001: expected token: ";", but found "<newline>"

[Example with latest sourcemod (1.10.6383) version](https://travis-ci.org/Bara/TroubleinTerroristTown/jobs/495529570#L640)
2019-02-19 17:21:17 +01:00
David Anderson 653e9325fc Merge pull request #963 from alliedmodders/update-sp
Update SourcePawn.
2019-02-18 12:53:21 -08:00
David Anderson 5d7d7c122e Update SourcePawn. 2019-02-17 21:21:43 -08:00
Ross Bemrose 45fb26d282 Change MultiTargetFilter to a typeset that allows ArrayList as its second argument. (#955) 2019-02-03 13:27:26 -08:00
Asher Baker c501c837d0 Ignore SM site certificate when downloading GeoIP
Build servers don't have a root for it, and the address is internal
2019-01-19 12:34:23 +00:00
Asher Baker 590f71436f Get GeoIP data from SM site for now 2019-01-19 12:18:36 +00:00
Michael Flaherty b7e252dfd6 Prevent FrameIterator OOB Errors (#949) 2019-01-13 13:36:35 -08:00
Nicholas Hastings a2246af121 Unify map lookup logic across tf2esque engines. (fixes #927) (#931) 2019-01-07 18:17:28 -05:00
Bara 3e454db2d8 Add snowball to CSWeaponID (#936) 2019-01-05 14:56:07 -05:00
OkyHp b88e0d7875 Add getter for Event.BroadcastDisabled (#946)
In a pre-hook, the hook param is not reliable if multiple plugins have hooked the same event.
2019-01-03 19:42:42 +00:00
Nick Hastings 821251b176 Fix BfRead.BytesLeft not being able to be optional. (fixes #945). 2019-01-01 15:34:26 -05:00
Deathreus 1b3599c189 Bump non-critical versioning to 1.10 (#939) 2018-12-27 21:02:14 -05:00
Nicholas Hastings 5e7596dea6 Upgrade SQLite from v3.22.0 to v3.26.0. (#935) 2018-12-19 17:26:29 -05:00
David Anderson ab7519530e Merge pull request #934 from alliedmodders/enum-structs
Inauguration of SourcePawn enum structs
2018-12-16 22:43:43 -08:00
David Anderson faa10f52a8 Move dynamicmenu.sp enum structs to transitional syntax. 2018-12-16 18:49:36 -08:00
David Anderson 53df09fbb7 Fix dynamicmenu.sp indentation. 2018-12-16 18:41:55 -08:00
Michael Flaherty c8f3035cb0 Introduce enum structs to core sm plugins 2018-12-15 13:51:03 -08:00
David Anderson f465985370 Update SourcePawn and AMTL to master.
This brings in enum struct support.
2018-12-15 12:17:11 -08:00
David Anderson 470486ba7e Don't double-format in ReplyToCommand. (#932) 2018-12-12 23:30:27 -08:00
Nick Hastings 9a4fe1c475 Fix signed/unsigned compare on Windows. 2018-12-12 20:02:23 -05:00
Ruben Gonzalez dd61223c0b Add new CSGO weapon id's/itemdefs. (#929) 2018-12-12 11:35:36 -08:00
Nick Hastings c196082988 Typo fix for CS:GO POSIX Extinguish gamedata. 2018-12-08 09:05:10 -05:00
Nick Hastings 9e58476631 Update CS:GO contribution score offset. 2018-12-07 07:24:30 -05:00
Nick Hastings 4bebdc18a2 Hmm... 2018-12-06 20:31:29 -05:00
Nick Hastings a01529b210 Add new GiveNamedItem param for CS:GO. 2018-12-06 20:18:21 -05:00
Nick Hastings 0b35c84bf0 Update CS:GO SDKTools and SDKHooks offsets. 2018-12-06 19:23:32 -05:00
Ruben Gonzalez 846a99e57f Merge branch 'master' of github.com:alliedmodders/sourcemod 2018-12-06 18:49:15 -05:00
Ruben Gonzalez c28f957fb3 Update csgo gamedata part 1 2018-12-06 18:47:44 -05:00
peace-maker f0aec6b0b6 Fix typo in fallback to "default" maplists section (#923)
When lookup of a more specialized entry in the maplists.cfg failed, it wouldn't fallback to the "default" section, but just try to parse the same section again.
2018-11-13 16:32:18 +00:00
Ruben Gonzalez d79c5e0dfa Switch CS:GO Clantag set/get to use netprops + offset over sig + offset. (#922)
* Switch CS:GO Clantag set/get to use netprops + offset over sig+offset.

* Make sure the new functions are defined before using them...

* Fix offset name

* Fix incorrectly dereferencing.
2018-11-09 07:13:17 -05:00
Kyle Sanderson cb8d92edeb SDKHooks: Reset global hookid when unhooking in SH. (#916)
Fixes https://github.com/alliedmodders/sourcemod/issues/912
2018-10-28 11:06:57 -07:00
Asher Baker db9925493a Update game.empires.txt 2018-10-14 13:06:30 +01:00
peace-maker 1b795a70b0 Add GameData methodmap (#766) 2018-10-11 20:27:56 -07:00
Kruzya ccfd2ffe38 Added sm_reload_databases (#773)
Added command sm_reload_databases for refreshing "registered" Databases Configurations cache.

Closes #772
2018-10-11 17:36:52 +01:00
Asher Baker c1d235a59c Use natural sorting for map lists (Fixes #892) (#907)
This produces consistently better results, especially for games such as L4D(2).
2018-10-11 15:20:10 +01:00
Asher Baker b5320a4f8a Add a note about FormatTime platform dependence (#908)
This has been another constant source of confusion since the C99 ones were added to the strftime documentation we link.

It'd be nice to have a consistent implementation inside SM in the future.
2018-10-11 11:07:07 +01:00
Asher Baker a1271ec3a8 Handle NULLs in SDKCall string return (Fixes #874) (#906)
`SDKCall` has existing semantics that a `-1` retval indicates null, so use that and writes an empty string to the buffer.

Consumers can tell the difference between `""` and `NULL` by checking if the return value is `0` or `-1`.
2018-10-11 00:18:03 +01:00
Asher Baker a659896f8a Revert "Use natural sorting for map lists (Fixes #892)"
This reverts commit a4e169aa8f.
2018-10-11 00:04:46 +01:00
Asher Baker a4e169aa8f Use natural sorting for map lists (Fixes #892) 2018-10-11 00:03:34 +01:00
Asher Baker 7dd733cf46 Improve CreateNative failure message (#903)
This confuses everyone.
2018-10-10 13:35:17 +01:00
Ruben Gonzalez 6eb319f46e Update CS:GO gamedata. (#904) 2018-10-09 20:18:53 -04:00
SlidyBat 3add38f665 Add additional TraceRay natives (#885)
* More TR natives

* Fix small typo

* Fix another typo

* Fix TR_AllSolid description

* Change Disp to Displacement

* Reorder params in TR_GetSurfaceName

* Fix TR_GetSurfaceName

* Another fix for TR_GetSurfaceName -_-

* Change if block to switch

* Make handle first param in TR_GetSurfaceName

* Reorder TR_GetStartPosition params

* Make TranslatePartitionFlags static

* Change tabs used for formatting to spaces

* Change inline comment style to be consistent with rest of file
2018-10-07 14:15:54 -07:00
Michael Flaherty 34e91fbd81 Restore SQL_CheckConfig Behavior (#873)
* Change lookup strategy for SQL_CheckConfig

* Ensure db conf lookup failures default to ..default

* Revert "Ensure db conf lookup failures default to ..default"

This reverts commit 03dc703daeeeadaa134e2160bf2c7cd812402758.
2018-10-07 14:08:11 -07:00
Michael Flaherty a9ca1a2fd6 NPOTB: Clarify preprocessor logic (#900) 2018-10-05 04:22:29 -07:00
Michael Flaherty a21c7564c1 [NMRiH] Gamedata update (Fixes #898) (#899) 2018-10-05 07:09:19 -04:00
Asher Baker 1ca4517f46 Revert "Remove arch loops from build scripts. (#889)"
This reverts commit 7ed329c11f.
2018-10-04 17:59:40 +00:00
Michael Flaherty 22b43e3869 Fix regression in vstk size (#894)
* Fix regression in vstk size

* Fix macro comment mistake

* More macro comment removals
2018-10-04 08:08:29 -04:00
Michael Flaherty fc14e37d0f Fix CS_TerminateRound calls & detour (#893) 2018-10-03 22:50:31 -04:00
David Anderson 7ed329c11f Remove arch loops from build scripts. (#889)
This simplifies non-sdk build scripts by removing their loops over SM.archs. Instead the top-level
build script will re-evaluate them for each architecture.
2018-09-30 09:59:28 -07:00
Michael Flaherty 6ad6abd319 Update sourcepawn submodule 2018-09-29 21:12:40 -07:00
SlidyBat bece74491d NPOTB: Update sample extension params to be sourcehook-friendly (#886) 2018-09-22 21:55:05 -07:00
Michael Flaherty 990a02dbe0 Fix grammar error in File docs (#883) 2018-09-22 12:27:05 -07:00
Ruben Gonzalez 75193e9ee9 Add new weapons to CSWeaponID enum. (#869) 2018-09-12 10:13:39 -04:00
JoinedSenses a5b22498ce Update to sm_ban, sm_kick, & sm_map in chat with no args to display menu (#838)
This change makes it so /kick, /ban, and /map open the already created methods for displaying their menus when there are no args.

The reason for the feature is to take advantage of menus that already exist and to make the commands easier to use.

The client == 0 check prevents them from opening if it was ran via rcon, sm_rcon, or server command. Client auth is also checked because its a registered admin command.

Usage params will display if client == 0 and args < min

For example, a moderator wants to change a map, instead of running through the admin menu, they can instead type just /map to display available maps and choose one.

If a mod wants to quickly ban or kick someone without having to either run through the admin menu or type it out, they could then type the corresponding commands with no args to open the menus.
2018-09-04 00:41:22 +01:00
Maxim Telezhenko 398522712e Add missing MarkNativeAsOptional for SetAuthIdCookie native (#879) 2018-09-01 00:19:48 +01:00
Asher Baker caf0914289 Remove MAPLIST_FLAG_NO_DEFAULT misuses (#870)
These two base plugins are using the MAPLIST_FLAG_NO_DEFAULT when they shouldn't, which causes much user (and SM developer) confusion as it is completely counter to the documentation.
2018-08-19 12:41:53 +01:00
Michael Flaherty 17700e45b0 Fix SetClanTag CS:GO Windows Signature (#868) 2018-08-15 17:56:04 -07:00
Asher Baker ba8b42ef1b Burninate IDataPack (#864)
This doesn't break any extensions NOT using IDataPack, and we do not know of any that are.

* The extension storage utility of this interface has been broken for the last 9 months, with ISourceMod::CreateDataPack being disabled.
* The plugin interop utility of this interface (its stated purpose) has been broken for the last 11+ years, with ISourceMod::GetDataPackHandleType being disabled.

I imagine it only survived the first cleanup 11 years ago because CSS:DM was using it internally, which it has now been migrated away from.

Compiled all the included extensions without changes (API compat), and loaded extensions build pre-change without issue (ABI compat).
2018-08-13 23:03:48 +01:00
SlidyBat 144fb907f1 Add new Traceray natives (#754) 2018-08-13 23:02:12 +01:00
Asher Baker e7c6b23439 Update blacklist.plugins.txt 2018-08-12 22:32:59 +01:00
Michael Flaherty a65c215217 Fix DataPack Overwrite Regression (#862)
Some tests passed with the implementation prior to this commit, but those were edge cases. Good older behavior is now fully restored
2018-08-11 13:31:33 +01:00
peace-maker 7e3b1c395b Mark new methodmap natives as optional (#867)
The `TopMenu` methodmap natives weren't marked as optional if the extension was optional like the other normal natives.

The `Regex` natives weren't marked as optional at all before if the regex extension was included optionally.

This makes the error message cleaner in case topmenus aren't loaded.
```
adminmenu.smx (Admin Menu): Required extension "TopMenus" file("topmenus.ext") not running
basebans.smx (Basic Ban Commands): Native "TopMenu.Display" was not found
```
2018-08-06 20:11:01 +01:00
Nick Hastings 3511d2a44d Trigger build against hl2sdk-tf2 update. 2018-08-02 17:29:09 -04:00
ddhoward beaf812909 Deprecate FormatUserLogText (#856)
Allow client index 0, too. (Console)
2018-07-31 19:19:18 -07:00
Michael Flaherty 7068c3e865 Fix LogStackTrace Anomaly (#863) 2018-07-31 04:17:36 -07:00
Kyle Sanderson 255b9323cc Flip sm_debug_connect to "1" (#860) 2018-07-27 22:02:31 -07:00
hydrogen-mvm d14c94c353 Add missing return value documentation (#854) 2018-07-26 18:33:22 -07:00
Michael Flaherty 11abe77eed Allow any returns in native callbacks (#857) 2018-07-25 21:46:44 -07:00
hydrogen-mvm 7d8dfb09d8 Fix English style in CONTRIBUTING.md (#855) 2018-07-21 23:17:35 -06:00
Kyle Sanderson 3baa703256 NPOTB: Fix clang-3.9 failures with Travis-CI (#851)
fix clang-3.9 failures, maybe; hopefully. I forget why this was broken.
2018-07-17 13:07:55 -07:00
Kyle Sanderson 2b3159f418 NPOTB: Add Discord and IRC Server to README.md 2018-07-17 10:43:23 -07:00
Kyle Sanderson 72acca4b9e Fix DataPack memory leak regression from #848. (#850)
* Fix memory leak regression from https://github.com/alliedmodders/sourcemod/pull/848.
2018-07-16 08:34:49 -07:00
Michael Flaherty 32d12ea4a6 Preserve old DataPack behavior when overwriting data (#848)
* Match old DataPack behavior when overwriting data

* Make RemoveItem more flexible

* Ditch implied RemoveItem behavior & asher fixes

* KyleS nits - but fixed before he says them

* Add back implicit behavior

* Update CDataPack.cpp

Committing to the spec.

* Update CDataPack.h

* fixup removing last item if explicitly requested

* Fix logic for accepting pack pos, rather than index

* Fixup IsReadable

* headache is over now
2018-07-14 17:00:17 -07:00
Ruben Gonzalez e4862dade8 Update CS:GO mac64/linux64 gamedata. 2018-07-13 19:44:40 -04:00
Ruben Gonzalez ed908b6545 Fix CS:GO weaponPrice offset. 2018-07-13 07:47:53 -04:00
KliPPy a81b52a787 Add move semantics for StringHashMap (#589)
* Move semantics for StringHashMap

* style

* Update sm_stringhashmap.h
2018-07-12 11:25:22 -07:00
komashchenko 52cdbb4fc1 Fix sm_help erroring out if invoked during the connection process (#723)
* Fix "Exception reported: Client 12 is not in game"

* Fix

* Update adminhelp.sp
2018-07-12 11:18:57 -07:00
Kyle Sanderson d0bf26135c Collection of plugin cleanups (#777)
* Fix rockthevote not clearing g_Voted on fakeclients.

* remove g_RTVAllowed in rockthevote as it's unused.

* Fix basebans using the wrong forward for configs.

* Prevent sm_addban from banning an immune steam adminid.

* Sprinkle in IsChatTrigger checks to plugins with plaintext chat hooks.

* fixup g_Voted[client] in OnClientDisconnect
2018-07-12 11:16:18 -07:00
Nick Hastings 4f2bb62ff9 Enable radio menus for IOSoccer. 2018-07-10 20:19:36 -04:00
Michael Flaherty 28f1ea82b6 Add base CommandIterator implementation (#819)
* Add base CommandIterator implementation

* Add check for invalid pos & finalize pr
2018-07-10 17:39:31 -04:00
Michael Flaherty aaac0b9eb2 Individualize NameHashSet Hashing & Revisit #709 (#740)
* Make mac/win lookups lowercase'd

* Revert #709 & 81042cc

* Adjust HashPolicy implementation across sourcemod

Basically, in order to implement our own (actual) hash policy in
`PluginSys.h`, we needed to remove the blanket implementation of `hash`
that was used before. Now, each policy must implement `hash` along with
`matches` in order to be used with `NameHashSet`. While this does force
us to change every implementation of policies across the entirety of
sourcemod, it allows core to use flexible implementations of `hash`.

* Remove logic duplication

* Improve lowercase checks
2018-07-10 17:38:40 -04:00
Alfred Llagas daee19d502 Changed "entiy" to "entity" in IsEntNetworkable (#847)
* Changed "entiy" to "entity" in IsEntNetworkable

* Update entity.inc
2018-07-08 11:11:35 -04:00
Mattia 70145dfd74 Make SQL_QuoteString deprecated (#792)
* Make SQL_QuoteString deprecated

* Fix message
2018-07-08 11:06:06 -04:00
Michael Flaherty c09b32010f Add Profiler methodmap (#814)
* Add profiler methodmap

* No tag mismatches here

thanks pm

* Lets fix some documentation while we're here.

* Use proper methodmap documentation style

Across sm we use `//` for methodmap docs, so lets just keep this consistent
2018-07-08 11:05:29 -04:00
Mattia 85a1d3e78a "sound" folder instead "sounds" (#790)
The folder is actually "sound" and not "sounds"
2018-07-08 11:04:20 -04:00
Nick Hastings a9c9da1066 Update SDKTools sound functionality for hl2sdk-csgo changes. 2018-07-07 08:57:00 -04:00
Nick Hastings 2860f31cb0 Trigger build for hl2sdk-csgo update. 2018-07-06 20:54:36 -04:00
Ruben Gonzalez 54cf1337c1 Merge branch 'master' of github.com:alliedmodders/sourcemod 2018-07-06 19:18:44 -04:00
Ruben Gonzalez dcde5927b1 Update SetClanTag signature 2018-07-06 19:18:14 -04:00
Nick Hastings c458d1e600 Trigger build for hl2sdk-csgo update. 2018-07-06 19:08:58 -04:00
Mr. Silence aae7161273 Updated some offsets and all signatures for ZPS. (#839)
Signed-off-by: Mr.Silence <[email protected]>
2018-06-27 17:15:27 -04:00
Nick Hastings 6287774d69 Update SDKTools gamedata for IOSoccer (fixes #833). 2018-06-22 16:30:22 -04:00
voed dc4d597fb9 Add link to SourceMod plugin API reference in project readme (#830) 2018-06-22 08:08:00 -06:00
Michael Flaherty 9ceb1af4fe Add LogStackTrace native (#685) 2018-06-19 23:18:37 -07:00
Michael Flaherty b9b6832a11 Streamline ConfDb loading proceedure (#791)
* Create DatabaseConfBuilder & remove locking
* Remove all refcounting

This is part 1/n in regards to this PR's rework
* Move db conf lookup out of RunThreadPart
* Return default configuration for failed lookups
* RefPtr members & stop leaks
* fix uint comparison warning
2018-06-19 09:35:37 -07:00
Nick Hastings 53c63def07 Use env vars to find MySQL src on Linux, macOS. 2018-06-07 20:40:14 -04:00
Asher Baker 4f70185aef Fix amtl submodule pin 2018-06-05 19:06:04 +01:00
peace-maker 6fcb411fe4 MySQL: Support multiple result sets in prepared queries (#825)
Prepared statements can return multiple result sets since MySQL 5.5. That can happen when calling stored procedures using `CALL x();`.

This change removes the previous caching of result bindings, since the number of fields in a result can differ from result set to result set. This could potentially have a negative impact on prepared statements always only returning one result set, since the result binding buffers are recreated everytime the statement is executed instead of once. That difference should be negligible.

Fixes #823.
2018-06-05 18:33:33 +01:00
peace-maker 9cc518e408 Fix MySQL extension build using vs2015 (#824)
MySQL defines its own timespec_t. Official mysql builds are built using VS2013, so you still need to compile the client library yourself to be able to link it, but this change makes the dbi extension compatible with future versions already.
2018-06-05 09:29:11 -04:00
Nick Hastings ddebc2a075 Fix oops with SetConVarBounds. 2018-06-03 12:36:58 -04:00
David Anderson fe6abb0c48 Merge pull request #822 from alliedmodders/update-sourcepawn
Update SourcePawn.
2018-05-31 23:32:51 -07:00
David Anderson 90e66cbeef Update SourcePawn. 2018-05-31 23:13:36 -07:00
David Anderson 487e01e4ed Merge pull request #821 from alliedmodders/update-amtl
Update AMTL.
2018-05-31 21:44:09 -07:00
David Anderson 25b3d8f354 Update AMTL. 2018-05-31 21:23:59 -07:00
Ruben Gonzalez d430bd2f5c Fix CompileRegex not actually setting a valid error code. (#775)
Fix CompileRegex not actually setting a valid error code.
2018-05-28 13:59:43 -04:00
Ruben Gonzalez e2767a3c80 Remove goto from ExtensionSys.cpp (#729) 2018-05-25 09:49:10 -04:00
RumbleFrog 7f552e4d75 Deprecate GetMaxClients (#818) 2018-05-23 12:58:36 +01:00
Nick Hastings cbcda61135 Swap _XKEYCHECK_H for _ALLOW_KEYWORD_MACROS, in case it moves to a
different header.
2018-05-21 19:54:12 -04:00
jason-e 2904c87b62 Send ShowActivity messages to TV clients (#813)
`ShowActivity` and related functions are used to inform all clients about the usage of admin commands (such as bans or mutes). These messages are not sent to any fake clients, however they _should_ be sent to SourceTV/GOTV fake clients because messages they receive are actually visible to broadcast viewers and in demos recorded with `tv_record`. 

Player chat messages as well as SM functions like `PrintToChat`/`PrintToChatAll` broadcast to TV clients, but `ShowActivity` does not.
2018-05-09 09:13:49 +01:00
Nick Hastings cfdedce362 Missed converting a GetFlags instance. 2018-05-06 13:18:04 -04:00
Nick Hastings 467d57059a Out with the old ConVar accessibility hacks, in with the new. 2018-05-06 12:59:33 -04:00
Nick Hastings c993712438 Update BM:S gamedata. 2018-05-06 12:17:47 -04:00
Nick Hastings a69d18ae1c Fix warning/error on newer Clang versions from abort not being defined. 2018-05-06 10:28:24 -04:00
Nick Hastings 95dae67d5b Fix wrong matchmaking_ds bin path being used in some instances. 2018-05-06 10:26:43 -04:00
Nick Hastings f6a64da672 Update Insurgency FireOutput gamedata. 2018-05-05 11:35:06 -04:00
Nick Hastings 11b23a6d07 Update ConVar hacks for BMS.
This is also to trigger an MM:S build for hl2sdk changes in multiple branches.
2018-05-05 11:01:55 -04:00
Spirrwell 82f1c5a20b Update Function Offsets For PVKII (#808)
* Update Function Offsets For PVKII

-Updates offsets
-Removes "Reload" as no corresponding function actually exists

* Offset Fixes

-Re-add "Reload" as it's defined for CBaseCombatWeapon
-Fix Linux\Mac offsets for GroundEntChanged
2018-05-01 20:28:54 -04:00
404 7e080d259e Update helpers.inc (#805)
Update GetClientAuthString to GetClientAuthId
2018-04-28 11:18:12 +01:00
Kyle Sanderson 1ab6ab1e5c NPOTB: Add basic issue template for new GH issues. 2018-04-05 22:20:49 -07:00
Nick Hastings b0e7bab980 Merge branch 'master' of https://github.com/alliedmodders/sourcemod 2018-03-28 21:11:14 -04:00
Nick Hastings 9b8d28de56 Allow -1/null for attacker and inflictor for OTD (bug 6494). 2018-03-28 21:10:32 -04:00
Michael Flaherty 5611ec54a2 Migrate extensions to common AMTL string funcs (#785) 2018-03-25 13:00:53 -07:00
Hexah 6c7e29cbdb Documentation fixes from methodmap implementation (#788)
* There is no "menu" param

* No "menu" param on GetTitle()

* Misspell "Replies"
2018-03-25 12:58:11 -07:00
Michael Flaherty 118d6dc9b1 Improve error message for EmitSound (#787)
Improve some error messages in sdktools.
2018-03-20 19:42:43 -06:00
Nicholas Hastings 08fe840bfd Probably fix Windows build. 2018-03-20 17:25:48 -04:00
Nicholas Hastings 4637cf9221 Use MySQL 5.5 for MySQL extension. (#786) 2018-03-20 17:12:30 -04:00
Joël Troch 4fd68939d3 [ZPS] Update gamedata and engine migration (#782)
* Migrate ZPS from EP2 to SDK 2013 engine

* Update ZPS gamedata (for version 3.0.7-Hotfix3)
2018-03-19 19:19:01 -04:00
peace-maker be6a930e82 Update SQLite to version 3.22.0 (#783)
This includes numerous bug fixes, optimizations and new features from releases over the past 5 years.

http://sqlite.org/chronology.html
2018-03-19 19:09:12 -04:00
Michael Flaherty 956f264b85 Replace ke::SafeSprintf with ke::SafeStrcpy (#784) 2018-03-19 20:12:51 +00:00
Nicholas Hastings 0a91b1f5b1 Increase MAX_NAME_LENGTH to match CS:GO MAX_PLAYER_NAME_LENGTH. 2018-02-25 10:51:18 -05:00
Nicholas Hastings a17b47a2dc Add Protobuf.HasField native. 2018-02-25 10:49:37 -05:00
Michael Flaherty 2a8c390498 Un-const string retrievals (#769) 2018-02-20 18:38:17 +00:00
Asher Baker 41ffe975fd Update blacklist.plugins.txt 2018-02-15 22:35:56 +00:00
Ruben Gonzalez 5ac3390656 Add new regex natives. (#767)
Add new regex natives to get multiple/all matches.
2018-02-15 15:31:24 -05:00
peace-maker f9faf9e48c Allow different values per platform in "Keys" gamedata section (#765)
This adds support for platform specific custom key values in the `Keys` section in game config files. Now you can have different values for the same key per platform.

Previously you could only add general key values in gamedata files that were the same on all platforms like
```
"Keys"
{
	"key"	"value"
}
```

This patch allows you to set the value per platform in a subsection like
```
"Keys"
{
	"key"
	{
		"windows"	"value1"
		"linux"	"value2"
		"mac"	"value3"
	}
}
```

Looking up the `key` will return the value matching the host platform.
2018-02-06 14:40:51 +00:00
Michael Flaherty e57dce76e1 Add support for msvc 1912 (Fixes #761) (#764)
* Add support for msvc 1912

* Default new msvc versions to VS 2017

* Use 2015 lib with 2017
2018-02-04 17:06:22 -05:00
Michael Flaherty 64a6972757 Fix description for CharToLower and CharToUpper v2 (#750) 2018-02-02 23:30:12 +00:00
StrangeThings 1293d15f72 Remove the @brief tag in sdktools_hooks.inc (#759) 2018-02-02 23:28:20 +00:00
Michael Flaherty 12fca79006 Prevent use of primitive float operation functions (#763)
Apparently people use the float natives for actual float arithmetic; they're not really intended to be used directly.

* Prevent use of primitive float operation functions
* Deprecate float operation functs
* Alias Float natives to internal names
* Add clarifying note
* Remove use of internal FloatDiv native
2018-02-02 23:27:38 +00:00
thewavelength 55b8371fa8 Add VS Preview 2017 as valid compiler (msvc-1911) (#678) 2018-01-28 11:39:23 +00:00
peace-maker a8080c0bbb Fix description of nominations convars (#758) 2018-01-27 12:00:04 +00:00
JRiipinen 8c61fdc99d Add more TF2 specific DMG_ definitions (#756)
* Add more TF2 DMG_ definitions

* Guard them all

* Inline doccomments
2018-01-26 14:06:54 +00:00
Nicholas Hastings 9374620b8b Add RemoveEntity native. (bug 5714) (#745) 2018-01-07 13:52:36 -05:00
Ruben Gonzalez 5a35760215 Merge pull request #744 from alliedmodders/show-required-exts
Address issue #737
2017-12-31 11:06:35 -05:00
Alex 6b257de75a Add internationalization to basechat and fix CS:GO colours (#674)
* Added translation more to basechat

Also fixed colors, because it didn't work without `\x01` at begin of string.

* Fixed cs:go colors, thanks Bara20

* Added 'space' at the start of string.

* Added check for Engine_CSGO, to remove offset on other games

* forgot one row
2017-12-30 12:25:32 -08:00
Ruben Gonzalez 40356fc9db Address issue #737 2017-12-30 14:08:56 -05:00
Kyle Sanderson de108cca44 Simplify Logger internals (Fixes Issue #663). (#691)
* Simplify Logger internals (Issue #663).

* Avoid reformatting strings on every call.
2017-12-29 19:56:25 -08:00
Kyle Sanderson 5f5a6b3a16 Migrate CDataPack from a Compact Cassette tape. (#688)
* Migrate CDataPack from a Cassette Tape.

Tested-By: Headline22.

* Remove last IsReadable param pass.

* populate len still if CDataPack::ReadString is unreadable or the wrong type.

* Fyren Fixes(TM)(R)(C).

* Deprecate IDataPack.
2017-12-29 19:56:02 -08:00
Nicholas Hastings 29b1926432 A couple of fixups to last commit (NPOTB). 2017-12-29 04:55:56 -08:00
Nicholas Hastings e0a154faa0 Add TF2 NextBot symbol data from Pelipoka to GDC (NPOTB). 2017-12-29 04:38:47 -08:00
Byte 1706fdfed9 Fix typo and update CSGOBadList (#738)
* Fix typo

* Update CSGOBadList
2017-12-28 18:43:49 -05:00
Byte 945df342d8 Fix typo in SwitchTeam Linux Signature (#743) 2017-12-28 17:39:30 -05:00
Scott Ehlert bfb11c7712 Remove extra CS:GO Mac offset for GetItemInLoadout 2017-12-20 04:17:29 -06:00
Scott Ehlert fa7d8757dc Rebuild 64-bit Linux libpcre with -Wa,-mrelax-relocations=no 2017-12-20 03:50:12 -06:00
Scott Ehlert 3c7978153b Rebuild 64-bit Linux libpcre with -fPIC. 2017-12-20 03:15:57 -06:00
Scott Ehlert 7cb3d4d8ff Fix Linux and macOS builds. 2017-12-20 02:13:56 -06:00
Scott Ehlert 870e118150 Fix BreakpadSymbols script for 64-bit builds. 2017-12-20 02:07:30 -06:00
Scott Ehlert e27f8fba1a Hopefully fix Windows build. 2017-12-20 02:04:05 -06:00
Scott Ehlert ce1a4dcac0 64-bit support for CSGO on Linux and macOS (#705) 2017-12-20 01:56:23 -06:00
Scott Ehlert 057a5790e2 Update CS:GO TerminateRound signature for Linux. 2017-12-19 23:23:29 -06:00
Nicholas Hastings 87858ef264 Test build. 2017-12-18 21:00:04 -05:00
Nicholas Hastings 98fea02eaa Roll version. >_> 2017-12-18 20:39:57 -05:00
Nicholas Hastings 1de6dbacad Update TF2 CalcIsAttackCritical gamedata. 2017-12-14 08:27:37 -05:00
Michael Flaherty 64ab3a08b5 Add missing const to usermessage function parameters (#735) 2017-12-14 11:27:07 +00:00
Nicholas Hastings 4007ec8cf8 Temp fix for load issues on Linux. 2017-12-05 20:44:53 -05:00
Asher Baker c33bf330a0 Add doi, remove dota 2017-12-04 21:47:00 +00:00
Michael Flaherty 830c3f36d3 Block reserved device names on windows (#733) 2017-12-03 11:38:56 +00:00
Michael Flaherty a5583882f4 fix bad english 🍋 (#724) 2017-12-03 11:37:50 +00:00
Ruben Gonzalez 6896ef739d Merge pull request #728 from alliedmodders/show-required-exts
Split optional extensions into their own block if not found.
2017-11-30 16:02:33 -05:00
Ruben Gonzalez c87afde1bd Add optional extensions not found to sm exts list in a seperate list. 2017-11-30 14:21:19 -05:00
Ruben Gonzalez 51cea0e04e Only show extensions that failed to load if the extension is required. 2017-11-30 12:57:12 -05:00
Nicholas Hastings 89732f7935 Revert "Update pushbuild.txt"
This reverts commit 8589a091dd.
2017-11-27 20:57:18 -05:00
Kyle Sanderson 8589a091dd Update pushbuild.txt
Force build.
2017-11-27 17:49:01 -08:00
Nicholas Hastings d9bf0a816e Fix CreateInterface missing in loader. 2017-11-27 19:21:25 -05:00
Ruben Gonzalez 38ba9b4561 Merge pull request #727 from alliedmodders/reverse-csgo-native-changes
Revert "Make CS:GO specific natives exist only on CS:GO"
2017-11-27 13:39:09 -05:00
Ruben Gonzalez 8e6ca1ce09 Revert "Make CS:GO specific natives exist only on CS:GO"
This reverts commit 687db96b38.
2017-11-27 12:58:24 -05:00
Michael Flaherty d685f30847 Add Translation Natives (#669)
* Add Translation Natives

See #626

* Fix vocab errors
* Better description
* Bump ITranslator Version
* Implement KyleS' Review Requests
* Improve documentation
2017-11-20 21:24:01 -08:00
Michael Flaherty 43cdf20fd3 Add FrameIterator to SourceMod (#716).
* Create FrameIterator type
This commit adds the FrameIterator type to core sm along with a few
methods around getting the information for each frame.

* Fix incorrect documentation
[skip ci]
* Implement KyleS's Changes
* A nit
2017-11-16 18:55:37 -08:00
Ruben Gonzalez 7507672895 Merge pull request #701 from alliedmodders/csgo-hashmap
CStrike extension changes for CS:GO
2017-11-03 19:48:55 -04:00
Nicholas Hastings 95afe72307 Separate out DOI build. (#718) 2017-11-03 15:45:16 -04:00
BenediktKa 539adcb8a2 Fix typo in reservedslots.phrases.txt (#717) 2017-11-03 12:19:08 -04:00
Nicholas Hastings 3a1bb177fc Fix TF2IgnitePlayer not working after game update (fixes #713). 2017-10-28 16:17:21 -04:00
Asher Baker f156d48f45 Include missing ctype header for macOS build 2017-10-28 12:51:55 +01:00
Michael Flaherty 404e96ad45 Add KeyValues.ExportToString (#706) 2017-10-28 12:47:00 +01:00
Michael Flaherty 90ddc16a4b Lowercase windows/mac paths to avoid plugin duplicate loadings (Bug 6491) (#709) 2017-10-28 12:44:25 +01:00
FlaminSarge c3b25e54f8 Add convenience logic for "offset" to Address definitions in GameConf (#580)
Allows for the last "read" offset for an Address to instead be "offset", which doesn't deref the addr pointer after applying the offset
Shortens the necessary coding to get a particular Address inside a function (old: store offset in a separate GameConf Offsets entry, apply the offset to the Address in SP)
2017-10-28 12:11:32 +01:00
Ruben Gonzalez b6a2f72e95 Merge branch 'master' into csgo-hashmap 2017-10-27 18:57:28 -04:00
Ruben Gonzalez 6085afbaae Fix comment info 2017-10-27 18:55:02 -04:00
Kyle Sanderson 2658636377 Fix unsigned compiler warning. 2017-10-27 18:53:49 -04:00
Asher Baker 4bab834716 Merge pull request #672 from peace-maker/null_natives_fixed
Add natives to check for NULL_VECTOR and NULL_STRING
2017-10-27 20:03:09 +01:00
Nicholas Hastings 8f6f881937 Update tf2 stun and death flags. 2017-10-27 08:03:39 -04:00
JRiipinen 8807939a14 Update TF2_IsPlayerInCondition (#712)
* Update TF2_IsPlayerInCondition

* Update conditions too
2017-10-27 07:02:38 -04:00
Scott Ehlert 27b69559a3 Really fix macOS build. 2017-10-26 20:38:25 -05:00
Scott Ehlert 373fb4f776 Update amtl to fix macOS build. 2017-10-26 19:36:30 -05:00
David Anderson 8c88614c2e Merge pull request #714 from Headline22/dvander-rednavd
Pin sourcepawn submodule to 1.9-dev
2017-10-24 20:09:00 -07:00
Michael Flaherty 858a0ba17d Pin sourcepawn submodule to 1.9-dev 2017-10-24 19:16:14 -07:00
Nicholas Hastings 5cf6a0c875 Fix MakeBleed native call (add damage custom param).. 2017-10-22 10:48:27 -04:00
Benoist3012 a5c213ae7d make bleed linux sig fix 2017-10-22 10:48:27 -04:00
Nicholas Hastings 23a1c5f952 Tyop fix. 2017-10-22 09:32:02 -04:00
Nicholas Hastings 5aaea4c2c5 Update TF2 enums. 2017-10-22 08:52:02 -04:00
Nicholas Hastings ab303e7394 Gamedata for 2017-10-20 TF2 update. 2017-10-19 23:59:14 -04:00
Michael Flaherty 4f54df65e9 Switch C header & Fix warnings (#702) 2017-10-15 10:32:01 +01:00
Kyle Sanderson 36f9a8ed7a NPOTB: Remove unsupported packages line from Travis-CI. 2017-10-10 12:00:11 -07:00
Kyle Sanderson 2ccaa376ba NPOTB: Enable better coverage testing with toolchains (Travis-CI). (#703)
NPOTB: Enable better coverage testing with toolchains (Travis-CI).
2017-10-09 18:34:01 -07:00
Kyle Sanderson 65bf85fcbe (Re-)Add support for gcc and clang3.9, 4.0, and 5.0. 2017-10-09 16:53:19 -07:00
Kyle Sanderson 30f061e818 Fix unsigned comparison warnings (-Werror + GCC5) from CS:GO fixes. 2017-10-09 13:00:52 -07:00
Kyle Sanderson 22e3d2d198 Fix GCC build with SourcePawn. 2017-10-09 11:51:49 -07:00
Ruben Gonzalez 687db96b38 Make CS:GO specific natives exist only on CS:GO 2017-10-04 18:20:06 -04:00
Ruben Gonzalez 588e88c7ee Fix build error. 2017-10-04 14:42:07 -04:00
Scott Ehlert 65a8f3cbf8 Trigger build. 2017-10-03 03:24:44 -05:00
Scott Ehlert 82e6d00cea Fix build. 2017-10-02 07:40:58 -05:00
Scott Ehlert bbdecceb4b Switch to AMBuild 2.1 API. (#694) 2017-10-02 07:18:57 -05:00
Andrew f67e4ce610 Making rename's LogAction message consistent... (#696)
with the other plugin's messages.
2017-09-26 20:22:38 -04:00
Andrew f289799c57 Making gravity's LogAction message consistent... (#695)
with the other plugin's messages.
2017-09-26 20:22:30 -04:00
Andrew aac279322b Making blind's LogAction message consistent... (#697)
with the other plugin's messages.
2017-09-26 20:22:02 -04:00
Kyle Sanderson 5d234bb9d6 Fix OnPlayerRunCmd crashing with invalid CUserCmd ptr. (#693) 2017-09-23 23:27:32 -07:00
peace-maker 7e898ee530 Fix core config values not being cached (#673)
Valid core config options aren't cached to be retrieved using `GetCoreConfigValue` after they've been loaded from core.cfg or set through the `sm config` root console menu.

E.g. `sm config ServerLang` would return `[SM] No such config option "ServerLang" exists.` all the time.

Stop notifying other listeners if the config key was consumed, but don't skip adding it to the cache.

Also fix `FollowCSGOServerGuidelines` always showing as unhandled command when being changed through `sm config FollowCSGOServerGuidelines yes`.
2017-09-23 17:24:39 -07:00
Andrew 54565c92f7 Add target arg to LogAction in basechat sm_psay. (#690) 2017-09-23 10:45:41 -07:00
Asher Baker 4e996a116d Allow seeking to end of datapack (#687) 2017-09-19 23:27:35 +01:00
Ruben Gonzalez 8c8af88cee Add additional native, fix include file. 2017-09-19 12:37:11 -04:00
Ruben Gonzalez 8a36d0486b Add enum value for max regular items. 2017-09-10 10:16:23 -04:00
Ruben Gonzalez 1f3b14367d Add new native to get enum value based on item definition index. 2017-09-09 23:27:32 -04:00
thewavelength 79ba2835f6 Fix build when product.version is mangled (#679)
Strip line breaks when reading product.version, as Git can mangle the line breaks if autocrlf is configured, resulting in `SM_BUILD_TAG` getting defined with a linebreak.
2017-09-10 01:17:35 +01:00
Ruben Gonzalez 3d461ecea1 Add support for CreateIitemEntityByName for CS:GO 2017-09-08 08:37:28 -04:00
Ruben Gonzalez b4d34ef062 Merge pull request #671 from alliedmodders/csgo-weaponpricefix
Fix CS_GetWeaponPrice returning incorrect weapon prices.
2017-09-04 08:49:33 -04:00
Ruben Gonzalez a341a0e85c Use implemented function to get weapon name. 2017-09-03 19:31:23 -04:00
Ruben Gonzalez d8f0484327 Make IsValidWeaponID check weapon info on CS:S 2017-09-03 19:30:35 -04:00
Ruben Gonzalez b68405b651 Fix cstrike include file. 2017-09-03 19:30:06 -04:00
Ruben Gonzalez 453e9da7c5 Intial CS:Go changes and slight changes for CS:S WeaponID related function. 2017-09-03 09:19:12 -04:00
Ruben Gonzalez 0e7a3b0173 Use keyvalue to get weapon price, change void * to appropriate class names. 2017-08-28 10:17:12 -04:00
Peace-Maker 7eef3948b1 Don't break backwards compatibility with unmanaged forwards
Instead of adding new functions to `IForward`, we just allow NULL to be passed to `PushArray` and `PushString`.
2017-08-25 23:23:50 +02:00
Peace-Maker e609a33e6d Cleanup CForward::Execute using a helper function
Flatten out the nesting a bit.
2017-08-25 23:23:37 +02:00
Peace-Maker 41a9889cdd Add Call_PushNullVector and Call_PushNullString
Be able to push NULL_[VECTOR|STRING] to a forward or direct function call.
The callee can check the parameter using the IsNullVector/IsNullString natives.
2017-08-25 23:23:24 +02:00
Peace-Maker 3de269946c Add IsNativeParamNullVector and IsNativeParamNullString natives
Lets plugins check if some other plugin passed NULL_VECTOR or
NULL_STRING to a native in the native callback.
2017-08-25 23:23:07 +02:00
Peace-Maker 9fa4ed8bac Add IsNullVector and IsNullString natives
Let plugins check if a string or vector passed to a function is their
NULL_VECTOR or NULL_STRING.
2017-08-25 23:22:39 +02:00
Ruben Gonzalez 22033c21f2 Fix CS_GetWeaponPrice returning incorrect weapon prices. 2017-08-25 10:26:28 -04:00
Nicholas Hastings d705f6a2e1 Update links in README. 2017-08-23 09:52:31 -04:00
Fyren 3d19bfd57e damn it, duck 2017-08-22 14:02:04 -06:00
Timocop ea6cf26929 Ignore vote actions if target is no longer available (#649) 2017-08-22 20:56:12 +01:00
Maxim Telezhenko 68c00b8ae7 Remove superfluous assignment after delete (#654) 2017-08-22 20:55:04 +01:00
Michael 9af507a322 Remove replicated flag from sourcemod_version (#667) 2017-08-22 20:53:25 +01:00
Ruben Gonzalez 5f9d571e12 Fix trying to use signature function for WeaponIDToAlias on linux. 2017-08-21 15:00:22 -04:00
Ruben Gonzalez f7d3e44b19 Fix CS:S build 2017-08-21 10:48:54 -04:00
Ruben Gonzalez a01e9e510c Fix using Q_strcpy instead of Q_strncpy 2017-08-21 10:35:58 -04:00
Ruben Gonzalez 3eb297bee1 Fix cstrike extension natives/forwards due to update 2017-08-21 10:28:59 -04:00
Steve Zaretti 8627c0cbfc Fix CS:GO Reload offset (#660)
* Fix some CS:GO gamedata

I've just tested some of them.

 - Weapon_Drop
 - Reload

 I'm testing Weapon_CanUse in few minutes

* Weapon_CanUse did not change.

* prethink did'nt change either.

* I went too fast. Only weapon vtable changed.
2017-08-19 10:00:04 -04:00
Ruben Gonzalez cbb5c6d740 Fix Handle buy call 2017-08-18 15:24:17 -04:00
Ruben Gonzalez 955a29a4aa Fix HandleCommand_Buy_Internal param order. 2017-08-18 15:06:20 -04:00
Ruben Gonzalez 1d9ea142c4 Update more CS:GO gamedata 2017-08-18 10:33:41 -04:00
awillinger cb83a307ec Fix (parts of) CS:GO gamedata (#656)
* Fix SDKTools gamedata (thanks to Rodya)

* Fix CStrike Linux gamedata

* Fix keys

* Fix keys #2

* Adjust Windows offsets as well

* Update CommitSuicide (from Bara)
2017-08-18 14:06:31 +01:00
Asher Baker 902cae595b Include function name in cstrike ext error messages 2017-08-18 13:00:50 +01:00
shavit b7b422f046 Removed gender from nomination changed translation phrase. (#653) 2017-08-15 06:53:48 +01:00
Asher Baker 01c6bb8c6f Add an explanatory note to GetSteamAccountID 2017-08-12 13:04:26 +01:00
Nicholas Hastings aeb52d4f45 Trigger build for hl2sdk-csgo update. (fixes #648). 2017-08-06 10:37:31 -04:00
David Anderson 41bf281f1d Merge pull request #647 from alliedmodders/revert-606-null_natives
Revert "Add natives to check for NULL_VECTOR and NULL_STRING"
2017-08-03 17:13:51 -07:00
Asher Baker 11aab699a5 Revert "Add natives to check for NULL_VECTOR and NULL_STRING" 2017-08-04 00:44:47 +01:00
Nicholas Hastings 1924da3527 Update Contagion tempents gamedata. (Fixes #642) 2017-07-28 14:12:28 -04:00
Asher Baker 2e6d02ad52 Fixup types can include additional flags in the high bytes 2017-07-27 19:31:20 +01:00
Asher Baker e4047c3f87 Merge pull request #606 from peace-maker/null_natives
Add natives to check for NULL_VECTOR and NULL_STRING
2017-07-25 19:19:26 +01:00
Nicholas Hastings fa1d4ec5d6 Merge branch 'master' of https://github.com/alliedmodders/sourcemod 2017-07-23 09:03:12 -04:00
Nicholas Hastings bcfdef0171 Trigger build for hl2sdk-insurgency update. 2017-07-23 09:02:48 -04:00
Peace-Maker 60320cd845 Cleanup CForward::Execute using a helper function
Flatten out the nesting a bit.
2017-07-22 23:08:31 +02:00
peace-maker 8840ce905d Update to latest SourcePawn (#639) 2017-07-18 12:48:39 +01:00
Nicholas Hastings fd87cb6b23 Clear cached IClient ptr on disconnect (Fixes #637). 2017-07-08 08:25:23 -04:00
Nicholas Hastings 29d1187434 Cache created entities by reference instead of index in SDKHooks (#634)
Fixes #663.
2017-07-06 13:33:34 -04:00
Nicholas Hastings fdac8a1677 Fix KeyValues.SetUInt64 truncating value (#635). 2017-07-06 13:11:01 -04:00
Arthurdead 44c744b8fd Add native to get gpGlobals->frametime (#629) 2017-06-26 11:18:12 +01:00
Nicholas Hastings 7f71f43c2e Another oops-fix for SDK 2013 mods.
Thanks @Ne3tCode
2017-06-24 08:49:36 -04:00
Nicholas Hastings 16d7e39b57 Oops. Fix non-bot IClient lookups for older SDK 2013 mods. 2017-06-23 14:43:39 -04:00
Nicholas Hastings 9a6900a0ba Don't let bots bypass the kick queue. It's not always safe. 2017-06-23 14:43:39 -04:00
Nicholas Hastings e762c2ee56 Add support for IClient lookups on SDK 2013 mods with new enough engine. 2017-06-23 14:43:39 -04:00
Nicholas Hastings c31eaa01a3 Cache player IClient pointer on connect. 2017-06-23 14:43:39 -04:00
Nicholas Hastings 338fdb37f6 Switch to C++11 class initializers for CPlayer. 2017-06-23 14:43:39 -04:00
Nicholas Hastings 79970ca5fa Update CS:GO InfoChanged offset. 2017-06-21 14:40:42 -04:00
Nicholas Hastings bcae547365 Trigger build. 2017-06-21 13:14:57 -04:00
Nicholas Hastings f7434cdae1 Trigger build for hl2sdk-sdk2013 change. 2017-06-21 08:42:12 -04:00
Ruben Gonzalez b9fd586f2f Update CS:GO CBaseClient related gamedata. 2017-06-21 07:37:04 -04:00
Nicholas Hastings e6e54813bb Trigger build against latest hl2sdk-tf2 update. Fixes #624) 2017-06-16 08:10:16 -04:00
Nicholas Hastings 328fa3b430 Merge branch 'master' of https://github.com/alliedmodders/sourcemod 2017-06-15 18:28:10 -04:00
Nicholas Hastings 78a2dec19e Updated more KreedzClimbing gamedata. 2017-06-15 18:26:06 -04:00
Ruben Gonzalez f413ea7f4b Merge pull request #623 from alliedmodders/CSWeaponDrop-change
Use the same weapon drop function in CS:GO as in CS:S
2017-06-12 15:49:58 -04:00
Ruben Gonzalez 2f0272f864 Use the same weapon drop function in CS:GO as in CS:S 2017-06-12 08:39:27 -04:00
Nicholas Hastings a984e23bf6 Update KreedzClimbing gamedir. 2017-06-08 12:44:59 -04:00
Nicholas Hastings 2acf5f85cd Fix ICommandLine lookup on Linux for Insurgency and Day of Infamy. 2017-05-28 08:29:38 -04:00
Ruben Gonzalez fc1da58040 Merge branch 'master' of github.com:alliedmodders/sourcemod 2017-05-28 07:16:45 -04:00
Ruben Gonzalez b3a89b70b5 Update CS:GO gamedata fixes #616 2017-05-28 07:16:01 -04:00
Duko 8753e58d7f Gamedata cleanup. 2017-05-26 10:21:24 -04:00
Ruben Gonzalez ae0ece411e Fix CS:GO gamedata. 2017-05-24 10:42:22 -04:00
Ruben Gonzalez b7be7eb44e Update CS:GO gamedata 2017-05-24 09:10:12 -04:00
Ruben Gonzalez 946150c8a2 Merge branch 'master' of github.com:alliedmodders/sourcemod 2017-05-24 08:41:53 -04:00
Ruben Gonzalez 9ebea1cdac Update CS:GO gamedata. 2017-05-24 08:41:30 -04:00
Duko 27b4f9538a Disable nextmap on Alien Swarm: Reactive Drop.
Bug: Disconnects players on changelevel
https://steamcommunity.com/app/563560/discussions/2/135509124600714346/
2017-05-20 07:23:27 -04:00
Duko 4ce13e9cbd Add gamedata for Alien Swarm: Reactive Drop. 2017-05-20 07:23:27 -04:00
Nicholas Hastings 7006533409 Update Kreedz Climbing gamedata. 2017-05-14 16:41:00 -04:00
Ruben Gonzalez 001503c85f Update CS:GO windows gamedata 2017-05-13 12:13:30 -04:00
Ruben Gonzalez 1831449e81 Update CS:GO gamedata for windows. 2017-05-13 08:44:25 -04:00
Ruben Gonzalez cd530679bd Update CS:GO windows gamedata. 2017-05-12 21:24:11 -04:00
peace-maker 1351df4260 Add OnPlayerRunCmdPost forward (#591)
* Add OnPlayerRunCmdPost forward

Allow plugins to catch the values that are actually used by the game
after some eventual changes by other plugins.

* Add |const| qualifier to arrays in OnPlayerRunCmdPost forward
2017-05-09 15:16:05 +01:00
Peace-Maker de42dfc783 Add Call_PushNullVector and Call_PushNullString
Be able to push NULL_[VECTOR|STRING] to a forward or direct function call.
The callee can check the parameter using the IsNullVector/IsNullString natives.
2017-05-04 22:56:31 -06:00
peace-maker ed42d2feea Add missing parameter to DataPack.IsReadable (#603) 2017-04-30 13:49:18 -04:00
Nicholas Hastings 0a81a28b07 Add contributing guidelines. 2017-04-29 12:54:00 -04:00
Mohammad Ghasembeigi c0ec537f29 Fix typo in file.inc include (#602) 2017-04-28 06:47:09 -04:00
Nicholas Hastings ba81b5b2a5 Force build for hl2sdk-csgo update. 2017-04-26 06:30:56 -04:00
Nicholas Hastings 3671a69b9d Force build for hl2sdk-csgo update. 2017-04-25 21:57:16 -04:00
Nicholas Hastings 6a77e04a8e Fix default value always being when calling ParmValue(string,string). 2017-04-22 21:28:44 -04:00
Nicholas Hastings 8401ca3269 Add gamedata for Alien Swarm: Reactive Drop. 2017-04-22 10:31:41 -04:00
Michael Flaherty a36dafb906 Add PrintToConsoleAll (#601) 2017-04-18 07:29:47 -04:00
Asher Baker e880471296 Update blacklist.plugins.txt 2017-04-11 13:00:21 +01:00
Kyle Sanderson e987cf6bfc Change CHalfLife2::GetMapDisplayName to always check for string substitutions. (#596) 2017-04-03 20:28:10 -04:00
Nicholas Hastings 7bb78e53c6 Update Day of Infamy gamedata. 2017-03-27 15:42:56 -04:00
Nicholas Hastings 99f7ee0588 Update Empires gamedata (supercedes #599). 2017-03-26 11:04:52 -04:00
Steve Zaretti 705ad3bcfc Fixed typo on previous PR (#600)
#598
2017-03-25 14:48:38 -04:00
Ruben Gonzalez 2febfae906 Update GDC symbols.txt (NPOTB). 2017-03-25 13:27:26 -04:00
Ruben Gonzalez 2db2af9343 Fix GDC's Linux SIg offset checking (NPOTB). 2017-03-25 09:29:45 -04:00
Ruben Gonzalez 8e813109a2 Updated CS:GO gamedata. 2017-03-25 09:03:08 -04:00
Ruben Gonzalez 8a6889663d Fix CS:GO gamedata. 2017-03-24 20:15:41 -04:00
Steve Zaretti aee82c9be4 HUD is now supported on CSGO (#598)
* HUD now supported on CSGO

https://forums.alliedmods.net/showthread.php?t=295215

* Update common.games.txt

went a bit too fast
2017-03-20 07:23:53 -04:00
Nicholas Hastings a5d364be49 Merge branch 'tf2-toolchainbeta' 2017-03-14 20:04:43 -04:00
FlaminSarge 3f21fa4b39 Update sm_map behavior to better reflect FindMap/GetMapDisplayName results (#588)
* Update sm_map to use GetMapDisplayName
Increase map name buffer sizes to PLATFORM_MAX_PATH

* Update sm_setnextmap to use ShowActivity2
2017-03-13 15:52:37 -07:00
peace-maker 0961e5dde3 Fix crash when accessing gamerules during mapchange (#593)
If the gamerules proxy entity doesn't exist, don't try to generate the
reference for it.
2017-03-11 08:54:38 -08:00
Ruben Gonzalez 89c4be525b Ignore replay and sourcetv in @spec targeting. (#595) 2017-03-11 16:12:43 +00:00
Nicholas Hastings 1135f9024a Fix error when configuring for csgo SDK build on VS 2017. 2017-03-11 09:28:24 -05:00
Nicholas Hastings 9924a28acf Fix AllowClLanguageVar setting being ignored in CS:GO. 2017-03-05 17:08:25 -05:00
Ross Bemrose 8ad5862461 Make CS:GO recognize both / and \ for GetMapDisplayName (#592) 2017-03-04 08:59:25 -05:00
Peace-Maker b67da15b5b Add IsNativeParamNullVector and IsNativeParamNullString natives
Lets plugins check if some other plugin passed NULL_VECTOR or
NULL_STRING to a native in the native callback.
2017-03-03 11:47:03 -07:00
Peace-Maker c1888c2d05 Add IsNullVector and IsNullString natives
Let plugins check if a string or vector passed to a function is their
NULL_VECTOR or NULL_STRING.
2017-03-03 11:45:39 -07:00
theSaint92 9d932b47fd rockthevote.sp - RoundToFloor() -> RoundToCeil() (#590)
The reason of update is described here https://forums.alliedmods.net/showthread.php?p=2499471
2017-02-28 23:05:00 +00:00
Nicholas Hastings 25af750af0 Update TF2 gamedata. 2017-02-20 19:30:07 -05:00
Benoist3012 08238a8036 Add FireEntityOutput native. (#587)
* AcceptEntityOutput native

* define fix

* MSVC fix and renamed native

* Added requested changes.

* tab/space fix
2017-02-15 19:29:43 -05:00
Nicholas Hastings 61f46845bd Update Insurgency gamedata. 2017-02-09 18:02:22 -05:00
Nicholas Hastings 9aec0b23dd Update FoF gamedata. 2017-02-09 18:02:05 -05:00
peace-maker 86363dd3ec Add ADT array blocksize getter (#578)
Add GetArrayBlockSize and GetStackBlockSize and equivalent properties to
the methodmaps to get the blocksize the array or stack was created with.

Useful when getting array handles from other plugins you didn't create
yourself.
2017-02-09 19:26:14 +00:00
Michael Flaherty 23feb54f6a Update Plugin Blacklist (#574)
* Update Blacklisted Plugins

Sourceless edit of a public plugin being distributed

https://board-tr.nitrado.net/index.php?page=Thread&threadID=22197

* Close comment (oops)
2017-02-09 19:21:00 +00:00
Asher Baker 55e463426d Update blacklist.plugins.txt 2017-02-09 19:07:25 +00:00
peace-maker 0743b757f6 Fix regression with GetEntPropEnt always returning -1 (#584)
Regression in #583

The `CBaseHandle *` was compared to a `IHandleEntity **` always failing
instead of comparing the actual base handles.

Fixes a small typo in MatchTypeDescAsInteger too, where a FIELD_CUSTOM
could fall through badly.
2017-02-09 07:43:15 -05:00
Nicholas Hastings af9852a68f Add support for getting and setting output variables with Get/SetEntProp*. 2017-02-07 07:52:00 -05:00
Nicholas Hastings 113a4a55c6 Fix incorrect bit size given for vectors with FindDataMapInfo. 2017-02-07 07:52:00 -05:00
Nicholas Hastings 5e4a69def6 Update GDC's symbols.txt. 2017-02-06 08:11:01 -08:00
Nicholas Hastings 6e79114dee Update GDC's symbols.txt. 2017-02-06 07:58:57 -08:00
Nicholas Hastings 04055c411e Fix startup crash on CS:GO caused by PR #514 2017-02-06 08:25:51 -05:00
WildCard65 90b3df1181 Add 2 CSGO gamerules netprops to CSGO blocklist if FollowCSGOServerGuidelines is enabled. (#514)
* Add m_bIsValveDS and m_bIsQuestEligible

* Fix compile
2017-02-04 08:18:58 -05:00
peace-maker 9e27a867dd Fix typo in menu manager drawing no spacer (#581)
The "Back" slot was hidden even if the page had a "Next" button. Draw
the spacer correctly!
2017-02-04 08:16:27 -05:00
David Anderson 7239f1d00a Merge pull request #582 from alliedmodders/update-sp
Update to the latest SourcePawn.
2017-02-03 23:12:58 -08:00
David Anderson 613838626e Update to the latest SourcePawn. 2017-02-03 22:45:47 -08:00
Nicholas Hastings 5118ea621d Update Linux CS:GO TerminateRound gamedata. 2017-02-03 23:37:02 -05:00
peace-maker ea8fdd8fbb Fix crash when a database transaction fails (bug 6531) (#577)
If one of the queries fails in a transaction, the DBI system would only allocate an array of the size of the amount of all the successful queries before the failed one. It writes data for all the queries though effectively writing past the array bounds leading to heap corruption.

Create the right sized array!
2017-01-22 22:27:31 -08:00
Kyle Sanderson f9ec1484f8 Update SourcePawn Module to c687974f5451b9d312141bfa020f465bd8bf96aa . 2017-01-21 18:05:54 -08:00
Nicholas Hastings c7f413f1b0 Sanitize servercfgfile and lservercfgfile values with sm_cvar (bug 6579). 2017-01-20 15:29:25 -05:00
GoD-Tony 3fd7b29d64 Fix GDC's Linux sigscanning (#576)
The pointer returned by dlopen is not inside the loaded librarys memory region.
2017-01-20 10:13:31 -05:00
GoD-Tony a0f060f000 Update CS:GO TerminateRound gamedata (#575) 2017-01-20 07:33:42 -05:00
WildCard65 fd399b9b4b Fix memory leak in Regex extension. (#572)
* Fix memory leak in Regex extension.

"x" is never deleted when compile fails.

* Handle handle allocation failures.

Handle allocation failures also result in memory leaks.

* Fix typo.
2017-01-11 21:25:46 -05:00
Nicholas Hastings ad3588d0aa Use newer MM:S api for Ep1/Original engine. (#548)
* Use newer MM:S api for Ep1/Original engine.

* Remove doubled FILENAME_1_6_EP1 define.
2017-01-11 21:25:00 -05:00
Nicholas Hastings d9312799c3 Allow direct event FireToClient if broadcast disabled.
Event.FireToClient should not care whether or not broadcasting
is enabled for the event since we're already intentionally not
broadcasting.
2017-01-03 20:31:40 -05:00
Nicholas Hastings cb39030cce Don't check handle ownership on Event.FireToClient
The handle does not get mutated here, so it is safe. Since we
don't currently support cloning event handles or copying events,
this also facilitates the only easy way of firing an existing game-
created event to a client.
2017-01-03 20:31:40 -05:00
Nicholas Hastings 0aa11374d8 Fix some gamedata issues.
"engine" and "game" were in the same #supported key in places, where
we wanted either to match, rather than both match.
2016-12-26 16:13:38 -05:00
Max Maton 0b7d99f03d Send the complete TextMsg usermsg (#571)
The source 2013 handler for TextMsg expects five strings in the message here: https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/client/hud_chat.cpp#L124

Because sourcemod doesn't send the last four strings along each message sent from sourcemod triggers an assert if the game is not built with RELEASE.
2016-12-25 17:33:18 -08:00
Nicholas Hastings 47d22a3051 Allow CStrike ext to load on CS:GO "mods".
They theoretically cannot have any binary changes since there is no
real SDK, so it should be compatible.
2016-12-25 08:31:39 -05:00
Nicholas Hastings 600f7e2342 Fix gamedata for CS:GO "mods". 2016-12-24 23:28:08 -05:00
Nicholas Hastings fbe377a53d Limit Black Mesa to 6 max radio menu items. (7+ not bound) 2016-12-13 13:30:18 -05:00
Nicholas Hastings 8a7262afd5 Enable Radio menus for Black Mesa. 2016-12-13 13:23:24 -05:00
iNilo 02fcf37088 Use method-map .Style instead of GetMaxPageItems. (sm_msay patch) (#569) 2016-12-12 10:18:59 -05:00
iNilo ec455394b4 Change sm_msay behavior to use GetMaxPageItems instead of hardcoded values (#568)
* Fix for CS:GO not showing the sm_msay exit button

Fix for CS:GO not showing the sm_msay exit button

![mSayPanel.CurrentKey = 9](http://i.imgur.com/t8079No.png)

![mSayPanel.CurrentKey = 10](http://i.imgur.com/qxgVoUM.png)

* Someone ate the semicolon

Made a new one

* Uses gamedata to determine the exit button

Uses gamedata to determine the exit button

* GetMenuStyle -> GetPanelStyle
2016-12-12 08:57:29 -05:00
Nicholas Hastings ee501058fb Fix Panel.Style getter not being bound. 2016-12-12 08:52:26 -05:00
peace-maker b74573fa12 Fix crash in CloneArray for too large arrays (#566)
If there is not enough memory to clone an array, throw an error instead
of crashing the server.
2016-12-11 20:55:11 -08:00
peace-maker d3d16a93cf Fix threaded query's result handle access rights (#567)
Plugins were able to close the results handle in the threaded query
callback causing a double free crash. The access rights are setup right
before the handle is created, but weren't used.
2016-12-11 16:35:53 -08:00
Asher Baker 71788e2325 Update blacklist.plugins.txt 2016-12-09 18:36:35 +00:00
Nicholas Hastings 70d81430f8 Add support for more SQLite database open options. (#565)
* Add support for in-memory SQLite databases.

* Add support for opening SQLite databases via file URI.
2016-12-04 11:23:08 -05:00
ErikMinekus 19db7aef46 Fixed description for CharToLower and CharToUpper (#564) 2016-12-04 09:08:13 -05:00
peace-maker 151834a948 Fix case of not calling OnMapTimeLeftChanged in CS:GO (#563)
Round end reasons in CS:GO are +1 from the ones in CS:S. The
CSRoundEnd_GameStart reason for when the OnMapTimeLeftChanged forward
should be called should be one higher than in CS:S.
2016-12-01 17:09:48 -08:00
GoD-Tony ec9af8feb6 Fix null check when generating signature. (#562) 2016-12-01 08:44:23 +00:00
peace-maker 3e201dd521 Add DETOUR_DECL_* marcos for more parameter counts (#561)
Add more macros for up to 8 parameters, because DETOUR_DECL_MEMBER8 is
the highest one yet.
2016-11-29 14:55:39 -08:00
Nicholas Hastings 152a86f6f4 Fix CS:GO OnGetWeaponPrice forward on Linux. 2016-11-29 11:05:39 -05:00
Nicholas Hastings 93da058dbd Fix innocuous copy/paste error. 2016-11-29 11:05:18 -05:00
Nicholas Hastings 7885d62f03 Add gamedata missing from last commit. 2016-11-29 10:53:04 -05:00
Nicholas Hastings c4487b74ee Semi-tested fix for CS:GO GetWeaponPrice on Linux. 2016-11-29 10:42:05 -05:00
Nicholas Hastings 90cefa9daf Revert "Update CS:GO GetWeaponPrice gamedata."
This reverts commit f3994ce6dc.
2016-11-29 09:01:33 -05:00
Nicholas Hastings f3994ce6dc Update CS:GO GetWeaponPrice gamedata. 2016-11-29 08:52:38 -05:00
Nicholas Hastings 2f82ef5ec6 Add CS:GO FindEntityByClassname signature for Linux. 2016-11-29 07:56:48 -05:00
Nicholas Hastings e2ac0a085e Update Linux IServer gamedata. 2016-11-28 22:20:23 -05:00
Ruben Gonzalez 6290834e2b Update cstrike extension gamedata. 2016-11-28 21:54:24 -05:00
Nicholas Hastings efa98f6b7f Untested Core, SDKTools, SDKHooks fixes. (CStrike ext fixes pending) 2016-11-28 21:27:53 -05:00
Asher Baker 87b0a8533f Update blacklist.plugins.txt 2016-11-17 23:21:50 +00:00
Nicholas Hastings 7a4a0271ef Trigger build for hl2sdk-bms changes. 2016-11-07 21:03:22 -05:00
Nicholas Hastings 990b45a273 Update TF2 gamedata. 2016-11-02 20:08:26 -04:00
David Anderson 1ff7b72bb0 Merge pull request #558 from peace-maker/suppress_not_runnable
Suppress logging of "Plugin not runnable" errors
2016-10-27 02:57:47 -04:00
Peace-Maker 7907a07686 Update to latest SourcePawn 2016-10-27 00:42:20 -06:00
Peace-Maker 4a8068d1c4 Suppress logging of "Plugin not runnable" errors
SourceMod itself and thirdparty extensions call functions in plugins
without making sure it is runnable. The plugin pausing feature isn't
supported anymore and is set to get nuked #438 which will reduce the
amount of not-runnable error reports.

We can't fix every third party extension, so suppressing the error from
the logs will stop the spam until pausing is removed.

#489 can be reverted after this.
2016-10-26 23:48:56 -06:00
Wliu 6a4500733d Add spacing to compile.sh (#53) 2016-10-24 14:50:24 +01:00
Luki 482a2f2eb5 Add AutoExecConfig native call to basevotes.sp (#535) 2016-10-14 13:17:23 -07:00
Luki e74b5807a9 Add AutoExecConfig native call to basevotes.sp (#534)
Basevotes convars are missing from sourcemod.cfg and there is no config file for this, so I added AutoExecConfig.
2016-10-14 13:16:45 -07:00
Kyle Sanderson 371e9f2f93 Check multiple engine sources for updated AuthIDs. (#552)
* Check multiple engine sources for updated AuthIDs.
* References are not defined.
2016-10-14 12:44:00 -07:00
Kyle Sanderson 20b7592fcd GetPlayerNetworkIDString isn't alone anymore, we have friends. (#551)
* GetPlayerNetworkIDString isn't alone anymore, we have friends.

Completely speculative CS:GO fix, 50/50, 60/40.

* Preserve existing cycle-saving techniques.
* Style.
2016-10-13 22:14:51 -07:00
Nicholas Hastings 9158d3734e Trigger build against hl2sdk-csgo change. 2016-10-13 21:34:34 -04:00
Nicholas Hastings 6f9776e3f4 Trigger build against hl2sdk-csgo change. 2016-10-13 21:29:15 -04:00
Nicholas Hastings d5ff829952 Speculative fix for CS:GO GetClientAuthId issue... 2016-10-13 21:21:58 -04:00
Nicholas Hastings 7fda6e412a Don't build for CS:GO on Mac anymore. (Game is 64-bit-only there now). 2016-10-13 20:54:54 -04:00
Nicholas Hastings 273cab1bbf Trigger build for hl2sdk-csgo update. (Fixes crash on player join.) 2016-10-13 20:40:17 -04:00
Ruben Gonzalez c097bdc9ce Update more tf2 gamedata. 2016-10-12 21:36:29 -04:00
Ruben Gonzalez da69ae0371 Update tf2 gamedata. 2016-10-12 21:22:48 -04:00
Nicholas Hastings 72ddd865d1 Add note about uninitialized data in ArrayList.Resize / ResizeArray. 2016-10-11 13:45:36 -04:00
Nicholas Hastings 1dd84e3ed3 Update CS:GO InfoChanged gamedata. (Fixes SetClientInfo). 2016-10-07 14:41:53 -04:00
Jonhasacat fdb80bd9cf Fixed offsets for SetClientName (#547) 2016-10-07 09:41:05 +01:00
Ruben Gonzalez 549fea4b0a Trigger Build 2016-10-06 23:19:09 -04:00
Ruben Gonzalez 0c08b72b5e Update pushbuild.txt 2016-10-06 22:36:29 -04:00
»SoD« XeroX 227e324aa9 Fixed wrong return type in UserMessageToBfRead (#546)
Fixed wrong return type in UserMessageToBfRead
2016-10-06 13:55:27 +01:00
Nicholas Hastings aae39da235 Update Insurgency gamedata. 2016-10-05 21:07:35 -04:00
Nicholas Hastings cff585f2a1 Fixed doc on RadToDeg. 2016-10-04 12:42:22 -04:00
Asher Baker ec7f1727e5 Allow setting multiple chat trigger characters (PR #449, bug 4341, bug 5668)
Special characters only, minus a couple of potentially-problematic characters.

Technically this is a breaking change - but anyone using multi-char triggers is probably crazy anyway and has been driven off by now.
2016-10-04 16:34:42 +01:00
Nicholas Hastings 098a693c1a Fixed return doc on CharToLower, CharToUpper. 2016-10-03 19:35:49 -04:00
Asher Baker 215599b90f Merge PR #489: Do not call functions in paused plugins
This should be reverted when pausing is removed, see PR discussion.
2016-10-03 16:51:45 +01:00
peace-maker 47eb7d60e5 Fix use-after-free crash in SQLite extension (#481)
When the server crashed and the process got terminated, the SqDriver
instance was killed first (e.g. by atexit). SqDatabase tries to access
SqDriver in its destructor.
This patch tells SqDatabase to not use anything from SqDriver anymore
after SqDriver got destroyed.

Next to that, the clientprefs extension relied on the IDatabase pointer
being valid to get the driver pointer. Cache the pointer, so the dbi
system still knows the IDBThreadOperation belonged to the now gone
driver, even after the database object is gone.
2016-10-03 16:31:17 +01:00
Kyle Sanderson 2deaa666f3 Fix erroneous () in DebugReport:: printouts. (#517) 2016-10-03 16:29:51 +01:00
Asher Baker 47dd2870d9 Merge pull request #476 from alliedmodders/query-format
Implement an auto-escaping Format native for SQL query construction
2016-10-03 16:20:01 +01:00
Nicholas Hastings 999f37800c Strip invalid UTF-8 char from end of player names. (#545) 2016-10-02 18:34:27 -04:00
Asher Baker a54ee12ade Update MakeBleed gamedata 2016-10-01 18:15:41 +01:00
David Anderson 07ba8df977 Merge pull request #544 from alliedmodders/update-amtl
Update to the latest SourcePawn and AMTL.
2016-09-24 17:45:34 -07:00
David Anderson 27e812461f Update to the latest SourcePawn and AMTL. 2016-09-24 16:45:04 -07:00
Nicholas Hastings 29d4ea3245 Trigger build for hl2sdk-tf2 update. 2016-09-21 13:16:43 -04:00
iNilo f70a3ea297 Typo in OnRemoveBan documentation (#542)
Fix typo in OnRemoveBan documentation
2016-09-17 17:23:59 +01:00
Nicholas Hastings 237db0504c Update GoldenEye:Source gamedata (bug 6529). 2016-09-11 14:51:04 -04:00
Kyle Sanderson 015b9e92b6 Sync AMTL with upstream fixes. (#538) 2016-08-28 14:01:53 -07:00
David Anderson ab53e580db Merge pull request #537 from peace-maker/cellarray_bridge
Add ICellArray creation/deletion to logic bridge
2016-08-27 18:17:37 -07:00
Peace-Maker ecbedb7b11 Don't expose CellArrays in ISourceMod to extensions
Don't let extensions have access to the internal implementation of cell
arrays.
2016-08-26 15:09:18 -07:00
Peace-Maker 5b9ae5917b Add ICellArray and create/free in ISourceMod
Add an ICellArray interface to expose the adt_array CellArray class from
logic to core.
Add methods to ISourceMod to create and delete ICellArray instances in
logic.
2016-08-21 21:32:23 +02:00
Nicholas Hastings f3c454084a Update to latest Sourcepawn for fixens. 2016-08-19 10:22:23 -04:00
Nicholas Hastings 94383d995d Fix building of MySQL DBI extension on VS 2015+. 2016-08-18 14:20:37 -04:00
Ruben Gonzalez 51a6b9ce30 Update CS:GO gamedata for latest update. 2016-08-06 17:30:18 -04:00
Nicholas Hastings a25e3755db Fix typo in updated Dino D-Day gamedata. 2016-08-06 13:34:41 -04:00
Nicholas Hastings 0707f14c7a Update Dino D-Day gamedata.
(Piggy-backing off of Blade Symphony now instead of Alien Swarm.
They switched to Portal 2 engine so detects as Blade Symphony, and
both are pretty vanilla at the engine level.)
2016-08-06 10:51:50 -04:00
Ruben Gonzalez 4b52a7e531 Update Insurgency gamedata. 2016-08-02 16:13:30 -04:00
Ruben Gonzalez f2751815be Fix CS:GO signature for conflicts with detours. 2016-08-02 12:11:38 -04:00
Ross Bemrose 988d023e89 Fix /nominations returning Plugin_Continue (#532) 2016-07-31 13:16:38 -04:00
Luki f06bdc9121 Add expanded documentation for sm_reserve_type (#531)
There is no information about sm_reserve_type 2 in the cfg file, even though reserve type 2 exists in the plugin and on the wikia.
2016-07-27 12:56:15 -07:00
David Anderson a7f5fb7a08 Fix Linux build. 2016-07-26 14:46:58 -07:00
David Anderson 61e958e679 Merge pull request #529 from peace-maker/optional_natives
Keep optional natives optional after reloading
2016-07-26 12:59:32 -07:00
Nicholas Hastings 919a1e7bb9 Fix typo in DoI SlapSound13. 2016-07-26 11:15:28 -04:00
Nicholas Hastings 56585fc32a Add preliminary gamedata for Day of Infamy. 2016-07-26 08:26:26 -04:00
David Anderson 57229aac91 Merge pull request #530 from alliedmodders/new-amtl
Update to SourcePawn 1.9 and the latest AMTL.
2016-07-26 01:43:52 -07:00
David Anderson 3cccfc15da Update to SourcePawn 1.9 and the latest AMTL. 2016-07-26 01:36:35 -07:00
Nicholas Hastings 7008a566a8 Redownload GeoIP data if file size is 0, regardless of file modified time.. 2016-07-24 08:26:00 -04:00
Nicholas Hastings 100ddd6724 Trigger build. 2016-07-22 10:26:58 -04:00
Peace-Maker 2c8614c639 Keep optional natives optional after reloading
Bug 6518

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

Load basetriggers
Load mapchooser
Unload mapchooser
Load mapchooser
Unload mapchooser

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

The change in ShareSys isn't needed to fix the error, but is included to
keep the SP_NTVFLAG_OPTIONAL flag consistent.
2016-07-21 01:52:47 +02:00
David Anderson a34555c45d Merge pull request #527 from alliedmodders/fix-new-sp
Fix syntax for SourcePawn update.
2016-07-09 12:28:43 -07:00
David Anderson adba0560d7 Fix syntax for SourcePawn update. 2016-07-09 12:24:18 -07:00
David Anderson 1b30e78db3 Update to the latest AMTL. 2016-07-09 12:16:17 -07:00
Nicholas Hastings cb7eeef014 Remove TFHoliday_SpyVsEngyWar - no longer exists. 2016-07-08 15:44:49 -04:00
Nicholas Hastings fc9aa50f3c Update TF2 "holiday" gamedata. 2016-07-08 15:44:16 -04:00
Nicholas Hastings f268fddc3c Update TF2 gamedata. 2016-07-07 19:58:15 -04:00
Asher Baker 3152e7f43f Force build for CS:GO CUserCmd mouse vector fix 2016-07-03 01:04:02 +01:00
Nicholas Hastings a2ceb8f7d5 Trigger build for hl2sdk-csgo update. 2016-06-25 07:36:34 -04:00
David Anderson 9db8c4af3e Merge pull request #524 from alliedmodders/rm-halfup
Remove half-up rounding.
2016-06-22 16:11:18 -04:00
David Anderson 34dedcaab1 Remove half-up rounding. 2016-06-22 12:54:36 -07:00
Asher Baker 58c00f4487 Download Clang from SourceMod site (#523)
Also switch to Clang 3.8
2016-06-20 17:12:58 +01:00
peace-maker f425236bac Increase topmenu display buffer size (#520)
The buffer for menu options was 64 chars. That limit can easily be
reached by some utf8 string which would get truncated. Double the buffer
size to 128 chars.
2016-06-20 16:03:54 +01:00
Luki 023a3ca056 Change behaviour for mass renaming (#521)
Append number instead of randomizing when renaming multiple players.

Before the change:
sm_rename @all "Random Name" - this would rename everyone but the names would be randomized (random characters and numbers)

After the change:
sm_rename @all "Random Name" - this would rename everyone to: Random Name 1, Random Name 2, Random Name 3 ...  etc.

Description:
sm_rename can only rename 1 player at a time, when you specify a name. If you use this command on multiple players (like sm_rename @bots "A random bot"), their names get randomized(just like when you dont specify a name). So I propose this change, so you can rename multiple people.

PS:The funny thing is that there was a comment in the code about not wanting everyone to have a same name, but sm_rename doesnt a have check for this so you could use sm_rename to rename everyone, one by one, using the same name.
2016-06-20 13:24:36 +01:00
Nicholas Hastings 34a0cb170e Update FoF gamedata. 2016-06-16 16:15:48 -04:00
Nicholas Hastings 5e4ee1b849 Update CS:GO gamedata. 2016-06-16 16:14:36 -04:00
Nicholas Hastings f668b3fe6c 🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍 2016-06-11 12:43:04 -04:00
Nicholas Hastings f12924458f Merge branch 'vs2015' 2016-06-11 12:14:12 -04:00
Nicholas Hastings 857f5fcced Add PowerShell version of checkout-deps script for Windows (NPOTB). 2016-06-11 11:17:29 -04:00
Nicholas Hastings 4eb1e8a4b0 Fix float unary minus operator not functioning properly after PR #510. 2016-06-09 21:36:46 -04:00
Nicholas Hastings 0f96a28cca Use VSERVERTOOLS003 in Nuclear Dawn if server has it available. 2016-06-08 12:32:20 -04:00
Fyren 4d8e76202d Merge pull request #518 from alliedmodders/UTIL_ReplaceAll-fix
Fix UTIL_ReplaceAll not properly tracking length (bug 6472)
2016-06-06 16:40:17 -06:00
Fyren e356758743 Merge pull request #516 from alliedmodders/scheduledpluginreloads
Better plugin reloads.
2016-06-06 16:29:07 -06:00
Fyren 4e654704dc Slightly better handling of plugin reloading. 2016-06-06 22:26:34 +00:00
Fyren 1790033458 Fix UTIL_ReplaceAll not properly tracking length. 2016-06-06 06:29:53 +00:00
Nicholas Hastings e3d7a047bd Fixed varint sendprops being treated improperly in CS:GO. 2016-06-05 11:03:18 -04:00
Nicholas Hastings a67c54a67c Bump version number. 2016-06-05 10:10:07 -04:00
ErikMinekus b9f7f20046 Fixed return doc spacing for GetGameFolderName (#515) 2016-05-31 07:34:54 -04:00
Nicholas Hastings c42f73b66c Update more Insurgency gamedata. 2016-05-27 09:33:20 -04:00
Nicholas Hastings 5a2bc4479d Update Insurgency gamedata. 2016-05-26 13:43:07 -04:00
Nicholas Hastings 31928e6282 Fix late/incorrect calls to TR_GetEntityIndex potentially causing crash. (#513) 2016-05-21 14:44:00 -04:00
Nicholas Hastings 9b3b2eb23e Fix comment and reduce branching in TF2_IsPlayerInCondition. 2016-05-21 12:55:47 -04:00
Nicholas Hastings e127a55b0a Clarified func doc for some edict/entity funcs. 2016-05-21 12:53:55 -04:00
Nicholas Hastings b7223932d2 Fix some funcommands gamedata for CS:GO.
The base SoundFinal and SoundBoom files don't exist there.
2016-05-21 12:53:27 -04:00
ErikMinekus 542bb59978 Update large includes for transitional syntax #2 (#511) 2016-05-21 09:16:49 -04:00
ErikMinekus f91d659c6f Update large includes for transitional syntax #1 (#510) 2016-05-21 08:52:43 -04:00
ErikMinekus 7451257578 Update small includes for transitional syntax (#509) 2016-05-20 15:56:21 -04:00
Nicholas Hastings d8835a426f Update FoF gamedata. 2016-05-20 09:53:43 -04:00
Nicholas Hastings 5edc46c994 Don't enable FileExists hook (SendFile forward) on TF2 servers with Replay. (#512)
It will crash. See PR #493 for details.
2016-05-19 19:11:28 -04:00
Kyle Sanderson 57c6e09fcf Merge pull request #493 from alliedmodders/tfreplaycrash
Only hook IBaseFileSystem::FileExists if we're also hooking INetChannel
2016-05-19 15:23:05 -07:00
Nicholas Hastings 626ee9ac65 Update more BM:S gamedata and trigger build against SDK change. 2016-05-16 17:52:38 -04:00
Nicholas Hastings 59191486b6 Update BM:S gamedata. 2016-05-15 09:16:09 -04:00
Nicholas Hastings f645ca0daf Update FoF gamedata. 2016-05-14 08:01:10 -04:00
Nicholas Hastings 20c9815619 Add support for sending gameevent to specific client. (#505) 2016-05-12 22:15:23 -04:00
Nicholas Hastings 98e8f70424 Remove some unused gamedata. 2016-05-11 15:16:48 -04:00
ErikMinekus 6d9f46e983 Update fun plugins for transitional syntax (#508) 2016-05-11 10:56:12 -04:00
ErikMinekus d9fb0ba64e Update base plugins for transitional syntax (#507) 2016-05-11 10:44:58 -04:00
ErikMinekus e8734ccf28 Update small plugins for transitional syntax (#506) 2016-05-11 09:32:34 -04:00
Nicholas Hastings 11b4320204 Fix potential crash on plugin load when a required library is not found. 2016-04-27 10:49:39 -04:00
ErikMinekus fb2117137e Update basebans and SQL admins plugins for transitional syntax (#484) 2016-04-27 09:34:22 -04:00
Maxim Telezhenko 730a9a4a40 Transitional Syntax for reservedslots.sp (#501) 2016-04-26 23:19:53 -04:00
Nicholas Hastings 40f2512317 Remove support for Source 1 Dota 2. (#496) 2016-04-26 23:18:47 -04:00
FlaminSarge 6dc602ad7c Update TFCond and tf2_stocks enums (#499)
* Update tf2_stocks DmgCustom and TFWeapon defines

* Update tf2 TFCond defines
2016-04-26 23:18:34 -04:00
Nicholas Hastings b5876bdd33 Allow Plugin_Changed return on event PreHooks to not block. (#503)
This avoids issues from confusion that users have, returning Plugin_Changed
after altering event data, when Plugin_Changed isn't required and wasn't supported
in that scenario, and instead acted like Plugin_Handled.
2016-04-26 23:18:00 -04:00
Nicholas Hastings 29a5daab98 Allow support for running on filesystems that use 64-bit inodes on Linux. (#502)
Most supported games don't even support this case, but at least CS:GO does. WIthout
this fix, some filesystem calls can fail, or in the case of readdir, fail to return all/any files.
This was first observed when using an XFS-formatted volume on CentOS 7 x64.
2016-04-26 23:17:36 -04:00
Nicholas Hastings ed46ca3328 Add support for retrieving game server Steam Id (bug 6404). (#495) 2016-04-26 23:17:08 -04:00
Kyle Sanderson e6ec89d145 Change checkout-deps to use tls for mysql.
http://cdn.mysql.com -> https://cdn.mysql.com
2016-04-15 19:10:23 -07:00
Alexander Georgievskiy b196d3e3c0 http://cdn.mysql.com -> https://cdn.mysql.com 2016-04-16 00:15:40 +03:00
Nicholas Hastings ebb5607bd4 Really fix FollowCSGOServerGuidelines setting being ignored in SDKTools (always on) (bug 6480). 2016-03-30 15:59:51 -04:00
Nicholas Hastings 416abd81a1 Add support for compiling with VS2015. 2016-03-30 08:56:27 -04:00
Nicholas Hastings c536a43914 Merge pull request #494 from akowald/gamerules-edictstate
Always send changes when using the GameRules_SetProp* natives.
2016-03-25 07:46:27 -04:00
akowald 283bdad552 Makes sending the change the default behavior with the GameRules_Set* natives. 2016-03-25 00:43:39 -04:00
Nicholas Hastings 0c8e6e2918 Fix FollowCSGOServerGuidelines setting being ignored in SDKTools (always on). 2016-03-21 15:29:48 -04:00
Kyle Sanderson 8924a9744e Only hook IBaseFileSystem::FileExists if we're also hooking INetChannel::SendFile or INetChannel::ProcessPacket.
This works around a TF Replay SourceHook crash that Johns was seeing when using 1.8.
SourceHook is not thread-safe at the time of this writing.
2016-03-20 14:07:08 -07:00
Nicholas Hastings 5815e49d93 Merge pull request #491 from alliedmodders/travis-clang-3.7
Update TravisCI build to use Clang 3.7.
2016-03-18 11:19:56 -04:00
Nicholas Hastings 70bc24218f Update TravisCI build to use Clang 3.7. 2016-03-18 08:31:01 -04:00
Peace-Maker 4f4903a05e Don't try to call functions in paused plugins
This avoids spam of "Plugin not runnable" exceptions on shutdown or
plugin unload.

When re/unloading a plugin which has other ones depending on it, like
the adminmenu, It pauses the depending plugins putting them in an
"Depends on plugin: %s" error state. ForwardSys doesn't remove them from
the forward lists on pause, specially the global forwards, and still
tries to call all the global forwards like OnPlayerRunCmd and
OnLibraryAdded etc. on the paused plugins. Executing functions in paused
runtimes has been ignored in the VM before introducing the "Exception"
mechanism, but now they're all logged.

This adds checks to make sure the plugin is runnable before calling a
function. (Stolen from #438)
2016-03-14 13:24:23 +01:00
David Anderson f7bb423f06 Update to the latest SourcePawn and AMTL. 2016-03-13 16:29:11 -07:00
Nicholas Hastings 19bcc8417d Merge pull request #486 from alliedmodders/csgo-safety
Add initial version of safety checks for CS:GO to attempt to avoid user GSLT bans.
2016-03-02 15:26:34 -05:00
Nicholas Hastings b65de29c92 Add initial version of safety checks for CS:GO to attempt to avoid user GSLT bans. 2016-03-02 15:25:01 -05:00
David Anderson 7bd1ed2339 Merge pull request #477 from 2m/wip-fix-sample-extension-2m
Fix compilation of sample extension
2016-02-29 18:12:15 -05:00
David Anderson a7c7e72004 Merge pull request #485 from peace-maker/plugin_unloading
Fix scheduled plugin unloading
2016-02-29 10:53:26 -05:00
Peace-Maker df59fd5b0e Fix scheduled plugin unloading
When unloading a plugin no plugin is allowed to execute code. There's
been some flawed logic in the scheduling, leading it to bail out if the
plugin was marked for scheduled unloading..

Also change the "error" message of `sm plugins unload` to something
nice.
2016-02-29 16:40:24 +01:00
Kyle Sanderson 0d80d3c57c Merge pull request #482 from peace-maker/ext_deps_name
Fix printing dependent extension name on unload
2016-02-27 15:00:35 -08:00
Peace-Maker 060f63e9db Fix printing dependent extension name
Typo which will print the name of the extension being unloaded instead
of the one which would be unloaded as well because of it.
2016-02-27 21:22:09 +01:00
Asher Baker e243de0538 Merge pull request #480 from iNilo/patch-1
Add missing @error annotation to GetClientSerial
2016-02-25 14:17:57 +00:00
iNilo 11253eae1c GetClientSerial does not have @error documentation
Native "GetClientSerial" reported: Client index 0 is invalid
2016-02-25 15:06:23 +01:00
Nicholas Hastings c81e1865e0 Merge pull request #479 from TheCreeper/master
Add support for EmpiresMod to mapchooser plugin.
2016-02-22 17:12:07 -05:00
TheCreeper 39d9f4da3f Be consistent. 2016-02-22 21:15:38 +00:00
TheCreeper 6d5dd40875 Add support for Empires to mapchooser. 2016-02-22 21:10:34 +00:00
Nicholas Hastings 051e7cf320 Update Empires gamedata. 2016-02-20 23:32:35 -05:00
Martynas Mickevičius 37210c9ef1 Fix compilation of sample extension. 2016-02-20 03:27:49 +02:00
Nicholas Hastings 3215e25318 Update TF2 gamedata. 2016-02-19 10:10:59 -08:00
Ruben Gonzalez 9d72f0b335 Update CS:GO gamedata for cstrike extension. 2016-02-18 11:16:05 -05:00
Ruben Gonzalez 803c6b0a82 Update TerminateRound detour comment's 2016-02-18 11:15:39 -05:00
Nicholas Hastings 4b04b8d51e Enable ShowMenu and HudMsg for KreedzClimbing. 2016-02-15 14:58:48 -05:00
Asher Baker b239430247 Merge pull request #458 from stickz/patch-5
Move repeated code in reserved slots plugin to a helper function
2016-02-15 17:11:39 +00:00
Asher Baker 700ec92a9a Implement an auto-escaping Format native for SQL query construction 2016-02-15 15:05:16 +00:00
Asher Baker 272655f340 Changed AddString to be failable 2016-02-15 14:57:56 +00:00
Asher Baker 7c3bcc9c25 Add missing buffer size check to SQLite QuoteString impl 2016-02-15 14:19:11 +00:00
Asher Baker 1ff13c59cf Move the guts of Format to a helper function 2016-02-15 12:49:22 +00:00
Asher Baker 936bdc47f0 Add argument index to format error messages 2016-02-15 10:20:08 +00:00
Asher Baker 9008705b9d Pass format flags down to AddString 2016-02-15 10:16:14 +00:00
Asher Baker 886c358e91 Renumber format flags for sanity 2016-02-15 10:09:48 +00:00
Kyle Sanderson 76f33d2742 Merge pull request #474 from Benoist3012/Benoist3012-tf2-tfcond-enums-update
Update tf2.inc TFCond enums
2016-02-06 14:56:35 -08:00
Benoist3012 5703c323d6 Update tf2.inc 2016-02-06 15:27:09 +01:00
Benoist3012 40434f54aa Update tf2.inc 2016-02-06 13:35:37 +01:00
Nicholas Hastings b9e9e15647 Merge pull request #473 from akowald/gamerules-crash
Fix for crashes related to the GameRules_Set* natives.
2016-02-03 18:30:53 -05:00
akowald 7fbc9869bd Fix for crashes related to the GameRules_Set* natives. 2016-02-03 16:20:31 -05:00
Nicholas Hastings 148943dad6 Merge pull request #472 from alliedmodders/more-stv-detect-fix
Fix SourceTV bot detection on Source SDK 2013 mods and BM:S.
2016-01-25 19:41:50 -05:00
Nicholas Hastings 90ca9d7a47 Fix SourceTV bot detection on Source SDK 2013 mods and BM:S.
See bug 5529.
2016-01-25 18:52:58 -05:00
Nicholas Hastings a0e6f33828 Fix some typos in BM:S SDKHooks gamedata. 2016-01-25 06:59:42 -08:00
Kyle Sanderson 52e3b580f3 Merge pull request #471 from peace-maker/drawitem_returntag
Change Panel.DrawItem return tag to |int| (bug 6463)
2016-01-22 09:45:29 -08:00
Peace-Maker 1c0a5b0420 Change Panel.DrawItem return tag to |int| (bug 6463) 2016-01-22 18:30:32 +01:00
Asher Baker f9448e30c9 Merge pull request #470 from powerlord/sampleext-updateambuild
Update sample_ext's AMBuildScript
2016-01-19 19:49:36 +00:00
Ross Bemrose 2f5257fcb5 Update sample_ext's AMBuildScript with the changes used in SourceMod's AMBuildScript 2016-01-19 12:29:15 -05:00
Nicholas Hastings 5a50c28afd Merge branch 'static-lib-sym-vis' 2016-01-09 11:50:42 -05:00
Nicholas Hastings 3c24ce4d7b Change --exclude-libs to be for Linux only. Apple's linker does not support it. 2016-01-09 11:50:13 -05:00
Nicholas Hastings 441bb0483a Merge pull request #469 from alliedmodders/static-lib-sym-vis
Don't export (all) symbols from included static lib on Linux/Mac.
2016-01-09 11:34:09 -05:00
Nicholas Hastings 05c7bd4be9 Don't export (all) symbols from included static lib on Linux/Mac. 2016-01-09 10:26:12 -05:00
Nicholas Hastings 3dc9c23b65 Updated NMRiH gamedata. 2016-01-07 20:03:08 -05:00
David Anderson e0e9e87326 Merge pull request #468 from splewis/new-syntax-testing
Update sourcepawn testing include to new syntax.
2016-01-07 12:35:12 +07:00
Sean Lewis 52c7ef0f6f Update sourcepawn testing include to new syntax. 2016-01-06 18:35:16 -06:00
Nicholas Hastings 7ada5f957e Merge pull request #467 from peace-maker/removefromtrie_tag
Add missing |bool| return tag to RemoveFromTrie native
2016-01-05 10:55:18 -05:00
Peace-Maker d3cc797f0f Add missing |bool| return tag to RemoveFromTrie native 2016-01-05 16:52:30 +01:00
Nicholas Hastings 8f4f0f61ea Merge pull request #466 from peace-maker/inform_customgd
Add info message when loading custom gamedata
2016-01-04 17:54:19 -05:00
Peace-Maker edb820eae8 Add info message when loading custom gamedata
Print a message to console when there is a gamedata file loaded from the
|custom| folder.
2016-01-03 22:28:24 +01:00
Nicholas Hastings 497b51814d Merge pull request #465 from klausenbusk/bug-5515
Allow plugins to suppress entity outputs (bug 5515).

Contributed by:
Ryan Stecker <[email protected]>
Peace-Maker <[email protected]>
2015-12-30 20:33:25 -05:00
Nicholas Hastings 311203b5cf Fix Neotokyo SDKHooks gamedata (bug 6453). 2015-12-30 18:34:02 -05:00
Nicholas Hastings 7dc4d49b86 Fix Neotokyo SDKTools gamedata (bug 6453). 2015-12-30 16:11:22 -05:00
Kristian Klausen 4cba1925fd Allow plugins to suppress entity outputs (fix 5515). 2015-12-30 17:51:57 +01:00
Nicholas Hastings 23fafbd47d Update PVKII gamedata. 2015-12-30 08:34:54 -05:00
Nicholas Hastings 7fbcb81916 Merge pull request #456 from alliedmodders/canbeautobalanced
Add support for hooking CanBeAutobalanced to SDKHooks.
2015-12-29 15:56:24 -05:00
Kyle Sanderson 2812f227b7 Change SDKHooks CanBeAutoBalanced to only MRES_SUPERCEDE if the return changes. 2015-12-29 12:44:03 -08:00
Nicholas Hastings ce07a44fb0 Merge pull request #455 from alliedmodders/normalshook-typeset
Converted NormalSHook to typeset and added old prototype.
2015-12-29 14:56:58 -05:00
Nicholas Hastings 23f9a1a524 Typo fix fix. 2015-12-22 16:18:53 -05:00
Ruben Gonzalez c81466bb33 Trigger Build 2015-12-22 12:19:57 -05:00
Nicholas Hastings 26b056d2c4 Typo fix. 2015-12-22 09:58:57 -05:00
Nicholas Hastings bd9fd43b76 Fix for Black Mesa's different GiveNamedItem prototype. 2015-12-22 09:55:15 -05:00
Nicholas Hastings 184ad9083c Fix for varint gamerules sendprops being treated improperly in Black Mesa. 2015-12-22 09:54:55 -05:00
Nicholas Hastings 8e7093ba2b Fix Black Mesa gamerules gamedata having always been incorrect. 2015-12-22 09:54:28 -05:00
Nicholas Hastings eb3e7fcc32 Update Black Mesa gamedata for game update. 2015-12-22 09:54:05 -05:00
Nicholas Hastings c5a81d7c6f Adjust for hl2sdk-bms updates. 2015-12-22 09:53:05 -05:00
Nicholas Hastings f42e9ff812 Merge branch 'master' of https://github.com/alliedmodders/sourcemod 2015-12-17 15:01:14 -05:00
Nicholas Hastings dc791f1fbe Update NMRiH gamedata. 2015-12-17 04:40:19 -08:00
Nicholas Hastings bbd3d3f4b6 Update TF2 gamedata.. 2015-12-16 14:53:13 -05:00
Asher Baker 8370112aa4 Merge pull request #462 from GoD-Tony/vtable-dump-fix
Update IDA vtable dump script
2015-12-12 21:44:56 +00:00
GoD-Tony 5e51ca0f80 Update IDA vtable dump script
A small fix to work with multiple versions of IDA x86 & x64
2015-12-12 22:01:21 +01:00
Asher Baker 7821c34a7b Force a build to make sure I didn't break CS:GO 2015-12-11 20:54:05 +00:00
Nicholas Hastings 272d3c4b9e Trigger build for hl2sdk-csgo updates. 2015-12-09 13:37:38 -05:00
Nicholas Hastings dd9d60e1d7 Revert part of Windows CS:GO gamedata change to fix IServer lookup. 2015-12-09 10:54:15 -05:00
Nicholas Hastings 3219abcd1f Update CS:GO engine gamedata. 2015-12-09 08:29:56 -05:00
Asher Baker 5733bb5b08 Force build for CS:GO SDK changes 2015-12-09 10:45:20 +00:00
stickz 75484c02a0 Add CheckHiddenSlots() Function 2015-11-27 12:51:38 -05:00
Nicholas Hastings 3e1ba143bf Merge pull request #457 from GoD-Tony/vtable-dump-x64
Add x64 support to IDA vtable dump script (npotb).
2015-11-26 16:46:59 -05:00
GoD-Tony d3ea10a600 Add x64 support to IDA vtable dump script 2015-11-26 17:36:14 +01:00
Nicholas Hastings 818e1e4e18 Add support for hooking CanBeAutobalanced to SDKHooks. 2015-11-26 10:35:00 -05:00
Nicholas Hastings 126ce99cd9 Resize clients array in newest NormalSHook prototype to MAXPLAYERS.
The old version of the newer one is left as a third typeset member to not break
compilation for users opting into it on dev branch. Both typeset members with
old array size are however marked as deprecated, since they can be missing
a client.
2015-11-26 09:43:08 -05:00
Nicholas Hastings 0d787e24ce Converted NormalSHook to typeset and added old prototype.
New prototype was added in PR #247
2015-11-25 17:25:35 -05:00
Fyren c11ac4c25e Update SP to version that uses its own new. 2015-11-21 07:51:12 +00:00
Asher Baker ef147860c2 Fix GetEntSendPropOffs returning 0 for missing props when actual=false
Issue introduced in #439.
2015-11-21 01:46:35 +00:00
Fyren 0e80ffef55 Merge pull request #448 from alliedmodders/use-blamepluginerror
Update SP and use BlamePluginError in sdkhooks and sdktools.
2015-11-18 18:33:10 -07:00
Asher Baker eb8996699e Merge pull request #443 from alliedmodders/fix-ext-dep-load
Fix crash on failing to load dependent extension.
2015-11-18 14:12:27 +00:00
Fyren cf4f500eda And use it in sdktools, too. 2015-11-18 01:37:15 +00:00
Fyren fec2fa3bf0 Update SP and use BlamePluginError in sdkhooks. 2015-11-18 01:24:31 +00:00
Nicholas Hastings a4d06e1077 Update CTakeDamageInfoHack in SDK Hooks for semi-recent game/SDK updates. 2015-11-11 13:12:04 -05:00
Nicholas Hastings 5f9aaadacb Update Windows TerminateRound signature for CS:GO (bug 6432). 2015-11-10 21:27:24 -05:00
Asher Baker a802fe3a8b Merge pull request #444 from alliedmodders/decl-bad
Pre-fill buffer for GetClientAuth*
2015-11-10 17:01:58 +00:00
Asher Baker 6ab0c35837 Pre-fill buffer for GetClientAuth* 2015-11-10 14:31:02 +00:00
Asher Baker b81b6cd1c6 Fix crash on failing to load dependent extension. 2015-11-09 14:56:42 +00:00
David Anderson c3e5d62bf6 Update to the latest AMTL: remove PassRef. 2015-11-08 13:51:22 -08:00
David Anderson e2b399b8d3 Update to the latest AMTL - Rename Ref to RefPtr. 2015-11-08 13:14:57 -08:00
Kyle Sanderson ce25a44e00 Merge pull request #442 from alliedmodders/netchanR
Use present netchannel instead of cached netchannel in CHookManager::SendFile.
2015-11-07 13:04:02 -08:00
Kyle Sanderson 72edc74e8b Use present netchannel instead of cached netchannel in CHookManager::SendFile. 2015-11-07 12:51:13 -08:00
Asher Baker cf07ecef46 Merge pull request #441 from powerlord/mapdisplayname-backslash
Update GetMapDisplayName to use platform separator on CSGO
2015-11-06 08:31:12 +00:00
Ross Bemrose c8caf7c860 Update FindMap testsuite plugin.
Update GetMapDisplayNAme to use platform separator on CSGO
2015-11-06 02:38:59 -05:00
Asher Baker 3b3b1d6342 And the last piece of the puzzle... normalise the slashes. 2015-11-05 17:45:26 +00:00
Asher Baker 04161da5a0 Alright, this should work. 2015-11-05 17:35:37 +00:00
Asher Baker cce6fde4ea Whoops. 2015-11-05 17:03:51 +00:00
Asher Baker b8e9aabd67 Windows sucks. This may or may not break the Windows build in retaliation. 2015-11-05 16:58:50 +00:00
Asher Baker 625f225448 Suppress error messages from missing repositories. 2015-11-05 11:06:43 +00:00
Asher Baker e8eb9970a6 Last try before I revert all this. 2015-11-05 10:54:35 +00:00
Asher Baker ed5771a861 Fix symbol dumping to work on ancient python versions. 2015-11-05 10:46:32 +00:00
Asher Baker 2c03498986 Really fix Mac symbol dumping. 2015-11-05 09:59:53 +00:00
Asher Baker de675be862 Fix Mac symbol dumping. 2015-11-05 09:31:09 +00:00
Asher Baker c109ea2cb6 Updated SourcePawn submodule. 2015-11-05 09:20:07 +00:00
Asher Baker c1f8ebf65c Merge pull request #439 from alliedmodders/propinfo
Deprecate FindSendPropOffs and FindDataMapOffs
2015-11-04 20:55:37 +00:00
Asher Baker c6323512ef Deprecate FindSendPropOffs and FindDataMapOffs, add HasEntProp. 2015-11-04 20:26:55 +00:00
Asher Baker 0387c45995 Fix Mac build. 2015-11-04 16:28:45 +00:00
Asher Baker 2ea3d9023b Fix libcurl build on Clang 3.5. 2015-11-04 15:21:13 +00:00
Nicholas Hastings 248d776a23 Update TF2 StunPlayer gamedata. 2015-11-03 20:38:12 -05:00
David Anderson 637941a978 Merge pull request #437 from alliedmodders/rm-pausing-12
Fix race between plugin unload and asynchronous query completion.
2015-11-01 14:52:58 -08:00
David Anderson 1f4be9798e Flush asynchronous queries before OnPluginEnd(). 2015-11-01 00:36:20 -07:00
David Anderson c849616003 Add an OnPluginWillUnload callback that precedes OnPluginEnd(). 2015-11-01 00:30:37 -07:00
David Anderson d674414cf0 Add a versioned IPluginsListener and deprecate the non-versioned class. 2015-11-01 00:23:33 -07:00
David Anderson cb3f6df111 Require that no plugin code be live when any plugin unloads. 2015-10-31 19:38:30 -07:00
David Anderson 59623695af Improve plugin console diagnostics. 2015-10-31 17:30:33 -07:00
David Anderson 87e9dee78b Evict plugins that fail to load. 2015-10-31 17:30:33 -07:00
David Anderson 62edc5f4c0 Clean up "sm plugins list" after status meaning clarifications. 2015-10-31 17:25:59 -07:00
David Anderson 903315747d Clarify plugin states. 2015-10-31 17:25:59 -07:00
David Anderson 485ade2610 Fix a number of inconsistencies in plugin state.
1. Fixed OnPluginUnloaded not pairing if the plugin failed.
2. Unify error message handling in the second pass.
3. Do not add libraries if a plugin failed during OnPluginStart.
2015-10-31 17:25:59 -07:00
David Anderson 9e4fff3362 Add a state variable to CPlugin to indicate queue/list membership. 2015-10-31 17:25:59 -07:00
David Anderson 7cc911ae58 Separate plugin unloading into an eviction step, which disconnects the plugin from Core.
Note: this also ensures that library action callbacks are balanced (i.e., we do not notify
libraries are being dropped if they were never notified as being added).
2015-10-31 17:25:59 -07:00
David Anderson 82ff7d5af7 Rename CPlugin::SetErrorState to EvictWithError. 2015-10-31 17:25:59 -07:00
David Anderson c4c6efb140 Remove a crazy unused function from CPluginManager. 2015-10-31 17:25:59 -07:00
David Anderson f078ea1f8a Remove the Illiad-length mostly-wrong comment at the top of PluginSys.h 2015-10-31 17:25:59 -07:00
David Anderson ab1b915a3c Fix re-entrancy issues in CPluginManager by using ReentrantList. 2015-10-31 17:24:22 -07:00
David Anderson 709149fbed Remove the CPluginIterator cache. 2015-10-31 17:23:24 -07:00
David Anderson e57a076dc8 Remove CPluginManager's friend access to CPlugin. 2015-10-31 17:19:10 -07:00
David Anderson c21b3a36fc Remove CPluginManager direct use of CPlugin::NativeOwner::m_fakes. 2015-10-31 17:19:10 -07:00
David Anderson f765c8d436 Remove CPluginManager direct use of CPlugin::m_LibraryMissing. 2015-10-31 17:19:10 -07:00
David Anderson ae44a6540a Remove CPluginManager direct use of CPlugin::m_FakeNativesMissing. 2015-10-31 17:19:10 -07:00
David Anderson f27dbaf716 Remove CPluginManager direct use of CPlugin::m_RequiredLibs. 2015-10-31 17:19:10 -07:00
David Anderson 717ad38d06 Remove CPluginManager direct use of CPlugin::m_errormsg. 2015-10-31 17:19:10 -07:00
David Anderson 60f06d1414 Remove CPluginManager direct use of CPlugin::m_FileVersion. 2015-10-31 17:19:10 -07:00
David Anderson a579136a3d Remove CPluginManager direct use of CPlugin::m_DateTime. 2015-10-31 17:19:10 -07:00
David Anderson 2f3d523ac0 Remove CPluginManager use of CPlugin::m_pRuntime. 2015-10-31 17:19:10 -07:00
David Anderson df5c53fa4a Remove CPluginManager direct use of CPlugin::m_filename. 2015-10-31 17:19:10 -07:00
David Anderson 46c069dbbe Remove CPluginManager direct use of CPlugin::m_Libraries. 2015-10-31 17:19:09 -07:00
David Anderson bda9defc0f Remove CPlugin's friend access to CPluginManager. 2015-10-31 17:19:09 -07:00
Asher Baker 8817b4277d Merge pull request #435 from alliedmodders/spelling
Spelling.
2015-10-30 19:20:39 +00:00
Asher Baker 4346e963e5 Correct spelling in API documentation. 2015-10-30 12:26:34 +00:00
Asher Baker 9bbcae1648 Correct spelling in configuration files. 2015-10-30 12:26:11 +00:00
Asher Baker fc504737c5 Fix a misleading error message from "sm config".
The Ignore state could be hit if the value was read directly rather than using OnSourceModConfigChanged.
2015-10-30 11:06:54 +00:00
Kyle Sanderson 1a09f2b6df Merge pull request #433 from alliedmodders/dinner
NPOTB: Remove 0x prefix from two-byte instructions.
2015-10-29 02:25:15 -07:00
Kyle Sanderson 44d34d0e5d NPOTB: Remove 0x prefix from two-byte instructions. 2015-10-28 19:43:17 -07:00
Nicholas Hastings 56339ed43a makesig.idc fucked me without taking me to dinner and a movie first 2015-10-28 22:37:10 -04:00
Nicholas Hastings 393ab89c34 Update TF2 gamedata. 2015-10-28 19:58:36 -04:00
Asher Baker 38fd55a05d Normalize repository root path. 2015-10-28 13:31:02 +00:00
Asher Baker e0e946afac Merge pull request #431 from alliedmodders/symbol-repos
Include repo information in symbol files
2015-10-28 13:12:10 +00:00
Asher Baker 4d3c89c065 Flip INFO REPO records around for parsing sanity. 2015-10-28 09:47:40 +00:00
Nicholas Hastings a7b1a9a5fa Update Insurgency gamedata. 2015-10-27 18:38:59 -07:00
Nicholas Hastings 529d7e2659 Fix Insurgency build on Linux for SDK changes. 2015-10-27 18:17:26 -07:00
Asher Baker 4be998c4dc Include repo information in symbol files. 2015-10-27 17:24:03 +00:00
Nicholas Hastings 261a4bb81b Merge pull request #430 from alliedmodders/packaging-latest
Upload sourcemod-latest-<os> text file when packaging.
2015-10-26 14:55:54 -04:00
Nicholas Hastings beba03292a Upload sourcemod-latest-<os> text file when packaging. 2015-10-26 11:13:57 -07:00
Ruben Gonzalez 6042518691 Update CS:GO CSore offset. 2015-10-24 19:16:35 -04:00
Ruben Gonzalez 02a9db8e50 Update CS:GO gamedata for CScore. 2015-10-24 01:53:49 -04:00
David Anderson d0dda098a2 Merge pull request #429 from powerlord/sqltxn-dbresultset
Allow SQLTxnSuccess to use DBResultSet[] in addition to Handle[]
2015-10-22 23:40:28 -07:00
David Anderson 195a836999 Merge pull request #427 from alliedmodders/refactor-amb
Refactor and cleanup the AMBuildScript a bit.
2015-10-17 18:58:05 -07:00
Nicholas Hastings 366c3c0e16 Merge pull request #425 from WildCard65/WildCard65-FixedDBI.inc
Fixed DBResultSet.IsFieldNull
2015-10-13 15:12:18 -04:00
Ross Bemrose a4b45aea9b Allow SQLTxnSuccess to use DBResultSet[] in addition to Handle[] 2015-10-13 14:50:59 -04:00
Nicholas Hastings fa65b62a04 Merge pull request #428 from FlaminSarge/tf_mannpower_conds
Update TFCond enum
2015-10-10 14:15:48 -04:00
Nicholas Hastings 71439b30ab Fix NeoTokyo SDKTools gamedata signatures. 2015-10-10 14:08:43 -04:00
FlaminSarge e585e34670 Update TFCond enum 2015-10-10 02:27:08 -07:00
Nicholas Hastings 2f2f057b47 Update Fistful of Frags gamedata. 2015-10-09 13:31:21 -04:00
Ruben Gonzalez 7e4bfce892 Update CS:GO gamedata. 2015-10-08 19:08:17 -04:00
David Anderson 6c5ab80418 Refactor and cleanup the AMBuildScript a bit. 2015-10-08 14:55:53 -07:00
Nicholas Hastings 121124e362 Merge pull request #426 from powerlord/holiday-communityupdate
Add Community Update holiday
2015-10-07 09:58:36 -04:00
Ross Bemrose f4adf33b4e Renumber holidays
Add CommunityUpdate holiday
2015-10-07 09:40:06 -04:00
Nicholas Hastings 6fe4175fd2 Update TF2 CanPlayerTeleport signature on Windows. 2015-10-02 07:43:43 -04:00
WildCard65 8627fe1fa8 Fixed DBResultSet.IsFieldNull 2015-09-30 08:38:14 -04:00
Asher Baker 9310cfd164 Merge pull request #424 from alliedmodders/update-versioning
Promote git revision number to 4th version string component
2015-09-29 19:40:51 +01:00
Asher Baker 722c0eb32b Promote git revision number to 4th version string component 2015-09-29 11:07:16 +01:00
Nicholas Hastings 66a3811049 Add FireOutput gamedata for KreedzClimbing. 2015-09-28 16:16:23 -04:00
Ruben Gonzalez c3fcc44718 Update CS:GO gamedata. 2015-09-25 23:09:39 -04:00
Nicholas Hastings 8b6e040581 Add gamedata for Kreedz Climbing. 2015-09-23 10:11:30 -04:00
David Anderson 88a47ff681 Switch to re-entrant lists in ForwardSys and CForward. 2015-09-21 01:07:34 -07:00
David Anderson d0843ab997 Add a ReentrantList class to abstract list mutation during iteration. 2015-09-21 01:07:30 -07:00
David Anderson c1396de2fc Replace SourceHook::List with ke::LinkedList in ForwardSys. 2015-09-21 01:07:25 -07:00
David Anderson 0810c4b217 Fix style issues in ForwardSys, removing extra blocks and tightening variable scope.
This also fixes a bug where IsFunctionRegistered() did not check the paused plugins list.
2015-09-21 01:07:18 -07:00
David Anderson 632c7d05dd Remove the forward cache and simplify CForward construction. 2015-09-21 01:07:01 -07:00
David Anderson dcc192ee0d Use new header style. 2015-09-21 01:06:43 -07:00
David Anderson 9b1678bd18 Remove error outparams from first-pass internal plugin loading commands. 2015-09-21 00:51:20 -07:00
David Anderson 5f19fc036d Refactor AskPluginLoad() to contain its own error state. 2015-09-21 00:51:16 -07:00
David Anderson 5eec2e7d6d Remove error message outparam to LoadExtensions. 2015-09-21 00:51:11 -07:00
David Anderson 3195dec436 Split LoadOrRequireExtensions into two distinct functions. 2015-09-20 23:44:45 -07:00
David Anderson 15f4a05122 Factor the iterator out of LoadOrRequireExtensions. 2015-09-20 23:44:41 -07:00
David Anderson e559e6ffa8 Simplify pass 2 of LoadOrRequireExtensions. 2015-09-20 23:44:37 -07:00
David Anderson 23290b35a7 Clean up LoadOrRequireExtensions and properly scope variables. 2015-09-20 23:44:34 -07:00
David Anderson 2b3da56fb5 Dedent a huge block of code. 2015-09-20 23:44:30 -07:00
David Anderson 370710c0ff Fix build. 2015-09-20 21:39:12 -07:00
David Anderson 4fc7eb8a6b Remove trailing whitespace. 2015-09-20 20:58:03 -07:00
David Anderson 38c01714d7 Clean up AskPluginLoad logic. 2015-09-20 20:57:59 -07:00
David Anderson 0e1a34a4d7 Hide CPlugin timestamp management details. 2015-09-20 20:57:55 -07:00
David Anderson d5d7e8c9cf Factor guts of _LoadPlugin into a separate function. 2015-09-20 20:57:51 -07:00
David Anderson 76d681761d Factor malware checks into its own pass. 2015-09-20 20:57:47 -07:00
David Anderson 3807edbeb8 Move CPlugin compilation into its own function. 2015-09-20 20:57:43 -07:00
David Anderson d9216cc599 Remove references to non-mapupdated plugins. 2015-09-20 20:31:30 -07:00
David Anderson d551338510 Merge pull request #400 from alliedmodders/mv-srvcmds-x
Remove sm_srvcmds.cpp.
2015-09-20 15:15:43 -07:00
David Anderson 8a7dfdbc11 Move the "sm" command to core/logic. 2015-09-20 14:33:17 -07:00
David Anderson 1a7b708df8 Split command buffer peeking hacks out of the "sm" command. 2015-09-20 14:33:14 -07:00
David Anderson 168b779786 Move sm_dump_handles to core/logic. 2015-09-20 14:33:10 -07:00
David Anderson c853050265 Move sm_reload_translations to Translator. 2015-09-20 14:33:06 -07:00
David Anderson c614d19af0 Move sm_dump_admcache to AdminCache. 2015-09-20 14:33:02 -07:00
David Anderson 8b4f27a038 Add infrastructure to let logic define ConCommands. 2015-09-20 14:32:58 -07:00
Ruben Gonzalez 48eee4db9b Sync GDC symbols.txt to match one currently used (NPOTB). 2015-09-20 15:28:33 -04:00
David Anderson c66d14605a Merge pull request #397 from alliedmodders/rm-old-mms
Remove code that handles long-dead Metamod:Source versions.
2015-09-18 14:38:52 -07:00
Nicholas Hastings ac8a7ecad7 Merge pull request #416 from alliedmodders/rip-s1dota
Stop building Source 1 Dota 2 build.
2015-09-18 15:48:59 -04:00
Nicholas Hastings 292df5010f Stop building Source 1 Dota 2 build. 2015-09-18 15:36:46 -04:00
Nicholas Hastings 5f3f9e869e Trigger build for hl2sdk TF2/CS:S/DoD:S/HL2:DM CUserCmd changes.
Fixes mouse values in OnPlayerRunCommand.
2015-09-18 15:32:52 -04:00
Nicholas Hastings e748d49343 In package script, set binmode for geoip out file (bug 6415).
This fixes newline conversion happening on Windows.
2015-09-18 10:08:39 -04:00
Nicholas Hastings c085444a03 In packaging, use API for gunzip instead of executable (bug 6415). 2015-09-18 08:27:28 -04:00
Nicholas Hastings c982cc9991 Merge pull request #354 from powerlord/findmap-plugins
GetMapDisplayName and associated core plugin changes.
2015-09-17 11:17:40 -04:00
Ruben Gonzalez 249be7ad56 Merge pull request #411 from alliedmodders/terminate-fix
Add shim for TerminateRound for  CS:GO
2015-09-16 19:31:52 -04:00
Ruben Gonzalez 6268abe2c3 Untab #ifdef's 2015-09-16 19:21:58 -04:00
Ruben Gonzalez 6aa776eab7 Add comments to VIP RoundEnd reasons. Fix typo. 2015-09-16 19:21:21 -04:00
Ruben Gonzalez c86a6abdc5 Add shim for TerminateRound for CS:GO 2015-09-16 19:03:40 -04:00
Nicholas Hastings 0e4edd4419 Merge pull request #401 from alliedmodders/css-sync
Updated gamedata for CS:S, DoD:S, and HL2:DM.
2015-09-16 18:14:58 -04:00
David Anderson 2a6b37dc81 Merge pull request #410 from alliedmodders/fix-static
Fix temporary parameter list being static.
2015-09-16 10:01:39 -07:00
David Anderson 485975fd99 Fix temporary parameter list being static. 2015-09-16 00:27:36 -07:00
David Anderson c36f80b93d Don't use server commands to flush plugin unloads. 2015-09-15 19:43:41 -07:00
David Anderson 08cadcdda6 Merge pull request #372 from alliedmodders/rm-pausing
Cleanup some PluginSys idiosyncracies.
2015-09-15 19:15:26 -07:00
David Anderson d473b0441d Allow plugin info fields to outlive their runtime. 2015-09-15 19:07:22 -07:00
Ruben Gonzalez 189369fcf3 Fix GDC byte offset check printing for linux (NPOTB) 2015-09-15 21:59:24 -04:00
Ruben Gonzalez a01a63cb71 Update CS:GO gamedata. 2015-09-15 19:23:28 -04:00
Ross Bemrose 10a95cfdce Add new function: GetMapDisplayName.
This function will resolve the name of a map using FindMap, then (if applicable), will turn a workshop map name into a nicely formatted name.

Currently only TF2 and CS:GO Map Workshops are supported.  More can be added at a later date.

This function returns false if a map was not found, but true in any other instance even if FindMap could not resolve the map name.

This patch also updates the following core plugins to use this GetMapDisplayName:

BaseTriggers
BaseVotes
MapChooser
NextMap
Nominations
RandomCycle
RockTheVote
2015-09-15 16:16:58 -04:00
David Anderson 653dd36020 Merge pull request #378 from powerlord/fix-convar
Fix ConVar .IntValue, .BoolValue, and .FloatValue assignments (Bug 6405)
2015-09-15 12:33:51 -07:00
Nicholas Hastings 28bf744a18 Merge pull request #399 from alliedmodders/tf2branch-nontf2-ismapvalid
Fix IsMapValid call on non-TF2 TF2-branch games to use old behavior requiring only map name
2015-09-14 20:44:24 -04:00
Nicholas Hastings e7d9795fc1 Fix IsMapValid call on non-TF2 TF2-branch games to use old behavior requiring only map name. 2015-09-14 19:24:28 -04:00
David Anderson 2adae27557 Clean up CPlugin member variables. 2015-09-14 12:55:42 -07:00
David Anderson 3430962cbe Simplify required libs handling and make sure they create dependency links. 2015-09-14 12:53:23 -07:00
David Anderson 0aaa659e29 Fix how the mark-serial is used.
The mark-serial is a generation number to optimize dependency tracking. It did not actually get
applied correctly, meaning that in rare cases we could miss dependencies. This patch removes the
incorrect serial propagation and ensures that we don't double-count a dependent plugin.

Additionally, this patch ensures that all callers of BindNativeToPlugin() will update the mark
serial, as is required to correctly track dependencies.
2015-09-14 12:50:50 -07:00
David Anderson 9ef8cc7064 Separate the top of UnloadPlugin into a precursor function. 2015-09-14 12:50:39 -07:00
Nicholas Hastings 44bacdc067 Fix recent regression with finding engine ptr on CS:S, DoD:S, HL2:DM.
They are still only have engine v21, not yet v22 (let alone v23).
2015-09-14 09:56:06 -04:00
Nicholas Hastings 7d2c0bd962 Merge pull request #408 from alliedmodders/css-sync2
Update metamod-attached extensions to use same engine ptr lookup as core
2015-09-13 17:45:13 -04:00
Ruben Gonzalez bb39c54f17 Merge pull request #403 from alliedmodders/gdc-fix
Fix Makefile for GDC and improve output (NPOTB)
2015-09-13 17:23:24 -04:00
Nicholas Hastings 8f8c00c66d Update metamod-attached extensions to use same engine ptr lookup as core.
(On TF2-branch games, always search for engine v23 first, falling back to v22.)
2015-09-13 17:18:33 -04:00
Kyle Sanderson 5b3b17799f Merge pull request #407 from Thordin/FindEntityByNetClass
Added IsFree() edict check to FindEntityByNetClass
2015-09-13 14:02:38 -07:00
thordin 3a59baab2c Added IsFree() edict check to FindEntityByNetClass. 2015-09-13 13:49:31 -07:00
David Anderson fc947c68f7 Merge pull request #404 from alliedmodders/fix-crash
Fix a regression from the ConCmdManager refactoring that causes a crash using SourceMod commands in the server console.
2015-09-12 22:53:09 -07:00
Ruben Gonzalez cfd116b93b Removed public/sourcepawn from include. Add -Wno-unused for unused variables. 2015-09-12 20:30:53 -04:00
Kyle Sanderson afc88694fd Merge pull request #305 from KyleSanderson/filetranshooks
Add File Transfer hooks to SDKTools (Bug 4222).
2015-09-12 13:12:50 -07:00
Kyle Sanderson 274e7bd329 Add FileTransfer Hooks to SDKTools (r=Drifter). 2015-09-12 13:01:33 -07:00
Nicholas Hastings 8777d0d0da Use unlink() instead of rm in packaging script for Windows compat. 2015-09-12 15:12:45 -04:00
Nicholas Hastings 8ce41407dd When downloading translations for packaging, bypass certificate check.
It will fail on the slaves and we're resolving to internal addressing anyway.
2015-09-12 14:16:38 -04:00
David Anderson bcd80d3e84 Fix a regression from the ConCmdManager refactoring that causes a crash using SourceMod commands in the server console. 2015-09-12 00:26:47 -07:00
Nicholas Hastings cfa09f22c1 Merge pull request #390 from alliedmodders/pkg-more
Add translation files and updated GeoIP data to snapshots (bug 5728)
2015-09-11 15:53:38 -04:00
Ruben Gonzalez cec5bfe7b2 Update Makefile to compile against central. Added some more info on byte checks. 2015-09-11 15:36:11 -04:00
Nicholas Hastings f1a907c298 Merge pull request #402 from alliedmodders/shim-noshim
Shim for TF2-branch games to find latest, non-shimmed engine iface. 2
2015-09-11 09:24:24 -04:00
Nicholas Hastings f6d7fd4949 Don't use VInterfaceMatch when wanting explicit iface version. 2015-09-11 05:40:03 -07:00
Nicholas Hastings 2bd91dd93b Fix always failing when falling back to engine v22. 2015-09-11 05:38:53 -07:00
Nicholas Hastings 2b13f28cfc Updated gamedata for CS:S, DoD:S, and HL2:DM. 2015-09-11 05:29:09 -07:00
Nicholas Hastings 3c264d78bb Merge pull request #398 from alliedmodders/shim-noshim
Shim for TF2-branch games to find latest, non-shimmed engine iface.
2015-09-10 22:47:13 -04:00
Nicholas Hastings 82b7485001 Shim for TF2-branch games to find latest, non-shimmed engine iface. 2015-09-10 20:43:48 -04:00
Nicholas Hastings c6c034f90a Trigger build for hl2sdk-tf2 changes. 2015-09-10 19:54:32 -04:00
Nicholas Hastings cb9f2b9144 Trigger build for hl2sdk-tf2 changes.. 2015-09-10 18:31:30 -04:00
Kyle Sanderson 6909f7f23c Merge pull request #396 from alliedmodders/findmapconst
Change FindMap to take a const char* for searching instead of char*.
2015-09-10 12:14:43 -07:00
Kyle Sanderson f59df243ea Change FindMap to take a const char* for searching instead of char*. 2015-09-10 11:47:46 -07:00
Kyle Sanderson d9839bab68 Fix sm-central crashing on start (bug 6413). 2015-09-10 11:32:10 -07:00
David Anderson fe16e8e47c Move the SetCommandClient hook into GameHooks. 2015-09-09 20:03:23 -07:00
David Anderson fd961f4712 Remove code to handle SourceHook versions 3 and lower. 2015-09-09 19:00:18 -07:00
David Anderson b548ba7b58 Remove bad-console-read protection logic for Metamod:Source 1.7 and earlier. 2015-09-09 18:59:31 -07:00
David Anderson df672dd8ce Remove the ability to compile against Metamod:Source versions lower than 1.8. 2015-09-09 18:54:43 -07:00
David Anderson c54b54ded0 Use GameHooks for ChatTriggers. 2015-09-09 18:51:21 -07:00
David Anderson 5757b729ac Hide MRES_SUPERCEDE from command hook callbacks. 2015-09-09 18:45:20 -07:00
David Anderson b048dc7b10 Move ConCommand hooks into GameHooks and switch callbacks to ICommandArgs. 2015-09-09 18:40:04 -07:00
David Anderson b63bfdc72a Rename QueryHookMode to ClientCvarQueryMode. 2015-09-09 18:40:01 -07:00
David Anderson fa93426f6a Remove blanket includes from sm_stringutil. 2015-09-09 15:18:24 -07:00
David Anderson 86f0a77e73 Reduce dependence on sm_strdup. 2015-09-09 15:18:24 -07:00
David Anderson 13a783d441 Remove UTIL_Format() and UTIL_FormatArgs(). 2015-09-09 15:18:17 -07:00
David Anderson e08697ad54 Remove strncopy(). 2015-09-09 14:57:47 -07:00
David Anderson 67ba703b84 Merge pull request #392 from alliedmodders/mv-datapack
Move CDataPack from core to logic.
2015-09-09 14:41:49 -07:00
Kyle Sanderson d85568b54b Merge pull request #321 from Bara20/getentityrendercolor
Add GetEntityRenderColor stock.
2015-09-08 16:22:16 -07:00
David Anderson 67c8ee4ce3 Move CDataPack from core to logic. 2015-09-06 11:02:52 -07:00
David Anderson 69984f472f Remove unused, NPOTB CrazyDebugger. 2015-09-05 20:44:00 -07:00
Nicholas Hastings 2ab7c08da9 Add translation files and updated GeoIP data to snapshots. 2015-09-01 11:30:45 -07:00
David Anderson 4e275eea97 Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
David Anderson 4f1705e001 Rename some bridge interfaces. 2015-08-31 09:57:32 -07:00
David Anderson 5d55ff23bd Move OnQueryCvarValueFinished into the global hook manager. 2015-08-31 09:22:08 -07:00
David Anderson 2ed044804d Move OnConVarChanged into a global hook. 2015-08-31 09:18:29 -07:00
David Anderson 32ba03538b Move CCommandArgs into its own header. 2015-08-31 00:07:37 -07:00
David Anderson 23feee0e00 Put the game provider in its own header. 2015-08-31 00:07:34 -07:00
David Anderson 401aa038f8 Start a new bridge mechanism for global callbacks. 2015-08-31 00:07:27 -07:00
David Anderson 38e1c2f1f3 Clean up the core side of the logic bridge. 2015-08-30 23:30:15 -07:00
David Anderson 9e4d396d5e Virtualize MMS functions in the core/logic bridge. 2015-08-30 23:29:46 -07:00
David Anderson 5c5d43137d Virtualize game state functions in the core/logic bridge. 2015-08-30 23:29:23 -07:00
David Anderson bdfdab1d3a Virtualize game description functions in the core/logic bridge. 2015-08-30 23:28:59 -07:00
David Anderson 9366882ac4 Virtualize ConVar bridge functions. 2015-08-30 23:28:44 -07:00
David Anderson 0f9e5234fe Convert core_bridge to a proper class declaration. 2015-08-30 23:28:28 -07:00
David Anderson 3d5c9f0e21 Rename smcore to bridge, and use it as a pointer. 2015-08-30 23:27:53 -07:00
David Anderson a2dac43833 Remove CCommand from the logic bridge. 2015-08-30 21:02:14 -07:00
David Anderson 28346c99f2 Move RootConsoleMenu into core/logic. 2015-08-30 21:01:46 -07:00
David Anderson 23d55dd9d5 Move RootConsoleMenu::ConsolePrint into the logic bridge. 2015-08-30 21:01:27 -07:00
David Anderson 2c886943a0 Move RootConsoleMenu into its own header and .cpp file. 2015-08-30 21:01:10 -07:00
David Anderson 9d805ea9fb Replace the AddRootConsoleCommand API to not expose internal structures. 2015-08-30 21:01:03 -07:00
David Anderson e992c33f35 Factor irrelevant stuff out of RootConsoleMenu. 2015-08-30 21:00:42 -07:00
David Anderson ecbcc7ba16 Move the sourcemod_version convar. 2015-08-30 21:00:39 -07:00
David Anderson 6503e92d66 Move LibrarySys from core to logic. 2015-08-30 20:11:22 -07:00
David Anderson 207f643d3a Replace g_LibSys usage with AMTL primitives. 2015-08-30 20:11:02 -07:00
David Anderson ec01ca72a0 Replace internal ILibrary use with ke::SharedLib. 2015-08-30 20:10:59 -07:00
David Anderson 5ecd906905 Replace CLibrary with a wrapper around ke::SharedLib. 2015-08-30 20:10:57 -07:00
David Anderson e78fe93e92 Move gnprintf/atcprintf from core to logic. 2015-08-30 19:32:46 -07:00
David Anderson 9d2bee261c Move TrimWhitespace from core to logic. 2015-08-30 18:42:25 -07:00
David Anderson c261bb0b2e Merge branch 'rm-strncopy' 2015-08-30 18:38:31 -07:00
David Anderson 204ca3aca5 Update to the latest AMTL revision. 2015-08-30 18:38:05 -07:00
David Anderson a158205f30 Remove strncopy from the core/logic bridge. 2015-08-30 18:21:07 -07:00
David Anderson 3786a2756b Merge pull request #379 from alliedmodders/rm-format
Remove Format/FormatArgs from the core/logic bridge.
2015-08-30 21:04:20 -04:00
David Anderson 457266d249 Make UTIL_Format wrap ke::SafeSprintf. 2015-08-30 18:03:36 -07:00
David Anderson 9ba1363d86 Remove Format/FormatArgs from the core/logic bridge. 2015-08-30 18:03:31 -07:00
David Anderson 2d40af31a2 Merge pull request #383 from alliedmodders/new-amtl
Update to the latest AMTL version.
2015-08-27 10:55:00 -04:00
David Anderson c87b3c0859 Update to the latest AMTL version. 2015-08-27 01:01:18 -04:00
David Anderson e30b57cb4a Update build scripts for new AMTL folder structure. 2015-08-26 15:54:55 -04:00
Ross Bemrose 569a53182c Allow sm_SetConVarString, sm_SetConVarFloat, and sm_SetConVarNum treat notify and replicate as non-existent.
Remove special functions for BoolValue, IntValue, and FloatValue.
2015-08-24 17:03:47 -04:00
Asher Baker ee2a408d44 Merge pull request #376 from s3bul/convars/define
Add missing include guard for convars.inc
2015-08-19 19:33:04 +01:00
Sebastian K e030bb4451 Add define included 2015-08-19 20:27:33 +02:00
Nicholas Hastings 9e3ed67185 Merge pull request #375 from alliedmodders/tf2-update-15-08-18-pre
Update TF2 gamedata.
2015-08-18 19:00:44 -04:00
Asher Baker d1768b7089 Update TF2 gamedata 2015-08-18 21:09:33 +01:00
David Anderson 55647cc18e Update to the latest SourcePawn revision. 2015-08-18 09:51:24 -07:00
Kyle Sanderson 9ebd4ad627 Merge pull request #319 from KyleSanderson/20isntagoodnumber
Allow GetMapHistorySize to return numbers greater than 20 (r=Dr!fter).
2015-09-05 13:58:03 -07:00
Nicholas Hastings d6476728f9 Merge pull request #391 from alliedmodders/dataprop-stringt-arrays
Fix quirks with Get/SetEntPropString on string_t arrays in datadesc
2015-09-02 21:55:14 -04:00
Nicholas Hastings 1e1b23dc31 Add missing sanity checks on element param on SetEntPropString for data props. 2015-09-02 18:35:37 -04:00
Nicholas Hastings 5cdf35d687 Fix array detection/handling for GetEntPropString with string_t arrays (bug 6409). 2015-09-02 18:33:58 -04:00
Ruben Gonzalez 229769ed22 Fix CS:GO Score gamedata. 2015-08-15 20:16:02 -04:00
Nicholas Hastings 4dd641287d Fix typo in last commit. 2015-08-15 11:56:36 -04:00
Nicholas Hastings 199d1b8eeb Fix Mac build. 2015-08-14 22:00:43 -04:00
Nicholas Hastings 31cd5c7863 Merge pull request #371 from alliedmodders/clang-3.6
Fix build on Clang 3.6.
2015-08-14 21:56:35 -04:00
Nicholas Hastings a95527a72c Merge pull request #370 from alliedmodders/valvefs-default-pathid
Make path id default to "GAME" instead of NULL for FileExists and FileSize if param missing.
2015-08-14 08:44:34 -04:00
Nicholas Hastings 4f0c06d068 Merge pull request #369 from alliedmodders/bug-6391
Fix bIsStringIndex not being initialized in SetEntPropString for non-index SendProps (bug 6391).
2015-08-14 08:32:33 -04:00
Nicholas Hastings af4573e7af Fix build on Clang. 2015-08-14 08:31:52 -04:00
Nicholas Hastings 620cb405b1 Fix build on Clang 3.6. 2015-08-14 08:25:40 -04:00
Nicholas Hastings a08a693bf3 Make path id default to "GAME" instead of NULL for FileExists and FileSize if param missing.
This only affects plugins compiled before the param existed in the includes. NULL defaults to "GAME"
on some engine versions, but is invalid on others, causing any file to not be found.
2015-08-14 07:52:50 -04:00
Nicholas Hastings 8a726a8fbb Fix bIsStringIndex not being initialized in SetEntPropString for non-index SendProps. 2015-08-14 07:50:10 -04:00
David Anderson ff692f6040 Merge pull request #366 from peace-maker/timer_paused
Fix calling timer callback in paused plugins
2015-08-13 22:14:02 -07:00
David Anderson 246c32a202 Update SourcePawn and AMTL. 2015-08-13 22:08:47 -07:00
David Anderson f81786cea0 Merge pull request #368 from alliedmodders/rm-binding
Update includes to remove binding syntax.
2015-08-12 12:31:55 -07:00
David Anderson bcfef75c5d Update regex and datapack includes to not use binding syntax. 2015-08-12 11:52:57 -07:00
Peace-Maker 0a14d3f50c Fix calling timer callback in paused plugins
Don't try to call the timer callback, if it's not runnable.
Error wasn't reported before the exception refactoring.
2015-08-09 01:50:36 +02:00
David Anderson 17c4649651 Update SourcePawn for bug 6396. 2015-08-02 12:54:34 -07:00
Nicholas Hastings 4c895a78c6 Update Insurgency gamedata. 2015-07-29 06:58:56 -04:00
David Anderson 152807b977 Update AMTL and SourcePawn submodules to master. 2015-07-25 17:25:59 -07:00
Nicholas Hastings 45f5ac64e1 Merge pull request #364 from alliedmodders/bug-6391
Fix maxlen in SetEntPropString not being initialized (bug 6391).
2015-07-25 14:54:06 -04:00
Nicholas Hastings b438a5b39e Merge pull request #365 from powerlord/sampleext-fixcopyfiles
sampleext PackageScript: Add missing CopyFiles function.
2015-07-25 14:17:08 -04:00
Ross Bemrose b705de0143 Add missing CopyFiles function. 2015-07-25 13:16:17 -04:00
Nicholas Hastings f589298879 Fix maxlen in SetEntPropString not being initialized (bug 6391).
This var is only used when setting a direct string, rather than a string_t. Some flawed
logic was causing it to only be set if the sendprop didn't have a proxy function (although
all strings should; that's how we detect whether it's a string_t or not). The var only needs
to be set if it's not a string_t, but does not hurt anything if it is.
2015-07-25 10:46:41 -04:00
Nicholas Hastings 7d153cf9f9 Merge pull request #363 from VoiDeD/datapack-pos
Introduce a datapack position tag.
2015-07-20 18:34:54 -04:00
Ryan Stecker 86b04e36b5 Clarify the Get/SetPackPosition documentation. 2015-07-20 15:03:57 -05:00
Ryan Stecker 33d13ff81c Hide datapack positions behind an opaque handle. 2015-07-20 15:03:04 -05:00
Nicholas Hastings dcbc85b2cf Update FoF sdktools gamedata. 2015-07-17 08:12:47 -04:00
Nicholas Hastings 5123527c66 Merge pull request #311 from alliedmodders/juju
Use the new Travis-CI Container environment.
2015-07-14 20:19:11 -04:00
Nicholas Hastings c4e7b8a795 More tweaks. 2015-07-14 19:44:52 -04:00
Nicholas Hastings 41297b96d0 Add gcc-multilib to build reqs. 2015-07-13 21:43:27 -04:00
Nicholas Hastings d30cab04c3 Merge pull request #360 from alliedmodders/cckv
Add support for listening to, blocking, changing, and faking ClientCommandKeyValues.
2015-07-13 21:35:25 -04:00
Ruben Gonzalez 3ab31eba7b Update FoF sdktools gamedata. 2015-07-13 08:53:30 -04:00
Nicholas Hastings e7aa159896 Clarify doc regarding KV handle. 2015-07-12 19:21:28 -04:00
Nicholas Hastings 4db1280c59 Add comment to note that pStk actually gets deleted. 2015-07-12 19:18:27 -04:00
Nicholas Hastings 5893737321 Fix handle leak. 2015-07-12 17:38:50 -04:00
Nicholas Hastings c85cc5cbf7 Add support for listening to, blocking, changing, and faking ClientCommandKeyValues. 2015-07-12 13:14:46 -04:00
Asher Baker 705b5d3f5f Merge pull request #340 from asherkin/datapack-alloc
Improve DataPack memory allocation & Report size for DataPack Handles
2015-07-08 20:07:40 +01:00
Nicholas Hastings 8a978dc71f Remove hack around FuzzyMatch never being returned in TF2 for FindMap.
It has been fixed now in the game.
2015-07-04 13:42:50 -04:00
Nicholas Hastings c32683225f Merge pull request #357 from alliedmodders/dumps-datestamps
Dumps datestamps
2015-07-03 19:33:02 -04:00
Nicholas Hastings 01941d5504 Merge pull request #353 from alliedmodders/getentpropstringt
Better string_t support for Get/Set EntPropString
2015-07-03 19:32:54 -04:00
Nicholas Hastings 8fb97a6152 Add date to sm_dump_netprops_xml output. 2015-07-03 10:39:44 -04:00
Nicholas Hastings 801da2db37 Fix MSVC compile. 2015-07-03 10:38:15 -04:00
Nicholas Hastings 52147ca75f Use datadesc instead of serverclass for m_iName lookup.
m_iName is not networked on all games.
2015-07-03 08:57:15 -04:00
Nicholas Hastings 2f3a3942b5 Merge pull request #356 from alliedmodders/revert-355-master
Revert "Changing MAX_NAME_LENGTH from 32 to 128 due to CSGO having 128."
2015-07-02 17:36:36 -04:00
Kyle Sanderson ed57a2f3d8 Merge pull request #355 from TheMadSword/master
Changing MAX_NAME_LENGTH from 32 to 128 due to CSGO having 128.
2015-07-02 14:27:33 -07:00
Nicholas Hastings 3ab4e4f24e Update sm_dump_netprops to include date of dump, similar to datamaps and classes dump commands. 2015-07-02 17:21:40 -04:00
Nicholas Hastings 1336d9cf5e Update date format on sm_dump_classes and sm_dump_datamaps to use the less ambiguous Y/m/d...
Instead of d/m/Y.
2015-07-02 17:21:03 -04:00
TheMadSword 1b706bcbcf Changing MAX_NAME_LENGTH from 32 to 128 due to CSGO having 128 bytes
buffer-size.
2015-07-02 16:14:54 -04:00
Nicholas Hastings 1a5714c3ca Fix build for ep1 and darkm. 2015-07-02 15:22:33 -04:00
Nicholas Hastings e0a83ff7b2 Add support for setting string_t values with SetEntPropString.
Adds new AllowPooledString func to CHalfLife2 to allocate a string in the game's string pool.
Also fixes SetEntPropString using incorrect offset for nested sendprops.
2015-07-02 14:47:31 -04:00
Nicholas Hastings 93bec920cf Add support for GetEntPropString(Prop_Send) with netvars backed by string_t vars. 2015-07-02 14:00:47 -04:00
Nicholas Hastings 8d8c9aa55b Revert "Changing MAX_NAME_LENGTH from 32 to 128 due to CSGO having 128." 2015-07-02 13:34:40 -04:00
Asher Baker 668839d1cb Update TF2 Disguise signature. 2015-07-02 14:37:48 +01:00
Kyle Sanderson a410aefd6d Merge pull request #352 from peace-maker/charset_thread
Lock database before setting character set
2015-06-29 12:14:09 -07:00
Peace-Maker c6a7e86762 Lock database before setting character set
SQL_SetCharset wasn't thread safe and could race with other threaded
queries causing a crash.
2015-06-29 20:44:45 +02:00
Nicholas Hastings f960c64dc6 Merge pull request #351 from alliedmodders/expose-findmap
Expose FindMap/ResolveFuzzyMapName to plugins.
2015-06-28 12:43:56 -04:00
Nicholas Hastings 80838af4a2 Work around eFindMap_FuzzyMatch never actually being returned in TF2. 2015-06-28 09:48:01 -04:00
Nicholas Hastings 7564c09aff Merge pull request #341 from powerlord/ambuild-sampleext
Add AMBuild2 script to Sample Extension.
2015-06-27 20:10:00 -04:00
Nicholas Hastings 60ac7e23d0 Updated FindMap function doc. 2015-06-27 20:04:20 -04:00
Nicholas Hastings c383f1dc43 Fix compile errors on Clang by implementing own enum. 2015-06-27 19:58:14 -04:00
Nicholas Hastings f107ff9cd2 Expose FindMap/ResolveFuzzyMapName to plugins. 2015-06-27 13:10:47 -04:00
Ruben Gonzalez 25a8209ffc Update CS:GO gamedata MVP base to be the same as Scores. 2015-06-26 11:00:10 -04:00
Ruben Gonzalez 3c0b89b80f Update CS:GO MVP and Contribution score offsets. 2015-06-26 10:44:20 -04:00
Nicholas Hastings 11c40e385e Merge pull request #347 from alliedmodders/double
Call OnClientDisconnect(_Post) if the client has already connected (bug 6361).
2015-06-18 17:43:34 -04:00
Nicholas Hastings d0574dbe28 Merge pull request #226 from powerlord/mapchooser-updates
More New API changes for MapChooser, Nominations, RockTheVote, RandomCycle, and NextMap.
2015-06-12 14:58:12 -04:00
Nicholas Hastings b4011f3e8b Update Insurgency gamedata. 2015-06-12 05:24:54 -07:00
Kyle Sanderson 0f9b9d0a24 Call OnClientDisconnect(_Post) if the client is already connected. 2015-06-11 20:14:25 -07:00
Nicholas Hastings c0d4dfa6ed Update IsMapValid for today's TF2 update. 2015-06-11 17:48:58 -04:00
Nicholas Hastings a4821f9389 Merge pull request #346 from alliedmodders/ctype-fixes
Fix some ctype misuses (bug 6377).
2015-06-10 19:29:35 -04:00
Nicholas Hastings 14e0a9a487 Fix some ctype misuses (bug 6377).
isalpha, isdigit, isupper, and islower do not return 0/1. They return 0 or anything-else. Since the bool tag in pawn only supports exactly 0 and 1, we need to return 1 for all truthy returns in the natives that wrap these.
2015-06-10 14:40:48 -04:00
Nicholas Hastings b17c7adcd5 Add gamedata for Modular Combat. 2015-06-10 10:02:34 -04:00
Nicholas Hastings a70722eb25 Update FoF gamedata. 2015-06-09 13:01:50 -04:00
Nicholas Hastings 13ecd11543 Merge pull request #344 from alliedmodders/update-convar-flags
Update ConVar flags in console.inc.
2015-06-07 11:18:27 -04:00
Ross Bemrose ba0bf5668d One minor issue left from the merge 2015-06-04 21:42:25 -04:00
Ross Bemrose 338b4ed5d9 Merge remote-tracking branch 'remotes/origin/master' into mapchooser-updates
Conflicts:
	plugins/nominations.sp
	plugins/rockthevote.sp
2015-06-04 21:39:04 -04:00
Kyle Sanderson a4f5c802a9 Merge pull request #345 from VoiDeD/fix-sizes-part-deux
Fix more buffer sizes for map names.
2015-06-04 16:34:55 -07:00
Ryan Stecker 8bc3d5d93c Fix more buffer sizes for map names. 2015-06-04 18:32:49 -05:00
Nicholas Hastings 850a73d718 Merge pull request #343 from alliedmodders/fix-sizes
Fix some buffer sizes in shipped plugins.
2015-06-04 18:27:52 -04:00
Nicholas Hastings 74802ce96e Minor indent fix. 2015-06-04 17:07:25 -04:00
Nicholas Hastings 952ee53383 Converted back to defines. Added deprecation notices on FCVAR_PLUGIN and FCVAR_LAUNCHERONLY. 2015-06-04 06:48:01 -04:00
Nicholas Hastings 1804dce9d9 More small convar flag inc changes:
* Re-added FCVAR_PLUGIN (shimmed to 0) and FCVAR_LAUNCHER with deprecation notes.
* Changed defines to const ints.
* Updated comments to use our newer, single-line comment style for cleanliness.
2015-06-03 23:38:31 -04:00
Nicholas Hastings 4231adaedf Update ConVar flags in console.inc.
The existing list was from the original engine, not even being accurate for EP1.
Flags that were never used and have since been removed from headers were removed.
Flags that were removed, but were used at one time co-exist with new flags that took over their value where applicable.
Flags that only exist on some engine versions are noted as such in the comment.
2015-06-03 23:06:26 -04:00
Nicholas Hastings 9e0dbfcf68 Fix inconsistencies with buffer sizes for player names.
Found any I could not using MAX_NAME_LENGTH and changed them to use it. I think that we should
increase MAX_NAME_LENGTH to 128 for CS:GO at some point as that's what it uses internally.
(Presumably to get the client's full multibyte name from Steam without truncation mid-codepoint which
can happen in other games. Steam's max is 32 characters if I remember correctly, but allows multibyte chars).
2015-06-03 22:40:43 -04:00
Nicholas Hastings 5139eef183 Fix buffer sizes used for map names (64 -> MAX_PATH).
As more games are now supporting maps nested in subfolders or in folders outside of the maps folder,
we need to account for the full path that the game uses to refer to the map for compatibility. Many other
places for fixed for this already after CS:GO added Steam Workshop support for maps.
2015-06-03 22:28:58 -04:00
Nicholas Hastings 974e18292a Update FoF gamedata. 2015-06-02 17:59:13 -04:00
Nicholas Hastings 3291e3a38f Fix crash on Black Mesa when an entity is deleted and SDK Hooks is loaded. 2015-05-31 23:21:43 -04:00
Nicholas Hastings 4db57b84b5 Fix sm_trigger_show default in shipped sourcemod.cfg match default in basetriggers. 2015-05-30 07:52:31 -04:00
Ruben Gonzalez c2ba31e341 Update more CS:GO gamedata. 2015-05-28 13:29:05 -04:00
David Anderson cb6024e334 Update AMTL and SourcePawn. 2015-05-27 10:22:40 -04:00
Ruben Gonzalez 12239fe852 Update CS:GO gamedata for latest update. 2015-05-26 22:04:08 -04:00
Nicholas Hastings a88070d063 Add GetDataMap gamedata for Black Mesa. 2015-05-25 18:20:38 -04:00
Nicholas Hastings 9f8a40f482 Merge pull request #337 from alliedmodders/earlier-maxclients
Populate MaxClients before OnPluginStart is called.
2015-05-20 06:48:08 -04:00
Nicholas Hastings d4babee202 Merge pull request #339 from alliedmodders/mapcycle-finding
Enable finding mapcycle in cfg dir on sdk2013 and bms.
2015-05-20 06:47:59 -04:00
Nicholas Hastings 7cfadb4584 Merge pull request #342 from alliedmodders/bug-6365
Fix regression in admin-sql-threaded when porting to transitional syntax (bug 6365).
2015-05-18 13:12:12 -04:00
Nicholas Hastings fc2fe79fe7 Fix regression in admin-sql-threaded when porting to transitional syntax. 2015-05-18 10:15:17 -04:00
Nicholas Hastings 2abb8e6335 Remove engine check for whether or not to search alt mapcycle paths. 2015-05-18 09:16:36 -04:00
Nicholas Hastings cb4b710885 Removed comment regarding MaxClients not being available in OnPluginStart. 2015-05-18 09:11:57 -04:00
Ruben Gonzalez 869777e9c4 Trigger build. 2015-05-15 20:53:17 -04:00
Ruben Gonzalez eab5e78150 Trigger Build 2015-05-15 18:30:02 -04:00
Ruben Gonzalez 0344c3d56f Trigger Build 2015-05-15 15:51:37 -04:00
Ross Bemrose 43f4a2f7b7 Fix checking the wrong directory for smsdk_ext.cpp. Updated some comments. 2015-05-14 14:16:19 -04:00
Ross Bemrose 0022b750b5 Split AMBuildScript into AMBulde and AMBuildScript 2015-05-14 13:48:59 -04:00
Ross Bemrose d49714bb10 Add AMBuildScript, configure.py, and PackageScript 2015-05-14 12:36:59 -04:00
Asher Baker fd48f4adfd Report size for DataPack Handles. 2015-05-13 19:43:53 +01:00
Asher Baker 7f97e67931 Saner allocation policy for DataPacks. 2015-05-13 19:43:35 +01:00
Nicholas Hastings 11bf32f6f1 Enable finding mapcycle in cfg dir on sdk2013 and bms. 2015-05-13 06:49:37 -07:00
Nicholas Hastings 55dee2d847 Trigger build for hl2sdk-bms update. 2015-05-12 21:03:36 -04:00
Nicholas Hastings ae78acf97a Remove harmless remnant of reverted change. 2015-05-12 13:39:06 -04:00
Nicholas Hastings fda0978225 Merge pull request #338 from alliedmodders/nuke-address-minvalid
Remove Address_MinimumValid entry from sp incs
2015-05-12 13:05:31 -04:00
Nicholas Hastings 227323c96d Merge pull request #336 from alliedmodders/link-libm
Link libm in all bin, not just engine-specific ones.
2015-05-12 11:54:52 -04:00
Nicholas Hastings 51344262c6 Merge pull request #333 from TheMadSword/IncreasedPrintToBufferSize
Increased PrintToChat, PrintCenter & PrintHint w/ "all" version, buffer sizes from 192 to 254.
2015-05-12 09:23:25 -04:00
Nicholas Hastings 4152e05dcd Fix indentation. 2015-05-12 06:21:32 -07:00
Nicholas Hastings 5574acda3d Remove Address_MinimumValid entry from sp incs
We have this defined in core for error checking, but it's useless in sp since unsigned comparisons are not supported.
2015-05-12 06:35:48 -04:00
Nicholas Hastings 75a93314a2 Rename PlayerManager::m_FirstPass to m_bServerActivated for clarity. 2015-05-11 20:42:26 -04:00
Nicholas Hastings 91b2ab8be1 Fixed some badness with the player initialization moving. 2015-05-11 20:29:00 -04:00
Nicholas Hastings 8fc689c89a Populate MaxClients before OnPluginStart is called. 2015-05-11 19:31:22 -04:00
Nicholas Hastings b3efc36487 Link libm in all bin, not just engine-specific ones.
This fixes the "undefined symbol: floorf" error that some people were getting in sourcemod.logic.so.
2015-05-11 18:59:12 -04:00
Nicholas Hastings 71cb002bc1 Merge branch 'master' of https://github.com/alliedmodders/sourcemod 2015-05-11 06:54:55 -04:00
Nicholas Hastings 78dcb8a0f3 Add gamedata file missing in PackageScript. 2015-05-11 06:52:56 -04:00
Nicholas Hastings 9d6cbfe0cc Remove unused gamedata. 2015-05-11 06:52:21 -04:00
Nicholas Hastings 7ab3d76c9f Merge pull request #331 from alliedmodders/support-bms
Add support for Black Mesa Multiplayer.
2015-05-10 18:44:20 -04:00
TheMadSword 6686badc93 Increased PrintHint and PrintCenter buffer 2015-05-09 09:22:07 -04:00
Asher Baker 1b47b68cc7 Correct NameHashSet::add() return type. 2015-05-09 11:57:49 +01:00
TheMadSword b70873e046 Changed buffer size for games with ChatSayText='yes', tested in CSS&CSGO w/ adding the kv in engine.cs*.txt 2015-05-07 22:55:15 -04:00
Asher Baker f7c6fc9d1f Restore check_thunks error message. 2015-05-07 21:53:38 +01:00
TheMadSword f57dbeb60f Increased PrintToChat & PrintToChatAll buffer size from 192 to 254; works in CSS/CSGO; dunno for the rest 2015-05-07 09:38:25 -04:00
Nicholas Hastings 397c45457a Fix spacing in PackageScript. 2015-05-06 22:18:43 -04:00
Nicholas Hastings 909598920b Disable nextmap on Black Mesa for now. (Doesn't ship with mapcycle.txt). 2015-05-06 22:01:57 -04:00
Nicholas Hastings dac3d1c988 Remove leftover debug code. 2015-05-06 22:01:39 -04:00
Nicholas Hastings 9164730b07 Add gamedata for Black Mesa. 2015-05-06 22:01:29 -04:00
Nicholas Hastings 64f9aedebc Add basic support for Black Mesa.
(Basically a copy of SDK 2013's support, but against BMS SDK).
2015-05-06 21:12:13 -04:00
Yed 5694a759ce Add IsFree check to FindEntityByNetClass in SDKTools (PR #330). 2015-05-04 18:13:11 -07:00
Nicholas Hastings ffedae66f4 Trigger build for hl2sdk-dota changes. 2015-05-03 15:07:07 -04:00
Nicholas Hastings a480bf0014 Trigger build for hl2sdk-dota changes. 2015-05-03 10:01:00 -04:00
Nicholas Hastings 2432540d6e Merge branch 'set-client-name' 2015-04-17 04:50:13 -07:00
Nicholas Hastings 16eeaf625f Enable the "name %s" command blocking on CS:GO as well. 2015-04-17 06:51:48 -04:00
Kyle Sanderson f421278166 Merge pull request #325 from VoiDeD/setfailstate-crash
Notify plugin listeners of SetFailState'd plugins on unload. (bug 6347)
2015-04-15 15:34:12 -07:00
Ryan Stecker 03e0c7317d Notify plugin listeners of SetFailState'd plugins on unload. (bug 6347) 2015-04-12 19:25:07 -05:00
Nicholas Hastings fee99f3629 Sourcepawn fix. 2015-04-12 18:35:57 -04:00
Nicholas Hastings 35c81365be Update Sourcepawn submodule to get fix for bug 6329.
- Fix bug where complex |this| values could be corrupted while evaluating function arguments. (bug 6329)
2015-04-12 16:52:28 -04:00
Nicholas Hastings 8ff1a9daf3 Merge pull request #322 from alliedmodders/fix-coreconf-order
Fix CoreConfig init to happen after SMGlobalClasses from logic bin are added (r=asherkin).
2015-04-05 10:43:17 -04:00
Nicholas Hastings 6c6ed241d3 Fix CoreConfig init to happen after SMGlobalClasses from logic bin are added.
This fixes OnSourceModConfigChanged not being called for logic classes when
config is first read, matching behavior for core classes. The function is still called
before each class's OnSourceModStartup func.
2015-04-05 10:06:30 -04:00
Nicholas Hastings b84114bc8e Update sourcepawn submodule to version with --gen=vs fix. 2015-04-05 09:32:59 -04:00
Bara 1748a411e1 Added GetEntityRenderColor 2015-04-04 01:38:30 +02:00
Kyle Sanderson aa99eb803b Allow GetMapHistorySize to return numbers greater than 20. 2015-04-02 13:50:47 -07:00
Kyle Sanderson 47eabfb7fb Spaces 2015-04-02 10:46:49 -07:00
Kyle Sanderson a6ab14f28e Add errno. 2015-04-02 10:46:11 -07:00
Kyle Sanderson a42cfed39c Enable travis-ci container environment. 2015-04-02 10:38:34 -07:00
Kyle Sanderson 88c4618230 Merge pull request #320 from KyleSanderson/dust
Remove Project Files from older outdated build systems.
2015-04-02 10:34:57 -07:00
Kyle Sanderson de58944140 Change checkout-deps.sh to do a user install instead of sudo. 2015-04-01 23:51:18 -07:00
Kyle Sanderson 7341bd184e Remove Project Files from older outdated build systems. 2015-04-01 19:54:34 -07:00
Kyle Sanderson 7a8bf78f39 Merge pull request #229 from powerlord/menuactions_all_warning_fix
Stop MENU_ACTIONS_ALL from tossing warnings with #pragma newdecls required
2015-04-01 19:39:52 -07:00
Nicholas Hastings 7268987461 Merge pull request #301 from alliedmodders/get-team-entity
Add GetTeamEntity native to SDKTools.
2015-04-01 22:30:18 -04:00
Nicholas Hastings ce56680fff Merge pull request #315 from alliedmodders/direxists-empty
Make DirExists("") throw an error.
2015-04-01 22:30:03 -04:00
Nicholas Hastings ea7d5ad8f1 Merge pull request #314 from alliedmodders/tfconds-reducks
Pass a handle instead of entptr to ProcessCondChange for stability.
2015-04-01 22:29:55 -04:00
Nicholas Hastings 91302da050 Merge pull request #313 from alliedmodders/set-client-name
Add SetClientName native.
2015-04-01 22:29:44 -04:00
Nicholas Hastings d49c72cf8b Fix typo in core AMBuilder file triggering exception when triggering exception. 2015-03-31 17:39:04 -04:00
Nicholas Hastings c11036a7b9 Update TF2 gamedata. 2015-03-31 17:37:44 -04:00
David Anderson 5dd4037c02 Update the sourcepawn repo. 2015-03-30 16:24:23 -07:00
Ruben Gonzalez 176a8182e8 Merge pull request #316 from alliedmodders/ondropweapon-fix
Fix not being able to block CS_OnCSWeaponDrop and clarify include file. (bug 6334)
2015-03-29 18:32:00 -04:00
Ruben Gonzalez debbaea384 Merge pull request #317 from alliedmodders/ffgamedata-update
Fix Fortress Forever gamedata.
2015-03-27 21:45:55 -04:00
Ruben Gonzalez 756255999f Fix Fortress Forever gamedata. 2015-03-27 21:29:06 -04:00
Ruben Gonzalez 35e4374e2e Fix not being able to block CS_OnCSWeaponDrop and clarify include file. 2015-03-27 19:54:42 -04:00
Nicholas Hastings 7b56dd5c8a Fix build. 2015-03-22 19:23:58 -04:00
Nicholas Hastings 53f9bb0402 Add missing SetClientName description in function doc. 2015-03-22 18:56:02 -04:00
Nicholas Hastings 885117fb66 Add hack-fix for CS:S reverting name changes done with SetClientName. 2015-03-22 18:29:11 -04:00
Nicholas Hastings d12d7625aa Remove unused phrase. 2015-03-22 15:36:07 -04:00
Nicholas Hastings 7399991181 Add SetClientName gamedata. 2015-03-22 15:17:31 -04:00
Nicholas Hastings e62654acba Change sm_rename to use new SetClientName native. 2015-03-22 12:15:30 -07:00
Nicholas Hastings 7d795b523e Add SetClientName native. 2015-03-22 12:15:08 -07:00
Nicholas Hastings 38817bdd2c Pass a handle instead of entptr to ProcessCondChange for stability. 2015-03-22 06:53:51 -07:00
Peace-Maker 4b8a581c9a Fix crash in games that don't support radio style menus
Fix regression in ad7d920
GetMenuStyleHandle(MenuStyle_Radio) crashes games, which don't support
the radio menu style. The style is never added to the menu manager, if
it's not supported, so GetMenuStyleHandle tries to call IsSupported on a
nullptr
2015-03-21 18:53:41 -04:00
David Anderson 8b0a10ad1d Checkout submodules recursively. 2015-03-15 19:31:34 -07:00
David Anderson 7fc993e079 Fix build. 2015-03-15 19:27:44 -07:00
David Anderson d846d91b0b Merge pull request #300 from alliedmodders/sp-upstream
Use upstream SourcePawn as a submodule.
2015-03-15 19:19:55 -07:00
Nicholas Hastings 660d6201ab Merge pull request #310 from InstantMuffin/patch-2
Fixed missing include in gdc-psyfork/memoryutils.cpp (r=psychonic).
2015-03-15 20:22:47 -04:00
David Anderson 2ab3498ab0 Use upstream SourcePawn as a submodule. 2015-03-15 16:38:38 -07:00
InstantMuffin f7f4ea4243 Fixed missing include in psyfork/memoryutils.cpp
Error:
MemoryUtils.cpp: In member function ‘void* MemoryUtils::ResolveSymbol(void*, const char*)’:
MemoryUtils.cpp:249:43: error: ‘fstat’ was not declared in this scope
  if (dlfile == -1 || fstat(dlfile, &dlstat) == -1)

Fixed by adding missing include: #include <sys/stat.h>
2015-03-15 21:42:06 +01:00
Ruben Gonzalez 637471ef29 Merge pull request #303 from alliedmodders/tf2_vstk_fix
Fix some TF2 natives not having the correct vstk size.
2015-03-14 09:26:16 -04:00
Ruben Gonzalez f06a3605d2 Fix typo 2015-03-13 16:52:20 -04:00
Ruben Gonzalez f523d6a74d Update function signature comments. 2015-03-13 16:19:57 -04:00
Ruben Gonzalez ff8cbf97c4 FIx some TF2 natives not having the correct vstk size. 2015-03-12 18:28:17 -04:00
Ruben Gonzalez a947dfa9d5 Update TF2's MakeBleed native for the latest update. 2015-03-12 17:54:47 -04:00
Nicholas Hastings 28870d2ae5 Make OpenDirectory error for empty path match error in DirExists. 2015-03-10 18:58:00 -07:00
Nicholas Hastings cc3b86ea80 Throw an error if DirExists called with empty path. 2015-03-10 18:57:28 -07:00
Nicholas Hastings ae8efdddcb Add GetTeamEntity native to SDKTools. 2015-03-10 07:27:43 -07:00
David Anderson 7f24f137d6 Merge pull request #299 from alliedmodders/amtl-upstream
Use upstream AMTL as a submodule.
2015-03-08 12:13:11 -07:00
David Anderson eaea3c927d Update upstream AMTL as a submodule. 2015-03-08 00:24:03 -08:00
David Anderson 72475d6770 Merge pull request #295 from DoctorMcKay/fix-doc
Moved note about releasing resources from OnPluginStart to OnPluginEnd
2015-03-08 00:10:13 -08:00
David Anderson 8bb6f0e5c6 Merge pull request #297 from alliedmodders/rm-packing
Remove scpack.
2015-03-07 12:42:00 -08:00
David Anderson 0b990e46ab Remove scpack. 2015-03-07 11:39:11 -08:00
David Anderson 1d313e3120 Move macro assembler out of public/assembler into sourcepawn/vm/x86. 2015-03-07 11:16:37 -08:00
David Anderson 561004c4bf Move SourcePawn headers out of public/ into sourcepawn/include. 2015-03-07 11:13:32 -08:00
David Anderson 6f1eefbdbe Strip internal SourcePawn dependencies on SM relative paths. 2015-03-07 11:07:20 -08:00
David Anderson 23ac0b4637 Keep one copy of zlib in the SourcePawn tree. 2015-03-07 11:02:44 -08:00
David Anderson a008a3f804 Remove msvc project files for SourcePawn. 2015-03-07 10:53:12 -08:00
David Anderson c81e7e3410 Move batchtool out of sourcepawn. 2015-03-07 10:52:13 -08:00
David Anderson d459ebee41 Rename jit/ to vm/. 2015-03-07 10:50:35 -08:00
Nicholas Hastings ea684d5933 Merge pull request #296 from WildCard65/WildCard65-patch-1
Port remainder of regex.inc to transitional syntax (r=psychonic).
2015-03-07 08:09:12 -05:00
WildCard65 a730cfe9b5 Fixed regex.inc 2015-03-07 08:07:11 -05:00
Alexander Corn c9b6b7b212 Moved note about releasing resources from OnPluginStart to OnPluginEnd 2015-03-06 15:25:39 -05:00
Nicholas Hastings d72a9150a1 Merge pull request #294 from alliedmodders/explicit-ret-types
Add explicit return types to forwards missing them (r=dvander).
2015-03-06 15:19:37 -05:00
Nicholas Hastings bfaedba9ed Merge pull request #287 from peace-maker/tempent_range
Add TE_SendToAllInRange (r=psychonic).
2015-03-06 15:19:24 -05:00
David Anderson 0c5cbe536f Revert unintentional change. 2015-03-06 11:00:15 -08:00
David Anderson 175f9afa68 Merge pull request #240 from alliedmodders/stock-values
Allow capturing non-public functions as values.
2015-03-06 10:53:21 -08:00
David Anderson 8216097b2c Allow capturing non-public functions as values. 2015-03-06 10:51:46 -08:00
Nicholas Hastings adbdcd6b1d Add explicit return types to forwards missing them. 2015-03-06 10:18:09 -08:00
Nicholas Hastings ac4f594063 Trigger build for hl2sdk-dota changes. 2015-03-06 11:25:37 -05:00
Nicholas Hastings 2d53547e03 Merge pull request #289 from alliedmodders/more-ninvoke-killing
Remove references to INativeInvoker.h from extension boilerplate.
2015-03-06 07:37:46 -05:00
David Anderson 7c775aee2e Merge pull request #288 from klausenbusk/patch-1
Updated KillTimer documentation to reflect "Invalid handles" = runtime error.
2015-03-06 01:52:32 -08:00
Fyren b1ae2a178f Merge pull request #293 from alliedmodders/spcomp-option-spaces
Reapply ancient patch to allow spaces in spcomp options.
2015-03-06 02:50:50 -07:00
David Anderson fa2dc5b20a Merge pull request #290 from InstantMuffin/patch-1
Documentation oddities for Call_PushStringEx
2015-03-06 01:43:54 -08:00
Fyren dd8fa985c1 Reapply ancient patch to allow space in spcomp options. 2015-03-06 09:08:24 +00:00
Fyren 81926ceae2 Merge pull request #292 from alliedmodders/sourcepawn-fix-signed-compare
Signed comparison warning fixes.
2015-03-06 01:48:54 -07:00
Fyren d3da389f9f Signed comparison warning fixes. 2015-03-06 08:08:41 +00:00
David Anderson 782eee3c58 Merge pull request #291 from VoiDeD/spcomp-error25-improvements
Improve the diagnostic given when a function prototype doesn't match an existing definition
2015-03-05 23:04:19 -08:00
Kyle Sanderson d0d0ea5051 Merge pull request #269 from KyleSanderson/wnoerrorsign
Add Wno-error=sign-compare for gcc to Compiler. r=dvander
2015-03-05 20:05:06 -08:00
Ryan Stecker 3509f963ee Improve the diagnostic given when a function prototype doesn't match an existing definition. 2015-03-05 18:45:15 -06:00
InstantMuffin 98cbef547a Update functions.inc 2015-03-05 21:03:46 +01:00
David Anderson 90d3841ab2 Fix mac build. 2015-03-05 11:51:08 -08:00
InstantMuffin 3f2ad5ccb0 Documentation oddities for Call_PushStringEx
See changes for details, should be obvious. What also strikes me as odd is that there is only one cpflag atm. Has this always been the case? Will there be more in the future? Or why is this designed to be a flagstring?
2015-03-05 20:47:05 +01:00
Nicholas Hastings 6f8ffd55a7 Merge pull request #263 from alliedmodders/admins-trans
Update admins.inc with methodmaps, newdecls (r=dvander, asherkin).
2015-03-05 14:32:15 -05:00
Nicholas Hastings 96703c247c Remove references to INativeInvoker.h from extension boilerplate. 2015-03-05 10:59:19 -08:00
Nicholas Hastings c39565ddb1 Fix spacing. 2015-03-05 10:56:54 -08:00
Nicholas Hastings 70390ff1f7 Purge Purge. 2015-03-05 10:56:36 -08:00
Kristian Klausen 924b7621ac Updated KillTimer documentation.. 2015-03-05 17:15:54 +01:00
David Anderson 715a51d01f Merge pull request #285 from alliedmodders/frames
Implement a new stack and error handling model for the SourcePawn VM.
2015-03-04 23:45:59 -08:00
David Anderson a1afa23bc4 Implement a new stack and error handling model for the SourcePawn VM.
This has three major changes to SourcePawn. First, the API now supports the concept of "exceptions". The exception state is a global property of an instance of the SourcePawn VM. Exceptions can be caught or suppressed. Many places in SourceMod have been updated to check exceptions instead of errors.

The new API obsoletes major parts of the embedder API - all but one method of invoking functions is obsoleted, and the debug interface has been scrapped. Extensions using the native API will not be affected, however, ThrowNativeError has been deprecated in favor of ReportError.

Second, the SourcePawn concept of a "stack" has been unified at the API level. A stack frame iterator now iterates over all SourcePawn invocations, rather than the topmost plugin. This makes error handling more consistent and removes another dependency on context-per-plugin.

Finally, the implementation of stack frames has been changed dramatically. Rather than maintain a complicated and expensive return pointer stack, we now rely on the implicit one provided by the CPU. The stack frame iterator now walks the JIT stack directly. This removes many unnecessary bookkeeping instructions from the generated code, in particular making the CALL instruction 40% faster.

These changes required some fair surgery to the JIT. Its error paths are now slightly more complicated, as they have to throw an exception rather than return an error code. In addition, any path that can throw an exception is now responsible for creating an "exit frame", which exists to tell the stack frame iterator about transitions from the JIT to the VM.
2015-03-04 23:45:30 -08:00
Peace-Maker b53947ccc3 Add TE_SendToAllInRange
Add helper stock to mimic PVS and PAS recipient filters for tempents in
the SDK.
2015-03-03 17:22:01 +01:00
Nicholas Hastings b43da7b7f0 Fix Mac build. 2015-02-27 04:53:31 -08:00
Nicholas Hastings fdc3c0791e Merge pull request #266 from alliedmodders/tfconds-reducks
Replace frameloop for player condition checks in TF2 ext with sendproxies (r=All of the KyleS).
2015-02-27 04:43:15 -08:00
David Anderson 04827466b0 Rewrite the .smx parser.
This removes one the last remnants of the SourceMod 1.0 VM implementation.

The new parser introduces a number of design changes in the VM. First, the VM now takes greater responsibility for validating and sanity checking the structure of the SMX container format. Previously, malformed SMX files could easily crash SourcePawn. The loader now rejects files that have out-of-bounds offsets or incomplete sections. Complex sections, like debug info or the code stream, are verified lazily.

Internally, the sp_plugin_t structure has been removed. It has been replaced by a new LegacyImage class, designed to be independent from the SPVM API. This potentially lets us load code streams from non-.smx containers. More importantly, it removes a lot of bookkeeping and pre-computed state from PluginRuntime. The LegacyImage class is now responsible for handling debug info as well.

PluginRuntime is now intended to hold only cached or immutable data, and PluginContext holds all VM state. As such PluginContext is now responsible for allocating a plugin's runtime memory, not PluginRuntime.

Finally, some aspects of the loading process have been cleaned up. The
decompression and image handoff logic should now be easier to
understand.
2015-02-25 22:28:10 -08:00
David Anderson afbcdc8a20 Merge branch 'rm-interpreter' 2015-02-25 22:22:07 -08:00
David Anderson b5ae5defcf Merge branch 'simpl-fns' 2015-02-25 22:21:43 -08:00
David Anderson 1f351c50d5 Merge branch 'fix-native-updating' 2015-02-25 22:20:41 -08:00
David Anderson 9a37b94f4d Merge pull request #280 from alliedmodders/rm-ctx
Remove sp_context_t.
2015-02-26 15:46:32 -08:00
David Anderson acf6dcac86 Remove the interpreter. 2015-02-24 23:57:08 -08:00
David Anderson fcec0ee7c7 Use AutoPtr in more places in the JIT. 2015-02-24 23:50:42 -08:00
David Anderson b9b0ec865c Simplify the JIT function cache. 2015-02-24 23:43:07 -08:00
David Anderson fcaa5361c8 Don't expose mutable sp_native_t. 2015-02-24 23:10:18 -08:00
David Anderson 33588b65ce Remove sp_context_t. 2015-02-24 21:54:34 -08:00
David Anderson c09c65e4c7 Remove sp_context_t::plugin. 2015-02-24 21:54:34 -08:00
David Anderson 11ea385169 Remove sp_context_t::rval. 2015-02-24 21:54:34 -08:00
David Anderson 3a0310e832 Remove sp_context_t::basecx. 2015-02-24 21:54:34 -08:00
David Anderson 31ab1ced06 Move hp from sp_context_t to PluginContext. 2015-02-24 21:54:34 -08:00
David Anderson b2c61a341a Move sp from sp_context_t to PluginContext. 2015-02-24 21:54:30 -08:00
David Anderson 4c9321f02a Move frm from sp_context_t to PluginContext. 2015-02-24 21:01:05 -08:00
David Anderson d2005bd42a Move cip from sp_context_t to PluginContext. 2015-02-24 20:53:44 -08:00
David Anderson 8817de8a55 Remove err from sp_context_t. 2015-02-24 20:41:51 -08:00
David Anderson 97dbc7ff07 Move n_err from sp_context_t to PluginContext. 2015-02-24 20:16:13 -08:00
[email protected] 9c104ef310 Move nidx from sp_context_t to PluginContext. 2015-02-24 19:59:45 -08:00
Asher Baker 7f0ff04ccf Updated plugin blacklist. 2015-02-25 01:10:28 +00:00
[email protected] 5502fbbdc1 Move the tracker from sp_context_t to PluginContext. 2015-02-24 15:43:41 -08:00
[email protected] deedc1aaa6 Remove unused fields from sp_context_t. 2015-02-24 15:21:52 -08:00
[email protected] 37af05c456 Move the debug return stack into PluginContext. 2015-02-24 15:20:00 -08:00
David Anderson 8c35d79576 Merge pull request #279 from alliedmodders/mv-basecontext
Rename BaseContext to PluginContext.
2015-02-24 14:56:32 -08:00
Asher Baker 6572989993 Merge pull request #213 from splewis/find-array-nonzero-blocks
Add block parameter to FindValueInArray native.
2015-02-24 22:37:49 +00:00
[email protected] 8eed58a467 Rename sp_vm_basecontext to plugin-context. 2015-02-24 12:55:00 -08:00
[email protected] 2e77155b4e Rename BaseContext to PluginContext. 2015-02-24 12:50:09 -08:00
[email protected] 8b8edf6e70 Remove dead file and fix gcc build. 2015-02-24 11:39:28 -08:00
[email protected] f0aa177bf8 Merge branch 'cc3' 2015-02-24 11:06:11 -08:00
[email protected] e163204643 Merge branch 'cc2'. 2015-02-24 11:05:25 -08:00
[email protected] 50d7d7eedb Merge branch 'rm-watchdog-singleton' 2015-02-24 11:04:06 -08:00
David Anderson ec05036a2d Merge pull request #274 from alliedmodders/refactor-api
Refactor the public API entrypoint for SourcePawn.
2015-02-24 11:03:32 -08:00
Nicholas Hastings b8223d1b98 Merge pull request #267 from 50Wliu/tf2_setclientteam
Add TF2_SetClientTeam to provide symmetry to TF2_GetClientTeam (r=psychonic).
2015-02-24 10:23:23 -05:00
David Anderson 781c5129a9 Remove the JITX86 class. 2015-02-24 02:03:58 -08:00
David Anderson 111dd7eb68 Factor code stubs out of JITX86. 2015-02-24 02:03:58 -08:00
David Anderson 21f5400d9c Remove ICompilationData. 2015-02-24 02:03:57 -08:00
David Anderson 8cf3e227ea Move context var initialization into BaseContext. 2015-02-24 02:03:56 -08:00
David Anderson 8c95919b32 Move watchdog/runtime interaction into Environment. 2015-02-24 02:03:55 -08:00
David Anderson b406c3d03d Merge sp_vm_engine and engine2. 2015-02-24 02:03:55 -08:00
David Anderson c70e87d582 Move the code cache into Environment, and out of knight/shared. 2015-02-24 01:57:50 -08:00
David Anderson 57ba8fd09b De-singleton-ify the watchdog timer. 2015-02-24 01:53:37 -08:00
David Anderson 3cf3f6c3f8 Merge sp_vm_engine and engine2. 2015-02-24 01:52:14 -08:00
David Anderson 499f7b3929 Refactor the public API entrypoint for SourcePawn. 2015-02-24 01:52:13 -08:00
David Anderson e58415f94a Fix shell build on Windows. 2015-02-24 01:49:03 -08:00
David Anderson 38d2c3690a Merge pull request #273 from alliedmodders/add-shell
Build the debug spshell as part of AMBuild.
2015-02-23 20:28:30 -08:00
David Anderson 4212fb88c8 Build the debug spshell as part of AMBuild. 2015-02-23 20:21:17 -08:00
David Anderson f769e1a00c Merge pull request #272 from alliedmodders/rn-runtime
Rename BaseRuntime to PluginRuntime.
2015-02-23 16:56:18 -08:00
[email protected] 1f9b898702 Rename BaseRuntime files to plugin-runtime. 2015-02-23 16:44:15 -08:00
[email protected] 2f71cb4cd7 Rename BaseRuntime to PluginRuntime. 2015-02-23 16:40:36 -08:00
David Anderson b8d2be9a0d Merge pull request #271 from alliedmodders/rm-jit-function
Rename some horrible classes.
2015-02-23 16:28:28 -08:00
[email protected] b2d8dde3a5 Rename Function to CompiledFunction. 2015-02-23 16:27:57 -08:00
[email protected] 0ee4885056 Rename sp_vm_function to scripted-invoker. 2015-02-23 16:14:59 -08:00
[email protected] 45bac7feb0 Rename jit_function to compiled-function. 2015-02-23 16:04:57 -08:00
[email protected] 892b8c05b1 Rename JitFunction to CompiledFunction and CFunction to ScriptedInvoker. 2015-02-23 16:03:08 -08:00
David Anderson 7d64ade621 Merge pull request #270 from alliedmodders/modernize-vm-style
Modernize sourcepawn/jit style.
2015-02-23 14:38:28 -08:00
[email protected] 45c43f4aee Modernize sp_vm_basecontext. 2015-02-23 13:40:01 -08:00
[email protected] 1b47aa10ca Modernize sp_vm_engine style. 2015-02-23 13:08:28 -08:00
[email protected] bcd88b4437 Modernize sp_vm_function style. 2015-02-23 13:01:00 -08:00
[email protected] 10d778e344 Modernize engine2.* style. 2015-02-23 12:49:26 -08:00
[email protected] 0100ebadb9 Fix build on GCC. 2015-02-23 12:40:02 -08:00
Wliu 20b5f76572 🎨 Change to TF2_ChangeClientTeam 2015-02-22 20:20:45 -05:00
Nicholas Hastings 62ed3973b5 Fix Insurgency s_pTempEntities offset on Windows. 2015-02-22 20:08:42 -05:00
Nicholas Hastings 5f7e800444 Use new IVEngineServer::GetIServer to get IServer* on Insurgency. 2015-02-22 15:16:26 -05:00
Nicholas Hastings b52b5f46f0 Update Insurgency Windows SDKTools gamedata. 2015-02-22 10:14:53 -05:00
Kyle Sanderson 3386a3af80 Add Wno-error=sign-compare for gcc to Compiler. 2015-02-21 20:25:39 -08:00
Kyle Sanderson 9099516906 Merge pull request #200 from alliedmodders/travis-clang-3.5
Make TravisCI builds use Clang 3.5 to match our Buildbot builds.
2015-02-21 19:28:38 -08:00
Kyle Sanderson f235f97d95 Install g++-4.8 before installing llvm 3.5 2015-02-21 19:20:18 -08:00
Kyle Sanderson 4bd4d8d4a5 Merge pull request #268 from KyleSanderson/MenuCrash
Root Menu Handles during Display (Bug 5620,r=dvander).
2015-02-21 17:25:25 -08:00
Kyle Sanderson 284fab7254 Root Menu Handles during Display. 2015-02-21 17:10:26 -08:00
Wliu f772c88eed Whoops. 2015-02-20 21:26:34 -05:00
Wliu 58d94c2827 Adds TF2_SetClientTeam to provide symmetry to TF2_GetClientTeam
Also remove some trailing whitespace
2015-02-20 21:23:27 -05:00
Nicholas Hastings 7e8d4b89ca Trigger build for hl2sdk-dota changes. 2015-02-20 09:16:40 -05:00
Nicholas Hastings 70be2941fe All of the KyleS. 2015-02-18 22:42:06 -05:00
Nicholas Hastings 9ffbac4f4e Simplified code. (We don't need m_Shared). 2015-02-18 18:44:31 -05:00
Nicholas Hastings 684b59a921 Don't fire forwards if client isn't ingame. 2015-02-18 12:33:37 -08:00
Nicholas Hastings e8765c5d3d Move m_CondOffset initialization to ctor. 2015-02-18 12:32:45 -08:00
Nicholas Hastings d179240c45 Merge pull request #265 from alliedmodders/missing-fs-native
Add missing impl for File.ReadUint16 (r=dvander).
2015-02-18 15:10:05 -05:00
Nicholas Hastings ac530a4ce0 Fix passing incorrect cond# to forwards for CondEx/2/3 fields. 2015-02-18 12:09:17 -08:00
Nicholas Hastings 589482736f Merge pull request #247 from AnthonyIacono/normalshook-upgrade
Improvements for NormalSHook functionality (r=psychonic).
2015-02-18 14:43:33 -05:00
Nicholas Hastings 3d2bd070ad Merge pull request #264 from davidskuza/sample-ext-vs-update
Updated Visual Studio sample_ext files.
2015-02-18 14:38:22 -05:00
Nicholas Hastings c4a58b1c95 Make sure processing and fwd calls happen on main thread. 2015-02-18 05:35:58 -08:00
Nicholas Hastings b9579a53ce Add missing impl for File.ReadUint16. 2015-02-18 04:50:20 -08:00
Developer 94c439e533 Updated Visual Studio sample_ext files 2015-02-18 10:34:38 +01:00
Nicholas Hastings a327a788c1 Trigger build for hl2sdk-csgo changes. 2015-02-17 15:52:31 -05:00
Nicholas Hastings a541acb2bc Convert admin SQL plugins to use AdminId/GroupId methodmaps, newdecls. 2015-02-17 09:13:40 -08:00
Nicholas Hastings 63d1fa2d8e Convert admin-flatfile to use AdminId/GroupId methodmaps and newdecls. 2015-02-17 08:24:46 -08:00
Nicholas Hastings e4ee52e1ac Convert adminhelp to newdecls. 2015-02-17 08:24:11 -08:00
Nicholas Hastings c0729ff5e2 Add methodmap for GroupId. 2015-02-17 08:21:14 -08:00
Nicholas Hastings c2d37cdff5 Add methmodmap for AdminId. 2015-02-17 07:19:56 -08:00
Nicholas Hastings 0f00a2db08 Remove unused result value in OnRebuildAdminCache forward call. 2015-02-17 06:43:49 -08:00
Nicholas Hastings 67e74581cc Make result ptr in IForward::Execute default to NULL (which is allowed). 2015-02-17 06:43:07 -08:00
David Anderson eb9f496cd8 Merge pull request #262 from VoiDeD/bug-6310
Fix tag mismatch warning when using SQLite_UseDatabase. (bug 6310)
2015-02-15 21:45:46 -08:00
Ryan Stecker 0203d2c811 Fix tag mismatch warning when using SQLite_UseDatabase. (bug 6310) 2015-02-15 21:53:31 -06:00
Nicholas Hastings 6bc2d20177 Mess with some array sizes. 2015-02-08 20:30:15 -05:00
Nicholas Hastings 350eb462ca Rewrite TF2 extension's player conditions handling to remove dirty frame loop. 2015-02-08 20:03:07 -05:00
Nicholas Hastings 591aea54b6 Merge pull request #261 from alliedmodders/handle-dump-loc
Make handle dump location relative to gamedir to match other sm_dump commands (r=kyles).
2015-02-08 17:14:42 -05:00
Nicholas Hastings 00ad38f5b7 Actually use game path instead of SM path as base. 2015-02-07 09:25:25 -08:00
Nicholas Hastings 261e135845 Make handle dump location relative to gamedir to match other sm_dump commands. 2015-02-07 09:21:53 -08:00
Nicholas Hastings f50d8317f6 Merge currently in-use gdc-psyfork symbols.txt. 2015-02-05 14:44:58 -05:00
Anthony 3558418ed7 Initializing soundEntry and using something safer than strcpy 2015-02-05 11:12:33 -08:00
Nicholas Hastings fca927884b Merge pull request #260 from alliedmodders/bug-6303
Fix crash when creating and destroying a TopMenu before map start (bug 6303, r=asherkin).
2015-02-04 16:16:23 -05:00
Nicholas Hastings 10c62dc0c0 Fix crash when creating and destroying a TopMenu without map change (bug 6303). 2015-02-04 09:57:04 -08:00
David Anderson 7e9b22cb6e Merge pull request #259 from alliedmodders/rm-sizeof-defarg
Remove sizeof() as a special-case default argument value.
2015-02-03 12:44:00 -08:00
Nicholas Hastings c427dfbea7 Merge pull request #203 from alliedmodders/bug-6248
Remove faulty g_FlagSet array in adminsys (bug 6248) (r=asherkin).
2015-02-03 12:39:43 -05:00
Nicholas Hastings e88039d4e0 Fix FindFlagChar not finding char for AdminFlag_Custom6. 2015-02-03 10:32:34 -05:00
Nicholas Hastings 84a59c6fb7 Fix g_ReverseFlags array size. 2015-02-03 10:27:32 -05:00
Nicholas Hastings 19be28cc2e Rename g_FlagSet to g_FlagCharSet to avoid some confusion. 2015-02-03 10:26:28 -05:00
David Anderson c116a731f1 Remove sizeof() as a special-case default argument value. 2015-02-02 21:10:20 -08:00
Ruben Gonzalez cf9dd08c45 Merge pull request #258 from alliedmodders/weaponprice-fix-wip
Fix GetWeaponPrice for CS:GO
2015-02-01 12:06:07 -05:00
Nicholas Hastings a88b447327 Merge pull request #257 from alliedmodders/sm-plugins-refresh
Fix "sm plugins refresh" not refreshing changed plugins (r=dvander).
2015-01-31 15:31:49 -05:00
Nicholas Hastings 52514a96bd Fix "sm plugins refresh" not refreshing changed plugins. 2015-01-31 15:28:21 -05:00
Ruben Gonzalez 5ffb4d9845 Merge branch 'master' into weaponprice-fix-wip 2015-01-31 15:15:44 -05:00
David Anderson 0bb2dc32af Merge pull request #256 from alliedmodders/bug6302
Don't special case hierarchy-free enumeration constants when used as array indices. (bug 6302)
2015-01-31 10:50:24 -08:00
Ruben Gonzalez 213e7ced8c Initial CSGO GetWeaponPrice fixes 2015-01-31 12:44:18 -05:00
David Anderson 380479cadd Don't special case hierarchy-free enumeration constants when used as array indices. (bug 6302) 2015-01-29 00:16:06 -08:00
David Anderson 04c23383b1 Merge pull request #255 from alliedmodders/bug6298
Fix chained field expressions losing lvalue-ness. (bug 6298)
2015-01-28 17:49:52 -08:00
David Anderson 90ff154598 Fix chained field expressions losing lvalue-ness. (bug 6298) 2015-01-28 17:31:16 -08:00
Nicholas Hastings 840b432ce0 Merge pull request #253 from alliedmodders/adminmenu-newdecl
Convert adminmenu to use newdecls and new classes/methodmaps (r=dvander).
2015-01-28 18:52:53 -05:00
Nicholas Hastings e1b6e09cd3 Merge pull request #250 from alliedmodders/sdkhooks-newdecls
Convert remainder of sdkhooks.inc to newdecls (r=dvander).
2015-01-28 18:52:41 -05:00
Nicholas Hastings ad8373925a Merge pull request #251 from alliedmodders/topmenus-stuff
Topmenus stuff (r=dvander).
2015-01-28 18:52:23 -05:00
Nicholas Hastings 2292515315 Merge pull request #254 from alliedmodders/bug-6226
Fix incorrect error line show for incorrect return value on forwards (bug 6226, r=asherkin).
2015-01-28 14:45:06 -05:00
Nicholas Hastings d9ce8249cb Fix incorrect error line show for incorrect return value on forwards (bug 6226). 2015-01-28 09:51:02 -08:00
Nicholas Hastings b3bb37323d Merge pull request #252 from alliedmodders/sdkhooks-lvlinit-block
Don't allow plugins to block LevelInit (wtf) (r=asherkin).
2015-01-27 21:31:03 -05:00
Nicholas Hastings c6b5675262 Merge pull request #249 from alliedmodders/signunsigned-stack-warning
Fix signed/unsigned compare warning in smn_adt_stack (r=asherkin).
2015-01-27 21:29:23 -05:00
Nicholas Hastings 43bca4dcc2 Convert adminmenu to use newdecls and new classes/methodmaps. 2015-01-27 18:13:10 -08:00
Nicholas Hastings dbbc30368d Convert remainder of sdkhooks.inc to newdecls. 2015-01-27 18:06:14 -08:00
Nicholas Hastings 5f651f7fde Convert remainder of topmenus.inc to newdecls. 2015-01-27 18:03:59 -08:00
Nicholas Hastings eadfec75a4 Make TopMenuHandler pass topmeut as TopMenu instead of Handle. 2015-01-27 18:03:24 -08:00
Nicholas Hastings e2aab2ab10 Don't allow plugins to block LevelInit (wtf). 2015-01-27 18:01:30 -08:00
Nicholas Hastings 8705aea634 Fix signed/unsigned compare warning in smn_adt_stack. 2015-01-27 17:59:55 -08:00
David Anderson 3040708d4e Merge pull request #215 from Thordin/more_handles
Increased handles to 32k
2015-01-26 11:24:46 -08:00
David Anderson 2382902fe4 Merge pull request #244 from alliedmodders/db-fix
Fix wrong value in transitional DBI callback. (bug 6292)
2015-01-23 14:07:22 -08:00
Anthony ee0575bbb0 Adding EmitSoundEntry() for engines >= portal 2 2015-01-21 10:33:29 -08:00
Nicholas Hastings aff2551942 Remove conditionals in ambuild scripts for using msvc <2013 (not supported). 2015-01-21 11:04:52 -05:00
Nicholas Hastings 18b54b9064 Update protobuf include path for Dota build. 2015-01-21 11:04:03 -05:00
Kyle Sanderson d1af9b5fd1 Merge pull request #248 from KyleSanderson/mysqltimeout
Establish a default timeout for MySQL connectivity.
2015-01-21 06:46:18 -08:00
Kyle Sanderson e3349116cb Establish a default timeout for MySQL connectivity. 2015-01-21 05:58:45 -08:00
Kyle Sanderson c70f16c65a Force reconfigure. 2015-01-20 18:15:15 -08:00
Kyle Sanderson 37d9867c06 Merge pull request #129 from KyleSanderson/SDKDep
Enable SDK independence with MM:S enabled extensions.
2015-01-20 17:22:04 -08:00
Anthony cddae6f456 Upgrading the normal sound hook for games like CS:GO 2015-01-20 15:08:57 -08:00
Ryan Stecker ff27484527 Prevent null auth string comparisons. 2015-01-19 07:48:45 -05:00
Nicholas Hastings 324d52bf2b Merge pull request #246 from alliedmodders/bot-admins
Fix regression causing "BOT" to no longer be valid in adminsys for Steam identities (r=asherkin).
2015-01-17 16:15:14 -05:00
Nicholas Hastings 9f648879e5 Fix regression causing "BOT" to no longer be valid in adminsys for Steam identities. 2015-01-17 10:11:04 -05:00
Nicholas Hastings a7c41f6ac2 Merge pull request #245 from chauffer/master
Add missing semicolon.
2015-01-17 08:20:17 -05:00
Simone fbb6e88d0d Add missing semicolon. 2015-01-17 11:47:26 +01:00
David Anderson 49383e7391 Fix wrong value in transitional DBI callback. (bug 6292) 2015-01-16 00:33:29 -08:00
David Anderson f715952128 Merge pull request #243 from VoiDeD/umsg-callback
Use BfRead or Protobuf tags in umsg hook callbacks, rather than a generic Handle.
2015-01-15 11:58:25 -08:00
Ryan Stecker 2516654d2e Use BfRead or Protobuf tags in umsg hook callbacks, rather than a generic Handle. 2015-01-15 13:40:21 -06:00
Ryan Stecker 8dbcfde314 Revert "Use BfRead tag in umsg hook typedef, rather than a generic Handle."
This reverts commit 89119880b5.
2015-01-15 13:32:54 -06:00
David Anderson 4218674e7c Merge pull request #242 from VoiDeD/umsg-callback
Use BfRead tag in umsg hook typedef, rather than a generic Handle.
2015-01-13 20:28:54 -08:00
Ryan Stecker 89119880b5 Use BfRead tag in umsg hook typedef, rather than a generic Handle. 2015-01-13 21:33:11 -06:00
Nicholas Hastings 42956c0a10 Add PlayerRunCommand gamedata for Dark Messiah. 2015-01-11 11:45:03 -05:00
Nicholas Hastings e0e2c00d12 Fix ICommandLine not being found in Dark Messiah. 2015-01-11 11:44:45 -05:00
Ross Bemrose 691d891794 Merge branch 'master' of https://github.com/alliedmodders/sourcemod into mapchooser-updates 2015-01-09 09:42:07 -05:00
Nicholas Hastings df6dfec728 Trigger build for hl2sdk-dota update. 2015-01-09 09:06:57 -05:00
Nicholas Hastings dfa36b7735 Update TF2 gamedata. 2015-01-07 14:09:36 -05:00
Asher Baker c28426a09f Fix threads leaking if they're not joined. (bug 3460, r=dvander) 2015-01-06 20:29:47 +00:00
Ross Bemrose 8567246772 ClearArray was changed to Clear in recent SourceMod builds. 2015-01-06 10:07:15 -05:00
Ross Bemrose a9961d3bb4 Merge branch 'master' of https://github.com/alliedmodders/sourcemod into mapchooser-updates 2015-01-06 10:04:25 -05:00
David Anderson bded4f9142 Fix uninitialized variable in decl_enum(). 2015-01-04 12:12:16 -08:00
David Anderson 491036a1e6 Allow "stock static" in addition to "static stock". 2015-01-04 12:04:51 -08:00
Nicholas Hastings 3e012e7f79 Fix ArrayList.Clear func name. 2015-01-04 12:28:38 -05:00
Nicholas Hastings 3929ff1f27 Fix typo on ArrayList.Erase native. 2015-01-04 11:58:44 -05:00
Nicholas Hastings 56d768f546 Merge pull request #239 from peace-maker/sdkhooks_otdsig
Fix missing params in OnTakeDamagePost typedef (r=psychonic).
2015-01-03 15:00:03 -05:00
David Anderson 4ec992474e Remove some heinous preprocessor directives.
Gone:
 - #emit (bah-roken!)
 - #pragma compress (useless)
 - #pragma library (useless)
2015-01-03 11:41:37 -08:00
David Anderson 822501b8a1 Fix typos in dbi.inc transitional syntax. 2015-01-03 11:38:51 -08:00
David Anderson bf3ff460b3 Merge pull request #93 from peace-maker/failstate_dependencies
Pause dependent plugins on SetFailState. (bug 6120, r=dvander)
2015-01-03 10:55:52 -08:00
Peace-Maker ff9ae0782e Fix missing params in OnTakeDamagePost typedef
Looks like the |weapon| parameter went missing during the switch to the
transitional syntax.

There was no -Post typedef including the |damagecustom| bit at all too.
2015-01-03 19:45:27 +01:00
Nicholas Hastings 66defdfc27 Merge pull request #237 from alliedmodders/ep1-servertools
Don't look for IServerTools on ep1 games (r=asherkin).
2015-01-01 16:29:11 -05:00
Nicholas Hastings 3e65d308a8 Don't looks for IServerTools on ep1 games.
(We don't use it and it doesn't exist on most.)
2015-01-01 14:56:37 -05:00
Nicholas Hastings a88d0da1af Merge pull request #236 from alliedmodders/sdkhooks-noload-crash
Fix SDKHooks causing crash on plugin load/unload or player connect/disconnect if missing gamedata (r=asherkin).
2014-12-30 21:08:29 -05:00
Nicholas Hastings aa38226337 Fix SDKHooks causing crash on plugin load/unload or player connect/disconnect if missing gamedata. 2014-12-30 20:56:28 -05:00
Nicholas Hastings 5961ed2e4a More gamedata cleanup. 2014-12-30 17:23:52 -05:00
Nicholas Hastings 4dd9131847 Merge pull request #234 from alliedmodders/expose-getmulticastrecips
Expose Message_DetermineMulticastRecipients as GetClientsInRange native (r=asherkin).
2014-12-30 15:42:25 -05:00
Nicholas Hastings 6d1a2b0d86 Expose Message_DetermineMulticastRecipients as GetClientsInRange native. 2014-12-30 15:37:57 -05:00
Nicholas Hastings cdaf54dfe0 Merge pull request #235 from alliedmodders/dmapdump-offset
Add offset printing to datamap dumps (r=asherkin)..
2014-12-30 14:29:51 -05:00
Nicholas Hastings 7f0edd441e Add offset printing to datamap dumps. 2014-12-30 08:36:35 -05:00
Nicholas Hastings 4a9dffd3e1 Change sm_trigger_show default value to 0 / disabled. 2014-12-29 11:56:07 -05:00
Ross Bemrose f69f4eb85f Fixes to make mapchooser.inc transitional compliant. Also updated comments in mapchooser.sp to match the new mapchooser.inc signature. 2014-12-26 12:36:12 -05:00
Ross Bemrose 84782a40df Merge branch 'master' of https://github.com/alliedmodders/sourcemod into mapchooser-updates 2014-12-26 12:30:21 -05:00
Nicholas Hastings 047c143879 Revert "Disable FireOutput detour on Windows for Dota for now."
This reverts commit a7c9aff568.
2014-12-24 11:01:32 -05:00
Nicholas Hastings a7c9aff568 Disable FireOutput detour on Windows for Dota for now. 2014-12-24 10:37:51 -05:00
Nicholas Hastings fe6d44bbd5 Fix build. 2014-12-23 08:27:41 -08:00
Nicholas Hastings 489b7f1d33 Gamedata cleanup. 2014-12-23 08:18:40 -08:00
Nicholas Hastings ad9de71ac9 Add new and remove old gamerules gamedata for numerous games. 2014-12-23 11:04:05 -05:00
Nicholas Hastings 3edaac9bd7 Merge pull request #230 from peace-maker/mysql_unpack_spam
Don't unpack mysql verbosely in checkout-deps.sh.
2014-12-23 09:02:46 -05:00
Nicholas Hastings 9247a8ab00 Merge pull request #232 from FlaminSarge/tf_mannpower_conds
Update TFCond enum for Mannpower.
2014-12-23 08:22:30 -05:00
FlaminSarge 7b71ff2643 Denote TFCond multiples of 32 consistently 2014-12-23 02:21:02 -08:00
FlaminSarge 97e88640ca Update TFCond enum for Mannpower 2014-12-23 02:13:51 -08:00
Nicholas Hastings e1b89a3008 Update TF2 gamedata. 2014-12-22 17:30:29 -05:00
Ross Bemrose 6dff44da54 Merge branch 'master' of https://github.com/alliedmodders/sourcemod into mapchooser-updates 2014-12-22 15:56:18 -05:00
Nicholas Hastings 7fddf5abf4 Disable nextmap on Insurgency. 2014-12-20 22:55:36 -05:00
Peace-Maker 6c17f247df Don't unpack mysql verbosely
I doubt we're interested in the filename of every single file
contained in the mysql archive when it's decompressed.

It bloats up the travis build log.
2014-12-20 11:32:15 +01:00
Peace-Maker 9b2e77711a Plugin_Failed == "An unrecoverable error"
Change the meaning of Plugin_Failed status to indicate, that the plugin
can't recover from the error.
Make sure those previously loaded plugins are shown correctly in sm
plugins info x.
2014-12-20 11:08:30 +01:00
Peace-Maker 0b131d6864 Pause dependent plugins on SetFailState (bug 6120)
When a plugin calls SetFailState it is paused and all natives it
registered are unavailable. Other plugins, which depend on those natives
keep running and error whenever they try to call those natives.

This correctly sets the dependent plugins to an error state as if the
plugin which called SetFailState was unloaded.
2014-12-20 11:07:57 +01:00
Nicholas Hastings abb8d8447f Move bot auth to after connect to fix old too-early-authid bug now causing crash (r=VoiDeD). 2014-12-19 18:27:18 -05:00
Ross Bemrose 7edc1f8a6d Stop MENU_ACTIONS_ALL from tossing warnings when #pragma newdecls required is set. 2014-12-19 11:29:05 -05:00
Ross Bemrose a0dd8cbc97 Merge branch 'master' of https://github.com/alliedmodders/sourcemod into mapchooser-updates 2014-12-19 11:15:04 -05:00
Nicholas Hastings 4f15715993 Merge pull request #228 from VoiDeD/fix-version
Update manual builds to use version 1.8.0
2014-12-18 19:42:59 -05:00
Ryan Stecker 679b2863fa Update manual builds to use version 1.8.0 2014-12-18 18:18:55 -06:00
Nicholas Hastings 13f6e2d4d0 Trigger build. 2014-12-18 05:09:25 -08:00
Nicholas Hastings 4311dc3270 Bump version to 1.8.0-dev. 2014-12-18 04:55:58 -08:00
Nicholas Hastings 7304747f79 Merge pull request #222 from alliedmodders/auth-ogrekill
Don't recalculate Steam ID every frame when waiting for validated auth.
2014-12-17 20:41:22 -05:00
Nicholas Hastings 17fcd5a37f Merge pull request #223 from alliedmodders/zo
Change /d2Zi+ flag on msvc builds to /Zo.
2014-12-17 19:35:14 -05:00
David Anderson d413a6bd2f Merge pull request #227 from VoiDeD/newdecls-retag-warning
Old style retagging should emit a compiler warning when newdecls are required.
2014-12-17 15:30:08 -08:00
Ryan Stecker 154d84668b Old style retagging should emit a compiler warning when newdecls are required. 2014-12-17 16:37:39 -06:00
Ross Bemrose 01f4b204c9 Added two items missed in the original conversion with the Runoff vote. 2014-12-17 16:05:14 -05:00
Ross Bemrose f40bfbf762 Updated nextmap.inc. Also fixed copyright years and added missing copyright header to mapchooser.inc (all .inc files use the same copyright header, so...) 2014-12-17 11:53:02 -05:00
Ross Bemrose ccf5aa6b54 Change all view_as<>(null) back to INVALID_HANDLE for now. 2014-12-17 11:07:51 -05:00
Ross Bemrose 032dde7be9 Missed a few GetArrayCell and GetArraySizes in MapChooser. 2014-12-16 17:00:00 -05:00
Ross Bemrose 2d5b71c832 Deleted comment... checked into it and its working as intended. 2014-12-16 16:57:49 -05:00
David Anderson 58194c5d99 Merge pull request #225 from powerlord/votecallback-fix
Add new-style API compatibility for VoteHandler.
2014-12-16 13:29:09 -08:00
Ross Bemrose 8272151d78 Convert the MapChooser VoteHandlers over to the new style. 2014-12-16 16:20:03 -05:00
Ross Bemrose 844fad263a Add new-style API compatibility for VoteHandler. 2014-12-16 16:06:20 -05:00
Ross Bemrose 1b79252947 Update NextMap, Nominations, RandomCycle, and RockTheVote with newer MethodMap stuff 2014-12-16 14:16:06 -05:00
Ross Bemrose bc4d6b7104 Eliminate extraneous view_as calls and also update mapchooser.inc. 2014-12-16 13:53:54 -05:00
Ross Bemrose 46839b9752 Update MapChooser to use 1.7 syntax... except there's a bug you run into with Advanced Vote Callbacks. 2014-12-16 13:38:43 -05:00
David Anderson e250eb66d1 Merge pull request #224 from VoiDeD/umsg-fix
Fix UserMessageToBfWrite and UserMessageToBfRead
2014-12-15 22:23:47 -08:00
Ryan Stecker 20ed5c338c Fix UserMessageToBfWrite and UserMessageToBfRead not working correctly for non-protobuf usermessages. 2014-12-15 23:07:53 -06:00
David Anderson b4199e5aa3 Merge pull request #221 from alliedmodders/tr-db
Transitional syntax support for DBI.
2014-12-14 18:37:53 -08:00
David Anderson b60ef1669c Update SQL plugins for transitional syntax. 2014-12-14 18:37:32 -08:00
Nicholas Hastings 7e8473b61a Remove /Zo on debug builds and add on release builds. 2014-12-14 16:03:42 -05:00
Nicholas Hastings ed87e048b4 Merge pull request #220 from alliedmodders/gamerules-no-gamedata
Fixup SDKTools to not require byte sig or symbol to get g_pGameRules (r=VoiDeD).
2014-12-14 15:29:14 -05:00
Nicholas Hastings 0d67bcc5ba Add null-check on serverclass in gamerules lookup. 2014-12-14 15:21:54 -05:00
Nicholas Hastings 03abafce3d Change /d2Zi+ flag on msvc builds to /Zo.
http://msdn.microsoft.com/en-us/library/dn785163.aspx
2014-12-14 14:59:16 -05:00
Nicholas Hastings 67fcd9e2c6 Populate auth ids (if available) when initializing CPlayer instance. 2014-12-14 14:56:19 -05:00
David Anderson bab1110bc0 Disallow coercion to/from char[] and any[]. 2014-12-14 02:00:58 -08:00
Nicholas Hastings d51a57cc34 In UpdatePlayerAuth, don't update SteamIDs if AuthID hasn't changed. 2014-12-13 19:40:22 -05:00
Nicholas Hastings de12f64c14 Convert CPlayer::m_AuthID to ke::AString. 2014-12-13 19:39:44 -05:00
David Anderson b1cb06c5ce Update DBI for transitional syntax. 2014-12-13 16:34:58 -08:00
Nicholas Hastings 88cb74213c Add support for getting g_pGameRules without a byte signature / symbol. 2014-12-13 16:35:32 -05:00
David Anderson 5a814c40b3 Merge pull request #207 from alliedmodders/tr-menus
Update menu transitional syntax.
2014-12-13 13:29:52 -08:00
David Anderson 1328984e0b Update plugins for transitional methods. 2014-12-13 13:29:15 -08:00
David Anderson 722a23c818 Redo menu methodmaps. 2014-12-13 12:53:30 -08:00
David Anderson 5959d6ed54 Merge pull request #198 from alliedmodders/tr-events
Port events to transitional syntax.
2014-12-13 12:51:58 -08:00
David Anderson 28eb663f9b Port events to transitional syntax. 2014-12-13 12:51:16 -08:00
Nicholas Hastings 939b10bd8e Refactor SDKTools to not expose gamerules ptr ptr outside of vglobals.cpp. 2014-12-13 15:48:51 -05:00
David Anderson b607bfeca9 Reserve 'builtin' as a keyword. 2014-12-12 21:29:28 -08:00
David Anderson f9d92b0eba Merge pull request #219 from alliedmodders/static-methods
Add support for static methods on methodmaps.
2014-12-12 12:24:28 -08:00
David Anderson 61bf7de101 Revert adminmenu API changes. 2014-12-12 10:10:46 -08:00
David Anderson 5b69efe5d4 Add static method support to methodmaps. 2014-12-12 10:10:46 -08:00
David Anderson afeae84340 Replace symbol proxies with type symbols.
Proxies were rather hacky and complicated, and only existed as a
workaround for oddities with constructors. This patch replaces them with
actual type symbols, a very tiny step to semantically getting rid of tags.

This greatly simplifies how we implement constructors, and paves the way
for using methodmap symbols in field expressions.

Since non-value symbols are new to spcomp1, we place a rather
pigeonholed check into primary() to make sure non-value symbols don't
escape into expressions.
2014-12-12 10:10:43 -08:00
Nicholas Hastings 46d620cb6a Merge pull request #217 from alliedmodders/tf2-holidayvars
Convert TFHoliday values to pubvars.
2014-12-10 08:31:15 -05:00
David Anderson 0295f817b8 Allow int: and void: tags, but warn. 2014-12-10 02:36:30 -08:00
David Anderson 18cc1b414b Fix some compile errors in new-style includes. 2014-12-10 02:12:53 -08:00
David Anderson a9e252314d Use typeset in sdkhooks.inc. 2014-12-10 01:13:08 -08:00
Kyle Sanderson bc4081718b Merge pull request #218 from KyleSanderson/damageeeee
Return the 'e' to OnTakeDamagAlive comment.
2014-12-09 23:20:20 -08:00
David Anderson 1ee3067575 Gracefully error on newly reserved keywords. 2014-12-09 23:18:11 -08:00
David Anderson 94bed806fe Reserve many keywords. 2014-12-09 23:04:13 -08:00
David Anderson 9c98edd104 Rename "union" semantics to "typeset". 2014-12-09 22:36:42 -08:00
Kyle Sanderson 0375aedd47 Return the 'e' to OnTakeDamagAlive comment. 2014-12-09 22:21:46 -08:00
Nicholas Hastings 09060c265f Convert TFHoliday values to pubvars. 2014-12-09 20:21:24 -05:00
Ruben Gonzalez 8a8917ba2e Update TF2 gamedata. 2014-12-08 20:26:14 -05:00
Thordin f27c33cd18 Increased handles to 32k 2014-12-07 21:50:40 -08:00
Sean Lewis d2e01da287 Wrap 3rd parameter in FindValueInArray to check for existence. 2014-12-06 17:07:54 -06:00
Sean Lewis 3ef2bdcb8d Add block parameter to FindValueInArray native. 2014-12-06 03:21:53 -06:00
Nicholas Hastings 25859e29ca Merge pull request #211 from Bara20/patch-1
Fix warning in files.inc (r=psychonic).
2014-12-02 08:20:02 -05:00
Bara a91d5bf754 Fix warning in files.inc 2014-12-02 03:35:56 +01:00
David Anderson 68e0645813 Add a view_as operator. 2014-11-30 19:08:25 -08:00
David Anderson cb4fdf1aa9 Update plugins for new syntax. 2014-11-30 18:57:38 -08:00
David Anderson 157549e119 Fix a bug where aliased constructors of nullable methodmaps could not be used. 2014-11-30 18:56:37 -08:00
David Anderson 9f5c8b60ae Add a "new" keyword for constructing nullable methodmaps. 2014-11-30 18:38:26 -08:00
Nicholas Hastings e7e43e38a5 Merge pull request #210 from alliedmodders/more-clientprefs-newauth
Fix clientprefs IsAuthIdConnected (again) (r=asherkin).
2014-11-26 18:55:57 -05:00
Nicholas Hastings 19f2f46655 Update PVKII gamedata. 2014-11-25 10:13:37 -05:00
Asher Baker 50898d7a4f Merge pull request #208 from asherkin/long-lang-codes
Support long key names for languages (bug 6282)
2014-11-24 19:07:18 +00:00
Asher Baker ced026cecc Support long key names for languages. (bug 6282) 2014-11-22 22:18:49 +00:00
David Anderson 62c243f0a5 Fix reading the wrong symbol name when throw argument errors. 2014-11-22 12:23:57 -08:00
Nicholas Hastings b0ceac9d74 Fix clientprefs IsAuthIdConnected (again). 2014-11-22 10:00:40 -08:00
David Anderson 673ff572c5 Disallow retagging enums or using implicit-int as an enum tag. 2014-11-20 19:30:22 -08:00
Nicholas Hastings f573bdf784 Merge pull request #209 from splewis/master
Add missing convars.inc to buildbot package script (r=psychonic).
2014-11-20 06:33:02 -05:00
Sean Lewis b7036de9e9 Add missing convars.inc to buildbot package script. 2014-11-20 03:01:46 -06:00
David Anderson 08388de7dd Merge pull request #199 from alliedmodders/tr-convars
Port ConVars to transitional syntax.
2014-11-19 22:38:56 -08:00
David Anderson be6da2f810 Merge pull request #173 from alliedmodders/tr-smc
Port SMC parsing API to transitional syntax.
2014-11-19 22:38:19 -08:00
Nicholas Hastings f38fd6a550 Merge pull request #205 from alliedmodders/tf2condex3
Add support for TF2 player conditions above >= 96 (r=asherkin).
2014-11-19 17:15:56 -05:00
David Anderson 0511543c76 Merge pull request #206 from alliedmodders/tr-files
Port files.inc to transitional syntax.
2014-11-18 18:56:07 -08:00
Nicholas Hastings db434acd27 Fix typo in CPlayer::GetSteam3Id doing length check on wrong var. 2014-11-16 10:07:08 -05:00
Nicholas Hastings 50400cf029 Remove unused variables. 2014-11-15 19:35:47 -05:00
Nicholas Hastings b85f4d776e Merge pull request #204 from alliedmodders/more-clientprefs-newauth
Fix SetAuthIdCookie's IsAuthIdConnect function's issues with mixed authid types (r=asherkin).
2014-11-15 19:35:13 -05:00
David Anderson 79143d8b6e Port files.inc to transitional syntax. 2014-11-15 13:42:28 -08:00
David Anderson f25953bb6c Merge pull request #187 from alliedmodders/tr-arrays
Update ArrayList for transitional syntax.
2014-11-15 13:04:29 -08:00
David Anderson 461dc3af3d Merge pull request #189 from alliedmodders/tr-tries
Port string maps to transitional syntax.
2014-11-15 12:52:37 -08:00
David Anderson 5e362ec169 Merge branch 'tr-bitbuf' 2014-11-15 12:49:39 -08:00
David Anderson e46d5d211d Merge pull request #196 from alliedmodders/tr-protobuf
Add transitional syntax support for Protobuf natives.
2014-11-15 12:47:46 -08:00
David Anderson 758a7c955c Merge pull request #188 from alliedmodders/tr-stack
Port adt_stack to transitional syntax.
2014-11-15 12:47:21 -08:00
David Anderson 4cb29eb054 Port adt_stack to transitional syntax. 2014-11-15 12:46:17 -08:00
Nicholas Hastings d3a4c972e2 Add static_assert on ConBitVecAndNot hack so it gets updated on next cond count change. 2014-11-15 11:31:18 -05:00
Nicholas Hastings 1cf43b4ec2 Fix off-by-one error with FindNextSetBit in cond checks. 2014-11-15 11:22:43 -05:00
Nicholas Hastings a369d51f23 Merge pull request #183 from powerlord/tf2-halloween-2014
New Halloween 2014 conditions (r=psychonic).
2014-11-15 10:12:48 -05:00
Nicholas Hastings 849df7895b Update TF2 extension for new m_nPlayerCondEx3 player conditions field. 2014-11-15 10:08:07 -05:00
Nicholas Hastings ea86eee74e Fix SetAuthIdCookie's IsAuthIdConnect function's issues with mixed auth id types. 2014-11-15 09:34:49 -05:00
Nicholas Hastings f42a1fe0e4 Merge pull request #201 from DoctorMcKay/tf2-getclientteam
Added TF2_GetClientTeam stock (r=psychonic).
2014-11-15 08:06:27 -05:00
Nicholas Hastings 5a9b5e5e21 Update CS:GO gamedata. 2014-11-12 04:36:18 -08:00
Alexander Corn 1562530cdd Added TF2_GetClientTeam stock
Also fixed some weird spacing and language in doc comments
2014-11-11 02:23:44 -05:00
Nicholas Hastings cd304dc800 Make TravisCI builds use Clang 3.5 to match our Buildbot builds. 2014-11-10 20:25:29 -05:00
Asher Baker 93470fbdc6 Merge pull request #190 from asherkin/emscripten-asm-fix
Use GCC builtins for bsr/bsf where available.
2014-11-11 00:15:17 +00:00
Ross Bemrose f55bc6719d Add condition 87 back. 2014-11-10 14:44:26 -05:00
Nicholas Hastings d6533e3219 Merge pull request #192 from alliedmodders/no-random-iface
Use directly-exported random functions on vstdlib rather than IUniformRandomStream (r=dvander).
2014-11-10 13:26:12 -05:00
David Anderson cfa0d9341e Remove handling of class pseudokeyword since there is no C++ API to use it. 2014-11-09 18:12:30 -08:00
David Anderson 2cfe54f34b Port BitBuffers to transitional syntax. 2014-11-09 16:56:50 -08:00
David Anderson 4a66b67d81 Port remaining .sp files. 2014-11-09 16:52:06 -08:00
David Anderson 110440988d Port gag.sp. 2014-11-09 16:37:07 -08:00
David Anderson 4a14b776db Port basecomm.sp. 2014-11-09 16:35:52 -08:00
David Anderson fb5b552f86 Port basecommands.sp. 2014-11-09 16:35:45 -08:00
David Anderson 614fa86311 Port basechat.sp. 2014-11-09 16:31:17 -08:00
David Anderson 9980930dff Port antiflood. 2014-11-09 16:30:41 -08:00
David Anderson e68c228a36 Port basevotes.sp. 2014-11-09 16:29:44 -08:00
David Anderson 8fd0cbecf7 Port funvotes.sp. 2014-11-09 16:28:03 -08:00
David Anderson c425305cde Port mapchooser. 2014-11-09 16:25:52 -08:00
David Anderson 59fbeb4f2c Port nominations. 2014-11-09 16:11:36 -08:00
David Anderson d68eea6dea Port randomcycle. 2014-11-09 16:10:31 -08:00
David Anderson 86d4cdc0c4 Port rockthevote. 2014-11-09 16:10:25 -08:00
David Anderson 16330d1c4c Port reservedslots. 2014-11-09 16:10:13 -08:00
David Anderson 65dfd3cdd1 Add C++ definitions. 2014-11-09 15:39:13 -08:00
David Anderson 9886eea487 Use new-style. 2014-11-09 15:09:46 -08:00
David Anderson affff9eeb7 Move ConVar API into its own include. 2014-11-09 15:02:42 -08:00
David Anderson 6b714dafe3 Add transitional syntax support for Protobuf natives. 2014-11-09 14:19:16 -08:00
David Anderson 801b7ec9e2 Merge pull request #194 from alliedmodders/keyword-this
Define 'this' as a keyword.
2014-11-09 13:09:22 -08:00
David Anderson 4bc7b9243a Define 'this' as a keyword. 2014-11-09 13:01:35 -08:00
David Anderson 8479c2f067 Port SMC parsing API to transitional syntax. 2014-11-09 12:33:07 -08:00
David Anderson 53a1dbdafd Merge pull request #193 from alliedmodders/rm-assert-macro
Remove use of macros in mapchooser.
2014-11-09 12:14:35 -08:00
David Anderson 4802d4bae2 Remove use of macros in mapchooser. 2014-11-09 12:13:52 -08:00
David Anderson 6e045ef43c Merge pull request #191 from alliedmodders/inc-fixups
Fix some syntax errors in include files.
2014-11-09 11:25:59 -08:00
Nicholas Hastings f3fcdeda9d Use directly-exported random functions on vstdlib rather than IUniformRandomStream. 2014-11-09 10:59:10 -05:00
David Anderson c37174cb97 Fix some syntax errors in include files. 2014-11-09 02:03:09 -08:00
David Anderson 22df518ab5 Fix a bug where local dynamic array declarations could be mistakenly parsed as old decls (bug 6280). 2014-11-09 00:15:09 -08:00
David Anderson c228be83d6 Revert "Fix a bug where local dynamic array declarations could be mistakenly parsed as old decls."
This reverts commit 046f167b6e.
2014-11-09 00:15:00 -08:00
David Anderson 046f167b6e Fix a bug where local dynamic array declarations could be mistakenly parsed as old decls (bug 6279). 2014-11-09 00:12:44 -08:00
David Anderson 099f299113 Fix trailing commas in array literals changing the result of sizeof(). 2014-11-08 23:15:23 -08:00
David Anderson 4c377f21f9 Mark symbols as read when using sizeof(). 2014-11-08 20:45:43 -08:00
David Anderson 704e9579f7 Fix comparisons of derived tags (bug 6239). 2014-11-08 20:27:39 -08:00
Asher Baker 686cf9c5ba Use GCC builtins for bsr/bsf where available. 2014-11-09 04:15:49 +00:00
David Anderson 7609d19e32 Fix bug where bad carriage returns mess up line endings. 2014-11-08 18:04:45 -08:00
David Anderson 6ba4bcb955 Port string maps to transitional syntax. 2014-11-08 17:43:28 -08:00
David Anderson 3cc5c198b4 Allow dynamic char arrays. 2014-11-08 17:39:43 -08:00
David Anderson 919a31df57 Update ArrayList for transitional syntax. 2014-11-08 16:31:33 -08:00
David Anderson cd0ac3ae37 Merge pull request #185 from powerlord/tr-event
Update events.inc to Transitional syntax.
2014-11-08 15:56:20 -08:00
David Anderson 17b9ee91e6 Merge pull request #177 from alliedmodders/tr-keyvalues
Port KeyValues to the transitional syntax.
2014-11-08 15:54:58 -08:00
David Anderson f020b5682e Port KeyValues to the transitional syntax. 2014-11-08 15:54:40 -08:00
David Anderson 78687080b1 Merge pull request #178 from alliedmodders/fs-redux
Simplify filesystem natives.
2014-11-08 15:46:10 -08:00
David Anderson f16501d34a Simplify filesystem native implementation. 2014-11-08 15:44:35 -08:00
David Anderson 3c13c87f1c Merge pull request #186 from alliedmodders/fix-arrays
Define post-fix arrays as determinate and pre-fix arrays as indeterminate.
2014-11-08 12:08:56 -08:00
Nicholas Hastings b7c4faf063 Merge pull request #169 from alliedmodders/vfsdir-fixes
Fixes for OpenDirectory with use_valve_fs (r=asherkin).
2014-11-08 13:19:54 -05:00
Nicholas Hastings 0d24804839 Merge pull request #174 from alliedmodders/eliminate-more-gamedata
Eliminate the need for more gamedata on some games (r=asherkin).
2014-11-08 12:52:53 -05:00
David Anderson dbee1bcd08 Add an error check after calling doexpr2(). 2014-11-08 03:07:34 -08:00
David Anderson 512cbc73a0 Fix a loophole with static local variables. 2014-11-08 02:54:29 -08:00
David Anderson 039572060e Add new dynamic array syntax. 2014-11-08 02:48:13 -08:00
David Anderson f08e53f5d2 Make sizeof on indeterminate arrays an error. 2014-11-08 02:07:43 -08:00
David Anderson 6d507ceb27 Add a special case for assigning a string literal to a char array. 2014-11-08 02:04:11 -08:00
David Anderson 70e095f320 Define post-fix arrays as determinate and pre-fix arrays as indeterminate. 2014-11-07 22:39:00 -08:00
David Anderson a8796543af Use symbols for fatal errors and bump them by 20 slots. 2014-11-07 17:41:33 -08:00
David Anderson 2c31b99ce3 Move is_new and has_postdims bits out of declinfo and into typeinfo. 2014-11-07 17:05:27 -08:00
Ross Bemrose 9175c081ee Changed all the char something[] to char[] something as per dvander's comments. 2014-11-07 19:13:46 -05:00
David Anderson b89bd36335 Merge pull request #184 from powerlord/sminc-pragma-newdecls-forward-fix
Add return types to OnPluginEnd, OnPluginPauseChange, and OnGameFrame.
2014-11-07 14:27:21 -08:00
Ross Bemrose 3579977b28 Added missing SetBroadcast to Event methodmap. 2014-11-07 16:47:20 -05:00
Ross Bemrose 21ea3c03b5 Something was throwing fits when those were Event earlier. 2014-11-07 16:30:29 -05:00
Ross Bemrose e7ec41e872 Fix timers.inc's OnMapTimeLeftChanged forward while I'm at it. 2014-11-07 16:01:50 -05:00
Ross Bemrose b76c948c95 Update condition names. Remove condition 87 for now. 2014-11-07 15:44:03 -05:00
Ross Bemrose 159f2c8335 Add return types to OnPluginEnd, OnPluginPauseChange, and OnGameFrame 2014-11-07 15:22:49 -05:00
Ross Bemrose 66bfd126b2 Initial pass for converting events.inc. 2014-11-07 14:35:45 -05:00
Ross Bemrose e7f6a99087 New Halloween 2014 conditions. 2014-11-07 11:16:26 -05:00
Nicholas Hastings 89e7d1c45c Merge pull request #181 from powerlord/tf2-holiday-spyvengy
New Holiday as per Halloween update (r=psychonic).
2014-11-06 06:48:05 -05:00
David Anderson b2e957db83 Merge pull request #182 from powerlord/tr-convar
Transitional syntax support for ConVars.
2014-11-05 23:12:41 -08:00
Ross Bemrose 67f9069382 Updated the named with the ones bailopan suggested. 2014-11-05 16:34:04 -05:00
Ross Bemrose 3fff07b33d Changed ConVarChanged to take a ConVar variable. Backwards compatible with Handle variables (I tested this to make sure). 2014-11-05 15:50:03 -05:00
Ross Bemrose 87a21c7ff8 Add HookChange and UnhookChange to ConVar. 2014-11-05 15:26:03 -05:00
Asher Baker a463ed5cf2 Updated IDA scripts for 6.5. 2014-11-05 16:37:12 +00:00
Ross Bemrose 0f9d2203a4 New Holiday as per Halloween update. 2014-11-05 11:01:04 -05:00
Ross Bemrose 89f6e4736f Merge branch 'master' of https://github.com/alliedmodders/sourcemod into tr-convar 2014-11-05 10:43:28 -05:00
Nicholas Hastings 04578dfee9 Merge pull request #180 from VoiDeD/tf2-gd-nov4-2014
Update MakeBleed signature.
2014-11-04 20:25:50 -05:00
Ryan Stecker 7f36ef65a9 Update MakeBleed signature. 2014-11-04 19:09:10 -06:00
Ross Bemrose 286d484207 Rearrange order of methods in methodmap. Add missing Reset method to methodmap. 2014-10-31 17:21:37 -04:00
Ross Bemrose cdc2b11a09 Add a ConVar class. 2014-10-31 17:06:42 -04:00
Nicholas Hastings c7109ca651 Merge pull request #170 from alliedmodders/tr-datapack
Add transitional syntax support for datapack.inc (r=dvander).
2014-10-31 08:49:12 -04:00
David Anderson 8c8d9b072a Fix more line-endings. 2014-10-30 21:30:12 -07:00
David Anderson 9c6c0f37ed Fix line-endings. 2014-10-30 21:25:23 -07:00
David Anderson 613b06f6c0 Improve error messages when we can't find a typeexpr on a method. 2014-10-30 21:15:48 -07:00
David Anderson 97c3a2bc6e Fix a crash when we fail to parse a typexpr in a global declaration. 2014-10-30 21:09:10 -07:00
David Anderson 91a863c20c Merge pull request #171 from alliedmodders/ts-topmenus
Port TopMenus to transitional syntax.
2014-10-30 19:21:35 -07:00
David Anderson b97335ccb0 Port TopMenus to transitional syntax. 2014-10-30 19:20:33 -07:00
Nicholas Hastings 67d839e568 Merge pull request #176 from VoiDeD/tf2-gd-oct30-2014
Update TF2 gamedata.
2014-10-30 22:10:11 -04:00
Ryan Stecker 5484f35dfb Update CTFPlayerShared::Burn signature. 2014-10-30 21:08:30 -05:00
Ryan Stecker 749bf80bcb Update TF2 vfunc gamedata. 2014-10-30 21:07:21 -05:00
David Anderson 0a545b12a4 Merge pull request #175 from alliedmodders/allow-any
Allow any in new-style natives.
2014-10-30 17:50:45 -07:00
David Anderson eaff5c9364 Allow any in new-style natives. 2014-10-30 17:19:01 -07:00
Nicholas Hastings f0dd129344 Eliminate need for FindEntityByClassname gamedata on sdk2013 and soon css/dods/hl2dm (already on tf2). 2014-10-30 19:25:26 -04:00
Nicholas Hastings 749701014d Eliminate need for sv gamedata on sdk2013 and soon css/dods/hl2dm (already on tf2). 2014-10-30 19:25:13 -04:00
Nicholas Hastings 10cee734dc Eliminate need for s_pTempEnts gamedata on sdk2013 and soon css/dods/hl2dm (already on tf2). 2014-10-30 19:24:53 -04:00
Nicholas Hastings 72c18cc3d9 Missing changes from last commit 2014-10-30 19:24:00 -04:00
Nicholas Hastings 350dd2ebc7 Eliminate need for gEntList gamedata on tf2/sdk2013 and soon dods/css/hl2dm. 2014-10-30 19:23:27 -04:00
Nicholas Hastings 5d78a5ff93 Fix Fistful of Frags Weapon_GetSlot offset. 2014-10-30 17:31:52 -04:00
Nicholas Hastings c15470b583 Update more Insurgency gamedata. 2014-10-30 17:31:23 -04:00
Nicholas Hastings e5eb291b67 Update Insurgency gamedata. 2014-10-30 04:34:36 -07:00
Nicholas Hastings 7ddced67cb Update NMRiH gamedata. 2014-10-30 06:54:09 -04:00
David Anderson a7303568d6 Merge pull request #172 from alliedmodders/fix-setters
Fix a crash when properties have setters but not getters.
2014-10-29 23:09:23 -07:00
David Anderson e7fc06910b Fix a crash when properties have setters but not getters. 2014-10-29 20:51:03 -07:00
Nicholas Hastings 86ddf1fea0 Revert accidental reverting of tf-regex merge. 2014-10-29 20:51:34 -04:00
Nicholas Hastings c9696ca230 Merge branch 'master' of https://github.com/alliedmodders/sourcemod 2014-10-29 20:23:41 -04:00
Nicholas Hastings 4dcc1590bb Update TF2 gamedata. 2014-10-29 20:21:20 -04:00
Nicholas Hastings 585786b465 Fix inconsistent spacing in methodmap decl. 2014-10-28 14:20:34 -04:00
David Anderson 3ec1b3a271 Merge pull request #168 from alliedmodders/tr-regex
Add transitional syntax support for regex.inc.
2014-10-28 11:19:02 -07:00
Nicholas Hastings de045b5ab6 Add transitional syntax support for datapack.inc. 2014-10-28 14:06:11 -04:00
Nicholas Hastings 9021b23bc2 Fix crash on OpenDirectory with use_valve_fs if path not found.
Also fixes minor memory leak on bad path.
2014-10-28 13:57:40 -04:00
Nicholas Hastings dca15ebabf Fix OpenDirectory with use_valve_fs requirement of trailing slash. 2014-10-28 13:53:27 -04:00
David Anderson 5874709407 Add transitional syntax support for regex.inc. 2014-10-27 22:05:37 -07:00
Nicholas Hastings ba0d41a69d Update Fistful of Frags gamedata. 2014-10-24 17:17:07 -04:00
David Anderson 76d26044f6 Fix build. 2014-10-21 21:51:15 -07:00
David Anderson 75335dbef3 Merge pull request #156 from Bara20/patch-2
Fix undefined symbol: clock_gettime.
2014-10-21 12:42:18 -07:00
David Anderson 6bd1285d66 Merge pull request #164 from VoiDeD/sp-commandline
Expose ICommandLine to plugins.
2014-10-21 12:25:51 -07:00
Nicholas Hastings f8ffe23c6e Merge pull request #162 from alliedmodders/steam3-bans
Allow Steam IDs in Steam3 format for sm_addban (r=asherkin).
2014-10-20 21:14:54 -04:00
Nicholas Hastings 77dc5ac7ed Fix build. 2014-10-14 17:47:44 -04:00
Nicholas Hastings 37c29775d4 Fix OnTakeDamage_Alive gamedata lookup in SDKHooks. 2014-10-14 17:36:55 -04:00
Ruben Gonzalez 5ce46e1537 Update windows CS:GO CheckWinLimit signature 2014-10-10 19:24:20 -04:00
Ryan Stecker a580f8c270 Whoops, forgot my hat. 2014-10-09 18:19:40 -05:00
Ryan Stecker d702371b15 Number -> Int, per recommendation. 2014-10-08 21:47:15 -05:00
Nicholas Hastings a3336b1dcf Fix typo causing compile error strcmp -> strncmp 2014-10-08 18:02:05 -07:00
Nicholas Hastings bba2a714a6 Merge pull request #163 from alliedmodders/admdump-crash
Fix crash on Windows when dumping admin cache to file (r=asherkin).
2014-10-08 20:53:11 -04:00
Nicholas Hastings 512fae4c25 Fix crash on Windows when dumping admin cache to file. 2014-10-08 17:31:02 -07:00
Nicholas Hastings d76f62b863 Allow Steam IDs in Steam3 format for sm_addban 2014-10-08 17:29:56 -07:00
Ryan Stecker 2aba6d9d42 Fix linux build. 2014-10-07 17:19:16 -05:00
Ryan Stecker f2a80e33fd Expose some of ICommandLine to plugins. 2014-10-07 16:16:02 -05:00
Nicholas Hastings ac96bb177a Merge pull request #157 from VoiDeD/getevent-defaults
Expose optional default values for the GetEvent* SP functions (r=psychonic)..
2014-10-05 09:14:30 -04:00
Nicholas Hastings 909d523da0 Trigger build for hl2sdk-tf2 changes. 2014-10-01 19:06:36 -04:00
Nicholas Hastings 02aad65d21 Trigger build for hl2sdk-tf2 changes. 2014-10-01 18:53:42 -04:00
Nicholas Hastings 0a9cabdecd Trigger build for hl2sdk-tf2 changes (bug 6259). 2014-09-26 08:31:15 -04:00
Nicholas Hastings 9eb1b3e73e Merge pull request #158 from VoiDeD/te-const-clients
Clients array in TE_Send should be const (r=psychonic).
2014-09-19 18:29:48 -04:00
Nicholas Hastings 0f6063af60 Re-add DBI query throttling (r=dvander). 2014-09-18 22:02:32 -04:00
David Anderson d4fb74ef9a Fix regression where duplicate function names were not an error. 2014-09-16 22:32:46 -07:00
Asher Baker 55a5c745d4 Updated plugin blacklist. 2014-09-16 10:47:21 +01:00
Ryan Stecker a80e049352 Clients array in TE_Send should be const. 2014-09-14 19:08:54 -05:00
Ryan Stecker 981ffdfc82 Fix linux build. 2014-09-13 03:13:33 -05:00
Ryan Stecker 3ffd4cd835 Expose optional default values for the GetEvent* SP functions. 2014-09-12 16:39:21 -05:00
Nicholas Hastings 570570f7a0 Fix regression causing inconsistencies in clientprefs auth id handling (r=VoiDeD). 2014-09-12 13:04:37 -07:00
Nicholas Hastings e72ff963f5 Fix regression in auth causing crash on L4D and newer (r=VoiDeD). 2014-09-12 12:02:45 -07:00
Ruben Gonzalez af273e8e66 Update linux CSGO gamedata 2014-09-12 12:26:27 -04:00
Nicholas Hastings a82dd5e0c3 Update CS:GO linux ClanTagOffset. 2014-09-12 06:50:36 -04:00
Nicholas Hastings e4569cb2b9 Disable RTTI for more game-agnostic extensions. 2014-09-11 17:41:25 -07:00
Nicholas Hastings 47450bb98c Disable RTTI for game-agnostic extensions 2014-09-11 17:28:24 -07:00
Nicholas Hastings c62e7458f9 Disable RTTI for Loader, Logic, and JIT bins 2014-09-11 17:15:59 -07:00
Bara d493bc701d Fix undefined symbol: clock_gettime
[SM] Extension dbi.mysql.ext.so failed to load: /home/csgo/csgo/addons/sourcemod/extensions/dbi.mysql.ext.so: undefined symbol: clock_gettime
2014-09-12 01:52:20 +02:00
Nicholas Hastings f0fe427fee Link libstdc++ on linux for CS:GO. 2014-09-11 19:23:10 -04:00
Nicholas Hastings 7f0b163b31 Merge pull request #155 from alliedmodders/onclientauth-steam2
Make OnClientAuthorized use Steam2 ids where available (r=asherkin).
2014-09-11 13:02:28 -04:00
Nicholas Hastings 49c22a404d Trigger build for hl2sdk-tf2 changes. 2014-09-10 20:59:13 -04:00
Nicholas Hastings e6fd19fb8c Fix crash regression from typo in 892edd9650 2014-09-09 22:05:59 -04:00
Nicholas Hastings 96f8d635c3 Re-enable -Wformat and -Wformat-security in builds 2014-09-09 22:05:07 -04:00
Nicholas Hastings 9a9446400d Nuke spurious NULL checks in spcomp to appease Clang 3.5 2014-09-09 22:04:24 -04:00
Nicholas Hastings 8a1c6bd833 Fix client listener OnClientAuthorized to match new doc 2014-09-09 18:20:52 -07:00
Nicholas Hastings e0c25cfe08 Fix typo, fix build 2014-09-09 18:12:34 -07:00
Nicholas Hastings 6d7115d62f Update the missed steamid nullcheck in clientprefs 2014-09-09 18:04:39 -07:00
Nicholas Hastings 96fbb7ecda Unify Player::GetSteamXId returns, clarify doc, and fix checks 2014-09-09 17:57:54 -07:00
Nicholas Hastings 775a35c5ab Update OnClientAuthorized function doc 2014-09-09 17:56:29 -07:00
Nicholas Hastings 9e6fcc7673 Make OnClientAuthorized use Steam2 ids where available 2014-09-09 17:43:01 -07:00
Nicholas Hastings acdd9e12ea Merge pull request #152 from alliedmodders/error-sp-warnings
Treat SourcePawn warnings as errors when building (r=dvander).
2014-09-09 17:01:44 -04:00
Nicholas Hastings a597277a64 Merge pull request #153 from alliedmodders/auth-fixups
More auth fixups for Steam auth (bug 6243, r=asherkin).
2014-09-09 16:24:57 -04:00
Nicholas Hastings b3dada65fa Fix build. 2014-09-09 13:21:01 -07:00
Nicholas Hastings 8a9a793453 Merge pull request #151 from alliedmodders/menu-natives-logic
Move menu natives from core to logic (r=asherkin).
2014-09-09 15:51:11 -04:00
David Anderson d1aa9a3513 Merge branch 'calli-7' 2014-09-07 15:08:51 -07:00
David Anderson 06f52aa7ce Merge pull request #141 from alliedmodders/calli-5
Rewrite the assembly pipeline.
2014-09-07 15:04:00 -07:00
David Anderson 60eb8ca4bd Merge branch 'master' into calli-5
Conflicts:
	public/amtl/am-utility.h
2014-09-07 15:03:28 -07:00
David Anderson 5b85f41fec Use the correct string table for tag names. 2014-09-07 15:02:09 -07:00
Kyle Sanderson cd4978d60e Merge pull request #154 from VoiDeD/sdkhooks-inc-fix
Fix sdkhooks.inc compile error
2014-09-06 22:10:22 -07:00
Ryan Stecker 07acec6550 Fix sdkhooks.inc compile error 2014-09-06 20:19:55 -05:00
Nicholas Hastings 66ab609000 Make admins_simple.ini bind Steam3 ids as steam auth 2014-09-05 13:16:55 -07:00
Nicholas Hastings 29d428adc2 Add support for auto-converting '_' to ':' with Steam3 Id targetting 2014-09-05 13:08:51 -07:00
Nicholas Hastings 5b1caec738 Treat sp warnings as errors when building 2014-09-05 08:26:23 -07:00
Nicholas Hastings ad7d920ce0 Move menu natives from core to logic 2014-09-05 08:24:40 -07:00
Nicholas Hastings 7fff73ad64 Fix syntax error in sdkhooks.inc. 2014-09-05 08:18:04 -04:00
Nicholas Hastings 215bbb8324 Make SteamID targetting explicit to Steam IDs...
rather than NetworkIDs which could be any form and similar to names.
Also make explicit support for both Steam2 and Steam3 formats
2014-09-04 16:25:12 -07:00
Nicholas Hastings 1bf4eb80bd Cache Steam ID and rendered forms when caching networkID 2014-09-04 16:14:34 -07:00
Nicholas Hastings f1dc24c089 Move Steam2/3 id rendering logic to CPlayer 2014-09-04 15:27:44 -07:00
Nicholas Hastings 892edd9650 Allow BindIdentity and FindAdminByIdentity to take more SteamID formats for steam auth type 2014-09-04 15:26:12 -07:00
Nicholas Hastings ec46e12c50 Replace usages of GetClientAuthString with GetClientAuthId 2014-09-04 12:49:06 -07:00
David Anderson 37638ba6fd Remove support for multiple tags on an argument. 2014-09-04 09:59:43 -07:00
David Anderson 8da4179c64 Merge pull request #150 from alliedmodders/fix-dbi
Fix DBI after AMTL changes.
2014-09-04 09:51:30 -07:00
David Anderson a1dc1101f7 Fix build. 2014-09-03 22:33:05 -07:00
David Anderson a00adaf9fb Sync with AMTL one last time. 2014-09-03 22:05:10 -07:00
David Anderson 8686957dee Final sync of AMTL. 2014-09-03 21:48:48 -07:00
David Anderson e6e90fb8b8 Sync am-string. 2014-09-03 21:45:44 -07:00
David Anderson 6068d341c8 Sync am-hashmap. 2014-09-03 21:44:51 -07:00
David Anderson 105cd27d19 Sync am-utility.h from upstream. 2014-09-03 21:40:03 -07:00
David Anderson e608057304 Sync a change from AMTL. 2014-09-03 21:31:06 -07:00
David Anderson 448c55c0f2 Fix DBI after AMTL changes. 2014-09-03 21:11:17 -07:00
Nicholas Hastings a7cdf17d90 Merge pull request #147 from alliedmodders/new-auth
Expose explicit client auth id formats (r=asherkin).
2014-09-03 18:50:24 -04:00
Nicholas Hastings b2b82f4a86 Add gamedata for SDKHooks Blocked and OnTakeDamage_Alive for many games. 2014-09-03 18:49:14 -04:00
Nicholas Hastings 6da7219f9f Merge pull request #149 from alliedmodders/ontakedamage_alive
Add OnTakeDamage_Alive hook support to SDKHooks (bug 6249, r=asherkin).
2014-09-03 18:35:06 -04:00
Nicholas Hastings 7f3656215b Consistency Fixes (ID->Id, AuthString->AuthId) 2014-09-03 15:13:30 -07:00
Nicholas Hastings be55587d70 Add OnTakeDamage_Alive hook support to SDKHooks (bug=6249). 2014-09-03 17:45:34 -04:00
David Anderson 40b1067ef7 Merge pull request #148 from alliedmodders/warnings-as-errors
Add a flag for warnings-as-errors.
2014-09-03 11:10:56 -07:00
David Anderson 01d1c0c806 Add a flag for warnings-as-errors. 2014-09-03 11:04:25 -07:00
Nicholas Hastings 3fba1d2817 Fix some nits 2014-09-03 10:50:11 -07:00
Nicholas Hastings e6ff9c36ed Merge pull request #119 from VoiDeD/sdkhooks-blocked
Implement SDKHook_Blocked and SDKHook_BlockedPost (r=psychonic).
2014-09-03 10:50:38 -04:00
Nicholas Hastings e11fec9ba1 Rename GetClientAuthString2 to GetClientAuthId 2014-09-02 18:11:36 -07:00
Nicholas Hastings d0c701793c Document possibly-unexpected yet valid auth strings 2014-09-02 17:47:33 -07:00
Nicholas Hastings eafd6626ec Fix true return when validation wanted and steam id pending 2014-09-02 17:44:11 -07:00
Nicholas Hastings e3b87a5ca4 Spin new logic into GetClientAuthString2...
and mark GetClientAuthString as deprecated, using 1.6.x GetClientAuthString behavior
2014-09-02 17:43:10 -07:00
Nicholas Hastings 8c89b72fbc Expose explicit client auth string formats 2014-09-02 14:40:39 -07:00
Ryan Stecker cae1d0dec1 Don't override hook result in BlockedPost. 2014-09-02 13:01:18 -05:00
Ryan Stecker 88c6d3d9a7 Merge remote-tracking branch 'upstream/master' into sdkhooks-blocked 2014-09-02 00:04:54 -05:00
Nicholas Hastings e9e35979a4 Update core AMBuild script for hl2sdk-csgo and hl2sdk-dota protobuf changes. 2014-09-01 11:25:55 -04:00
David Anderson 9d337dd1a9 Merge pull request #146 from alliedmodders/unions
Add a "union" keyword to replace funcenum.
2014-08-31 16:02:59 -04:00
Nicholas Hastings e093c7f72a Merge pull request #120 from alliedmodders/wip-valve-fs2
Add support for Valve FS to natives that use file handles (r=asherkin).
2014-08-30 14:25:53 -04:00
Nicholas Hastings ac121ec4d2 Merge branch 'master' of https://github.com/alliedmodders/sourcemod 2014-08-29 09:54:13 -07:00
Nicholas Hastings b81c44cf49 Update for hl2sdk-dota changes 2014-08-29 09:53:43 -07:00
David Anderson a136049392 Merge pull request #142 from VoiDeD/array-commas
Allow trailing commas in string array declarations. (bug 6239)
2014-08-29 11:21:14 -04:00
David Anderson a1b7c32b29 Add a "union" keyword to replace funcenum. 2014-08-28 14:02:08 -07:00
Ryan Stecker 302dc1cb8a Add test. 2014-08-26 14:58:58 -05:00
David Anderson 6db4f31a10 Remove weird tag flags. 2014-08-24 20:47:07 -07:00
David Anderson 63e5ab18ff Remove support for multiple tags on an argument. 2014-08-24 18:59:51 -07:00
David Anderson d230711e4d Bump SourcePawn version to 1.7 to match SourceMod. 2014-08-23 19:26:51 -07:00
Ryan Stecker 74908098f4 Allow trailing commas in string array declarations. (bug 6239) 2014-08-23 18:15:08 -05:00
David Anderson 078ee76491 Re-add .dbg.natives. 2014-08-23 13:40:50 -07:00
David Anderson 98ec07a419 Add debug info tables to smxbuilder. 2014-08-23 13:26:03 -07:00
David Anderson c4056aea5d Rewrite the assembly pipeline.
This patch uses SmxBuilder from spcomp2 to replace the old assemble()
pipeline. Instead of generating into an old AMX structure, and then
decoding that into SMX, we now directly generate into SMX. This greatly
simplifies code generation and smx building.
2014-08-23 13:25:58 -07:00
David Anderson 7a51d5d549 Remove unused variables. 2014-08-23 13:25:48 -07:00
Nicholas Hastings 89f5d6ecfb Merge pull request #140 from FlaminSarge/tf_enums_2014jun
Update TF2 enums for Love & War (r=psychonic).
2014-08-23 09:32:35 -04:00
David Anderson 9267d0c803 Eliminate Newborn/NoAddRef (bug 5907, r=ds). 2014-08-22 22:50:25 -07:00
David Anderson 0cf8eb2854 Fix Windows build more. 2014-08-22 21:07:49 -07:00
David Anderson d20ba38d6b Fix Windows build. 2014-08-22 20:47:18 -07:00
David Anderson 4d42fa0305 Fix Windows build. 2014-08-22 20:41:24 -07:00
David Anderson 860a5db5ea Merge pull request #139 from alliedmodders/fix-mac-build
Fix Mac build on apple-clang 5.0.
2014-08-22 20:34:38 -07:00
David Anderson 666b6b97ee Fix Mac build on apple-clang 5.0. 2014-08-22 20:30:35 -07:00
David Anderson d562593d31 Fix build. 2014-08-22 18:27:46 -07:00
David Anderson 27c3866b90 Merge branch 'calli-4' 2014-08-22 10:10:48 -07:00
David Anderson 50f3ec8da2 Merge branch 'calli-3' 2014-08-22 09:59:11 -07:00
David Anderson f42651a813 Merge branch 'calli-2' 2014-08-22 09:58:14 -07:00
David Anderson 91f0f1001b Merge pull request #134 from alliedmodders/calli
Simplify how functags work.
2014-08-22 09:54:48 -07:00
Nicholas Hastings 51d32bca77 Clarify return value commit on RemoveFile 2014-08-22 07:21:12 -07:00
Nicholas Hastings 9d6fea857b Fix another syntax error in files.inc 2014-08-22 06:55:45 -07:00
Nicholas Hastings 8d60fecb96 Fix syntax errors in files.inc 2014-08-22 06:30:25 -07:00
Nicholas Hastings 73115f7afa Add support for specifying gameinfo search path when using valveFS in file natives 2014-08-22 06:00:43 -07:00
Nicholas Hastings b95e7ff145 Add missing use_valve_fs param to CreateDirectory native def 2014-08-22 05:59:41 -07:00
Nicholas Hastings e1158889e5 Fix backwards use_valve_fs logic for OpenDirectory 2014-08-22 05:56:23 -07:00
David Anderson a09735a4c7 Remove SC_FUNC and SC_VDEFINE. 2014-08-22 00:53:47 -07:00
David Anderson 6291374b35 Move rtti hacks. 2014-08-22 00:41:32 -07:00
David Anderson dcd246c7ef Port scvars to C++. 2014-08-22 00:39:03 -07:00
David Anderson 29fbbade69 Port sc1 to C++. 2014-08-22 00:38:04 -07:00
David Anderson 48d228e2b1 Port sc2 to C++. 2014-08-22 00:23:02 -07:00
David Anderson 4608050bd2 Port sc3 to C++. 2014-08-22 00:17:00 -07:00
David Anderson 234b4907ed Port sc4 to C++. 2014-08-22 00:12:16 -07:00
David Anderson 9c005d93ed Port sc5 to C++. 2014-08-22 00:09:28 -07:00
David Anderson 3eb1faa470 Port sc6 to C++. 2014-08-22 00:07:40 -07:00
David Anderson 142fbaafdd Port sc7 to C++. 2014-08-22 00:04:48 -07:00
David Anderson afd6009fda Port scexpand and sci18n to C++. 2014-08-22 00:00:31 -07:00
David Anderson 3e8157c6bc Port lstring and sclist to C++. 2014-08-21 23:58:19 -07:00
David Anderson 2ba4fb180e Move scstate.c to C++. 2014-08-21 23:54:10 -07:00
David Anderson 261188fd1b Port a bunch of legwork files to C++. 2014-08-21 23:53:11 -07:00
David Anderson 5a4c50ce55 Port sp_symhash to C++. 2014-08-21 23:36:26 -07:00
FlaminSarge c70543839f Update TF2 enums for Love & War 2014-08-21 23:14:14 -07:00
David Anderson f5efdbf6f5 Remove hardtabs and fix style issues. 2014-08-21 22:42:22 -07:00
David Anderson 25241fa278 Remove file. 2014-08-21 22:19:25 -07:00
David Anderson 225954a27c Modernize the smx headers. 2014-08-21 22:16:07 -07:00
Ruben Gonzalez 3e1495d692 Update NMRIH gamedata. 2014-08-21 09:33:25 -04:00
Nicholas Hastings 5716927cbf Fix compile error on with MSVC. 2014-08-20 21:37:47 -04:00
Nicholas Hastings 09250f89cc Merge pull request #133 from alliedmodders/logger-logic
Move Logger and core natives from core to logic (r=dvander).
2014-08-20 06:43:31 -04:00
David Anderson 233aa5d2df Merge pull request #135 from alliedmodders/typedef-fix
Fix typedefs not fixing string sizes (bug 6220).
2014-08-20 00:30:08 -07:00
David Anderson 1f51393e26 Fix typedefs not fixing string sizes (bug 6220). 2014-08-20 00:26:09 -07:00
David Anderson d91d69f72e Remove newline. 2014-08-20 00:06:33 -07:00
David Anderson 96a73eb86f Deleting CONTRIBUTOR.md (until an up-to-date link is available). 2014-08-20 00:02:01 -07:00
David Anderson e5e2c1fa3d Simplify functag handling. 2014-08-20 00:00:24 -07:00
David Anderson 942a3cd155 Another dedent. 2014-08-19 22:32:02 -07:00
David Anderson 8dc4fcc728 Remove allowproccall code, dedent a block. 2014-08-19 22:29:13 -07:00
David Anderson 385d3708a3 Fix style issues in sctracker.c. 2014-08-19 22:17:10 -07:00
David Anderson 5cf2475e2e Merge pull request #132 from alliedmodders/fix-variadic-args
Fix returning strings from functions with variadic arguments.
2014-08-19 21:36:31 -07:00
Ruben Gonzalez 9f2a0f6748 Update FoF gamedata. 2014-08-18 08:56:39 -04:00
Nicholas Hastings e9ba251c1c Fix link errors. 2014-08-17 11:11:55 -04:00
Nicholas Hastings e4645332aa Convert missed files in logic to use logger from logic. 2014-08-17 11:06:43 -04:00
David Anderson 56cf6e723e Remove unnecessary changes. 2014-08-17 01:21:35 -07:00
David Anderson cef9d9d162 Fix returning strings from functions with variadic arguments. 2014-08-17 01:17:10 -07:00
Nicholas Hastings 1ca837ea2c Merge pull request #131 from VoiDeD/removewearable-optional
Mark TF2_RemoveWearable as optional (r=psychonic).
2014-08-16 13:23:01 -04:00
Ryan Stecker 2037cfc36d Mark TF2_RemoveWearable as optional. 2014-08-16 12:10:31 -05:00
Nicholas Hastings 8ffdfb6a0c Merge pull request #43 from hlstriker/master
Added a new function SetFilePermissions to set permissions of a file (r=psychonic).
2014-08-16 10:02:09 -04:00
Kyle Sanderson 766b6e1770 Merge pull request #127 from alliedmodders/coremapend
Add OnCoreMapEnd to extension's interface.
2014-08-15 20:48:59 -07:00
Ruben Gonzalez 31087dcb57 Merge pull request #130 from VoiDeD/regex-errors
Fix typo related to invalid regex handle errors.
2014-08-14 14:13:42 -04:00
Ryan Stecker d873b20573 Fix typo related to invalid regex handle errors. 2014-08-14 12:24:51 -05:00
Nicholas Hastings 486910a9a1 Add missing files 2014-08-13 14:26:18 -07:00
Nicholas Hastings 17d5af0e2f Move Logger and Core natives to Logic 2014-08-13 14:24:35 -07:00
Asher Baker f570fa414b Reformatted compiler output a little. (r=dvander) 2014-08-12 18:35:43 +00:00
David Anderson 4b8e26463a Merge pull request #122 from peace-maker/datapack_funcpointer
Add WritePackFunction and ReadPackFunction natives
2014-08-12 10:33:27 -07:00
David Anderson b92efc1df1 Merge pull request #128 from VoiDeD/profile-dump
Add a command to dump profiling output.
2014-08-12 10:31:30 -07:00
Nicholas Hastings 25f8570279 Merge pull request #124 from alliedmodders/csgo-cl-language
Fix automatic language detection on CS:GO (bug 6163) (r=asherkin).
2014-08-11 07:37:11 -04:00
Kyle Sanderson 901890e36d Eliminate SDK dependence for MM:S enabled extensions. 2014-08-09 14:42:38 -07:00
Ryan Stecker 0bde28cc17 Add a command to dump profiling output. 2014-08-09 13:32:05 -05:00
Ruben Gonzalez 2ba0b794ea Added note to know what version OnCoreMapEnd was added to. 2014-08-08 10:57:38 -04:00
Ruben Gonzalez 7a88386568 Add OnCoreMapEnd to extension's interface. 2014-08-08 01:01:47 -04:00
Nicholas Hastings 4e5b1a58ce Add ValveFS support to more filesystem functions: OpenDirectory (CloseHandle on directory) ReadDirEntry DirExists CreateDirectory RenameFile 2014-08-06 13:15:24 -07:00
Nicholas Hastings 3edd1ce658 Remove inaccurate note on GetClientLanguage function doc. 2014-08-05 10:40:14 -04:00
Asher Baker 84e5e20362 Merge pull request #125 from WildCard65/wearablesfix
Actually remove extra wearables.
2014-08-05 15:02:14 +01:00
WildCard65 dfba8757f7 Remove un-needed whitespace 2014-08-05 09:15:55 -04:00
WildCard65 15304a0059 Actually remove extra wearables.
Old logic was to try to get extra wearables on a non-existent entity.
2014-08-05 09:14:02 -04:00
Nicholas Hastings ccc818d06e Fix automatic language detection on CS:GO (bug 6163). 2014-08-05 01:41:44 -04:00
David Anderson 000cb2b4dd Merge pull request #123 from alliedmodders/sp2-compat
Introduce a typedef keyword.
2014-08-03 22:27:27 -07:00
David Anderson ad376ff0b8 Introduce a typedef keyword. 2014-08-03 21:51:34 -07:00
David Anderson 09edda93ad Fix style atrocities in sc1.c. 2014-08-03 18:53:58 -07:00
Peace-Maker bfcfbbe107 Add WritePackFunction and ReadPackFunction natives
Adds type safety to CDataPack. Cells can't be read as Float anymore. Now
you're able to store a function pointer in a datapack and be sure the
pointer can't be read as a cell and a cell can't be read as a function
pointer.
2014-08-04 02:05:25 +02:00
Nicholas Hastings f2b19e6c87 Add more accurate return value for DeleteFile when using Valve FS. 2014-08-03 09:10:02 -04:00
Nicholas Hastings 836cde4e21 Merge pull request #121 from VoiDeD/bug-6206
Remove the extra wearables of weapons in TF2_RemoveWeaponSlot (r=psychonic).
2014-08-02 22:02:14 -04:00
Ryan Stecker 14823723bd Remove the extra wearables of weapons in TF2_RemoveWeaponSlot. 2014-08-02 20:57:55 -05:00
Ryan Stecker 601aac440e Implement SDKHook_Blocked and SDKHook_BlockedPost. 2014-08-01 21:35:41 -05:00
Nicholas Hastings 573aea20fb More progress:
Abstracted many fs funcs with helper class.
Removed much duplicated code.
Fixed ReadFile assuming FS errors for ValveFS.
Added ValveFS support for ReadFileString, WriteFile, WriteFileString, DeleteFile.
Added missing param in doc for OpenFile.
2014-08-01 12:38:51 -07:00
Nicholas Hastings 5e7e7ce551 Improved FPrint(f) passthrough 2014-08-01 06:09:09 -07:00
Ruben Gonzalez c116353285 WiP addition of support for ValveFS to many more filesystem natives. 2014-07-31 20:56:07 -04:00
Kyle Sanderson 678e743819 Merge pull request #116 from VoiDeD/funcommands-gravity
Fix PerformGravity's logging format.
2014-07-30 17:59:52 -07:00
Ryan Stecker ff5ec0ea28 Fix PerformGravity's logging format. 2014-07-30 18:22:12 -05:00
Nicholas Hastings 8d5fe316e0 Merge pull request #114 from VoiDeD/tf2-removewearable
Implement TF2_RemoveWearable native (r=psychonic).
2014-07-30 18:43:34 -04:00
Kyle Sanderson c4a1e3c819 Merge pull request #107 from alliedmodders/sdkhackfix
Copy SDKHooks vector instead of taking a reference.
2014-07-30 15:42:49 -07:00
Kyle Sanderson ab72841704 Rename SDKHooks function and variable to be friendlier. 2014-07-30 15:34:51 -07:00
Ryan Stecker 75d5b0c972 Add more TF2_RemoveWearable documentation. 2014-07-30 17:28:51 -05:00
Asher Baker dd7a1764e4 Merge pull request #115 from asherkin/basebans-load
Improved error reporting in basebans custom reasons loading.
2014-07-30 20:52:51 +01:00
Asher Baker eab6ac748f Improved error reporting in basebans custom reasons loading. 2014-07-30 16:30:01 +01:00
Nicholas Hastings b979d707db Update Fistful of Frags gamedata. 2014-07-30 06:35:45 -04:00
Ryan Stecker 4a400d9569 Implement TF2_RemoveWearable native. 2014-07-29 20:31:27 -05:00
Kyle Sanderson ba0406930d Pre-allocate 8 elements to skip trivial reallocations near the beginning of the vectors life. 2014-07-29 02:48:13 -07:00
Kyle Sanderson be79dee6e0 Store only the callback as per VoiDeD, re-eval if HookList changes. 2014-07-29 02:46:49 -07:00
Kyle Sanderson 97610edda4 HackFix: Mimic forwardsys style of pawn calling. 2014-07-28 15:51:34 -07:00
Asher Baker 803a54b773 Merge pull request #113 from VoiDeD/spcomp-include-path
Fix not adding the "include" directory to the spcomp search path.
2014-07-24 22:23:43 +01:00
Ryan Stecker fad5c590b6 Fix not adding the "include" directory to the spcomp search path. 2014-07-24 15:35:44 -05:00
David Anderson 2553d02698 Fix build. 2014-07-24 10:40:51 -04:00
David Anderson da71cfed5a Merge pull request #112 from alliedmodders/dynamic-scp
Generate .scp files as part of the build process.
2014-07-24 09:01:49 -04:00
David Anderson 34e57b77b1 Fix spacing. 2014-07-24 08:54:52 -04:00
David Anderson fa446f74a1 Generate .scp files as part of the build process. 2014-07-24 07:58:03 -04:00
David Anderson 94b64cd6fc Regen sc5.scp. 2014-07-24 06:55:57 -04:00
David Anderson abcd106273 Merge pull request #111 from alliedmodders/bug6199
Improve error messaging for reserved keywords (bug 6199).
2014-07-24 06:53:51 -04:00
David Anderson 97e821dd6f Improve error messaging for reserved keywords (bug 6199). 2014-07-24 06:51:03 -04:00
David Anderson 6e48ded1a6 Merge pull request #109 from alliedmodders/binreloc
Enable binreloc for OS X.
2014-07-24 03:24:52 -07:00
David Anderson 1cc6120741 Merge pull request #110 from alliedmodders/bug6200
Add GetNativeFunction (bug 6200).
2014-07-24 03:24:37 -07:00
David Anderson 2a46f8f881 Add GetNativeFunction (bug 6200). 2014-07-23 23:36:11 -07:00
David Anderson 3fc05056b0 Rename <unknown> to __unknown__ to quell sc7 asserts. 2014-07-23 23:25:12 -07:00
David Anderson f41b3a2b06 Enable binreloc for OS X. 2014-07-23 23:21:03 -07:00
David Anderson 654dcd8ff0 Merge pull request #108 from VoiDeD/bug-6187
Fix message string for error 102.
2014-07-23 17:11:09 -07:00
Ryan Stecker 6a2ec15041 Fix error message 102 to include the spectype that's missing.
Additionally this fixes invalid usage of error 102 in grow_stgbuffer.
2014-07-23 18:52:22 -05:00
David Anderson 59efdafbaf Merge pull request #106 from VoiDeD/spcomp-file-handles
Close file handle on success in pc_opensrc.
2014-07-22 15:43:29 -07:00
Ryan Stecker f3671e55db Close file handle on success in pc_opensrc. 2014-07-22 17:33:26 -05:00
David Anderson b6d8cb9fcf Merge pull request #105 from alliedmodders/fix-varargs
Fix bug in variadic argument parsing. (bug 6195)
2014-07-21 23:12:26 -07:00
David Anderson 2a99eecdb6 Fix bug in variadic argument parsing. 2014-07-21 23:01:35 -07:00
David Anderson 57303f4310 Merge pull request #103 from alliedmodders/fix-incdec
Fix postinc/dec operations on accessors.
2014-07-20 21:24:57 -07:00
David Anderson 88c614c1ba Merge pull request #104 from alliedmodders/fix-structs
Clean up the struct syntax and force it to use newdecls.
2014-07-20 21:19:15 -07:00
David Anderson b1c400190a Merge pull request #101 from alliedmodders/sp2-incs
Block off operators for post-transitional compiler.
2014-07-20 21:19:07 -07:00
David Anderson 686890ec10 Clean up the struct syntax and force it to use newdecls. 2014-07-20 12:16:23 -07:00
David Anderson 8aa28e2c8d More indentation, spacing, and style fixes in sc1.c. 2014-07-20 11:50:57 -07:00
David Anderson 16177e9ecc Fix indentation, spacing, and style in declstruct(). 2014-07-20 11:46:02 -07:00
David Anderson 2b74f1bd61 Remove unused function. 2014-07-20 11:19:48 -07:00
David Anderson 5daa420aed Fix inc/dec operations on accessors. 2014-07-20 11:18:38 -07:00
David Anderson d2c7064e2b Merge pull request #102 from alliedmodders/fix-map-check
Check for null map in matchtag().
2014-07-20 10:36:34 -07:00
David Anderson 4051756576 Check for null map in matchtag(). 2014-07-20 10:15:49 -07:00
David Anderson 51f97d1298 Block off operators for post-transitional compiler. 2014-07-20 01:02:44 -07:00
David Anderson 8436a3ea6c Merge pull request #100 from alliedmodders/delete-crash
Mark usage correctly when invoking special natives.
2014-07-17 22:38:25 -07:00
David Anderson b0e98b16ec Mark usage correctly when invoking special natives. 2014-07-17 22:30:13 -07:00
David Anderson 7948755b3b Merge pull request #99 from alliedmodders/any-newdecls
Allow the any type in non-native newdecls.
2014-07-17 21:49:25 -07:00
David Anderson f79f5df5ab Allow the any type in non-native newdecls. 2014-07-17 21:43:59 -07:00
David Anderson b84b70d0f1 Merge pull request #98 from alliedmodders/fix-nullable
Fix nullable comparisons.
2014-07-17 21:29:07 -07:00
David Anderson beeb848724 Rename. 2014-07-17 21:19:31 -07:00
David Anderson 805b66e539 Fix null not working with comparisons. 2014-07-17 21:18:49 -07:00
David Anderson 8125faeb70 Merge pull request #97 from alliedmodders/bug-6179
Fix const with newdecls and a varargs bug. (bug 6179)
2014-07-17 20:55:23 -07:00
David Anderson 84344c1592 Fix const with newdecls and a varargs bug. (bug 6179) 2014-07-17 20:44:54 -07:00
Nicholas Hastings ac371aa639 Merge pull request #96 from peace-maker/reloadpost_hook
Fix regression. SDKHook_ReloadPost never firing (r=psychonic).
2014-07-16 15:09:44 -04:00
Peace-Maker 1181144e57 Fix regression. SDKHook_ReloadPost never firing
The switch to vtable hooks typo'd the ReloadPost hooks.
2014-07-16 20:40:52 +02:00
David Anderson 3a2f2e621d Remove references to the DisableJIT option. r=psychonic 2014-07-15 09:42:49 -07:00
David Anderson 9c6b82f3a5 Merge pull request #89 from alliedmodders/bug-6176
Fix crash with malformed arguments (bug 6176).
2014-07-13 11:26:57 -07:00
David Anderson 2ea9ec50b5 Merge pull request #91 from alliedmodders/bug-6183
Show errors for methods that are unused. (bug 6183)
2014-07-13 11:24:51 -07:00
David Anderson 58a3cb4a06 Merge pull request #90 from alliedmodders/bug-6178
Allow chaining off method calls. (bug 6178)
2014-07-13 11:24:22 -07:00
Nicholas Hastings a8a64cabee Update some Contagion gamedata. 2014-07-13 10:15:18 -04:00
David Anderson 71fb0d1d18 Address review comment. 2014-07-12 21:21:07 -07:00
David Anderson cd6997cd0b Merge pull request #88 from alliedmodders/bug-6175
Fix and formalize newline and semicolon behavior in methodmaps. (bug 6175)
2014-07-12 20:45:35 -07:00
David Anderson 5dd5b5131b Show errors for methods that are unused. (bug 6183) 2014-07-12 10:28:29 -07:00
David Anderson 1a83ca57fc Allow chaining off method calls. (bug 6178) 2014-07-12 10:05:43 -07:00
David Anderson 21d3a7f93e Fix crash with malformed arguments (bug 6176). 2014-07-12 09:31:51 -07:00
David Anderson 294fdee1e6 Clarify lexpop(). 2014-07-12 00:09:05 -07:00
David Anderson 3d3e5c40c2 Fix and formalize newline and semicolon behavior in methodmaps. (bug 6175) 2014-07-12 00:07:34 -07:00
Ruben Gonzalez 9e1fef9775 Update TerminateRound code and gamedata for update. 2014-07-11 09:18:47 -04:00
David Anderson b0bfec0f8f Merge pull request #87 from alliedmodders/bug-6174
Fix "static stock" not working (bug 6174).
2014-07-10 23:41:59 -07:00
David Anderson 919e859a6d Fix "static stock" not working (bug 6174). 2014-07-10 23:18:07 -07:00
David Anderson c47cfa6fa8 Merge pull request #86 from VoiDeD/transitional-functags
Give functags their correct types for transitional syntax.
2014-07-10 15:27:03 -07:00
Ryan Stecker c38b4a4d1d Give functags their correct types for transitional syntax. 2014-07-10 16:55:22 -05:00
Nicholas Hastings 44b2b02a1e Merge pull request #85 from alliedmodders/more-prop-data-types
Fix regression stopping -1 from being a valid value in SetEntPropEnt (r=VoiDeD).
2014-07-09 22:47:54 -04:00
Nicholas Hastings 31a79231f8 Fix regression stopping -1 from being a valid value in SetEntPropEnt. 2014-07-09 22:23:20 -04:00
Nicholas Hastings d4c676aed2 Merge pull request #83 from alliedmodders/more-prop-data-types
Add support to Get/SetEntPropEnt for FIELD_CLASSPTR and FIELD_EDICT datadesc fields (r=KyleS).
2014-07-09 21:00:49 -04:00
Nicholas Hastings 0b5e587db9 Remove unnecessary null check. 2014-07-09 20:33:38 -04:00
Nicholas Hastings f7a64167fc Fix Dota 2 build. 2014-07-09 19:25:45 -04:00
Nicholas Hastings 3a94bd4fef Add support to Get/SetEntPropEnt for FIELD_CLASSPTR and FIELD_CLASSPTR datadesc fields. 2014-07-09 17:32:32 -04:00
David Anderson d9420cab49 Merge pull request #82 from VoiDeD/fix-version
Update version for manual builds of the 1.7 branch.
2014-07-09 09:53:40 -07:00
Ryan Stecker 226c0a456d Update version for manual builds of the 1.7 branch. 2014-07-09 11:03:02 -05:00
David Anderson 1e0155ad17 Merge pull request #81 from alliedmodders/unkeyword-class
Unkeyword "class", make it contextual.
2014-07-08 09:24:11 -07:00
David Anderson aa299d187b Merge pull request #80 from alliedmodders/lockdown-funcs
Begin locking down function types.
2014-07-08 09:23:55 -07:00
David Anderson 02b7f42811 Unkeyword "class", make it contextual. 2014-07-08 00:44:34 -07:00
David Anderson e76f553957 Begin locking down function types. 2014-07-08 00:26:37 -07:00
David Anderson d2b7126e1d Merge pull request #79 from alliedmodders/fix-null-func
Add a nullfunc_t type for INVALID_FUNCTION.
2014-07-08 00:17:47 -07:00
David Anderson 3fe22687e9 Revert. 2014-07-08 00:06:52 -07:00
David Anderson 2ade122cd2 Merge branch 'master' into fix-null-func
Conflicts:
	sourcepawn/compiler/sc5.scp
2014-07-08 00:06:04 -07:00
David Anderson e57a323dc8 WIP. 2014-07-07 23:31:31 -07:00
Asher Baker af791a30df Merge pull request #72 from VoiDeD/keyvalue-from-string
Implement StringToKeyValues.
2014-07-07 13:49:24 +01:00
David Anderson ff31d8df49 Update nominations.sp and improve compiler error messaging. 2014-07-06 23:59:15 -07:00
David Anderson 8e5992685a Merge branch 'master' into redo-noms 2014-07-06 23:49:18 -07:00
David Anderson af557fdd5e Use setters. 2014-07-06 23:46:45 -07:00
David Anderson 27d5ce45f5 Merge branch 'master' into noms 2014-07-06 23:42:41 -07:00
David Anderson 44316d63cc Add setters and fix some methodmap bugs. 2014-07-06 23:37:43 -07:00
David Anderson 97e0c84e6d Merge pull request #73 from alliedmodders/nullable
Add nullable types and tighten up some new type system semantics.
2014-07-06 11:45:09 -07:00
David Anderson 76edcb16ac Merge pull request #78 from VoiDeD/class-keyword
Fix usage of `class` keyword in some includes.
2014-07-06 10:46:07 -07:00
Nicholas Hastings 63aeeb8672 Merge pull request #70 from VoiDeD/classname-no-world-entity
GetEntityClassname should handle the case where the world entity has not been created yet (r=psychonic).
2014-07-06 11:26:01 -04:00
Ryan Stecker 312f003031 Fix usage of class keyword in some includes. 2014-07-06 07:15:22 -05:00
David Anderson dbedd6712a Remove VoteInProgress from Menu map. 2014-07-05 14:36:14 -07:00
David Anderson f18a83e03e Fix some menu API oddities. 2014-07-05 14:34:32 -07:00
David Anderson 1277bbd50e Mark the expression before flushing the staging buffer. 2014-07-05 14:15:44 -07:00
David Anderson a7de88dd42 Port nominations.sp to the transitional syntax and API. 2014-07-05 14:00:52 -07:00
David Anderson e5b1b630bb Port some includes to transitional API. 2014-07-05 13:58:07 -07:00
David Anderson db9ee5326a Allow CloseHandle() on nulls. 2014-07-05 13:52:44 -07:00
David Anderson 9ae3256bc0 Rename the null tag to null_t. 2014-07-05 13:31:10 -07:00
David Anderson a7342f3fa2 Fix AMBuildScript compatibility issue with older objdirs. 2014-07-05 13:28:55 -07:00
David Anderson 49380620e0 Merge branch 'master' into nullable 2014-07-05 13:24:45 -07:00
David Anderson 9ff38bcf80 Add nulls, and more newdecl and type system features.
New null_t type has a constant "null", which can be assigned to objects.
Methodmaps can now be "nullable", accepting null_t types.
The delete keyword now zaps non-const lvalue inputs.
Fixed some newdecl arguments not accepting references.
Allow functag matching to coerce arguments and return values.
Allow functags to accept new-style types as a return value.
2014-07-05 13:20:06 -07:00
Ryan Stecker fc54903fd0 Add test. 2014-07-05 12:01:17 -05:00
David Anderson 68ab7f0a12 Merge pull request #61 from VoiDeD/ambuild-disable-auto-versioning
Add an ambuild configure option to disable auto versioning.
2014-07-05 09:39:35 -07:00
David Anderson fece28935e Merge pull request #71 from VoiDeD/jit-spew
Only spew JIT compilation and opcodes when built with JIT_SPEW defined.
2014-07-05 09:38:45 -07:00
Ryan Stecker 6864bf0068 Only spew JIT compilation and opcodes when built with JIT_SPEW defined. 2014-07-05 10:57:08 -05:00
Ryan Stecker 3c079bcca0 GetEntityClassname should handle the case where the world entity has not been created yet. 2014-07-05 10:37:16 -05:00
David Anderson 3f220bca0d Merge pull request #69 from alliedmodders/pragma-newdecls
Add #pragma newdecls required|optional.
2014-07-05 01:21:18 -07:00
David Anderson 96bbd4d7e0 Fix potential bugs in restoring newdecl state. 2014-07-05 01:13:45 -07:00
David Anderson da33c79d8b Add #pragma newdecls required|optional. 2014-07-05 01:08:14 -07:00
David Anderson bfc65b086a Fix bug in newdecls in for loop initializers. 2014-07-05 00:48:32 -07:00
David Anderson 680a8e0283 Fix tests. 2014-07-05 00:44:46 -07:00
David Anderson 0e4b913312 Merge pull request #68 from alliedmodders/declloc
Add support for new-style declarations in local variables.
2014-07-05 00:00:20 -07:00
David Anderson f62769108c Fix some local declarations not working. 2014-07-04 23:53:16 -07:00
David Anderson 9a2bdd3792 Add -Wno-sometimes-uninitialized. 2014-07-04 23:10:23 -07:00
David Anderson 386b178ef3 Fix uninitialized variable warning. 2014-07-04 23:00:00 -07:00
David Anderson 79d9a49d28 Fix compiler bug. 2014-07-04 22:46:55 -07:00
David Anderson 376eb9725e Add support for new-style declarations in local variables. 2014-07-04 21:16:39 -07:00
David Anderson 5d753c2697 Merge pull request #67 from alliedmodders/glbdecls
Add support for new-style declarations in globals.
2014-07-04 17:21:26 -07:00
David Anderson 1c41f905f9 Add some tests and errors for bad void usage. 2014-07-04 17:14:40 -07:00
David Anderson dfa9a8f134 Add tests. 2014-07-04 17:01:12 -07:00
David Anderson 49eee8c04e Fix regression in methodmap tagging. 2014-07-04 16:55:33 -07:00
David Anderson 58b9fd57b2 Remove unused "no-postdims" flag. 2014-07-04 16:41:38 -07:00
David Anderson 7e770908fb Add support for decl lists. 2014-07-04 16:37:52 -07:00
David Anderson 3cf9e56a19 Fix various bugs in global newdecl support. 2014-07-04 14:31:56 -07:00
Nicholas Hastings ffa1887c48 Merge pull request #65 from powerlord/master
New functions for SDKTools to get information from game_sound files (r=psychonic).
2014-07-04 17:17:00 -04:00
Ryan Stecker 878a82a6e5 Implement StringToKeyValues. 2014-07-04 12:04:38 -05:00
David Anderson 19815d42c3 Add new-style declaration support for global declarations. 2014-07-04 00:37:39 -07:00
Ross Bemrose 966841afbd Make sure the edict isn't free.
return GetParametersForSoundEx's return value instead of always true.
2014-07-03 14:13:36 -04:00
Ross Bemrose e1d4ed0e34 Fixed overwriting the same copy/pasted line twice instead of once per new native. 2014-07-03 13:19:19 -04:00
Nicholas Hastings cde927112a Merge pull request #66 from alliedmodders/tf2-iserver
Switch TF2 to use IVEngineServer::GetIServer in SDKTools to find IServer ptr (r=voided).
2014-07-03 12:45:18 -04:00
Nicholas Hastings 3254f6f362 Switch TF2 to use IVEngineServer::GetIServer in SDKTools to find IServer ptr. 2014-07-03 12:26:52 -04:00
David Anderson 932a8028ca Merge pull request #60 from VoiDeD/ambuild-remove-tp-flag
Remove the /TP (compile as C++) msvc flag from projects that should be compiling as C.
2014-07-03 09:24:51 -07:00
David Anderson bdb5ef506b Merge pull request #64 from alliedmodders/newdecl
New declaration syntax: arguments.
2014-07-03 09:18:25 -07:00
Ross Bemrose d25ab6349c Commit new version of bug 5942: New functions for SDKTools to get information from game_sound files. 2014-07-03 10:20:53 -04:00
David Anderson 438fade64f Bug fixes. 2014-07-03 00:34:11 -07:00
David Anderson a15153e9b8 Improve error messaging. 2014-07-03 00:21:18 -07:00
David Anderson ed4cca0225 Bug fixes. 2014-07-03 00:14:12 -07:00
David Anderson 86cd906371 Remove typeinfo_t::type. 2014-07-02 23:17:30 -07:00
David Anderson cb46de97e1 Merge pull request #63 from alliedmodders/memsrc
Use in-memory buffers for reading files, and handle newlines better.
2014-07-02 23:07:46 -07:00
David Anderson 153bbba641 WIP. 2014-07-02 23:01:00 -07:00
David Anderson e46c49abe0 Fix bug. 2014-07-02 21:59:04 -07:00
David Anderson 10c8b78a16 Use in-memory buffers for reading files, and handle newlines better. 2014-07-02 21:52:17 -07:00
Ryan Stecker db98c98a1a Remove the /TP (compile as C++) msvc flag from projects that should be compiling as C. 2014-07-02 13:46:39 -05:00
Ryan Stecker d4f4a7eed0 Add an ambuild configure option to disable auto versioning. 2014-07-02 13:29:59 -05:00
Nicholas Hastings e6f6e6df70 Merge pull request #59 from alliedmodders/csgo-weapon-drop
Update CStrike extension CSWeaponDrop to use Vector overload on CS:GO (r=asherkin).
2014-07-02 10:44:04 -04:00
Nicholas Hastings eeba5b93c5 Update CStrike extension CSWeaponDrop to use Vector overload on CS:GO. 2014-07-02 10:08:56 -04:00
David Anderson 84f9b2bf35 Remove accidental files. 2014-07-01 22:06:33 -07:00
Scott Ehlert b1da6958ff Merge pull request #58 from alliedmodders/bug6164
Use -Wno-deprecated-register on clang 3.4+ or Apple clang 5.1+ only (bug 6164, r=psychonic).
2014-07-01 20:30:08 -05:00
Nicholas Hastings 5e596819c5 Update CS:GO CSWeaponDrop gamedata. 2014-07-01 21:06:39 -04:00
Scott Ehlert 415b6ea174 Use -Wno-deprecated-register on clang 3.4+ or Apple clang 5.1+ only (bug 6164). 2014-07-01 16:13:22 -05:00
Nicholas Hastings 0e015027fc Merge pull request #57 from VoiDeD/reservedslots-override-fix
sm_reskick_immunity access check should not check for commands (r=psychonic).
2014-07-01 10:18:04 -04:00
Ryan Stecker 9c1dd0565f sm_reskick_immunity access check should not check for commands. 2014-07-01 09:07:40 -05:00
David Anderson beb557aa56 Add unstaged changes. 2014-06-30 20:11:18 -07:00
David Anderson 6f3b08bbae Initial import of new decl parsing structure. 2014-06-30 20:10:15 -07:00
Scott Ehlert 553b07b722 Merge pull request #56 from peace-maker/gitignorefix
Fix .gitignore typo (r=ds).
2014-06-30 21:23:51 -05:00
Peace-Maker c2c7f090ba Fix .gitignore typo
VS build directories weren't excluded correctly
2014-06-30 15:06:22 +02:00
Peace-Maker 909c6ec594 Refresh sorting of topmenu after (re)LoadTopMenuConfig (bug 6032, r=psychonic). 2014-06-29 21:07:55 -04:00
Nicholas Hastings aedd1eb49c Add HudText gamedata support for Synergy (bug 6161). 2014-06-29 20:23:07 -04:00
Nicholas Hastings 6e34a530b4 Update Dota Linux EntityFactoryDictionary gamedata. 2014-06-28 17:04:43 -04:00
Nicholas Hastings 367c557a77 Update Synergy gamedata and switch NMRiH gamedata on linux to use symbols. 2014-06-28 09:52:03 -04:00
Andrew 3022b665dd Initialized the mask variable.
Moved the FPERM_ defines into the .cpp and removed the header file.
2014-06-27 16:43:51 -04:00
David Anderson 5cf0c08165 Merge pull request #55 from alliedmodders/nts
New type system.
2014-06-26 23:04:54 -07:00
David Anderson b8bd7c517e Add parsing functions. 2014-06-26 21:05:19 -07:00
David Anderson 6a5da160ad Fix build. 2014-06-25 01:06:48 -07:00
David Anderson 99f4cdb3e4 New type system. 2014-06-24 23:37:14 -07:00
David Anderson 2ae04ee1df Merge pull request #54 from alliedmodders/profiling
Add a general profiling abstraction layer.
2014-06-24 20:56:05 -07:00
David Anderson b26552d74c Improve usability of start/stop. 2014-06-24 20:55:53 -07:00
David Anderson f9defa7b37 Remove JIT registration API; this needs more time. 2014-06-24 20:44:30 -07:00
David Anderson fac52a2897 Fill out API more. 2014-06-24 01:18:16 -07:00
David Anderson ec61d4d188 Add a general profiling abstraction layer. 2014-06-24 01:04:13 -07:00
David Anderson 99c0879086 Fix build. 2014-06-23 20:17:40 -07:00
David Anderson b064556081 Merge pull request #50 from alliedmodders/map-api
Add transitional API for maps (aka tries).
2014-06-23 20:06:42 -07:00
David Anderson 2724659be8 Rename to StringMap. 2014-06-23 20:06:13 -07:00
Nicholas Hastings 3983dc10ed Update non-auto version for 1.7.0 for compiled plugins. 2014-06-23 19:46:26 -04:00
Nicholas Hastings c5e2d49b8f Merge pull request #52 from alliedmodders/bug-6137
Update TF2_IsHolidayActive native to virtually call gamerules IsHolidayActive (bug 6137, r=VoiDeD).
2014-06-23 19:39:14 -04:00
Nicholas Hastings bbdf40160c Add missing thisptr to call. 2014-06-23 19:24:27 -04:00
Nicholas Hastings de0f49248d Update TF2_IsHolidayActive native to virtually call gamerules IsHolidayActive. 2014-06-23 16:23:49 -04:00
David Anderson 92ace5497f More MSVC fixes. 2014-06-22 22:47:17 -07:00
David Anderson 8005009420 Workaround buggy C99 support in MSVC. 2014-06-22 22:44:16 -07:00
David Anderson 4ee04b8a7b Add transitional API for maps (aka tries). 2014-06-22 22:32:08 -07:00
David Anderson d7b66c2515 Merge pull request #49 from alliedmodders/methodmaps-inline-3
Add property accessors to methodmaps.
2014-06-22 22:16:57 -07:00
David Anderson 123c7f6b06 Fix METHOD_NAMEMAX. 2014-06-22 22:16:41 -07:00
David Anderson a17ad1c5a5 Add property accessors to methodmaps. 2014-06-22 22:02:02 -07:00
Nicholas Hastings dbcfbdb21a Merge pull request #42 from alliedmodders/bug-6137
Switch TF2 extension to hook CTFGameRules::IsHolidayActive for holiday forward (bug 6137, r=VoiDeD).
2014-06-22 21:23:27 -04:00
David Anderson 50b0019302 Merge pull request #48 from alliedmodders/methodmaps-inline-3
Add support for fully inline functions in methodmaps.
2014-06-22 14:20:15 -07:00
David Anderson b6eb3b041b Fix bug in requiring braces for new methods. 2014-06-22 13:28:35 -07:00
David Anderson 354022888f Add support for fully inline functions in methodmaps. 2014-06-22 13:21:46 -07:00
David Anderson 3ba47a71fd Merge pull request #47 from alliedmodders/fix-dbi-leak
Fix a Handle leak when reporting transaction errors.
2014-06-22 12:26:45 -07:00
David Anderson b64551e984 Fix a Handle leak when reporting transaction errors. 2014-06-22 11:05:20 -07:00
David Anderson 90e8607586 Merge pull request #46 from alliedmodders/methodmaps-inline-2
Add support for inline native methods on methodmaps.
2014-06-22 01:58:22 -07:00
David Anderson ffd97a1fd0 Fix typeexpr unknown token not reporting an error message. 2014-06-22 01:46:43 -07:00
David Anderson 5b12f456ac Add support for inline native methods. 2014-06-22 01:44:23 -07:00
David Anderson c4f2b8348e Merge pull request #45 from alliedmodders/methodmaps-inline
Introduce 4-token lookahead buffer.
2014-06-21 23:56:58 -07:00
David Anderson 8f6c13b220 Merge pull request #44 from alliedmodders/methodmaps-dtor-fix
Allow base destructors to run and fix some error reporting.
2014-06-21 23:37:12 -07:00
David Anderson 10a511a35e Introduce 4-token lookahead buffer. 2014-06-21 23:35:55 -07:00
David Anderson 861953d736 Allow base destructors to run and fix some error reporting. 2014-06-21 12:27:04 -07:00
David Anderson 63ad5eff18 Introduce basic methodmaps (PR #38).
commit 1e5213d43fdd170bb0c30af914a4e40610014b2b
Author: David Anderson <[email protected]>
Date:   Sat Jun 21 04:09:27 2014 -0700

    Quell MSVC C99 bugs.

commit f2e166c5925fda49b5abeadc0aa0f9156b99cf11
Author: David Anderson <[email protected]>
Date:   Sat Jun 21 03:59:23 2014 -0700

    Fix varying levels of stupid memory errors.

commit b0773d7be45345351ab1c1738681d5215a97f3f3
Author: David Anderson <[email protected]>
Date:   Sat Jun 21 03:36:39 2014 -0700

    Fix memory leak in parsing some control flow structures.

commit 5aca55713cfc2dd09c5900132fc4a6be51e3e309
Author: David Anderson <[email protected]>
Date:   Sat Jun 21 03:35:17 2014 -0700

    Fix memory leak in struct parsing.

commit b46ec5cd281b46177e83c4f0a4acac9cc1065c53
Author: David Anderson <[email protected]>
Date:   Sat Jun 21 03:32:03 2014 -0700

    Fix build.

commit 17bbbb9a46bfc00862adca7d3e15369a48e9ac0f
Merge: c083409 2107599
Author: David Anderson <[email protected]>
Date:   Sat Jun 21 01:26:27 2014 -0700

    Merge branch 'master' into methodmaps

commit c083409b569abff13f24d3b8c47f8ff199036840
Author: David Anderson <[email protected]>
Date:   Fri Jun 20 23:49:36 2014 -0700

    Add VS2k13 support.

commit b7993778494d538cb1c1965116030142a7f7765b
Author: David Anderson <[email protected]>
Date:   Fri Jun 20 01:28:08 2014 -0700

    Implement destructors.

commit 1a340dec260d079ed1b79351ed7b50b58a997cea
Author: David Anderson <[email protected]>
Date:   Fri Jun 20 00:08:04 2014 -0700

    Add some tests.

commit 12db52ee64eb009ead9294495e9034c63ab75b09
Author: David Anderson <[email protected]>
Date:   Fri Jun 20 00:05:49 2014 -0700

    Initial implementation of constructors.

commit 074669a658caa2822aa864164b615a244c00a0bc
Author: David Anderson <[email protected]>
Date:   Thu Jun 19 22:42:35 2014 -0700

    Add simple test harness.

commit 27c1e3cf14e1e6c5cf35c80c792cce2744b804d7
Author: David Anderson <[email protected]>
Date:   Thu Jun 19 22:15:42 2014 -0700

    Big refactoring for new syntax.

commit f3c37fdc919e76ee0815e2394cbe8d221f9fc0ca
Author: David Anderson <[email protected]>
Date:   Thu Jun 19 22:12:54 2014 -0700

    Refactor tests for the new syntax.

commit 6211f392f8e722b907474cf380cfac4347e46b8e
Author: David Anderson <[email protected]>
Date:   Wed Jun 18 22:25:48 2014 -0700

    Make lexer tokens an enum.

commit 5210b013756b0b00de3a61c6490685c768ff8cbd
Author: David Anderson <[email protected]>
Date:   Tue Jun 17 06:48:15 2014 -0700

    Add comment.

commit 06688ff4aced14077dd21a9cc1db4c26c7420ff3
Author: David Anderson <[email protected]>
Date:   Tue Jun 17 06:46:10 2014 -0700

    Allow |this| to be a base type of the methodmap.

commit 05cf3682020e0e6d9f47b1a0a6727b9edbfe7622
Author: David Anderson <[email protected]>
Date:   Mon Jun 16 22:11:58 2014 -0700

    Unify duplicate typesymbol checking.

commit 09161bf2691c8c1ed25b9b70fda01c336f21aa0b
Author: David Anderson <[email protected]>
Date:   Mon Jun 16 19:53:36 2014 -0700

    Close loophole that allowed methodmaps for enums.

commit 5bb4aeba89fec47a4de7a7532d27830999d1fcb4
Author: David Anderson <[email protected]>
Date:   Mon Jun 16 01:50:42 2014 -0700

    Add tests and dbi/handle changes.

commit b9203e2491daec2a8073874d6375949483778d14
Author: David Anderson <[email protected]>
Date:   Mon Jun 16 01:38:29 2014 -0700

    Ensure methodmap tags are fixed.

commit 878b80fd87a2ea500d3a28ce2d53f616d1efe5e8
Author: David Anderson <[email protected]>
Date:   Mon Jun 16 01:36:04 2014 -0700

    Implement inheritance.

commit 6ba9e004fbae18ad68056368ddd0affdc78659f1
Author: David Anderson <[email protected]>
Date:   Mon Jun 16 01:31:00 2014 -0700

    Refactor matchtag() to not be insane.

commit 4ede6343b0682c6df98fa869153828e92f891bcc
Author: David Anderson <[email protected]>
Date:   Mon Jun 16 01:20:50 2014 -0700

    Fix indenting.

commit e3ddef8916e3dd5f4ff0fe571d6e1c3acd163352
Author: David Anderson <[email protected]>
Date:   Mon Jun 16 01:20:27 2014 -0700

    Initial prototype.
2014-06-21 04:10:15 -07:00
Andrew f3299b2c8c Added a new function SetFilePermissions to set permissions of a file. I'm not sure about the Windows implementation. See this feature request: https://bugs.alliedmods.net/show_bug.cgi?id=6152 2014-06-21 00:45:07 -04:00
Nicholas Hastings fe485836f1 Remove redundant code. 2014-06-19 23:48:15 -04:00
Nicholas Hastings 1daf629a42 Remove dead variable. 2014-06-19 23:34:35 -04:00
Nicholas Hastings 151c6d246e Switch TF2 extension to hook CTFGameRules::IsHolidayActive for holiday forward (bug 6137). 2014-06-19 23:22:47 -04:00
Nicholas Hastings 210759907d Merge pull request #41 from alliedmodders/c++11
Enable C++11 on posix (r=dvander).
2014-06-19 21:20:13 -04:00
Nicholas Hastings 8b7ce5eed2 Enable C++ support on "like" gcc builds. 2014-06-19 20:59:15 -04:00
Nicholas Hastings 4a75be1c92 Fix KE_OVERRIDE typo in amtl (already fixed upstream). 2014-06-19 20:58:26 -04:00
Nicholas Hastings 3d114e5506 Update linux platform check in KePlatform.h to be consistent with others. 2014-06-19 20:57:54 -04:00
Nicholas Hastings 58158ce607 Merge pull request #40 from alliedmodders/fix-invalid-string-index
Fix FindStringIndex native not returning INVALID_STRING_INDEX when string not found (bug 6144, r=DS).
2014-06-19 14:40:16 -04:00
Nicholas Hastings 0f39825699 Merge pull request #39 from alliedmodders/outputs-getentclassname
Update SDKTools entity output functions to use core's GetEntityClassname instead of own (r=DS).
2014-06-19 14:39:49 -04:00
Nicholas Hastings 291ef6fdc4 Fix FindStringIndex native not returning INVALID_STRING_INDEX when string not found (bug 6144). 2014-06-19 11:40:01 -04:00
Nicholas Hastings 75254bbf25 Update SDKTools entity output functions to use core's GetEntityClassname instead of own. 2014-06-19 11:27:26 -04:00
Nicholas Hastings b0e466edae Revert "Disable FireOutput gamedata on TF2 until proper fix is found."
This reverts commit 9af7eefe07.
2014-06-19 00:34:41 -04:00
Nicholas Hastings e95309a603 Add early-exit in entity output detour if entity has no classname. 2014-06-19 00:33:54 -04:00
Nicholas Hastings 9af7eefe07 Disable FireOutput gamedata on TF2 until proper fix is found. 2014-06-18 23:16:20 -04:00
Nicholas Hastings b5c5aba588 Revert "Update TF2 FireOutput gamedata."
This reverts commit 633f219cf7.
2014-06-18 23:15:38 -04:00
Ryan Stecker 633f219cf7 Update TF2 FireOutput gamedata. 2014-06-18 22:01:59 -04:00
Nicholas Hastings 13f27821ad Bump version for master branch. 2014-06-18 19:24:06 -04:00
Nicholas Hastings 7553106eee Merge pull request #34 from WildCard65/Spacing
Added spacing to compile.sh (r=psychonic).
2014-06-17 21:44:05 -04:00
Nicholas Hastings 5cf73385c5 Merge pull request #37 from FlaminSarge/tf_weapon_enum_2014jun11
Update TF_WEAPON enum and tf2_stocks.inc (r=psychonic).
2014-06-17 16:52:11 -04:00
FlaminSarge 7a96467045 Update TF_WEAPON enum for June 11, 2014 TF2 Patch. 2014-06-15 00:30:53 -07:00
FlaminSarge 86c1660ee9 Fix line endings in tf2_stocks include. 2014-06-15 00:29:41 -07:00
WildCard65 8e4836f83a Added spacing to compile.sh
And made it exit out on compile error.
2014-06-14 08:32:24 -04:00
Nicholas Hastings 00c09584c7 Update Fistful of Frags gamedata. 2014-06-13 13:40:06 -04:00
Nicholas Hastings 7677e8af79 Merge pull request #27 from VoiDeD/convar-cache
Utilize convar cache for FindConVar (r=KyleS, r=psychonic)..
2014-06-12 19:47:33 -04:00
Kyle Sanderson 69cb941fa4 Merge pull request #25 from KyleSanderson/kylepreds
Replace SourceHook list usages in clientprefs with AMTL.
2014-06-12 15:42:30 -07:00
Nicholas Hastings 17a7d4802d Update TF2 SDKHooks Reload gamedata. 2014-06-12 10:00:49 -04:00
Nicholas Hastings 0b2610e3b3 Update CSGO Windows SetClanTag gamedata (bug 6150). 2014-06-12 09:56:50 -04:00
Nicholas Hastings 51a02652d8 Merge pull request #33 from alliedmodders/tf2-iservertools
Use updated IServerTools iface on TF2 for getting tempent list and FindEntityByClassname (PR #33, r=KyleS).
2014-06-11 23:43:48 -04:00
Nicholas Hastings e7870da5ff Add ifdef section notes on endifs. 2014-06-11 23:37:02 -04:00
Nicholas Hastings a697e81427 Use updated IServerTools iface on TF2 for getting tempent list and FindEntityByClassname. 2014-06-11 22:44:42 -04:00
Nicholas Hastings 5f8288dc70 Update TF2 CalcIsAttackCritical gamedata. 2014-06-11 17:48:51 -04:00
Nicholas Hastings feb5050df1 Merge pull request #5 from peace-maker/pawn_stringconcat
Add string literal concatenation using ellipses "..." (bug 4261, PR #5, r=dvander).
2014-06-11 08:16:04 -04:00
peace-maker 0d79b7a542 Merge pull request #2 from psychonic/pawn_stringconcat2
Fix build.
2014-06-11 08:48:41 +02:00
Nicholas Hastings e4328f9211 Fix build. 2014-06-10 12:30:04 -04:00
Kyle Sanderson 70518a8e49 Revert "Add better spacing to compile.sh"
This reverts commit cd106a7eb6.
2014-06-08 00:42:27 -07:00
David Anderson 6ac897f9f3 Merge pull request #26 from alliedmodders/sql-txn
Add an API for off-thread SQL transactions. (bug 3775, r=kyle)
2014-06-06 20:51:30 -07:00
Kyle Sanderson ec9791b183 Merge pull request #24 from 50Wliu/compile
Compile.sh spacing improvements
2014-06-06 19:52:56 -07:00
Ryan Stecker d5c267b291 Utilize convar cache for FindConVar. 2014-06-05 14:06:37 -05:00
David Anderson 3de533a73e Ignore .swp files. 2014-06-05 10:28:19 -07:00
David Anderson f1f135adb6 Add CloneHandle() test. 2014-06-05 10:27:59 -07:00
David Anderson 91077fdc91 Fix tab/space mix. 2014-06-05 10:16:47 -07:00
David Anderson f250461648 Fix typo. 2014-06-05 01:28:53 -07:00
David Anderson 6a98e40643 Fix typo. 2014-06-05 01:25:32 -07:00
David Anderson 36c342fc7b Add comment. 2014-06-05 01:22:44 -07:00
David Anderson 39ff3f9993 Add a rollback test. 2014-06-05 01:05:23 -07:00
David Anderson 7026e68b06 Add tests for SQL transactions. 2014-06-05 01:00:54 -07:00
David Anderson 25ea80890d Add testing.inc to packages. 2014-06-05 01:00:36 -07:00
David Anderson 2379c76b03 Add a new testing API for the testsuite. 2014-06-05 01:00:17 -07:00
David Anderson e6d8416f0e Fix typo. 2014-06-05 00:59:46 -07:00
David Anderson cb16a78681 Fix memory bugs. 2014-06-05 00:38:09 -07:00
David Anderson 2930fb1963 Change indentation. 2014-06-04 22:46:40 -07:00
David Anderson d7b49f7706 Initial implementation. 2014-06-04 22:45:26 -07:00
Kyle Sanderson 695fc802a9 Replace SourceHook list usages in clientprefs with AMTL. 2014-06-04 21:49:48 -07:00
Kyle Sanderson c37dbe131e Merge pull request #23 from KyleSanderson/gameextusage
Replace SH List usages in game extensions with AMTL variants.
2014-06-04 20:03:23 -07:00
Ruben Gonzalez 88af898285 Update CS:GO Gamedata 2014-06-04 22:40:21 -04:00
Wliu cd106a7eb6 Add better spacing to compile.sh 2014-06-04 22:00:10 -04:00
Kyle Sanderson 975fc93e1f Replace SourceHook list usages in tf with AMTL. 2014-06-04 17:36:53 -07:00
Kyle Sanderson 6c37a5d9f3 Replace SourceHook list usages in cstrike with AMTL. 2014-06-04 17:36:28 -07:00
SystematicMania 7b59b7f384 Fix "sm version" command reporting incorrect compile time in many cases (bug 6078, r=asherkin). 2014-06-03 15:55:25 -04:00
Nicholas Hastings 0ca218931a Trigger build again for hl2sdk-l4d and hl2sdk-dota changes. 2014-06-02 09:57:02 -04:00
Nicholas Hastings 1d9f769a42 Trigger build for hl2sdk-dota changes. 2014-06-02 09:30:25 -04:00
Scott Ehlert 083edcedc7 Merge pull request #22 from alliedmodders/css-clan-teamscore-mac
Update clan tag and team score offsets for cstrike ext on OS X.
2014-06-01 17:02:12 -05:00
Scott Ehlert fb5c3c86da Add clan tag and team score commands to cstrike test plugin. 2014-06-01 16:52:03 -05:00
Scott Ehlert 3c89f2b1c2 Update clan tag and team score offsets for cstrike ext on OS X. 2014-06-01 16:47:49 -05:00
Nicholas Hastings 4c7cf6ce06 Trigger build for hl2sdk-l4d changes. 2014-06-01 16:27:52 -04:00
David Anderson 195104487e Merge pull request #21 from alliedmodders/components
Convert build scripts to the new project-based API.
2014-05-31 21:02:33 -07:00
Nicholas Hastings 39993c7019 Merge pull request #20 from psychonic/bot-hibernation-disconnect
Fix case where bots leave server without disconnect notice (hibernation) (r=KyleS).
2014-05-31 23:00:03 -04:00
David Anderson 897aa42135 Remove tag(). 2014-05-31 19:59:02 -07:00
David Anderson abdf7d5b07 Port build scripts to the new project API. 2014-05-31 19:56:42 -07:00
David Anderson 9f8f879590 Fix typo. 2014-05-31 18:12:49 -07:00
David Anderson db14d2d00a Factor out versioning. 2014-05-31 17:57:53 -07:00
Nicholas Hastings a0f3410f3b Fix a case where bots can leave server without disconnect notice (hibernation), triggering other issues. 2014-05-31 15:18:17 -04:00
David Anderson 4159e1a177 Merge pull request #19 from alliedmodders/update-build-scrpt
Update the build script to the latest AMBuild API.
2014-05-30 22:55:49 -07:00
David Anderson 4f7b0ff487 Update the build script to the latest AMBuild API. 2014-05-30 22:50:35 -07:00
Asher Baker 891ebe4480 Merge pull request #18 from asherkin/version-count
Revert to using revision count for full version strings (r=dvander).
2014-05-31 04:44:51 +01:00
David Anderson 859be35b34 Fix build. 2014-05-30 19:49:54 -07:00
Asher Baker 88c452581b Revert to using revision count for full version strings. 2014-05-31 03:28:09 +01:00
David Anderson b0ccc87638 Merge pull request #17 from alliedmodders/vsgen
Add support for the preliminary IDE project file generator.
2014-05-30 19:18:40 -07:00
David Anderson 1e6843f8db Add support for the preliminary IDE project file generator. 2014-05-30 19:07:56 -07:00
Nicholas Hastings 76a589f689 Merge pull request #16 from psychonic/client-disconnect-quirks
Fix inconsistencies with OnClientDisconnected calls (bug 5988, r=kyles)
2014-05-30 19:09:50 -04:00
Nicholas Hastings e7621ad8a7 Fix inconsistencies with OnClientDisconnected calls (bug 5988) 2014-05-30 17:45:49 -04:00
Nicholas Hastings c4232510a1 Merge pull request #15 from 50Wliu/contributing
Create CONTRIBUTING.md (r=psychonic).
2014-05-29 23:27:12 -04:00
Wliu e2878d3df8 Create CONTRIBUTING.md
As discussed in #11.
2014-05-29 17:49:18 -04:00
Nicholas Hastings 5cb10441d7 Merge pull request #7 from Bara20/patch-1
Add CS_DMG_HEADSHOT define (r=psychonic).
2014-05-29 15:39:33 -04:00
Nicholas Hastings 6ee42dc7fe Really fix Mac build. 2014-05-29 15:09:38 -04:00
Nicholas Hastings e0f6544c86 Fix Mac build. 2014-05-29 14:16:11 -04:00
Asher Baker ab68e70998 Merge pull request #14 from psychonic/rip-magic
Replace magic numbers for sm_show_activity with named constants (r=asherkin).
2014-05-29 19:06:22 +01:00
Asher Baker 8be1feadc1 Merge pull request #13 from psychonic/adminsys2logic
Move adminsys and more natives from core to logic (r=asherkin).
2014-05-29 19:04:40 +01:00
Nicholas Hastings beb3f8c1d4 Replace magic numbers for sm_show_activity with named constants. 2014-05-29 13:54:51 -04:00
Nicholas Hastings 35784c018d Move adminsys and more natives from core to logic. 2014-05-29 13:31:12 -04:00
Ruben Gonzalez dc4c3f2f1a Update CS:GO Gamedata 2014-05-29 09:31:07 -04:00
Nicholas Hastings 9ff6cdef8c Merge pull request #12 from psychonic/more2logic
Move many player natives from core to logic.
2014-05-29 00:51:29 -04:00
Nicholas Hastings dbc881143b Move many player natives from core to logic. 2014-05-28 23:20:41 -04:00
Kyle Sanderson 556d5e0949 Merge pull request #9 from KyleSanderson/amtlutilloudness
Quell isNaN MSVC performance warning.
2014-05-28 18:12:32 -07:00
Nicholas Hastings 6456b937be Fix build. 2014-05-28 21:10:40 -04:00
Kyle Sanderson 05d8622ea9 Quell isNaN MSVC performance warning. 2014-05-28 18:05:55 -07:00
Nicholas Hastings f1387c892e Merge pull request #10 from psychonic/platform-defs
Fix up PLATFORM defs to match same-name ones in some SDK versions.
2014-05-28 21:01:17 -04:00
Nicholas Hastings cae5d48d31 Merge pull request #8 from psychonic/travis-ci
Add support for Travis-CI
2014-05-28 20:56:14 -04:00
Nicholas Hastings d83d72fd88 Give define value (of 1) to PLATFORM defs to match the same-name defs in some SDKs. 2014-05-28 20:36:52 -04:00
Nicholas Hastings ff42e854bb Add Travis-CI config file. 2014-05-28 14:38:55 -04:00
Nicholas Hastings a462feee61 Fix version script failing when HEAD directly contains hash instead of ref to it. 2014-05-28 14:38:17 -04:00
Bara 5eef4bccd3 Add CS_DMG_HEADSHOT define
but i don't know if it works in other games.

( I'm using this already in my only headshot plugin - https://forums.alliedmods.net/showthread.php?t=234169 and works fine in CSS/CSGO )
2014-05-28 15:32:58 +02:00
David Anderson 609fa50763 Revert "Add string literal concatenation using ellipses "..." (bug 4261, PR #5)"
This reverts commit 7868767dde.
2014-05-27 19:45:26 -07:00
Peace-Maker 7868767dde Add string literal concatenation using ellipses "..." (bug 4261, PR #5)
commit cd0d31805c
Author: Peace-Maker <[email protected]>
Date:   Wed May 28 03:07:25 2014 +0200

    Ignore \ ctrlchar in lexing

commit cf617a4d20
Author: Peace-Maker <[email protected]>
Date:   Tue May 27 13:32:59 2014 +0200

    Add string literal concatenation using ellipses "..." (bug 4261)

    Backported the changes CompuPhase did to the compiler to support string
    literal concatenation including all fixes in later commits from r30 on.
    http://code.google.com/p/pawnscript/source/detail?r=30

    Pawn uses ellipses "..." to concatenate so it looks like this:

    #define PROJECT_AUTHOR "Greyscale"
    #define PROJECT_COPYRIGHT "Copyright (C) 2010  " ... PROJECT_AUTHOR

    This would result in PROJECT_COPYRIGHT being defined as
    "Copyright (C) 2010  Greyscale"

    While i've been at it, that stringizing a macro parameter feature was
    ported too.
    From the changelog for version 3.3.4026
    (http://www.compuphase.com/pawn/pawnhistory.htm):

    The macro substition processor now recognizes the "#" character for
    "stringizing" a parameter. For example, if you have the definition
    #define log(%1) #%1
    Then the expression log(test) will result in "test".
    Note that concatenation of literal strings requires an ellipsis in pawn
    (which is different than C/C++). So to combine the parameter with
    literal strings, use a syntax like:
    #define log(%1) "logging: " ... #%1 ... "\n"
    The stringize operator is only available in the replacement text of a
    macro.

    Doing
    PrintToServer(log(hello));
    would print
    logging: hello\n
2014-05-27 19:30:13 -07:00
Peace-Maker 6ac013376f Call OnLibraryAdded for all available libraries (bug 5925, PR #4)
commit c1b064c9232553045f6f5bfaf7df0feb6ceb4571
Author: Peace-Maker <[email protected]>
Date:   Wed May 28 03:16:22 2014 +0200

    Coding style adjustments

commit 37a16dbba24cc2035fb8838be8729067cb9bc13a
Author: Peace-Maker <[email protected]>
Date:   Wed May 28 03:03:25 2014 +0200

    Load core.phrases before calling OnLibraryAdded

commit 676ac951111c7e8f565debbd4316850a4c4a8d00
Author: Peace-Maker <[email protected]>
Date:   Tue May 27 13:18:48 2014 +0200

    Call OnLibraryAdded for all available librarys (bug 5925)

    When loading multiple plugins at once (on server start or mapchange)
    OnLibraryAdded is only called for libraries which are loaded after the
    current plugin. The plugin isn't informed about the libraries that were
    added before its OnPluginStart forward was called.

    This patch calls OnLibraryAdded for all already registered libraries the
    current plugin has missed.
2014-05-27 19:26:58 -07:00
David Anderson cfde247ef7 Revert "Call OnLibraryAdded for all available librarys (bug 5925, pull request #4)"
This reverts commit ac11eb8910.
2014-05-27 19:25:52 -07:00
David Anderson ac11eb8910 Call OnLibraryAdded for all available librarys (bug 5925, pull request #4)
commit c1b064c9232553045f6f5bfaf7df0feb6ceb4571
Author: Peace-Maker <[email protected]>
Date:   Wed May 28 03:16:22 2014 +0200

    Coding style adjustments

commit 37a16dbba24cc2035fb8838be8729067cb9bc13a
Author: Peace-Maker <[email protected]>
Date:   Wed May 28 03:03:25 2014 +0200

    Load core.phrases before calling OnLibraryAdded

commit 676ac951111c7e8f565debbd4316850a4c4a8d00
Author: Peace-Maker <[email protected]>
Date:   Tue May 27 13:18:48 2014 +0200

    Call OnLibraryAdded for all available librarys (bug 5925)

    When loading multiple plugins at once (on server start or mapchange)
    OnLibraryAdded is only called for libraries which are loaded after the
    current plugin. The plugin isn't informed about the libraries that were
    added before its OnPluginStart forward was called.

    This patch calls OnLibraryAdded for all already registered libraries the
    current plugin has missed.
2014-05-27 19:24:33 -07:00
Peace-Maker cd0d31805c Ignore \ ctrlchar in lexing 2014-05-28 03:07:25 +02:00
Peace-Maker cf617a4d20 Add string literal concatenation using ellipses "..." (bug 4261)
Backported the changes CompuPhase did to the compiler to support string
literal concatenation including all fixes in later commits from r30 on.
http://code.google.com/p/pawnscript/source/detail?r=30

Pawn uses ellipses "..." to concatenate so it looks like this:

#define PROJECT_AUTHOR "Greyscale"
#define PROJECT_COPYRIGHT "Copyright (C) 2010  " ... PROJECT_AUTHOR

This would result in PROJECT_COPYRIGHT being defined as
"Copyright (C) 2010  Greyscale"

While i've been at it, that stringizing a macro parameter feature was
ported too.
From the changelog for version 3.3.4026
(http://www.compuphase.com/pawn/pawnhistory.htm):

The macro substition processor now recognizes the "#" character for
"stringizing" a parameter. For example, if you have the definition
#define log(%1) #%1
Then the expression log(test) will result in "test".
Note that concatenation of literal strings requires an ellipsis in pawn
(which is different than C/C++). So to combine the parameter with
literal strings, use a syntax like:
#define log(%1) "logging: " ... #%1 ... "\n"
The stringize operator is only available in the replacement text of a
macro.

Doing
PrintToServer(log(hello));
would print
logging: hello\n
2014-05-27 13:32:59 +02:00
Fyren 84de0f6b85 and maybe also a hyphen 2014-05-27 01:09:12 -06:00
Fyren 914a0a7fc1 FYREN SMASH CAPITALS 2014-05-27 01:08:47 -06:00
Fyren f82420b601 bets on if I do any better than Kyle? 2014-05-27 01:08:15 -06:00
Kyle Sanderson 5193b70ada Update README.md with community hyper links. 2014-05-26 23:23:39 -07:00
David Anderson 4b2b50a3df Fix spacing. 2014-05-26 22:21:27 -07:00
David Anderson 9ed3a55ade Fix build. 2014-05-26 22:17:58 -07:00
David Anderson 53a8d5ac30 Merge pull request #3 from alliedmodders/search-paths
Add search path configuration options.
2014-05-26 21:39:22 -07:00
David Anderson b4144d2cff Find metamod-source over mmsource-central. 2014-05-26 21:38:08 -07:00
David Anderson 5bbcc7322c Add path configuration options. 2014-05-26 21:30:43 -07:00
David Anderson 3f81397a84 Delete master.cfg 2014-05-26 10:06:27 -07:00
David Anderson c744b39c6d Merge pull request #2 from alliedmodders/git-buildbot
Switch packaging scripts to Git.
2014-05-25 12:11:01 -07:00
David Anderson 1a97d37215 Fix spacing. 2014-05-25 12:10:25 -07:00
David Anderson 2bc7e4736f Switch packaging scripts to Git. 2014-05-25 12:05:24 -07:00
David Anderson 5681b99fd8 Merge pull request #1 from alliedmodders/git-mv
Switch build infrastructure to Git.
2014-05-25 11:03:23 -07:00
David Anderson 9a5efc2de2 Fix. 2014-05-25 03:41:44 -07:00
David Anderson 692af52ea7 Fix typo. 2014-05-25 03:25:52 -07:00
David Anderson ee51295d22 Simplify formatting. 2014-05-25 03:20:50 -07:00
David Anderson 3c7a08afc2 Change version display. 2014-05-25 03:18:05 -07:00
David Anderson ed9ca9e943 Add rev-list --count back into the build "unique" id. 2014-05-25 03:03:22 -07:00
David Anderson fbaa3a804f Make SDK keys consistent. 2014-05-25 02:14:05 -07:00
David Anderson 9f0308530c Remove reference to SM_BUILD_REV. 2014-05-25 01:57:42 -07:00
David Anderson 2e89d91a86 Switch build infrastructure to Git. 2014-05-25 01:53:58 -07:00
Scott Ehlert e20e4677df Replace .hgignore with .gitignore. 2014-05-24 23:55:24 -05:00
David Anderson 97c581f72c Delete .hgtags 2014-05-24 20:09:17 -07:00
David Anderson c079a3b58a Delete NOTICE.txt 2014-05-24 20:09:04 -07:00
David Anderson c6de58aa05 Create README.md 2014-05-24 20:08:46 -07:00
Ruben Gonzalez 4fd0e3acd8 Update CS:GO team score gamedata. 2014-05-22 09:49:27 -04:00
Nicholas Hastings 3145daa46a Trigger build for hl2sdk-l4d changes. 2014-05-21 17:25:30 -04:00
Nicholas Hastings 3c52840dd8 Add CS_SLOT_KNIFE define (bug 6131, r=drifter). 2014-05-21 09:08:53 -04:00
Ruben Gonzalez 8ed66980c0 Update for hl2sdk-l4d changes. 2014-05-21 00:09:53 -04:00
Kyle Sanderson 365da7fef6 GCC build fix. 2014-05-20 20:33:50 -07:00
Ruben Gonzalez 9af5023a8f Update CStrike ext Windows Terrorist team score offset (bug 6129). 2014-05-18 21:45:08 -04:00
Scott Ehlert 878201c631 Add obj-*/ build directories to hgignore. 2014-05-17 15:25:45 -05:00
Scott Ehlert e65d11f4de Remove --package-debug configure option.
It is no longer needed since debugging symbols should be present in binaries by default now.
2014-05-17 15:11:11 -05:00
Scott Ehlert 1a89edec47 Add --symbol-files option to AMBuild configure. 2014-05-17 15:05:58 -05:00
Ryan Stecker 1143b3f56f Updated IServer gamedata. (r=asherkin)
--HG--
extra : amend_source : e907eac94dcfeac43a91ee317688a1a9bf9b8e75
2014-05-16 07:01:04 +01:00
Ruben Gonzalez 1b4017c6b7 Fix HandleCommand_BuyInternal sig for CS:S 2014-05-16 00:31:07 -04:00
Ruben Gonzalez 15224c6df5 Update windows CS:S gamedata 2014-05-16 00:23:26 -04:00
Ruben Gonzalez e831757313 Update windows CS:S gamedata 2014-05-16 00:13:23 -04:00
Ryan Stecker a47388ff76 Actually update Windows RemoveCondition for TF update. 2014-05-15 20:10:40 -07:00
Ryan Stecker 71f4f36f8c Further update Windows gamedata for TF conditions. 2014-05-15 19:44:19 -07:00
Ryan Stecker a4e387331a Update Windows gamedata for TF update. 2014-05-15 18:58:24 -07:00
Ruben Gonzalez defdc617b3 Update gamedata for CS:S update. 2014-05-15 21:22:24 -04:00
Nicholas Hastings 61b6a32631 Fix crash in ReconnectClient and Inactivate client when IServer ptr is null (bug 6122, r=asherkin).
--HG--
extra : amend_source : a38ac59091e43118d61b9c3eda30dece4190992e
2014-05-15 10:49:32 -04:00
Nicholas Hastings 1fdf1c0264 Update CS:GO IServer Windows gamedata (bug 6122).
--HG--
extra : rebase_source : 6d074a4d607fbc2c3e3e1ce752a8060ca934808b
2014-05-15 10:45:43 -04:00
Peace-Maker 32f019c70c Fix Mapchooser dying on single map rotation servers (bug 5179, r=kyles). 2014-05-13 13:44:14 -07:00
Kyle Sanderson 9c62e94239 Optimize native call if statically bound (bug 5842, r=ds,fyren f=dvander).
Original patch written by David Anderson (original r from Fyren).
- Updated to function with the current JIT compiler.
- Took in clean-ups from later-dated patches.
2014-05-11 14:36:32 -07:00
Nicholas Hastings b4ff034ac2 Fix passing invalid ent to OnEntity forwards (bug 6119, r=KyleS).
--HG--
extra : rebase_source : f5477d7d36ef579c40b0547389e8eccaf129f69e
2014-05-10 22:21:42 -04:00
Nicholas Hastings 6b27a7fe46 Consolidate duplicate OnEntityCreated logic (bug 6119, r=KyleS).
--HG--
extra : rebase_source : b0f563081c5d98c3fbc2769ee89e3ce0ec093624
2014-05-10 22:21:42 -04:00
Nicholas Hastings adc9569e23 Fix clients being invalid when passed to OnEntityDestroyed (bug 6119, r=KyleS).
--HG--
extra : rebase_source : 546168635b7e7cd8f8c4302858aa258025444dfd
2014-05-10 22:21:38 -04:00
Peace-Maker 4cd6c37ab5 Remove LogMessageEx definition from logging.inc (bug 5897, r=kyles). 2014-05-10 05:42:33 -07:00
Kyle Sanderson f15234e4f8 Changed EventHook name storage to use AString (bug 6188, r=psychonic). 2014-05-10 02:40:08 -07:00
David Anderson 29ff05bd62 Fix compiler bug with multidimensional array variable release (bug 6100, r=fyren).
--HG--
extra : rebase_source : 3f3c366fd8c47268ecd0df5907b68d3c879a5e60
2014-05-09 23:17:14 -04:00
Peace-Maker e9b4a6e96c Add DisplayTopMenuCategory native (bug 6033, r=dvander). 2014-05-09 12:32:49 -07:00
Peace-Maker 530078b3ae Add ability to disable TopMenu Title Caching (bug 6034, r=dvander). 2014-05-09 12:30:52 -07:00
Peace-Maker 5149205109 Clear default driver reference if unloaded (bug 5934, r=dvander). 2014-05-09 10:36:58 -07:00
Kyle Sanderson 55b77a1925 Return the 'd' to ClientPrefs::AreClientCookiesPening (r=asherkin). 2014-05-09 09:34:29 -07:00
Ruben Gonzalez bc5691c4b6 Update CS:GO gamedata 2014-05-08 08:33:13 -04:00
Nicholas Hastings 0513f93f9d Add PrepSDKCall_SetAddress and Address support to PrepSDKCall_SetFromConf (bug 5261, r=asherkin). 2014-05-07 12:58:16 -04:00
Kyle Sanderson b5decd8a50 Build Fix. 2014-05-06 18:48:53 -07:00
Kyle Sanderson b1901da79f Unify Maximum supported clients, raised SDKTools limit (bug 5964, r=psychonic). 2014-05-06 18:40:35 -07:00
Nicholas Hastings 6f47b1a89d Update GroundEntChanged offset for some games. 2014-05-05 11:54:12 -04:00
Peace-Maker cec703a059 Change hook prototype of GroundEntChanged to include void* parameter (bug 6050, r=psychonic). 2014-05-05 11:40:42 -04:00
Nicholas Hastings 217eb68455 Fix Dota SDKHooks EntityListenersFinder signature. 2014-05-05 10:32:21 -04:00
Nicholas Hastings f0d6fd1912 Fix usage of replace param in SetTrieArray (bug 6113, r=asherkin). 2014-05-04 21:38:32 -04:00
Nicholas Hastings b0061ece62 Trigger build for Dota INetChannelInfo changes. 2014-05-04 10:42:12 -04:00
Nicholas Hastings 0b6603ab2b Update Fistful of Frags gamedata. 2014-05-01 11:11:46 -04:00
Nicholas Hastings 09546b0d2a Update Dota 2 gamedata. 2014-04-30 13:18:46 -04:00
Nicholas Hastings 799ee7b9c6 Trigger build again for hl2sdk-csgo changes. 2014-04-24 10:04:24 -04:00
Scott Ehlert b0b28b7a6e Fix Linux and Windows builds. 2014-04-23 21:53:58 -05:00
Nicholas Hastings bbe7a9dd6a Trigger build for hl2sdk-csgo changes. 2014-04-23 22:28:41 -04:00
Scott Ehlert ecec7dbef3 Deduplicate a number of files used by extensions by moving them to the public directory (bug 5341, r=psychonic).
These files include smsdk_ext.cpp, smsdk_ext.h, sm_memtable.h, CDetour/*, and asm/*.
The smsdk_config.h file for each extension has also been moved out of the 'sdk' directory into its parent.

--HG--
rename : extensions/bintools/sdk/smsdk_config.h => extensions/bintools/smsdk_config.h
rename : extensions/clientprefs/sdk/smsdk_config.h => extensions/clientprefs/smsdk_config.h
rename : extensions/cstrike/sdk/smsdk_config.h => extensions/cstrike/smsdk_config.h
rename : extensions/curl/sdk/smsdk_config.h => extensions/curl/smsdk_config.h
rename : extensions/geoip/sdk/smsdk_config.h => extensions/geoip/smsdk_config.h
rename : extensions/mysql/sdk/smsdk_config.h => extensions/mysql/smsdk_config.h
rename : extensions/regex/sdk/smsdk_config.h => extensions/regex/smsdk_config.h
rename : extensions/sdkhooks/sdk/smsdk_config.h => extensions/sdkhooks/smsdk_config.h
rename : extensions/sdktools/sdk/smsdk_config.h => extensions/sdktools/smsdk_config.h
rename : extensions/sqlite/sdk/smsdk_config.h => extensions/sqlite/smsdk_config.h
rename : extensions/structs/sdk/smsdk_config.h => extensions/structs/smsdk_config.h
rename : extensions/tf2/sdk/smsdk_config.h => extensions/tf2/smsdk_config.h
rename : extensions/topmenus/sdk/smsdk_config.h => extensions/topmenus/smsdk_config.h
rename : extensions/updater/sdk/smsdk_config.h => extensions/updater/smsdk_config.h
rename : extensions/sdktools/CDetour/detourhelpers.h => public/CDetour/detourhelpers.h
rename : extensions/sdktools/CDetour/detours.cpp => public/CDetour/detours.cpp
rename : extensions/sdktools/CDetour/detours.h => public/CDetour/detours.h
rename : extensions/sdktools/asm/asm.c => public/asm/asm.c
rename : extensions/sdktools/asm/asm.h => public/asm/asm.h
rename : public/sample_ext/sdk/smsdk_config.h => public/sample_ext/smsdk_config.h
rename : core/logic/sm_memtable.h => public/sm_memtable.h
rename : public/sample_ext/sdk/smsdk_ext.cpp => public/smsdk_ext.cpp
rename : public/sample_ext/sdk/smsdk_ext.h => public/smsdk_ext.h
2014-04-23 21:19:28 -05:00
Nicholas Hastings d66a7b0ee0 Update CS:GO gamedata. 2014-04-23 21:40:50 -04:00
David Anderson 61c4d2b805 Fix typo pointed out by Nephrite (bug 6107, comment #7).
--HG--
extra : rebase_source : 9e62da715c2560dd102644b04b5d46413d100890
2014-04-23 10:18:56 -07:00
Peace-Maker 73d8072693 Mark CS:S as supporting HudMsg (bug 6108, r=psychonic).
--HG--
extra : rebase_source : 90340b31b76cc855e1a74c3012ba568786084086
2014-04-23 08:55:09 -04:00
David Anderson c64edf31fc Fix Windows build, again. 2014-04-22 20:04:12 -07:00
David Anderson cb32e3d8f9 Fix Windows build. 2014-04-22 19:46:55 -07:00
David Anderson e69e9eddc7 Change float comparison operators to return false for NaN (bug 6107, r=ds).
--HG--
extra : rebase_source : a11c56fb23d6617545def3591ec6100dd143eb3e
2014-04-22 19:40:45 -07:00
Scott Ehlert aa85a1866e Update checkout-deps script for Contagion on Windows (NPOTB). 2014-04-20 00:37:20 -05:00
Scott Ehlert 623925a1cf Fix downloading of ambuild using the checkout-deps script (NPOTB). 2014-04-20 00:37:19 -05:00
David Anderson b6792a2c8c Sync am-vector.h with AMTL (fix bug 6090).
--HG--
extra : rebase_source : f27515a516db9bc14779da3721f6378d573584b5
2014-04-19 19:21:40 -07:00
Nicholas Hastings 7248ad9aba Update Nuclear Dawn gamedata. 2014-04-20 21:38:40 -04:00
Nicholas Hastings d44b8aa853 Fix uninit'd GetCommandLine ptr in event that tier0 is not found. 2014-04-20 21:07:28 -04:00
Nicholas Hastings f8d6ecbc02 Fix Nuclear Dawn ICommandLine lookup on Linux. 2014-04-20 21:06:45 -04:00
Nicholas Hastings bd76558b94 Add missing GAMEFIX define for Nuclear Dawn. 2014-04-20 15:59:23 -04:00
Nicholas Hastings 63451b7b6b Update for hl2sdk-nd changes. 2014-04-20 12:00:04 -04:00
Nicholas Hastings edc42800ba Update CS:S gamedata. 2014-04-20 08:18:39 -04:00
Nicholas Hastings 0608d47219 Update for Dota IClient changes. 2014-04-09 13:17:18 -04:00
Powerlord 5efb5068cd Add new TF2_IsHolidayActive native to TF2 Ext (bug 6095, r=psychonic). 2014-04-07 23:17:11 -04:00
Powerlord 14f31006c1 Update TF2 Ext IsHolidayActive detour to use TF_IsHolidayActive (bug 6094, r=psychonic). 2014-04-07 23:16:17 -04:00
Powerlord 90c8440f17 Add TFHoliday_AprilFools to TFHoliday enum (bug 6092, r=psychonic). 2014-04-07 23:15:13 -04:00
Ondrej Hošek c3e9d7de41 Add support for single-file gamedata custom overrides (bug 5386, r=psychonic). 2014-04-07 12:14:26 -04:00
Nicholas Hastings 9badb14c3a Update for Dota IServerGameClient changes. 2014-04-06 17:03:29 -04:00
Nicholas Hastings 655994cd09 Fix doc style on two native comments to fix detection in our api parser. 2014-04-06 17:03:14 -04:00
Nicholas Hastings 217ca928d5 Move funcommands material and sound defs to gamedata (bug 6085, r=asherkin). 2014-03-29 15:07:07 -04:00
Nicholas Hastings fdae6cf1b0 Backed out changeset: fe0e55c4d544 2014-03-30 14:07:14 -04:00
Nicholas Hastings e708cdf28c Fix FindFlagChar giving '?' for Admin_Custom6 (nobug, r=asherkin). 2014-03-30 12:41:07 -04:00
Nicholas Hastings 2d616a5995 Add curl ext build dirs to .hgignore (NPOTB). 2014-03-30 12:19:26 -04:00
Nicholas Hastings 563dd617af Add sm_reload_translations command (bug 5750, r=asherkin). 2014-03-30 12:08:11 -04:00
Nicholas Hastings 2c399ec441 Move funcommands material and sound defs to gamedata. 2014-03-29 15:07:07 -04:00
Nicholas Hastings 57067d38fe Print SendProp flags in netprop dump (bug 6082, r=asherkin). 2014-03-29 14:23:16 -04:00
Nicholas Hastings 2f6b64e92e Make IGameConfig::GetMemSig return value clearer (bug 6081, r=asherkin). 2014-03-29 14:22:53 -04:00
Nicholas Hastings 00b06313c9 Add gamedata for Contagion (bug 6007, r=asherkin). 2014-03-29 14:14:00 -04:00
Nicholas Hastings 2b015a1d5b Add support for Contagion (bug 6007, r=asherkin). 2014-03-29 14:14:00 -04:00
SystematicMania 010220ea25 No longer require clients to be ingame for INetChannelInfo natives (bug 5775, r=psychonic). 2014-03-27 22:52:16 -04:00
Nicholas Hastings 95a56972a1 Update Empires Mod gamedata. 2014-03-27 22:23:22 -04:00
SystematicMania a8ff00bc34 Switch more base plugins to OnClientSayCommand from say hooks (bug 5986, r=psychonic).
--HG--
extra : rebase_source : 7ff7d92f9d060ac69d0652d643f08e7d81946e49
2014-03-25 11:57:00 -04:00
Kyle Sanderson 9abac06e85 Change SDKHooks to VTable Hooks (bug 6070, r=psychonic). 2014-03-23 22:11:06 -06:00
Nicholas Hastings ee595978f8 Fix StoreFromAddress and LoadFromAddress continuing with bad values after error (bug 6080, r=asherkin). 2014-03-23 17:07:51 -04:00
Nicholas Hastings 49d769282b Fix compile error in DisplayAskConnectBox stock (bug 5984). 2014-03-22 17:06:37 -04:00
Nicholas Hastings 451c90b932 Improve logical entity support in SDKHooks natives (bug 6069, r=asherkin). 2014-03-21 22:09:15 -04:00
Nicholas Hastings 9215ddcf8a Add PbRemoveRepeatedFieldValue native (bug 6066, r=asherkin). 2014-03-21 13:23:48 -04:00
Nicholas Hastings fb0fd0c6d2 Fix Alien Swarm EntityListeners gamedata for SDKHooks (bug 6059). 2014-03-21 13:10:44 -04:00
Nicholas Hastings 9c1902b0e3 Fix missing compile.exe and unecessary compile.sh in Windows package (bug 6047, r=asherkin). 2014-03-21 12:30:47 -04:00
FlaminSarge cf8d05ae98 Add support for passwords to DisplayAskConnectBox stock (bug 5984, r=psychonic). 2014-03-21 12:14:08 -04:00
Nicholas Hastings 8c513faad5 Fix non-msvc build. 2014-03-21 12:08:17 -04:00
Nicholas Hastings 6e8d9ff788 Record inline function debug info in PDB files (r=asherkin). 2014-03-21 12:04:41 -04:00
Nicholas Hastings 0e6cbf989e Add default infinite value for TF2_AddCondition duration (nobug, r=asherkin). 2014-03-21 12:03:49 -04:00
Nicholas Hastings d6bbb765c1 Add hack to not throw error on FEBC not found if not attempted to be found (nobug, r=asherkin). 2014-03-21 12:03:19 -04:00
Peace-Maker b411b60ed7 Update GoldenEye: Source gamedata.
--HG--
extra : rebase_source : ea8e83bb0a1dbf73d8f573fb8746a71315ca4ee4
2014-03-17 10:01:17 -04:00
Scott Ehlert 692cafa784 Update checkout-deps script for Dota 2 on Linux and Mac OS X. 2014-03-14 05:21:12 -05:00
Nicholas Hastings 6600a8c60b Use https for checkout-deps clones of AM repos (npotb). 2014-03-13 20:40:51 -04:00
Ruben Gonzalez cebede3a79 Update CS:GO gamedata 2014-03-10 18:56:34 -04:00
Nicholas Hastings db756f482b Fix SDKHooks TraceAttack hook crashing on SDK 2013 mods. 2014-03-08 22:06:29 -05:00
Kyle Sanderson cd349946e8 Fix FakeClientCommandEx always leaking memory (bug 5678, r=psychonic). 2014-03-08 19:50:55 -07:00
Nicholas Hastings b4156a19c3 Fix TE_* natives operating on incorrect data for some tempents (bug 6072, r=fyren). 2014-03-08 19:46:49 -05:00
Nicholas Hastings b3e2647dc4 Fix IgniteEntity crash on NMRiH. 2014-03-08 01:04:49 -05:00
Nicholas Hastings e9f0d1f513 Update CPlayer::Kick for hl2sdk-csgo IClient changes. 2014-03-06 21:33:18 -05:00
Nicholas Hastings 21cae97820 Trigger build for hl2sdk-csgo IClient change. 2014-03-06 21:25:30 -05:00
Nicholas Hastings 74989d925e Fix Dota 2 gEntList gamedata on Linux and Mac.
--HG--
extra : rebase_source : abbc60d623f55b3465e821a177df6af534eda2b4
2014-03-05 20:42:54 -05:00
Scott Ehlert b402d77ff9 Trigger build for ILoggingListener update for Dota 2. 2014-03-05 18:43:51 -06:00
Scott Ehlert 8431925577 Fix upload set for builds. 2014-03-03 05:21:50 -06:00
Scott Ehlert 22e8b53029 Add gamedata for EntityFactoryDictionary and IServer for Dota 2 on Linux (bug 6068, r=psychonic). 2014-03-03 05:20:40 -06:00
Nicholas Hastings aa75fd24d8 Add Linux and Mac gamedata for Dota 2 and update Windows gamedata (bug 6068). 2014-03-03 05:20:40 -06:00
Scott Ehlert f8f4cebe9e Add support for Dota 2 on Linux and Mac OS X (bug 6068, r=psychonic). 2014-03-03 05:20:38 -06:00
Scott Ehlert 7d7db6d5bb Trigger build. 2014-03-01 20:12:48 -06:00
Kyle Sanderson 38bbb8580f Move PlayerRunCmd to a global VTable Hook (bug 6051, r=psychonic). 2014-03-01 14:25:35 -07:00
Nicholas Hastings 8a7af5ba0d Trigger full rebuild. 2014-03-01 11:00:52 -05:00
Nicholas Hastings a98d277cf3 Remove unused variables (nobug, r=askerin). 2014-02-28 20:45:03 -05:00
Nicholas Hastings 3c6dd2cb79 Choose correct libprotobuf build for current msvc version on Windows. 2014-02-28 20:44:10 -05:00
Nicholas Hastings 5b96047ce8 Enable SDK "COMPILER_*" defines for all builds (nobug, r=asherkin). 2014-02-28 20:43:07 -05:00
Nicholas Hastings 692f597808 Update SDKHooks CTakeDamageInfoHack for SDK updates. 2014-02-28 15:03:53 -05:00
SystematicMania 10f878d8c7 Fix regressions in b2f7d97b1ea7 and update plugins for OnClientSayCommand changes (bug 5986, r=psychonic). 2014-02-28 10:38:36 -05:00
Nicholas Hastings 8987a34078 Fix ep1 and darkm builds (bug 5986).
--HG--
extra : amend_source : 719c0f37249744104d670c56addc112d704a1fad
2014-02-27 23:46:51 -05:00
SystematicMania ba99d0154b Strip quotes from chat forwards (bug 5986, r=psychonic). 2014-02-27 23:06:02 -05:00
Kyle Sanderson 977bf4d583 Fix Anti-Flood resolution of gametime (bug 5394, r=psychonic). 2014-02-27 20:49:19 -07:00
Ruben Gonzalez 06efa7c52b Update gamedata for CS:GO 2014-02-27 22:17:32 -05:00
Kyle Sanderson 84d58ff421 Remove unfinished ConVar queries on client disconnect (bug 6003, r=psychonic). 2014-02-27 19:55:13 -07:00
SystematicMania c679b97e5f Allow non-silent chat triggers to go through OnClientSayCommand (bug 5926, r=psychonic). 2014-02-27 20:22:01 -05:00
Nicholas Hastings b99ab3d1d2 Remove TextMsg params padding on Dota. 2014-02-27 09:53:57 -05:00
Scott Ehlert ce6b993954 Use Linux game data for offsets and signatures/symbols on OS X if Mac-specific data is not available (bug 6056, r=dvander).
Although unlikely, OS X game data can also be used on Linux if Linux-specfic data is missing.
2014-02-15 23:23:53 -06:00
David Anderson e95c2ba0b9 Improvements to checkout-deps.sh (bug 6054, r=ds). 2014-02-15 17:13:13 -08:00
Ruben Gonzalez ab6971656b Fix not returning a valid weaponID for cz75a (irc, r=KyleS) 2014-02-13 13:19:59 -05:00
Ruben Gonzalez 01fc010719 Update CSSDM gdc patch bytes (NPOTB) 2014-02-13 12:12:36 -05:00
Peace-Maker 37c84448a9 Fix CS:S GroundEntChanged SDKHooks Windows gamedata. 2014-02-13 11:37:06 -05:00
Scott Ehlert d259be7b1f Make symstore.pl die if it fails to open a symbol directory (no bug, r=dvander). 2014-02-13 01:40:02 -06:00
Scott Ehlert 9be71eea2f Fix ___strlcat_chk symbol error on OS X 10.8 and earlier (bug 6046, r=dvander). 2014-02-13 01:28:13 -06:00
Dr!fter a4d841655b Fix possible crash when unloading cstrike extension. (irc, r=KyleS) 2014-02-13 00:02:35 -05:00
Ruben Gonzalez 162c69bfda Fix CS_GetWeaponPrice returning incorrect value for M4A1 in CS:GO
--HG--
extra : amend_source : b4fa218795b59a82f98c0c8142e3bf36161f88d6
2014-02-12 19:03:14 -05:00
Nicholas Hastings c5f496670d Define NETWORK_VARS_ENABLED for SDKs that require it. 2014-02-10 21:04:01 -05:00
Nicholas Hastings 53a0acc2e3 Add GiveAmmo gamedata for more games.
--HG--
extra : amend_source : fd278ab2ac6f0afe7a47b0ba24d8c751755e1970
2014-02-10 11:46:10 -05:00
Peace-Maker 75d950e4b0 Add GiveAmmo native to SDKTools (bug 6039, r=psychonic). 2014-02-10 10:49:19 -05:00
Nicholas Hastings 5abd9edf62 Remove over-aggressive error handling of Addresses gamedata (bug 6044, r=asherkin).
--HG--
extra : rebase_source : 704dcfdf285286814411f3dd5be2dd6e02872085
2014-02-10 09:43:10 -05:00
Scott Ehlert e00e879af5 Use == instead of is operator for checking string equality in AMBuild scripts (bug 6043, r=dvander). 2014-02-09 22:50:20 -06:00
Peace-Maker 8476832dc2 Fix param order in AddToTopMenu function doc (irc, r=psychonic). 2014-02-09 19:38:41 -05:00
Scott Ehlert 0ab8f4a1bd Remove GLIBC 2.7 depedency from Webternet extension (no bug, r=dvander). 2014-02-09 15:19:17 -06:00
Ruben Gonzalez 79f825cc44 Fix typo in sdktools error. 2014-02-08 22:12:31 -05:00
Ruben Gonzalez f351e20de3 Update CStrike extension and gamedata on windows for latest CS:GO update (irc, r= psychonic) 2014-02-08 20:04:12 -05:00
Ruben Gonzalez 925d514224 Increase max sig length (irc, r=psychonic)
--HG--
extra : amend_source : 24f20bd01d0277e255f47e0c4392396ec1871104
2014-02-08 20:00:52 -05:00
Kyle Sanderson 36cc7610a1 Fix bad handle Forward handling in RequstFrame (irc, r=psychonic). 2014-02-08 15:10:35 -07:00
Kyle Sanderson 06d2017a95 Remove unmanaged forwards from lookup list on Release (bug 6025, r=psychonic). 2014-02-08 14:51:44 -07:00
Nicholas Hastings 0da68844a5 Remove MarkNativeAsOptional calls for old PbReadRepeated natives. (irc, r=KyleS). 2014-02-08 14:13:40 -05:00
Nicholas Hastings 1f6733562d Fix CS:GO EntInfosFinder gamedata. 2014-02-08 12:22:02 -05:00
Nicholas Hastings 4093fa0588 Fix SDKHooks load issue and reliance on gEntList ptr on CS:GO and Dota 2 on Windows. 2014-02-07 22:11:31 -05:00
Nicholas Hastings 39c82d6ea0 Fix logical entity support for Dota 2 and CS:GO on Windows. 2014-02-07 20:44:52 -05:00
Nicholas Hastings 03c7a9d5f3 Update CS:GO SDKTools gamedata. 2014-02-07 13:07:30 -05:00
Scott Ehlert 65b32b8ced Update dependency script to support getting Windows deps (no bug, r=dvander). 2014-02-06 19:45:35 -06:00
Scott Ehlert 41f74d1a5c Update Linux dependency script to support getting Mac deps (no bug, r=dvander).
--HG--
rename : tools/checkout-linux-deps.sh => tools/checkout-deps.sh
2014-02-06 00:28:29 -06:00
Nicholas Hastings 13e65a73a4 Update Insurgency gamedata. 2014-02-03 09:34:37 -05:00
Nicholas Hastings dc1234ddfb Update CS:GO SDKHooks gamedata.
--HG--
extra : rebase_source : cace974aa8e534dcb28d0759b034599d3cea81cc
2014-02-03 08:56:33 -05:00
Kyle Sanderson 5d8f5c890d Triggering build. 2014-02-02 21:35:02 -07:00
Kyle Sanderson e2eabc7a96 Force a reconfigure to happen everytime. 2014-02-02 21:26:04 -07:00
Kyle Sanderson a33977c71c Force rebuild for b0fa678a69ef (bug 6029, r=dvander). 2014-02-02 15:54:24 -07:00
Kyle Sanderson 9de1a1ddfa Add configuration option to package debug files with amb2. 2014-02-02 15:33:33 -07:00
David Anderson 7dcdaf0319 Disable amb2 color when configuring. 2014-02-02 01:39:24 -08:00
Scott Ehlert b3d64d1121 Fix freeing non-heap object warning from GCC (r=ann). 2014-02-01 04:16:26 -06:00
Michael McKoy 52ff6fd5f8 Fix overoptimization of nomination counts in Mapchooser (bug 5359, r=kyles). 2014-01-30 14:29:53 -07:00
Kyle Sanderson af7b8cd9a3 Wrap ClientPrintf into IGamePlayer (bug 6021, r=asherkin). 2014-01-29 21:41:41 -07:00
Nicholas Hastings b0ee5ce485 Updated Dota 2 gamedata. 2014-01-29 13:07:50 -05:00
FlaminSarge 4a65e38d54 Update TFCond and customkill enum values (bug 6012, r=psychonic). 2014-01-27 10:15:17 -05:00
Nicholas Hastings 097d2d902c Add missing meta results to some pre-hooks in SDKHooks (nobug, r=me). 2014-01-27 10:09:47 -05:00
Peace-Maker 9d15512f3b Fix crash in SDKHooks Reload post-hook (irc, r=psychonic). 2014-01-27 10:09:03 -05:00
Kyle Sanderson 3bbb48ce9e Fix GetPlayerUserId uninitialized return in Dota 2 (irc, r=psychonic). 2014-01-25 16:58:12 -07:00
Peace-Maker a709307fab Rename SortFunc2D parameters to match documentation (bug 6014, r=kyles). 2014-01-22 20:14:55 -07:00
Scott Ehlert 06c73813ca Triggering build for OS X 10.9 VM. 2014-01-22 00:38:49 -06:00
Kyle Sanderson 5acc7209b2 Add client checks to EmitSound SoundsHooks (bug 5873, r=psychonic) 2014-01-17 23:25:23 -05:00
Kyle Sanderson 9fe11f9c36 Fix being able to nominate same map multiple times (bug 5109, r=psychonic) 2014-01-17 23:21:16 -05:00
Kyle Sanderson fb734e4124 Add any tag to WritePackCell and ReadPackCell natives (bug 6001, r=asherkin) 2014-01-17 23:14:40 -05:00
Scott Ehlert 7c1fb6e5b9 Triggering build for clang 3.4. 2014-01-11 13:25:32 -06:00
Scott Ehlert 40d03f78cf Hopefully fixed clang build on Linux. 2014-01-08 17:37:55 -06:00
Scott Ehlert 7f8c6a9fd6 Triggering build. 2014-01-08 17:29:04 -06:00
Scott Ehlert 832187be31 Triggering build. 2014-01-08 17:21:01 -06:00
Scott Ehlert a2f8f1e70d Triggering build. 2014-01-08 17:10:04 -06:00
Scott Ehlert 3f3343e945 Changes to pushbuild.txt now trigger a reconfigure. 2014-01-08 17:09:50 -06:00
Scott Ehlert 4e077402e5 Triggering build. 2014-01-08 16:50:21 -06:00
Nicholas Hastings ad5740f8a7 Add support for Valve search paths to GetFileSize native (bug 5931, r=asherkin). 2014-01-07 14:24:53 -05:00
Nicholas Hastings 310f77d96a Consolidate FileExists usage in logic bin (bug 5931, r=asherkin). 2014-01-07 14:24:41 -05:00
Nicholas Hastings 121c3973d6 Add support for Insurgency mapcycle format (bug 5966, r=asherkin).
--HG--
extra : rebase_source : 3ae48e176177b1816351cc0cdd5c8dd35e630ea3
2014-01-07 10:24:44 -05:00
Nicholas Hastings 17212616d7 Support all file search paths when finding mapcycle file (bug 5839, r=asherkin).
--HG--
extra : rebase_source : 997dedcbac4a9249111c7424723f5b386baee77d
2014-01-07 10:24:05 -05:00
Nicholas Hastings 876ba3bef5 Don't hardcode paths to tier0/vstdlib in ICommandLine lookup (nobug).
--HG--
extra : rebase_source : 43d9d34a73ad9f89806507a521aed3f30d351586
2014-01-07 10:21:53 -05:00
David Anderson 9a0918a354 Fix typo that caused dump_syms to execute out of order with respect to linking. 2013-12-30 20:21:33 -05:00
David Anderson cfad3b26ca Port breakpad symbol uploading to AMBuild 2 (bug 5997 part 16, r=ds). 2013-12-30 17:51:02 -05:00
David Anderson a55b000273 Switch buildbot scripts to AMBuild 2 (bug 5997 part 15, r=ds). 2013-12-30 17:51:01 -05:00
David Anderson b69b0de234 Various build fixes (bug 5997 part 14, r=ds). 2013-12-30 17:51:01 -05:00
David Anderson 6d320163a1 Various Windows build fixes (bug 5997 part 13, r=ds).
--HG--
rename : sourcepawn/compiler/libpawnc.rc => sourcepawn/compiler/version.rc
2013-12-30 17:51:00 -05:00
David Anderson ae21f29ad9 Port the PDB log to AMBuild 2 (bug 5997 part 11, r=ds). 2013-12-30 17:51:00 -05:00
David Anderson f82224eba0 Move versioning to a static library to improve trivial build speed (bug 5997 part 9, r=ds). 2013-12-30 17:51:00 -05:00
David Anderson c2cfe60102 Port versioning to AMBuild 2 (bug 5997 part 8, r=ds). 2013-12-30 17:50:59 -05:00
David Anderson 75e622e879 Port packaging to AMBuild 2 (bug 5997 part 6, r=ds). 2013-12-30 17:50:59 -05:00
David Anderson 9c19f6efb7 Port plugin build scripts to AMBuild 2 (bug 5997 part 5, r=ds). 2013-12-30 17:50:58 -05:00
David Anderson 58995fc829 Add an spcomp option to print #included files (bug 5997 part 4, r=ds). 2013-12-30 17:50:58 -05:00
David Anderson 54ed1807c0 Port webternet/curl to AMBuild 2 (bug 5997 part 2, r=ds). 2013-12-30 17:50:57 -05:00
David Anderson e1a820dcf9 Port simple C++ build scripts to AMBuild 2 (bug 5997 part 1, r=ds). 2013-12-30 17:50:56 -05:00
Ryan Stecker b749bbf42b Remove 'state' keyword from compiler (bug 4572, r=dvander). 2013-12-28 08:42:50 -05:00
Nicholas Hastings bdbc3c3b58 Fix SDKHooks Spawn hook crashing in Dota.
--HG--
extra : rebase_source : dfe1eb22256268b321b8c24be718fbc7c770e74e
2013-12-28 08:19:34 -05:00
Scott Ehlert b83810b986 Triggering build. 2013-12-20 17:27:58 -06:00
Nicholas Hastings 462b543816 Trigger build for hl2sdk-dota changes. 2013-12-20 15:19:01 -05:00
Asher Baker 29ddb9f4d9 Fix spcomp compilation on OS X 10.9
Summary:
10.9's SDK changed strlcat and strlcmp to macros, which has broken lots of code. As they will always be available from the system (being BSD functions), just use the system ones there.

tempnam has also been deprecated, refactoring spcomp to use it safely is quite a bit of work, and it's not critical, so just hacking around it with mkstemp.

Test Plan: Compiled spcomp.

Reviewers: dvander

Differential Revision: https://phabricator.alliedmods.net/D3

--HG--
extra : rebase_source : 535b88f815727b186fa6a141036599651a60e334
2013-12-02 13:08:27 +00:00
Kyle Sanderson 398b05afed Fix uninit'd memory issues in AMTL AString and Vector (bug 5921, r=psychonic).
--HG--
extra : rebase_source : 17a57dcf815cb3798eaa13af5f4af44fb1930f86
2013-11-30 10:59:05 -05:00
David Anderson f0e4fe66ba AMTL updates and changes to adapt for them to fix menu crashes (bug 5921, r=psychonic).
AMTL:
Removes isVoid from AString.
Fixes support inserting to Vector at length.

--HG--
extra : rebase_source : 02805fad60c2b759a0e2e91c081144854a8e0b54
2013-11-30 10:51:28 -05:00
Dr!fter fa057e76f3 Update CS:GO CSWeaponDrop signature 2013-11-21 19:26:10 -05:00
Nicholas Hastings 47906fbcb7 Updaee CS:GO gamedata. 2013-11-16 10:19:20 -05:00
Nicholas Hastings 5df8c9290f Fix incorrect return and inability to block in TF2 OnCrit forward (r=FlaminSarge, VoiDeD). 2013-11-09 19:33:06 -05:00
Nicholas Hastings 1938be9e28 Updated NMRiH gamedata. 2013-11-08 10:42:30 -05:00
Nicholas Hastings 839e292819 Updated CS:GO gamedata. 2013-11-06 22:48:07 -05:00
Nicholas Hastings 056f64ad40 Consolidate SDKTools ent factory lookup (r=asherkin). 2013-11-05 20:32:37 -05:00
Nicholas Hastings c13a0a2e7a Trigger build. 2013-11-03 09:39:49 -05:00
Nicholas Hastings 1cf12085fc Trigger build. 2013-11-02 09:40:44 -04:00
Nicholas Hastings d9946b49c4 Trigger build. 2013-11-01 19:20:32 -04:00
Nicholas Hastings c5ca58a95b Trigger build. 2013-11-01 18:15:54 -04:00
Nicholas Hastings 591255c793 Fix typo in No More Room In Hell SDKHooks gamedata. 2013-10-30 16:10:02 -04:00
Nicholas Hastings 2ea5e6d090 Updated No More Room In Hell gamedata. 2013-10-30 16:03:09 -04:00
Kyle Sanderson e01fc5e697 Add RequestFrame native for one-off frame actions (bug 5965, r=dvander). 2013-10-29 22:10:40 -04:00
Nicholas Hastings 0775976165 Updated TF2 enums. 2013-10-29 20:08:18 -04:00
Nicholas Hastings d2f719171d Fix GetEngineVersion ret values for MM:S 1.9.x on orangebox (bug 5967, r=asherkin). 2013-10-29 19:00:21 -04:00
Nicholas Hastings c9c147a814 Have SDKTools use IServerTools to get ent facts where available (bug 5968, r=asherkin). 2013-10-29 18:59:36 -04:00
Nicholas Hastings 31aa230cba Updated TF2 ext Burn call with new parameter. 2013-10-29 18:59:12 -04:00
Nicholas Hastings 880be015ae Updated TF2 gamedata. 2013-10-29 18:59:00 -04:00
David Anderson 96d6cf8def Fix some memory errors (bug 5904, r=ds). 2013-10-29 18:58:34 -04:00
Nicholas Hastings 66dd3f08b1 Updated Synergy gamedata. 2013-10-28 11:13:48 -04:00
Nicholas Hastings 2175e561cc Flipped on ShowMenu support for Insurgency (present in next game update). 2013-10-25 14:32:56 -04:00
Kyle Sanderson 35191745ca Fix regression in SDKTools SetClientListening hook refcounting (bug 5956, r=fyren). 2013-10-24 13:20:42 -04:00
Scott Ehlert 661af1c5e2 Trigger build. 2013-10-24 00:53:27 -05:00
Dr!fter bd1ee1f805 Update CS:GO sdktools gamedata 2013-10-23 22:28:53 -04:00
Scott Ehlert 9e926bdb1d Trigger build. 2013-10-21 04:08:40 -05:00
Asher Baker edab49c4ef Support HUGE files in spcomp (bug 5959, r=dvander)
Summary: When there are more than 32768 SLOC in a file, spcomp underflows when storing debug info. These are safe to change as the file-backed struct uses uint32_t already.

Test Plan: Compiled the test plugin from bug 5959. I didn't load it, but it compiled without error and the SMX file is valid.

Reviewers: BAILOPAN

Differential Revision: https://phabricator.alliedmods.net/D2

--HG--
extra : rebase_source : fa907333b8c0dcab6e78c69ad4a92cdfb048083f
extra : amend_source : c7d2ec7d8b880459a57e4b2df5c1e8bbab5585bb
2013-10-15 23:36:16 +01:00
Asher Baker bbbbc8b311 Add a .arcconfig file so that arc works
Test Plan: Used arc to send this diff.

Reviewers: BAILOPAN, psychonic

Differential Revision: https://phabricator.alliedmods.net/D1

--HG--
extra : amend_source : 6aff9a42b440fe57ac096a93e843916c8a64b26d
2013-10-15 22:57:59 +01:00
David Anderson d5c1111fda Update linux dep script (no bug, r=NPOTB). 2013-10-14 11:56:43 -07:00
Nicholas Hastings 26a76365f4 Trigger build. 2013-10-13 15:17:20 -04:00
Nicholas Hastings 3a20ae16e1 Added gamedata for Insurgency (bug 5951, r=asherkin). 2013-10-13 14:16:12 -04:00
Nicholas Hastings e0746e1ab8 Added engine support for Insurgency (bug 5951, r=asherkin). 2013-10-13 14:16:08 -04:00
Nicholas Hastings 24c623c2fa Added gamedata for Blade Symphony (bug 5949, r=asherkin). 2013-10-13 14:15:33 -04:00
Nicholas Hastings 5e1d207eae Added engine support for Blade Symphony (bug 5949, r=asherkin). 2013-10-13 14:15:29 -04:00
Nicholas Hastings 3e15966c3e Add support for Source SDK Base 2013 (bug 5917, r=asherkin). 2013-10-13 14:14:51 -04:00
Nicholas Hastings ff54fb431f Fix ep1 build. 2013-10-09 09:12:46 -04:00
Nicholas Hastings 1ba6b2653a Move ForwardSys from core to logic (bug 5953, r=fyren).
--HG--
rename : core/ForwardSys.cpp => core/logic/ForwardSys.cpp
rename : core/ForwardSys.h => core/logic/ForwardSys.h
2013-10-09 08:43:08 -04:00
Nicholas Hastings 1d1b5d1c6d Move DBManager and DB natives from core to logic (bug 5953, r=fyren).
--HG--
rename : core/Database.cpp => core/logic/Database.cpp
rename : core/Database.h => core/logic/Database.h
rename : core/sm_simple_prioqueue.h => core/logic/sm_simple_prioqueue.h
rename : core/smn_database.cpp => core/logic/smn_database.cpp
rename : core/sm_queue.h => public/sm_queue.h
2013-10-09 08:43:08 -04:00
Nicholas Hastings 9027d15211 Move ADTFactory from core to logic (bug 5953, r=fyren).
--HG--
rename : core/ADTFactory.cpp => core/logic/ADTFactory.cpp
rename : core/ADTFactory.h => core/logic/ADTFactory.h
2013-10-09 08:43:08 -04:00
Nicholas Hastings 5bde264c43 Rename some register defines to avoid conflict with sys headers (bug 5917, r=hamdinger). 2013-10-08 21:01:21 -04:00
Asher Baker 67a2fe3751 Speculative fix for bot issues with SteamAuthstringValidation (r=psychonic). 2013-10-08 11:27:26 -04:00
Kyle Sanderson e3cb33bbda Switch StringToInt(Ex) from strtol to strtoul (bug 5939, r=psychonic). 2013-10-06 15:40:03 -04:00
Nicholas Hastings 3174fb7d19 Update CTakeDamageInfo var names from sdk update. 2013-10-06 10:57:38 -04:00
Nicholas Hastings 1836f69cf0 Updated gamedata for CS:GO Get/SetClientContribution score. 2013-10-03 10:43:20 -04:00
Peace-Maker 985b7831cf Fix typo stopping plugins from reaching ext dep lists (bug 5851, r=fyren). 2013-09-30 12:26:45 -04:00
Dr!fter fbc851ceae Fix Team Score Offset's for linux on CS:GO 2013-09-26 21:04:51 -04:00
Nicholas Hastings 55bf8ec095 Fix watchdog timer hanging on exit (r=dvander). 2013-09-23 22:29:28 -04:00
Nicholas Hastings 39e955c412 Updated HL2DM gamedata. 2013-09-18 21:49:36 -04:00
Kyle Sanderson f8c065c182 Update CS:S gamedata 2013-09-16 21:22:49 -04:00
Kyle Sanderson ed6fe7519a Detech dispatch after Handles are freed (bug 5853, r=asherkin). 2013-09-14 12:23:04 -04:00
Nicholas Hastings d808d6d8a5 Fix some format string misuse with map names. 2013-09-13 13:47:55 -04:00
Nicholas Hastings b471109c08 Increase mapname buffer size in nextmap to accomodate longer map names. 2013-09-13 13:47:55 -04:00
Dr!fter 9978b07956 Update gamedata for CS:GO update 2013-09-12 21:56:33 -04:00
Asher Baker 1b3ff094fa Updated plugin blacklist. 2013-09-11 06:16:48 +01:00
Drifter 75ce4c395a Add CS_UpdateClientModel native to cstrike extension (bug 5905, r=psychonic). 2013-09-10 13:08:14 -04:00
Nicholas Hastings 427e93c573 Fix attempted triggers from gagged users displaying in chat (bug 5918, r=asherkin). 2013-09-10 09:52:37 -04:00
Nicholas Hastings 46327563f2 Initialize DamageCustom var in SDKHooks CTakeDamageInfoHack (nobug, r=asherkin). 2013-09-09 18:41:54 -04:00
Kyle Sanderson 3308f0644c Fix incorrect assignment in SDKHook_TakeDamage + cleanup (bug 5911, r=psychonic). 2013-09-06 18:37:13 -04:00
Peace-Maker cb128162e6 Added missing DispatchKeyValues and SDKHooks gamedata for HL2CTF (bug 5114, r=psychonic).
--HG--
extra : amend_source : d84f37e83a223a5fbc1b71f70c8ba0076c7c1cf4
2013-09-05 22:31:44 -04:00
David Anderson f9f4c7dcd6 Add an interpreter because. (bug 5902, r=ds). 2013-09-01 00:23:44 -07:00
David Anderson 2dae228f10 Remove memtables from HandleSys (bug 5899 part 5, r=fyren). 2013-08-31 19:50:36 -07:00
David Anderson b917c540aa Remove memtables from GameConfigs (bug 5899 part 4, r=fyren). 2013-08-31 19:50:26 -07:00
David Anderson 67ce8aff61 Remove memtables from ConCmdManager (bug 5899 part 3, r=fyren). 2013-08-31 19:50:15 -07:00
David Anderson ba927964c8 Clean up ConCmdManager (bug 5900, r=fyren). 2013-08-31 11:51:23 -07:00
David Anderson 435f2b8e39 Remove MenuManager use of memtables (bug 5899 part 2, r=fyren). 2013-08-31 11:50:28 -07:00
David Anderson a25f9010cc Remove CoreConfig use of memtables (bug 5899 part 1, r=fyren). 2013-08-31 11:50:11 -07:00
David Anderson 4500964394 Use Refcounted to manage to NativeEntry (bug 5852 part 4, r=ds).
--HG--
extra : rebase_source : 2e08816db6819c9d9957a0e0ade9cd1aa420fd54
2013-08-30 10:16:28 -07:00
David Anderson 3da646f913 Simplify NativeEntry state (bug 5852 part 3, r=ds).
--HG--
extra : rebase_source : e80ed1c3b3af0b48fff6632eb131ca534a2c2885
2013-08-30 10:14:18 -07:00
David Anderson 140436c2cb Store C++ native lists more optimally in ShareSys (bug 5852 part 2, r=ds).
--HG--
extra : rebase_source : 75b786b4c839ec48bf32982486fbbafa1050ad55
2013-08-30 10:12:44 -07:00
David Anderson 0e677fb3a2 Remove native override API (bug 5852 part 1, r=ds).
--HG--
extra : rebase_source : 9df0399c88721b63667a9b0b5dca0eb20168117a
2013-08-30 10:10:57 -07:00
David Anderson 4dc5d0e12f Fix -Wno order in AMBuildScript. 2013-08-30 12:50:47 -07:00
David Anderson a260e92266 Add a script to checkout/update linux dependencies. 2013-08-30 12:24:40 -07:00
David Anderson 9a86be24a7 Remove experimental decompiler from the tree; superceded by Lysis. 2013-08-30 11:39:47 -07:00
Nicholas Hastings e620d973f4 Reserved slot fixes for OB games when SourceTV or Replay are enabled (bug 5499, r=drifter). 2013-08-30 14:15:02 -04:00
Nicholas Hastings 7ad43a5b11 Make sm_mapvote_runoffpercent cvar work as advertised (bug 5890, r=asherkin). 2013-08-30 14:14:59 -04:00
Nicholas Hastings 124ede82b3 Fix build. 2013-08-29 15:05:34 -04:00
David Anderson da9debda67 Sync AMTL. 2013-08-29 11:45:28 -07:00
Nicholas Hastings 1c40d77b14 Fix build. 2013-08-29 14:16:18 -04:00
David Anderson f1b0c29815 Sync AMTL. 2013-08-29 10:11:59 -07:00
David Anderson b261dde858 Refactor Trie natives to use HashMap instead of KTrie; add iteration API (bug 5892, r=ds).
--HG--
extra : rebase_source : a5bcf64a45d6734a97d78b4f4ea9aea48d17bb8b
2013-08-29 10:09:02 -07:00
Matthias Kollek 88fdec6dd5 Added banreasons.txt missing from changeset a4e4207da173 (bug 5762). 2013-08-29 11:11:41 -04:00
Nicholas Hastings e8ce238eb7 Another fix for build on non-windows. 2013-08-29 10:12:44 -04:00
Nicholas Hastings 404b1c5ed0 Fix build on non-windows. 2013-08-29 09:47:20 -04:00
Nicholas Hastings dde1deb6bc Clean up TF2 ext CalcCritical code (bug 5894, r=voided). 2013-08-29 09:27:35 -04:00
David Anderson c80e0a964f Fix uninitialized var causing trouble in _FindServerClass (bug 5893, irc r=psychonic). 2013-08-28 13:46:34 -04:00
Nicholas Hastings d9f23a8af2 Fix translator system not loading languages with long identifier (bug 5888, r=dvander). 2013-08-28 13:18:55 -04:00
Matthias Kollek fd9e657196 Add support for customizing ban reasons in basebans.sp (bug 5762, r=psychonic). 2013-08-28 13:17:17 -04:00
Nicholas Hastings 693c4024d6 Updated TF2 Regenerate signature. 2013-08-27 23:32:04 -04:00
Nicholas Hastings d7eee4191f Updated TF2 AddCond signature. 2013-08-27 21:08:37 -04:00
Peace-Maker b8c61f89fa Re-rig global forwards when plugin pause state changes (bug 5582, r=psychonic). 2013-08-27 19:06:18 -04:00
Kyle Sanderson d05feabcd6 Suppress SpewOpcode if not a debug build (bug 5859, r=dvander). 2013-08-27 08:39:15 -04:00
David Anderson c30b7c111f Fix hashmap not being initialized (no bug, irc r=kyles). 2013-08-26 23:38:55 -07:00
Nicholas Hastings f6255c72d1 Compile with clang by default on linux. 2013-08-26 23:07:45 -04:00
Nicholas Hastings cd68567ce3 Updated plugin blacklist. 2013-08-26 10:31:25 -04:00
David Anderson e6f39eb9b6 Switch AdminCache off KTrie (bug 5886, r=ds). 2013-08-25 21:39:07 -07:00
David Anderson 2c1a398292 Fix build. 2013-08-25 14:04:01 -07:00
David Anderson 0f52f6931b Switch ADTFactory/IBasicTrie off KTrie (bug 5884 part 17, r=ds). 2013-08-25 12:21:15 -07:00
David Anderson 51dc097266 Switch TopMenus off KTrie (bug 5884 part 16, r=ds). 2013-08-25 12:20:38 -07:00
David Anderson 8e99b342a4 Switch ClientPrefs off KTrie (bug 5884 part 15, r=ds). 2013-08-25 12:19:10 -07:00
David Anderson bc51c3e5b1 Switch ConCmdManager off KTrie (bug 5884 part 14, r=ds). 2013-08-25 12:18:25 -07:00
David Anderson d5177fdc74 Switch EventManager off KTrie (bug 5884 part 13, r=ds). 2013-08-25 12:17:26 -07:00
David Anderson 80eba57e6b Switch sm_srvcmds off KTrie (bug 5884 part 12, r=ds). 2013-08-25 12:17:25 -07:00
David Anderson 3985dd639a Switch UserMessages off KTrie (bug 5884 part 11, r=ds). 2013-08-25 12:16:07 -07:00
David Anderson 3000445af9 Switch smn_console off KTrie (bug 5884 part 10, r=ds). 2013-08-25 12:15:27 -07:00
David Anderson 0235d57625 Switch ConsoleDetours off KTrie (bug 5884 part 9, r=ds). 2013-08-25 12:15:26 -07:00
David Anderson 77c7b312ea Switch ConVar, CoreConfig off KTrie (bug 5884 part 8, r=ds). 2013-08-25 12:13:30 -07:00
David Anderson 3850765759 Switch HalfLife2 off KTrie (bug 5884 part 7, r=ds). 2013-08-25 11:59:48 -07:00
David Anderson 0b8e2fd5c9 Switch Profiler off KTrie (bug 5884 part 6, r=ds). 2013-08-25 11:59:48 -07:00
David Anderson ebe9ee8114 Switch ShareSys off KTrie (bug 5884 part 5, r=ds). 2013-08-25 11:59:47 -07:00
David Anderson a8ab617ee9 Switch smn_maplists off KTrie (bug 5884 part 4, r=ds). 2013-08-25 11:59:47 -07:00
David Anderson 414440589e Switch PluginSys off KTrie (bug 5884 part 3, r=ds). 2013-08-25 11:59:46 -07:00
David Anderson 544b6d94aa Switch HandleSys off KTrie (bug 5884 part 2, r=ds). 2013-08-25 11:59:45 -07:00
David Anderson 0144062126 Introduce NameHashSet (bug 5884 part 1, r=ds). 2013-08-25 11:59:44 -07:00
David Anderson db1b7a8067 Fix build. 2013-08-25 11:26:37 -07:00
Nicholas Hastings a9905ec95e Add missing MarkNativeAsOptional calls for cstrike.inc (r=me). 2013-08-25 11:01:55 -04:00
Kyle Sanderson 7e2afacf34 Fix broken translating in some plugins and natives (bug 5612, r=psychonic). 2013-08-25 10:15:35 -04:00
Kyle Sanderson 2b6257e94e Fixed potential deadlock in HandleSystem::TryAndFreeSomeHandles (bug 5665, r=dvander). 2013-08-25 09:59:13 -04:00
David Anderson d14b5fe00b Switch GameConfigs to hash tables (bug 5878 part 3, r=ds). 2013-08-25 01:42:16 -07:00
David Anderson 04bb2d1066 Switch Translator to hash tables (bug 5878 part 2, r=ds). 2013-08-25 01:42:15 -07:00
David Anderson 3b9037397a Add new StringHashMap container (bug 5878 part 1, r=ds). 2013-08-25 01:42:14 -07:00
Nicholas Hastings ea3e602835 Fix cmd listener callback return behavior to match func doc (bug 5882, r=asherkin). 2013-08-24 23:56:39 -04:00
Nicholas Hastings 96e971084a Fix SDKHooks hook ent validation missing first datatable name (bug 5881, r=asherkin). 2013-08-24 21:59:52 -04:00
Nicholas Hastings 9bf78a96cc Replace hardcoded "/ff" check in basetriggers (bug 5863, r=drifter). 2013-08-24 21:59:52 -04:00
Nicholas Hastings ba55ef0b2e Don't call SayCommand forwards for chat triggers (bug 5863, r=asherkin). 2013-08-24 21:59:52 -04:00
Nicholas Hastings 0c00f7393c Fixed regression causing public triggers to no longer display (bug 5863, r=drifter). 2013-08-24 21:59:52 -04:00
Nicholas Hastings 1824826474 Removed unused var m_bTriggerWasSilent from core ChatTriggers (bug 5863, r=asherkin). 2013-08-24 21:59:52 -04:00
David Anderson 57e1c7d55f Fix build problems when using HashMap. 2013-08-24 01:29:43 -07:00
David Anderson e489b4a570 Fix build problems when using HashTable. 2013-08-24 01:29:26 -07:00
David Anderson 83dc7f0855 Fix performance problems in AString. 2013-08-24 01:29:03 -07:00
David Anderson 90a2d1bb39 Update AMTL with a number of changes.
- Introduce HashMap, a key-value map based on HashTable.
 - Introduce LinkedList, to port from SourceHook::List.
 - Introduce AString, to port from SourceHook::String.
 - Introduce KE_OVERRIDE and KE_DELETE helpers for C++11.
 - HashTable now constructs/destructs only live items.
 - Fix insert-on-removed-item bug in HashTable.
 - Fix Vector keeping a new maxsize if allocation fails.
 - Renamed am-inline-list.h to am-inlinelist.h.

--HG--
rename : public/amtl/am-inline-list.h => public/amtl/am-inlinelist.h
2013-08-23 22:29:44 -07:00
systematicmania da650606e3 Fixed optional dependencies logging errors (again) (bug 5739, r=dvander).
Regression from changeset 4c93f74cae51 and changeset 7dae5b0b8e28 in bug 5860.
2013-08-24 00:12:21 -04:00
Nicholas Hastings bc789d7c1a Add missing GetFunctionCount check in ChatTriggers::OnSayCommand_Pre (bug 5864, r=kyles).
--HG--
extra : rebase_source : afa6969f8319c80b027c4ae81e6b8db6b8d5c14f
2013-08-23 18:48:06 -04:00
David Anderson 5999b50e10 Fix Windows build errors. 2013-08-23 15:45:07 -07:00
Peace-Maker e5428a3c27 Fixed crash in OnSayCommand_Post with console chat, pass console chat (bug 5864, r=kyles). 2013-08-23 07:31:04 -04:00
Nicholas Hastings cf39bc97a5 Backed out changeset: 4af1c2ab3816 (bug 5864).
--HG--
extra : rebase_source : 7a3f03aaa4bb80d4b01c59cdb4dc12b0f5e020da
2013-08-23 07:28:07 -04:00
David Anderson 4d43374fde Add atomic reference counting and port DBI (bug 5876 part 3, r=ds).
--HG--
extra : rebase_source : a6defaf477e7a856ce91f92d5f3143f12c141da3
2013-08-23 00:18:13 -07:00
David Anderson dac42ee272 Add reference counting to IDatabase (bug 5876 part 2, r=ds).
--HG--
extra : rebase_source : 9fef982c3923a2f5cb842b3b8a5cca235ef9c6b9
2013-08-23 00:18:12 -07:00
David Anderson f7991185ba Add reference counting and use it for CGameConfig (bug 5876 part 1, r=ds).
--HG--
extra : rebase_source : 42b033d005ae3118b6505c530227c84e0e8a7553
2013-08-23 00:18:11 -07:00
Nicholas Hastings 5954f15989 Fixed crash in OnSayCommand_Post with console chat, pass console chat (bug 5864, r=voided);
--HG--
extra : rebase_source : 4a1a1945efc119f40e7d55d4fdfcc250bdc0febc
2013-08-22 21:45:42 -04:00
Nicholas Hastings 4d2eb7af30 Changed from RemoveEdict to using the Kill input for TF2_RemoveWeapon (r=voided).
--HG--
extra : rebase_source : cb9bd8d35bddfb5feb3bead7284398eb8bd7d6b4
2013-08-22 21:45:40 -04:00
Nicholas Hastings 50083048f6 Fixed SDKHooks thinking a hook type was supported when gamedata missing (r=voided).
--HG--
extra : rebase_source : 88a08b03ecbbbaa3bf1c91db30c2e08ceb106e95
2013-08-22 21:45:19 -04:00
David Anderson dab2932550 Fix Linux build. 2013-08-22 18:03:00 -07:00
David Anderson a8cebbe3fd Fix windows build. 2013-08-22 17:55:49 -07:00
David Anderson d6a6194e68 Make amtl headers BSD-licensed and clean up outstanding style issues. 2013-08-22 17:11:17 -07:00
David Anderson c373527851 Rename ke_* headers to am-*
--HG--
rename : public/amtl/ke_allocator_policies.h => public/amtl/am-allocator-policies.h
rename : public/amtl/ke_inline_list.h => public/amtl/am-inline-list.h
rename : public/amtl/ke_thread_posix.h => public/amtl/am-thread-posix.h
rename : public/amtl/ke_thread_utils.h => public/amtl/am-thread-utils.h
rename : public/amtl/ke_thread_windows.h => public/amtl/am-thread-windows.h
rename : public/amtl/ke_utility.h => public/amtl/am-utility.h
rename : public/amtl/ke_vector.h => public/amtl/am-vector.h
2013-08-22 17:10:59 -07:00
David Anderson de8726ab73 Move ke_ headers to new public/amtl folder.
--HG--
rename : public/sourcepawn/ke_allocator_policies.h => public/amtl/ke_allocator_policies.h
rename : public/sourcepawn/ke_inline_list.h => public/amtl/ke_inline_list.h
rename : public/sourcepawn/ke_thread_posix.h => public/amtl/ke_thread_posix.h
rename : public/sourcepawn/ke_thread_utils.h => public/amtl/ke_thread_utils.h
rename : public/sourcepawn/ke_thread_windows.h => public/amtl/ke_thread_windows.h
rename : public/sourcepawn/ke_utility.h => public/amtl/ke_utility.h
rename : public/sourcepawn/ke_vector.h => public/amtl/ke_vector.h
2013-08-22 16:30:44 -07:00
David Anderson 94d33a4ef1 Fix various problems with unloading ClientPrefs and SourceMod (bug 5874, r=ds).
--HG--
extra : rebase_source : 0a35f8380d651ca65fac9dd402c5cd3625e3105c
2013-08-22 14:05:44 -07:00
Kyle Sanderson d79b41e4a7 Fix weapon ID checks (bug 5872, r=Dr!fter) 2013-08-21 10:55:12 -04:00
David Anderson 754a6e1177 Rewrite DBManager to use the new synchronization primitives (bug 5870, r=fyren). 2013-08-21 00:01:28 -07:00
David Anderson b972ea4781 Fix stack alignment when lazily compiling scripted calls (bug 5871, r=ds). 2013-08-20 23:59:11 -07:00
David Anderson 45856816c1 Rewrite IThreader implementation around new synchronization primitives (bug 5862, r=fyren). 2013-08-19 20:58:02 -07:00
David Anderson 582162460f Fix OP_MOVS to not clobber random memory (bug 5868, r=psychonic). 2013-08-19 12:59:10 -07:00
Nicholas Hastings e970c36419 Fixed GuessSDKVersion return value when using MM:S versions < 1.10 (r=me). 2013-08-16 11:47:35 -04:00
David Anderson c48cc0afdc Fix OS X build. 2013-08-15 16:26:16 -07:00
Nicholas Hastings 3d6d4f5464 typo 2013-08-15 18:53:02 -04:00
Nicholas Hastings 61bc6ec825 snaaaaaaaaaaaaaaaaakes 2013-08-15 18:49:55 -04:00
Nicholas Hastings 6f0f6676db Fixed char * constant conversion warning in cstrike ext. 2013-08-15 18:43:14 -04:00
Nicholas Hastings fc240d4dfa Only add -Wno-narrowing if GCC >= 4.6 or Clang(?). 2013-08-15 18:34:51 -04:00
Dr!fter 6dc0861740 Update some more CS:GO gamedata 2013-08-15 17:22:30 -04:00
Drifter 45cabd756c Fix CS:GO GetWeaponPrice and OnGetWeaponPrice using outdated method (r=psychonic). 2013-08-15 14:40:30 -04:00
Nicholas Hastings 5fc854ab4f Fixed chat trigger crash regression on ep1 (bug 5394, r=asherkin).
--HG--
extra : rebase_source : 39f0eff210b785b266422157c48b538921e16cc8
2013-08-15 10:18:27 -04:00
David Anderson caa3343dea Added missing core.cfg entry. 2013-08-14 23:59:31 -07:00
David Anderson 3ac43497b9 Implement a watchdog timer for scripts that take too long to execute (bug 5837, r=fyren).
--HG--
extra : rebase_source : ffacb38457eca581660ce8f15c444ad828b7fedd
2013-08-14 23:54:25 -07:00
Dr!fter 74f1b800c2 Update gdc keys for CS:GO update 2013-08-14 17:18:02 -04:00
Nicholas Hastings 7d431e55df Update BuyCommand detour in CStrike extension with new param on CS:GO. 2013-08-14 17:08:02 -04:00
Nicholas Hastings 575962569f Update GivePlayerItem for new params in CS:GO. 2013-08-14 17:07:27 -04:00
Dr!fter 01ef0e93aa Update some more CS:GO gamedata 2013-08-14 16:42:40 -04:00
Nicholas Hastings 439f4f6f0e Updated some CS:GO gamedata. 2013-08-14 14:20:57 -04:00
Nicholas Hastings 00b1f33725 Fixed typo in Nuclear Dawn gamedata backcompat fix. 2013-08-14 13:14:59 -04:00
Nicholas Hastings 1204eec8ac Added compat shim to load on Nuclear Dawn with MM:S < 1.9.3. (bug 5813, r=me). 2013-08-14 12:55:55 -04:00
Nicholas Hastings f3ac8f6649 Added gamedata and extension loading compat shims for Nuclear Dawn (bug 5813, r=asherkin). 2013-08-14 11:56:34 -04:00
FlaminSarge 7db280a666 Add GetPlayerJingleFile native. (bug 5690, r=asherkin) 2013-08-12 02:08:34 +01:00
David Anderson a4b7ad0d42 Fixed memory corruption when parsing natives. (bug 5840, r=fyren) 2013-08-12 01:33:04 +01:00
Asher Baker 2b88905b40 Fixed build. 2013-08-12 01:32:44 +01:00
FlaminSarge ef5263ef9e Add support for more CalcIsAttackCritical helpers. (bug 5576, r=asherkin) 2013-08-12 01:18:01 +01:00
FlaminSarge 9206512c38 Add support for tracking player conditions >= 64. (bug 5565, r=asherkin) 2013-08-12 01:11:11 +01:00
Peace-Maker 82e16db275 Fixed sm_cancelvote not resetting rtv state. (bug 5808, r=asherkin) 2013-08-12 00:58:43 +01:00
Peace-Maker 97fc093eef Fix crash creating a timer when there are no handles available. (bug 5317, r=asherkin) 2013-08-12 00:57:26 +01:00
Kyle Sanderson b9cd424186 Add support for nested datatables. (bug 5446, r=asherkin) 2013-08-12 00:54:21 +01:00
Kyle Sanderson 6af85409f1 Dump handle information when a plugin is forcefully unloaded. (bug 5666, r=asherkin) 2013-08-12 00:45:29 +01:00
Kyle Sanderson 86c699dd36 Fixed various memory issues. (bug 5766, r=asherkin) 2013-08-12 00:44:22 +01:00
Kyle Sanderson 3d4e1ffd64 Added helper stock to check if a command exists. (bug 5510, r=asherkin) 2013-08-12 00:42:56 +01:00
David Anderson b39fcebe65 Remove InfoVars, reassign DAT from EBP to ESI to preserve C++ stacktraces in JIT code (bug 5844 part 10, r=ds). 2013-08-12 00:24:02 +01:00
David Anderson 04129a0841 Remove InfoVars::frm (bug 5844 part 9, r=ds). 2013-08-12 00:23:54 +01:00
David Anderson a7658f013e Eliminate InfoVars::hp (bug 5844 part 8, r=ds). 2013-08-12 00:23:00 +01:00
David Anderson 2822bf7a65 Eliminate InfoVars::cip (bug 5844 part 7, r=ds). 2013-08-12 00:22:54 +01:00
David Anderson 87ccd272ee Eliminate InfoVars::rval (bug 5844 part 6, r=ds). 2013-08-12 00:22:41 +01:00
David Anderson 18275ce2c9 Remove InfoVars::ctx (bug 5844 part 5, r=fyren). 2013-08-11 11:33:47 -07:00
David Anderson 5935070dfa Remove InfoVars::memory (bug 5844 part 4, r=ds). 2013-08-11 11:33:29 -07:00
David Anderson 8391c83121 Remove InfoVars::stp (bug 5844 part 3, r=fyren). 2013-08-11 11:31:55 -07:00
David Anderson 4255ee105f Remove InfoVars::data_size (bug 5844 part 2, r=ds). 2013-08-11 11:31:24 -07:00
David Anderson e3c45bd1f7 Clean up INFO register structure (bug 5844 part 1, r=ds). 2013-08-11 11:30:27 -07:00
David Anderson 449617474b Statically align the stack at function boundaries (bug 5842, r=ds). 2013-08-11 11:27:19 -07:00
David Anderson ce542ac5f6 Move tracker related opcodes entirely to C++.
The tracker related opcodes:
  GENARRAY
  GENARRAY_Z
  TRACKER_POP_SETHEAP
  TRACKER_PUSH_C

All contain some vastly overcomplicated assembly containing logic that could
be implemented much easier in C++. If it were a performance concern, these
opcodes would be entirely in C++, but most of them call out to one or more
routines to do additional work. This patch just moves most of the logic out
to C++ to reduce complexity and fix reported bugs.

--HG--
extra : rebase_source : 1397056ac3ca3efb969e66ec577e2b33ca725e1a
2013-08-10 21:23:02 -07:00
Nicholas Hastings d0e18ed0ba Debug build fixes.
--HG--
extra : rebase_source : 772710f29b5aca5e0e4b7276fcb19b3702450e3f
2013-08-10 12:22:09 -04:00
David Anderson 70952282f0 More Windows build fix. 2013-08-08 22:02:42 -07:00
David Anderson bf325b72f1 Use SSE when available for floating-point operations (bug 5841, r=her). 2013-08-08 20:26:36 -07:00
David Anderson f031ad23f6 Fix Windows build (require stdint.h i.e. MSVC 2010+). 2013-08-08 20:21:37 -07:00
David Anderson 9e56725406 Refactor the JIT to use a newer, simpler macro assembler. (bug 5827, r=ann) 2013-08-08 09:41:24 -07:00
David Anderson ad543c909c Add -Wno-narrowing to support building on GCC-4.7 (no bug, r=me). 2013-08-08 09:40:23 -07:00
Nicholas Hastings 36b8b81914 Ep1 compile fixes. 2013-08-05 12:06:04 -04:00
Kyle Sanderson 5d76ffef88 Added global pre and post forwards for client chat (bug 5394, r=psychonic). 2013-08-05 11:46:29 -04:00
Nicholas Hastings 37316fed84 Fixed a path not using updated mapcycle file detection (bug 5719). 2013-08-05 11:36:59 -04:00
Nicholas Hastings ecd568510d Triggering build. 2013-08-05 08:36:25 -04:00
GoD-Tony 5ec9cf7089 Added ISDKHooks interface with entity listeners (bug 5602, r=psychonic). 2013-08-04 10:03:40 -04:00
Kyle Sanderson aad1b5dc9f Fixed regression in CellFilter GetRecipientIndex reading oob (bug 5826, r=psychonic). 2013-08-03 19:20:03 -04:00
Nicholas Hastings 1b13f0a2ec Triggering build.
--HG--
extra : amend_source : 2a8f0c1879b366883b96eeebf304e5aa8b19153f
2013-08-03 19:03:12 -04:00
Asher Baker 29108ea8ad Change wording for SteamAuthstringValidation config option to mark feature as experimental (bug 5791, r=psychonic). 2013-08-01 14:31:03 +01:00
Erik Minekus 0e167ee85b Numerous code documentation fixups (bug 5720, r=psychonic). 2013-08-01 09:26:34 -04:00
Nicholas Hastings 8fe6d09613 Check all possible mapcycle paths on newer orangebox games (bug 5719, r=asherkin). 2013-07-31 22:57:50 -04:00
Drifter fa0df413f4 Added CS_IsValidWeaponID native and validity checks to other natives (bug 5566, r=psychonic). 2013-07-31 22:11:15 -04:00
Drifter 1a8be6344a Fixed incorrect return for some weapons in CS_GetWeaponPrice (bug 5562, r=psychonic). 2013-07-31 22:08:23 -04:00
Kyle Sanderson fff8455903 Fixed crash in SDKHooks when throwing bad ent type error on logical ent (r=psychonic). 2013-07-31 22:03:59 -04:00
Nicholas Hastings 80d94e1aa3 Build against MM:S 1.10. 2013-07-31 18:42:15 -04:00
Nicholas Hastings a36c266e7d Split TF2, DoD:S, HL2:DM, and ND to separate binaries (bug 5813, r=asherkin). 2013-07-21 11:53:56 -04:00
Nicholas Hastings 636c100b6b Updated for latest hl2sdk-dota changes.
--HG--
extra : amend_source : 503e712bb88b2da051c9ea3d6d51b7294ba83230
2013-07-29 10:03:18 -04:00
Dr!fter 28f85aae7f Update WeaponIDToAlias Sig for CS:GO 2013-07-26 14:42:03 -04:00
Kyle Sanderson dfa11f64ef Fixed handle misuse in clientprefs plugin (bug 5805, r=psychonic).
--HG--
extra : amend_source : a63c384e65feb0238bfc4e8ab618bc637a015962
2013-07-20 15:17:43 -04:00
Nicholas Hastings 3f92d2f300 Synced gdc-psyfork symbols.txt with live version (NPOTB).
--HG--
extra : amend_source : 5d889731940a87f676145713d79ae563a176b0fb
2013-07-18 21:07:14 -04:00
Dr!fter cc0bf88a5f Fix gdc-psyfork when checking linux offset (NPOTB) 2013-07-18 21:04:03 -04:00
Kyle Sanderson b3c0b964b5 Added many missing handle security checks (bug 5595, r=psychonic).
--HG--
extra : rebase_source : cc5bf3057bbce89fc14bff9c673821c3146c588b
2013-07-18 20:34:43 -04:00
Dr!fter 4661e5a10b Add signature offset byte check support for gdc-psyfork (NPOTB). 2013-07-18 20:34:11 -04:00
Kyle Sanderson 220a35b492 Make compile.sh set working dir to own dir (bug 5710, r=psychonic). 2013-07-18 19:40:42 -04:00
Asher Baker 351142f93f Fixed inaccurate compiler error when ternary operator is involved (bug 5711, r=dvander). 2013-07-18 17:59:24 -04:00
Kyle Sanderson 29bc273e58 Removed -Wno-parentheses from posix build and fixed warnings (bug 5745, r=psychonic). 2013-07-18 15:50:57 -04:00
Kyle Sanderson b96e0c8713 Fixed accidental assignment in each of SDKTools and sp compiler (bug 5745, r=psychonic). 2013-07-18 15:50:50 -04:00
systematicmania 7e0c0d79bc Fixed clients not being marked as in kick queue in some cases (bug 5746, r=psychonic). 2013-07-18 11:38:04 -04:00
Kyle Sanderson 1f88f1f3f6 Throw error instead of crash when calling SetTeamScore between maps (bug 5718, r=psychonic). 2013-07-18 11:38:04 -04:00
Peace-Maker 69d8b1c30d Added SQL_SetCharset native to (re)set charset even after reconnect (bug 5786, r=psychonic). 2013-07-18 10:27:12 -04:00
Peace-Maker 5a5d8d2d07 Fixed typo in too-many-params native error message (r=psychonic). 2013-07-17 08:05:42 -04:00
Nicholas Hastings 0e25540a89 Updated DoD:S gamedata. 2013-07-16 20:45:02 -04:00
Nicholas Hastings 21169f4e9a Updated for latest hl2sdk-dota changes. 2013-07-13 13:58:47 -04:00
Nicholas Hastings 1fbed9f7d0 Don't load nextmap on Dota 2. 2013-07-13 13:58:47 -04:00
Nicholas Hastings c230cf5aab Updated for latest hl2sdk-dota changes. 2013-07-12 02:31:41 -04:00
Dr!fter 2d65ed352e Fix SDKHooks gamedata for Half-Life 2 and DOD:S 2013-07-10 20:46:00 -04:00
Dr!fter 5fa81d4273 Update TF2 Reload Offset 2013-07-10 20:33:21 -04:00
Dr!fter 5ec32bdd2f Update GroundEndChanged for CS:S and CS:GO 2013-07-10 19:56:51 -04:00
Dr!fter d39aa10da1 Update TF2 ForceRespawn offset 2013-07-10 19:14:10 -04:00
Dr!fter 0d763052fb Update TF2 Gamedata 2013-07-10 18:53:12 -04:00
Nicholas Hastings ee62e33dd0 Updated L4D2 IServer gamedata for Windows. 2013-07-08 16:10:55 -04:00
Nicholas Hastings a22de48e40 Fix tier0/vstdlib lookup in core for recent L4D2 changes. 2013-07-06 11:54:37 -04:00
Nicholas Hastings 7b5708a8b4 Define POSIX when compiling for any build on linux/mac. 2013-07-06 11:53:58 -04:00
Nicholas Hastings 71c1767790 Updated L4D2 gamedata. 2013-07-05 14:29:12 -04:00
Nicholas Hastings 5fb0115d06 Triggering build for L4D2 sdk update. 2013-07-04 16:45:00 -04:00
Nicholas Hastings c8e6128720 Fixed build for real. 2013-07-04 11:28:32 -04:00
Nicholas Hastings 55583540a8 Fix posix builds. 2013-07-03 23:27:04 -04:00
Ryan Stecker 9b5d0228be Fixed ReadMapList not seeing maps in all valveFS paths (bug 5715, r=asherkin). 2013-07-03 23:14:55 -04:00
Nicholas Hastings 325d05b59c Triggering build for bug 5613. 2013-06-30 22:04:04 -04:00
Nicholas Hastings d1500dc99b Updated ambuild script for new l4d2 library names. 2013-06-30 10:45:19 -04:00
Matheus Valadares 157c8d5e54 Fixed error log filename date sometimes being incorrect (bug 5761, r=fyren). 2013-06-22 12:21:36 -04:00
Nicholas Hastings 0533b5cefc Fixed Dota build. 2013-06-18 12:16:48 -04:00
Ryan Stecker 7816085868 Updated TF2 CalcCriticalMelee Windows byte signature. 2013-06-13 21:37:05 -04:00
Matheus28 178a5f0645 Updated Dota 2 gamerules gamedata. 2013-06-04 21:37:48 -04:00
Scott Ehlert dfb8527e50 Triggering build to test buildbot. 2013-05-26 01:06:10 -05:00
Asher Baker 0a581154d1 Force rebuild. 2013-05-17 21:46:43 +01:00
Asher Baker efabf18162 Fixed copy-paste error in 116256b519b5. 2013-05-16 14:58:14 +01:00
Asher Baker 56737ac523 File upload support for webternet (r=psychonic). 2013-05-16 14:49:03 +01:00
Nicholas Hastings 702885ebb2 Fixed SDKTools dota build. 2013-05-14 11:27:06 -04:00
Nicholas Hastings a12b83de59 Typo fix. 2013-05-14 10:24:47 -04:00
Nicholas Hastings 3b83356825 Updated for latest hl2sdk-dota changes.
--HG--
extra : rebase_source : 0365a2c057523822481dee0880f8a5d525a8050a
2013-05-14 10:19:29 -04:00
Dr!fter c2aad7a71d Update Remove Disguise sig 2013-05-13 19:07:28 -04:00
Nicholas Hastings ef4edc6ff1 One more dota build fix. 2013-05-13 15:33:55 -04:00
Nicholas Hastings 614967ccc1 Updated for latest hl2sdk-dota changes. 2013-05-13 15:18:12 -04:00
Nicholas Hastings e8dc1480eb Don't omit frame pointer on msvc builds. 2013-05-13 14:19:17 -04:00
Nicholas Hastings 8fb87df0f0 Updated for hl2sdk-dota changes. 2013-05-08 09:21:40 -04:00
Kyle Sanderson bb7cfd2493 Fixed dereferencing potential null pointer in CPlugin::GetProperty (bug 5725, r=dvander). 2013-05-06 12:12:00 -04:00
Nicholas Hastings 1b19622ab8 Fixed CS:S CommitSuicide offset.
--HG--
extra : rebase_source : fc01c099f2af0de819a327262e6e8ffe6f79c658
2013-05-03 15:29:20 -04:00
Asher Baker 68ab7e2e3e Fixed unaligned memory access in spcomp (r=dvander). 2013-05-02 20:47:35 +00:00
Nicholas Hastings 157a286d1b Backed out changeset: f2f13520e8a1. 2013-05-02 15:31:01 -04:00
Nicholas Hastings 0eb199a9a8 Backed out changeset: 2c69e71dc4df. 2013-05-02 15:30:38 -04:00
Nicholas Hastings 77a928cef9 Backed out changeset: cf4356fd3524. 2013-05-02 15:30:16 -04:00
Nicholas Hastings 290388159a Backed out changeset: 7d07b4f23cd0. 2013-04-30 15:38:15 -04:00
Nicholas Hastings d0551a3ede Updated TF2 gamedata. 2013-04-29 21:20:11 -04:00
Nicholas Hastings 1e0d0429d0 Synced gdc-psyfork (NPOTB). 2013-04-29 20:51:54 -04:00
Nicholas Hastings 37ad913086 Triggering build. 2013-04-25 11:41:49 -04:00
Nicholas Hastings 3755ad7515 Triggering build. 2013-04-23 11:44:52 -04:00
Nicholas Hastings 369e141ea8 Build fixes for recent hl2sdk-dota updates. 2013-04-23 07:11:49 -04:00
Nicholas Hastings 39c9e69d8a Remove deprecated PbReadRepeated natives. 2013-04-23 07:11:49 -04:00
Nicholas Hastings 30be1ea16e Updated CS:S gamedata. 2013-04-16 12:19:45 -04:00
Nicholas Hastings a450361956 Added support for getting/setting protobuf enum values with Pb*Int natives (nobug, r=asherkin). 2013-04-16 11:33:36 -04:00
Nicholas Hastings df48ad6b61 Fixed build. 2013-04-15 07:22:23 -04:00
Nicholas Hastings 264de34c31 Merge. 2013-04-15 07:13:23 -04:00
Nicholas Hastings 70444b46b9 Fixed regression in cset 68d82718dc99 causing missing protobuf natives (bug 5712). 2013-04-15 07:12:52 -04:00
Brian Simon a79e552ab4 Added more alternative names for TFClass_Heavy (bug 5338, r=asherkin). 2013-04-11 03:07:50 +01:00
Kyle Sanderson 1b5faef097 Remove debug printout from PerformGravity (bug 5679, r=asherkin). 2013-04-11 03:03:29 +01:00
Asher Baker fe61f583e6 Only split DWARF data out for non-explicit-debug builds (bug 5683, r=dvander). 2013-04-11 00:34:52 +01:00
Asher Baker 4031ad354b Fixed JIT conflicts with SELinux (bug 5581, r=dvander). 2013-04-11 00:33:12 +01:00
Nicholas Hastings 46b9ae4174 Merge. 2013-04-08 08:00:50 -04:00
Nicholas Hastings c0d1aaa8a0 Allow localizaton of more base plugin strings (bug 5120, r=asherkin). 2013-04-08 08:00:13 -04:00
Nicholas Hastings a963427967 Allow localization of name-reserved kick message (bug 5146, r=asherkin). 2013-04-08 08:00:13 -04:00
Asher Baker d5ec523584 Support emscripten for compiling spcomp (r=dvander). 2013-04-05 07:03:43 +01:00
Nicholas Hastings c0c3fceaad Updated HL2DM gamedata. 2013-04-03 12:26:08 -04:00
Nicholas Hastings c52d7c9126 Fixed AllPluginsLoaded activities happening before SM is loaded (r=dvander`hom). 2013-04-03 12:25:54 -04:00
David Anderson 6cb67a19e7 Checkin missing chunks from bug 5680 (ref bug 5691). 2013-03-31 22:03:57 -07:00
David Anderson 9b5ca124ab Don't allocate/delete across static CRTs (no bug, irc r=fyren+psychonic). 2013-03-31 13:30:22 -07:00
David Anderson 4a0a509dd8 Fix typo in ExtensionSys::LoadAutoExtension (no bug, r=me). 2013-03-31 09:50:46 -07:00
David Anderson 6f2184901d Fix Mac build. 2013-03-29 13:10:51 -07:00
David Anderson 201e5e59da Fix build, again.
--HG--
extra : rebase_source : 8b1fb4f11f51c6b3bc63eb2e3e20467619d93a9a
2013-03-29 13:06:12 -07:00
Nicholas Hastings 2cb5778cfa Merge. 2013-03-29 15:45:55 -04:00
Nicholas Hastings 006016322b Updated DoD:S gamedata. 2013-03-29 15:45:16 -04:00
David Anderson 4191856034 Fix protobuf builds. 2013-03-29 12:35:56 -07:00
David Anderson 97f7b4f59f Fix build. 2013-03-29 12:19:41 -07:00
David Anderson ea441b3d70 Fix build. 2013-03-29 11:47:40 -07:00
David Anderson 045ee262a8 Move scared guts of core into logic (bug 5680, r=fyren).
--HG--
rename : core/ExtensionSys.cpp => core/logic/ExtensionSys.cpp
rename : core/ExtensionSys.h => core/logic/ExtensionSys.h
rename : core/HandleSys.cpp => core/logic/HandleSys.cpp
rename : core/HandleSys.h => core/logic/HandleSys.h
rename : core/NativeInvoker.cpp => core/logic/NativeInvoker.cpp
rename : core/NativeInvoker.h => core/logic/NativeInvoker.h
rename : core/NativeOwner.cpp => core/logic/NativeOwner.cpp
rename : core/NativeOwner.h => core/logic/NativeOwner.h
rename : core/PluginSys.cpp => core/logic/PluginSys.cpp
rename : core/PluginSys.h => core/logic/PluginSys.h
rename : core/ShareSys.cpp => core/logic/ShareSys.cpp
rename : core/ShareSys.h => core/logic/ShareSys.h
rename : core/smn_fakenatives.cpp => core/logic/smn_fakenatives.cpp
rename : core/logic/AutoHandleRooter.h => public/AutoHandleRooter.h
2013-03-29 11:37:29 -07:00
Nicholas Hastings 502c6f0dae Triggering build. 2013-03-29 12:28:02 -04:00
Nicholas Hastings bc31dfbbd1 Triggering build. 2013-03-29 11:58:47 -04:00
Nicholas Hastings a1319f4231 Triggering build. 2013-03-29 11:06:55 -04:00
Nicholas Hastings ce365abab6 Added Dota 2 gamedata for SDKHooks. 2013-03-22 23:07:17 -04:00
Nicholas Hastings 48a623f062 Merge. 2013-03-22 14:31:30 -04:00
Nicholas Hastings a727dfb3b0 Updated Dota 2 gamedata. 2013-03-22 14:30:29 -04:00
Drifter 52ba76fcb2 Update gamedata for CS:GO update 2013-03-21 20:00:29 -04:00
Nicholas Hastings 70e29d4f20 Fixed IsMapValid passing blank string to engine's IsMapValid which crashes some games. 2013-03-21 01:22:08 -04:00
Nicholas Hastings 08d83eb8da Backed out changeset: 40e1814dd3d6 (bug 5484). 2013-03-19 22:08:19 -04:00
Nicholas Hastings eacff1f0b4 Another build fix. 2013-03-19 12:15:24 -04:00
Nicholas Hastings 4806d71ca2 Fixed build. 2013-03-19 11:46:02 -04:00
Nicholas Hastings 085b87dd02 Triggering build. 2013-03-19 11:36:04 -04:00
Peace-Maker 35cd7eb2be Add alternative lookup method for EntityFactoryDictionary (bug 5658, r=asherkin). 2013-03-19 11:25:04 -04:00
Nicholas Hastings ec716f0c58 Cache m_iEFlags offset for datamaps dump instead of getting for each ent (bug 5657, r=asherkin). 2013-03-19 11:24:01 -04:00
Nicholas Hastings 0d97198f88 Initial commit of Dota 2 gamedata (bug 5656, r=asherkin). 2013-03-19 11:22:52 -04:00
Nicholas Hastings 2c7537b4cd Dota 2 support in Ambuild scripts (bug 5656, r=asherkin). 2013-03-19 11:22:31 -04:00
Nicholas Hastings e364937353 Updated protobuf and usermessage support for Dota 2 (bug 5656, r=asherkin). 2013-03-19 11:19:38 -04:00
Nicholas Hastings 877ef76540 Tweaked Dota 2 support to account for lack of IPluginHelpers (bug 5656, r=asherkin). 2013-03-19 11:19:19 -04:00
Nicholas Hastings 519e8c5fcd Added basic support for Dota 2 (bug 5656, r=asherkin). 2013-03-19 11:18:44 -04:00
Peace-Maker 305d53f094 Fixed possible rte in basetriggers for !ingame clients (bug 5191, r=psychonic). 2013-03-18 20:11:50 -04:00
Michael McKoy 5625ad76b9 Fixed mapchooser interaction with CS:GO winlimits (bug 5484, r=psychonic). 2013-03-18 20:10:31 -04:00
Kyle Sanderson 4c722bf623 Fixed check against uninitialized string in extension loader (bug 5546, r=psychonic). 2013-03-18 20:03:17 -04:00
Peace-Maker 8fe22c33bf Fixed double print when sending psay to self (bug 5649, r=psychonic). 2013-03-18 19:58:18 -04:00
GoD-Tony d866c061a3 Added logged error when PlayerRunCommand offset lookup fails (bug 5535, r=psychonic). 2013-03-18 19:53:30 -04:00
Nicholas Hastings f8fed31918 Changed MM:S inclusion in sqlite vcproj to use MMSOURCE19 env var (NPOTB) (bug 5468). 2013-03-18 19:06:48 -04:00
Nicholas Hastings e487007960 Fixed errors with SendConVarValue on CS:GO (bug 5638, r=asherkin). 2013-03-18 11:47:55 -04:00
Nicholas Hastings b46f2d1527 Triggering build. 2013-03-18 10:39:22 -04:00
Nicholas Hastings e162fb0e80 Triggering build. 2013-03-18 09:06:28 -04:00
Asher Baker 91ea3ba090 Force build. 2013-03-18 01:37:59 +00:00
Asher Baker e84f6e4afd Backed out updated libcurl. 2013-03-18 00:55:59 +00:00
Asher Baker 9b65900df0 Fix libcurl compile error. 2013-03-18 00:14:55 +00:00
Kyle Sanderson 9659340d7f Force rebuild of libcurl. 2013-03-17 23:56:15 +00:00
Asher Baker 63175aa3cb Updated cURL version. 2013-03-17 22:23:20 +00:00
Kyle Sanderson 986aa2a477 Fix a number of issues with cloned handles (bug 5240, r=asherkin). 2013-03-17 22:05:33 +00:00
Kyle Sanderson 07d7a8eeff Check for cloned handles when dumping (bug 5245, r=asherkin). 2013-03-17 21:58:56 +00:00
Asher Baker 3c9e84d380 Whoops. Snakes. 2013-03-17 21:07:28 +00:00
Asher Baker 0f62a8ec2f Generate debugging information during compilation (bug 5227, r=ds). 2013-03-17 21:00:28 +00:00
Nicholas Hastings 4e7a9cf30b Updated regex.inc with more flags and error codes (bug 5593). 2013-03-17 11:39:04 -04:00
Nicholas Hastings 5077703400 Moved PCRE_STATIC def in Regex ext to extension instead of modifying pcre header (bug 5593). 2013-03-17 11:39:04 -04:00
Nicholas Hastings 77fef18590 Recompiled Regex extension libpcre against v8.32, enabling utf8, unicode props, and jit (bug 5593). 2013-03-17 11:39:04 -04:00
Nicholas Hastings 6ce00034a2 Updated PCRE source to version 8.32 (bug 5593). 2013-03-17 11:32:03 -04:00
Nicholas Hastings ed6d8521e6 Added msvc10 proj file for Regex extension and hooked up to meta sln (NPOTB). 2013-03-17 11:29:55 -04:00
Kyle Sanderson d24c751eef Fixed crash regression in cset 90159516acd3 when player auth is invalid (bug 5538, r=asherkin). 2013-03-17 09:49:31 -04:00
Scott Ehlert 54012523bc Added --no-mysql option to configure script to make MySQL optional (bug 5661, r=dvander). 2013-03-17 02:40:04 -05:00
Nicholas Hastings 5286f43133 Fixed Windows build. 2013-03-17 00:26:53 -04:00
Peace-Maker ca1e9a2976 Increased map name buffer sizes in mapchooser (bug 5609, r=psychonic). 2013-03-16 23:17:22 -04:00
Kyle Sanderson 5951cbf7b9 Added GetSteamAccountID function to IPlayerHelpers and native for sp (bug 5548, r=asherkin). 2013-03-16 23:12:40 -04:00
Kyle Sanderson e2b519a21e Fixed build error in mms_sample_ext from cset d17aed3d46bf (r=psychonic). 2013-03-16 23:02:36 -04:00
Nicholas Hastings cf0401fea7 Add DPT_Int64 type to netprop dumps (bug 5655, r=asherkin). 2013-03-16 22:57:57 -04:00
Nicholas Hastings 14a8f4a728 Get GetEntityClassname m_iClassname offset from worldspawn (bug 5654, r=asherkin). 2013-03-16 22:57:33 -04:00
Scott Ehlert 3e41d9b794 Made BreakpadSymbols script compatbile with Python 2.6 and above (bug 5660, r=asherkin). 2013-03-16 22:55:59 -04:00
Nicholas Hastings 148867bf47 Fixed build. 2013-03-16 22:50:51 -04:00
Kyle Sanderson ef6c454137 Replace usages of deprecated Sourcehook Add/Remove macros (bug 5631, r=dvander). 2013-03-16 22:15:25 -04:00
FlaminSarge 093f8cb89b Exposed third parameter of TF2's AddCond in TF2_AddCondition (bug 5641, r=psychonic). 2013-03-16 18:05:22 -04:00
Nicholas Hastings 707e820af6 Fixed some engine builds failing. 2013-03-16 14:11:56 -04:00
Nicholas Hastings 0c7696da65 Add GetPlayerResourceEntity to SDKTools; deprecate old, broken TF2-specific impl (bug 5491, r=asherkin). 2013-03-16 13:50:36 -04:00
Nicholas Hastings 9e540eb1c4 Move UserMessages::m_pBase to only engines without protobuf msgs (r=asherkin). 2013-03-16 13:42:11 -04:00
Nicholas Hastings 306828480f Added repeated field handing to PbSet* natives (bug 5633, r=asherkin). 2013-03-16 13:31:56 -04:00
Nicholas Hastings 42b415952b Added repeated field handling to PbRead* natives. Deprecate PbReadRepeated* (bug 5633, r=asherkin). 2013-03-16 13:31:35 -04:00
FlaminSarge e155e258cb Updated TF2 TFCond defines (bug 5642, r=psychonic). 2013-03-16 13:30:00 -04:00
Kyle Sanderson 6f45794574 Fixed mismatched delete [] on thunks in JIT CompData dtor (bug 5639, r=dvander). 2013-03-16 13:08:35 -04:00
Scott Ehlert 1d30f00806 Added --sdks option to configure script to specify which SDKs to build againt (bug 5630, r=dvander).
Valid arguments are "all", "present", or a comma delimited list of engine names.

The "all" option will try to build against all supported SDKs. (This is the default.)
The "present" option will only attempt to build against SDKs that exist on the system.

Examples:

configure.py --sdks=css,csgo,ep2v
configure.py --sdks=l4d
configure.py -s present
2013-03-13 20:26:08 -05:00
Asher Baker 52e9ec10bf Fixed issues with COMMAND_FILTER_NO_BOTS and @bots multi-target. (r=fennec) 2013-03-10 03:20:31 +00:00
Asher Baker 8da56ff98c Allow access to unvalidated authstrings (bug 5587, r=psychonic). 2013-03-07 00:58:17 +00:00
Nicholas Hastings d44e334524 Fixed SDKHooks GetMaxHealth callback being passed incorrect parameters. 2013-03-02 13:42:07 -05:00
Asher Baker e814e65fcb Error on access to nested datamap props (bug 5446, r=psychonic). 2012-09-03 20:26:39 +01:00
Kyle Sanderson c2f7d600aa Change extension unload order to avoid exposing finalisation window (bug 5556, r=asherkin). 2013-02-28 22:04:28 +00:00
Kyle Sanderson 5d942265f9 Overhaul of ClientPrefs extension (bug 5538, r=asherkin). 2013-02-28 21:51:49 +00:00
Scott Ehlert 6b07625192 Added L4D and L4D2 gamedata for SDK Hooks on Mac OS X. 2013-02-25 20:44:16 -06:00
Scott Ehlert 19b56361b9 Triggerin' a build. 2013-02-25 17:02:00 -06:00
Kyle Sanderson 7d93eba321 Removed call to getchar() in debug build of compiler (bug 5626, r=ds). 2013-02-25 16:30:19 -06:00
Nicholas Hastings 7b42aba5ea Fixed startup crash regression (bug 5607, r=dvander). 2013-02-18 20:13:08 -05:00
GoD-Tony be4ac7ca61 Rolled version to 1.6.0 for manual builds (r=psychonic). 2013-02-17 22:13:51 -05:00
GoD-Tony 28e25ea718 Added missing rootconsole extern to sample extension (bug 5402, r=psychonic). 2013-02-17 21:47:19 -05:00
Nicholas Hastings b2e6e6155f Updated core and logic msvc10 project files (NPOTB). 2013-02-16 22:21:41 -05:00
David Anderson f5e1ff3f1f Fix more build bustage. 2013-02-16 17:28:17 -08:00
David Anderson 3fda82b5f8 Fix build bustage. 2013-02-16 17:01:53 -08:00
David Anderson 822a4896da Fix build bustage. 2013-02-16 16:50:47 -08:00
David Anderson 7f2bf03d7e Trigger an build. 2013-02-16 16:45:54 -08:00
David Anderson 1e8a6e878d Move DebugReporter from core to logic (bug 5607, r=psychonic).
--HG--
rename : core/DebugReporter.cpp => core/logic/DebugReporter.cpp
rename : core/DebugReporter.h => core/logic/DebugReporter.h
2013-02-16 15:57:00 -08:00
David Anderson 5f0a55057e Move filesystem natives from Core to Logic (bug 5606, r=psychonic).
--HG--
rename : core/smn_filesystem.cpp => core/logic/smn_filesystem.cpp
2013-02-16 15:52:11 -08:00
David Anderson 7814acb9f8 Remove plugin_settings.cfg and supporting code (bug 5605, r=psychonic).
--HG--
extra : rebase_source : 66d0ba0ddb5c649e7f72d96bdf3629e563522ae9
2013-02-16 15:15:22 -08:00
Nicholas Hastings b296af6fe4 Added support for "fuzzy" map names in L4D and later (bug 5599, r=asherkin). 2013-02-14 19:28:12 -05:00
Nicholas Hastings 14b9902f6d Updated CS:GO gamedata. 2013-02-13 22:25:15 -05:00
Kyle Sanderson f2d54b7728 Fixed SM ambuild config failure at TF2 ext if ep2v sdk is missing (bug 5608, r=psychonic). 2013-02-12 12:26:10 -05:00
Nicholas Hastings 8950a693db More, hopefully final CS:GO/protobuf usermessage fixups (bug 5588). 2013-02-11 15:11:04 -05:00
Ruben Gonzalez fd3b9095ba Fix CS_WeaponIDToAlias param missing CSWeaponID tag (bug 5460) 2013-02-11 11:17:31 -05:00
Nicholas Hastings 030e1b9130 Added missing smn_protobuf.cpp to core msvc10 project (NPOTB). 2013-02-11 09:39:23 -05:00
Nicholas Hastings a040c237bc Removed intentional invalid steamid crash in SDK Hooks. 2013-02-11 09:39:23 -05:00
Nicholas Hastings a62fafd4ed Fixed typo in Fortress Forever gamedat.a 2013-02-11 09:39:23 -05:00
David Anderson 666703e8cf Trigger build. 2013-02-10 21:43:07 -08:00
David Anderson 52cd52ca54 Bump version to 1.6.0. 2013-02-10 21:10:25 -08:00
Nicholas Hastings ef825d8a94 Fixed non-CS:GO builds. 2013-02-10 23:11:04 -05:00
Nicholas Hastings 6775898712 Serialize and deserialize usermessages from the server on CS:GO to avoid issues on linux (bug 5588). 2013-02-10 23:06:26 -05:00
Nicholas Hastings d3dd82f190 Updated core msvc10 project file for CS:GO w/ protobuf (NPOTB). 2013-02-10 09:44:33 -05:00
Nicholas Hastings 95409f7ec7 Updated gdc-psyfork symbols.txt with support for ep1 (NPOTB). 2013-02-09 14:21:50 -05:00
Nicholas Hastings 1141a73945 Updated Fortress Forever gamedata. 2013-02-09 14:19:43 -05:00
Peace-Maker 176c003658 Fixed SDKHooks missing version info. 2013-02-09 11:37:51 -05:00
Nicholas Hastings 74aafaa72f Fixed SDKHooks looking for IServerTools on < Orangebox, causing load failure (bug 5603). 2013-02-08 22:46:49 -05:00
Nicholas Hastings 0ac7867b3d Updated SDKHooks msvc10 project files and added to SM solution (NPOTB). 2013-02-08 22:26:51 -05:00
Nicholas Hastings c1b65f52be Minor typo fix in SDKHooks version.rc. 2013-02-08 07:57:16 -05:00
Nicholas Hastings 1d242ee161 Triggering build. 2013-02-08 00:08:51 -05:00
Nicholas Hastings 230e4e3a32 Build fix. 2013-02-08 00:00:09 -05:00
Nicholas Hastings 7ff4724e28 Typo fix in SDKHooks AMBuildScript. 2013-02-07 23:46:48 -05:00
Nicholas Hastings 0015d00243 Initial commit of latest functional SDKHooks extension. 2013-02-07 23:43:33 -05:00
Nicholas Hastings 5ca8967375 Updated CS:GO gamedata. 2013-02-07 13:50:22 -05:00
Nicholas Hastings 4e0c1f97ac Updated more CS:S gamedata. 2013-02-06 17:41:17 -05:00
Nicholas Hastings 191c3dabdb Updated CS:S gamedata. 2013-02-05 17:20:00 -05:00
Peace-Maker cd9a28864a Updated for CS:S sync (r=asherkin). 2013-02-05 21:45:11 +00:00
Nicholas Hastings c2ecb7363c Fixed VARINT & UNSIGNED flags being read from dt instead of member in SendProp arrays (bug 5591, r=prodigysim). 2013-02-04 07:38:30 -05:00
Alexandr e20e272ee1 Fixed basecomm forwards firing with incorrect client parameter value (bug 5583, r=psychonic). 2013-01-28 18:30:44 -05:00
Michael Busby 8dc7f78b0f Fix GameRules_SetPropVector writing data to unexpected addresses instead of to the proxy entity (bug 5592, r=psychonic). 2013-01-27 14:59:14 -08:00
Nicholas Hastings c4331c4795 Fixed pb non-intercept hook callbacks being passed handle with NULL pb msg (bug 5579, bug 5590). 2013-01-27 12:29:16 -05:00
Nicholas Hastings d071ecc17c Removed accidental resetting of pb msg and memory leak in hooked pb messages (bug 5579, bug 5588). 2013-01-26 21:10:25 -05:00
Nicholas Hastings 7c03276b50 Replaced remaining calls to old MM:S usermessages functions when using protobuf system (bug 5579, bug 5588). 2013-01-26 12:14:40 -05:00
Nicholas Hastings ee8b180341 Marked some missed Pb natives as optional (bug 5579). 2013-01-23 18:28:06 -05:00
Nicholas Hastings 5258a1dc85 Updated CS:GO Cstrike extension gamedata. 2013-01-23 14:46:23 -05:00
Nicholas Hastings e74d5593a8 Updated CS:GO HandleCommand_Buy_Internal detour with new bool param. 2013-01-23 14:46:12 -05:00
Nicholas Hastings 18285ca751 Fixed potential for reading out of library bounds in MemoryUtils;:FindPattern (r=asherkin). 2013-01-23 14:05:35 -05:00
Peace-Maker 764a04a201 Fixed Sort_Random not including first value in array sorting functions (bug 4292, r=psychonic). 2013-01-23 12:51:19 -05:00
Nicholas Hastings 1e5a375203 Fixed native error when using PbReadRepeated* natives for index 0 (bug 5579). 2013-01-23 11:14:51 -05:00
Nicholas Hastings 3a2504dc18 Triggering build against new mac libprotobuf. 2013-01-22 23:40:45 -05:00
Nicholas Hastings 7bc4c10660 Triggering build against new mac libprotobuf. 2013-01-22 23:18:27 -05:00
Asher Baker 0fcfead475 Fixed missing libprotobuf linking to core on linux, mac. 2013-01-22 22:47:35 -05:00
Nicholas Hastings ab9c1217e4 Fixed numerous instances of same "cannot pass objects of non-POD type" error in smn_protobuf.cpp. 2013-01-22 22:36:38 -05:00
Nicholas Hastings e9f002e9c5 Fixed typo in core causing CS:GO build break. 2013-01-22 22:23:40 -05:00
Nicholas Hastings a9b6bcf779 CS:GO core build fix for warnings in protobuf headers. 2013-01-22 22:17:24 -05:00
Nicholas Hastings 52e427117c Triggering build against hl2sdk-csgo with merged protobuf. 2013-01-22 22:02:18 -05:00
Nicholas Hastings 312e26a5cf Added initial support for protobuf usermessages on CS:GO (bug 5579, r=asherkin). 2013-01-22 21:43:12 -05:00
Nicholas Hastings f757d5f09b Updated gdc-psyfork with current (NPOTB).
- Added support for custom symbols.txt path (-s <path>).
- Added support for dlsym symbol lookup in linux bins (-n).
- Updated gdc_core.sh example script to account for new options above.
- Updated symbols.txt.
2013-01-07 09:09:14 -05:00
Nicholas Hastings a66adcbc88 Fixed gamedata offsets for CSPromod, GESource, and Synergy. 2013-01-06 09:35:22 -05:00
Nicholas Hastings f4f930e8bd Merge. 2012-12-31 18:17:11 -05:00
Nicholas Hastings 5200940f2f Updated gamedata offsets for CSPromod, GESource, and Synergy. 2012-12-31 18:15:25 -05:00
Asher Baker 63f8262a57 Updated plugin blacklist. 2012-12-28 11:58:31 +00:00
Nicholas Hastings bb9d5e11f1 Backed out changeset: 8048e61b5382. 2012-12-27 16:39:04 -05:00
Nicholas Hastings df76b7285c Backed out changeset: c283854680ad. 2012-12-27 16:38:49 -05:00
Nicholas Hastings e105711678 Backed out changeset: 951598961ea8. 2012-12-27 16:38:34 -05:00
Nicholas Hastings b206858c67 Triggering build. 2012-12-26 18:05:22 -05:00
Nicholas Hastings bc1b803093 Backed out changeset: b65f88522631. 2012-12-26 17:57:03 -05:00
Nicholas Hastings 6e54e0f6e4 Backed out changeset: 9d722aa39e4c. 2012-12-26 17:56:43 -05:00
Nicholas Hastings e0d2287973 Let's try that again... 2012-12-26 13:56:57 -05:00
Nicholas Hastings 7f26803dee Ifdefing out usermessaging on CS:GO to fix builds. 2012-12-26 13:34:32 -05:00
Nicholas Hastings 22cbe23f85 Merge. 2012-12-26 12:28:43 -05:00
Nicholas Hastings 8f0c442024 Fixed TF2_RemoveCondition being called for added conds instead of removed conds. 2012-12-26 12:27:24 -05:00
Nicholas Hastings 02b8e3f7c0 Fixed typo in TF2 ext asm.c causing accidental assignment instead of compare. 2012-12-26 12:19:15 -05:00
Nicholas Hastings 7846ff1666 Updated Makefile for TF2 extension (NPOTB). 2012-12-26 12:19:15 -05:00
Asher Baker 3e1e20dbe2 Fixed PackageScript to not try and include extra extensions. 2012-12-25 21:44:58 +00:00
Nicholas Hastings eaf441c226 Add -Wno-array-bounds for TF2 extension to avoid GCC bugged warning (msvc and Clang fine). 2012-12-23 22:06:52 -05:00
Nicholas Hastings 942b1d2591 Triggering build. 2012-12-23 17:22:19 -05:00
Nicholas Hastings 710456f871 Added new IN_ATTACK3 button define to entity_prop_stocks (bug 5564). 2012-12-23 17:06:14 -05:00
Nicholas Hastings 59df217a09 Updated SQLite to version 3.7.15.1 (bug 5235). 2012-12-23 17:06:11 -05:00
Nicholas Hastings ffd7603b17 Added support in TF2 ext for detection of player conds >= 64 (bug 5565, r=asherkin). 2012-12-23 16:59:50 -05:00
Nicholas Hastings 329616c029 Fixed hang in TF2 extension when player condition 63 is added. 2012-12-21 01:17:30 -05:00
Nicholas Hastings 8723a69a8f Updated more TF2 gamedata. 2012-12-20 18:24:47 -05:00
Nicholas Hastings edddca4857 Updated DOD:S and HL2DM gamedata. 2012-12-20 17:58:43 -05:00
Nicholas Hastings 536123ec59 Updated TF_WEAPON_* and TF_CUSTOM_* defines. 2012-12-19 07:58:21 -05:00
Nicholas Hastings db699ed2c3 Updated TF2_IsPlayerInCondition stock for m_nPlayerCondEx2... 2012-12-19 07:55:03 -05:00
Nicholas Hastings bf9c58b8ed Updated TF2 gamedata. 2012-12-19 07:55:03 -05:00
Nicholas Hastings 8eeec3dc48 Added new param for CTFPlayerShared::AddCond call in TF2 ext. 2012-12-19 07:55:03 -05:00
Nicholas Hastings 4a1dd5f519 Added support for new SPROP_VARINT sendprops. 2012-12-18 17:58:45 -05:00
Nicholas Hastings 5256edf0e5 Ported GetEntProp's unsigned prop support to GameRules_GetProp. 2012-12-18 17:53:45 -05:00
Nicholas Hastings e9385e6eb6 Validate entity in GameRules_GetPropEnt and in CS_DropWeapon safety checks. 2012-12-17 14:34:44 -05:00
Nicholas Hastings 80f7e3092b Fixed regressions in a988c42d4248:
* Fixed crash when prop/data ent is invalid.
* Restored GetEntPropEnt/GetEntDataEnt2 functionality when logical ent support is not available.
2012-12-17 14:33:57 -05:00
Nicholas Hastings ab06cf4788 Validate entity in GetEntPropEnt, GetEntDataEnt2 (r=me). 2012-12-16 19:52:31 -05:00
Powerlord c2300f7b2b Updated TFHoliday enum (bug 5526, r=psychonic). 2012-12-15 14:40:51 -05:00
Nicholas Hastings ba2915ce4e Added natives to CStrike ext to access assists/score in CSGO (bug 5525, r=asherkin). 2012-12-15 14:36:52 -05:00
Ryan Stecker c0b91dd107 Fixed VoteMenuToAll stock adding bots to list (bug 5253, r=asherkin). 2012-12-14 15:18:30 -05:00
Asher Baker 439986e3fe Made thread worker processing limits configurable at runtime (bug 5326, r=psychonic). 2012-12-14 15:16:35 -05:00
Asher Baker e77ad244ad Fixed OnLibraryAdded/Removed not being called in all plugins (bug 5431, r=psychonic). 2012-12-14 15:15:12 -05:00
Kyle Sanderson 2e3c5e367e Added WeaponIDToAlias native to CStrike extension (bug 5460, r=psychonic). 2012-12-14 15:12:22 -05:00
GoD-Tony eb230a45f6 Added PlayerRunCmd gamedata for The Hidden: Source (bug 5534, r=psychonic). 2012-12-14 15:07:47 -05:00
David Anderson 5aacf886e1 Call OnPluginEnd before finalizer hooks have run (bug 4519, r=fyren). 2012-12-14 15:05:18 -05:00
FlaminSarge 0cae86e2ad Added new values to TFCond(ition) enum (bug 5537, r=asherkin). 2012-12-14 15:01:28 -05:00
Nicholas Hastings e7f0a005e2 Updated CSPromod gamedata. 2012-12-10 23:35:57 -05:00
Nicholas Hastings b3c506c69e Updated Reserved Slots to use max humans as max count (bug 5444, r=asherkin). 2012-12-02 15:37:13 -05:00
Nicholas Hastings 99f741fb3b Added GetMaxHumanPlayers native exposing IServerGameClients func (bug 5551, r=asherkin). 2012-12-02 11:03:27 -05:00
Kyle Sanderson 52aa0a5b27 Added a sanity check on handle index in EntityToBCompatRef (bug 5539, r=psychonic). 2012-12-01 13:41:00 -05:00
Nicholas Hastings b7ac61cbea Updated gdc-psyfork with current (NPOTB).
- Added script support for Steam3 content (CS:GO, ND, etc.).
- Removed script steam.inf temp-move hack now that DepotDownloader correctly handles checksums.
- Updated symbols.txt.
- Fixed gdc having issues with gamedata files that contain new or unknown sections ("Addresses").
2012-12-01 13:39:34 -05:00
Nicholas Hastings 2896e7bd4b Added missing and removed non-existant headers in vc10 Core and Logic proj files (NPTOB). 2012-12-01 13:37:08 -05:00
Nicholas Hastings 8a10f4b7a2 Fixed Replay dectection on TF2 and SourceTV detection on ND (bug 5529, r=asherkin). 2012-11-24 09:56:46 -05:00
Drifter 7619d0d7ff AutoExecConfig now logs an error when it cannot create cfg (bug 5465, r=asherkin). 2012-11-24 09:53:44 -05:00
Nicholas Hastings 2175357e72 Updated more L4D2 gamedata. 2012-11-21 08:30:08 -05:00
Nicholas Hastings bd9f126973 Merge 2012-11-20 20:57:36 -05:00
Nicholas Hastings 4260a5b3df Updated L4D2 gamedata. 2012-11-20 20:55:28 -05:00
Asher Baker 247fabaaf0 Added the ability to override RegConsoleCommand-created commands (bug 5199, r=psychonic). 2012-11-15 17:53:11 +00:00
Asher Baker a991d327e6 Improved sendtable dump output (bug 5471, r=psychonic). 2012-11-15 17:50:11 +00:00
Asher Baker c19712dccc Improved console config editing (bug 5470, r=psychonic). 2012-11-15 17:49:13 +00:00
Nicholas Hastings 7d67e851c9 Fixed typo in game.nucleardawn.txt. 2012-11-08 12:56:19 -05:00
Nicholas Hastings 7492ee5d2e Fixed build. 2012-11-03 15:09:10 -04:00
Daniel Varnai 7ea6080689 Fixed SourceTV detection on EP2V, CSS, and CS:GO (bug 5529, r=psychonic). 2012-11-03 14:58:40 -04:00
Nicholas Hastings 272dbf94e0 Updated ZPS gamedata (bug 5536). 2012-11-02 13:39:33 -04:00
Nicholas Hastings d96f7ae4ae Updated Nuclear Dawn gamedata. 2012-10-31 09:58:13 -04:00
Nicholas Hastings 20d4597fa0 Updated tf2 weapon and dmg custom defines. 2012-10-28 19:14:04 -04:00
Nicholas Hastings c5947e2dd7 Triggering build. 2012-10-28 15:56:05 -04:00
Nicholas Hastings 544bd7d4cc Triggering build. 2012-10-27 17:42:43 -04:00
Nicholas Hastings d1c1cb5f7c Makefile updates. 2012-10-27 11:59:27 -04:00
Nicholas Hastings a1165183c2 Updated last piece of gamedata for today's TF2 update. 2012-10-26 22:59:20 -04:00
Nicholas Hastings 07520fb26e Merge. 2012-10-26 22:03:05 -04:00
Nicholas Hastings 46393d63af Updated more ep2v gamedata. 2012-10-26 22:02:46 -04:00
Asher Baker ccc067a1c6 Merge. 2012-10-27 01:09:43 +01:00
Asher Baker 0cd954749c Updated plugin blacklist. 2012-10-27 01:08:25 +01:00
Nicholas Hastings 916f60b59b Updated TF2 extension gamedata. 2012-10-26 20:06:50 -04:00
Nicholas Hastings 115d17de01 Updated core to compile for new ep2v lib names (bug 5524). 2012-10-26 16:28:05 -04:00
Nicholas Hastings 8dfae523a3 Updated ambuilder script for ep2v lib name changes (bug 5524). 2012-10-26 16:27:00 -04:00
Nicholas Hastings 0532135dc3 Updated CS:GO gamedata. 2012-10-26 01:26:45 -04:00
Nicholas Hastings b28c6d6e4a Updated PVKII gamedata. 2012-10-24 13:55:07 -04:00
Nicholas Hastings f703b285bb Updated NMRiH gamedata (bug 5482). 2012-10-14 18:25:59 -04:00
GoD-Tony 749b9dd1bb Added symbol lookup support to gamedata on Windows (bug 5511, r=ds). 2012-10-14 18:10:46 -04:00
Daniel Varnai 42ff151ae4 Added clan tag support for CS:GO in CStrike ext (bug 5429, r=psychonic). 2012-08-13 14:59:31 -04:00
Drifter 5ec6f851c9 Updated CS:GO Cstrike ext gamedata. 2012-10-11 23:16:47 -04:00
Asher Baker 89be7adc80 Updated plugin blacklist. 2012-10-12 02:25:53 +01:00
Drifter 39f9702db4 Updated CS:GO Cstrike ext gamedata. 2012-10-11 20:01:02 -04:00
Nicholas Hastings 021c390091 Merge. 2012-10-02 08:55:04 -04:00
Drifter cec1d4a28b Updated CSGO gamedata for CStrike extension. 2012-10-02 08:54:06 -04:00
Asher Baker 38969dde2f Updated plugin blacklist. 2012-09-22 12:59:14 +01:00
Asher Baker 3061ef9d4c Updated plugin blacklist. 2012-09-21 01:33:43 +01:00
Nicholas Hastings e55b7fa70f Merge. 2012-09-11 18:27:50 -04:00
Drifter 79d04c2d24 Updated CS:S gamedata for CStrike extension. 2012-09-11 18:26:48 -04:00
Nicholas Hastings d11be6fcf4 Updated CS:S SDKTools gamedata. 2012-09-11 18:23:39 -04:00
Asher Baker bed417dc62 Include the auto-version file in the build, so 3rd party plugins compiled aginst the includes get useful versioning info (bug 5453, r=dvander). 2012-09-08 21:02:46 +01:00
Asher Baker 7625ca439e Check the debug stringbase when loading plugins, lest it be null and cause crashes down the line (bug 5478, r=dvander). 2012-09-08 17:31:31 +01:00
Nicholas Hastings 6ff5733d7b Removed old, unsupported msvc8/9 project files for TF2 and CStrike exts (NPOTB). 2012-09-08 12:14:01 -04:00
Nicholas Hastings a3117ef272 Fixed output name in msvc10 files for TF2 and CStrike exts. (NPOTB) (bug 5479). 2012-09-08 12:13:20 -04:00
Nicholas Hastings 2fdbedfe95 Updated TF2 gamedata. 2012-09-06 18:45:13 -04:00
Nicholas Hastings 5567484a8e Updated ep2v gamedata. 2012-09-06 17:41:08 -04:00
Nicholas Hastings d79c5bd1dc Triggering build for hl2sdk-csgo change. 2012-09-04 13:00:12 -04:00
Drifter 34d2db6d78 Added forwards to basecomm plugin (bug 5466, r=asherkin). 2012-09-03 20:45:11 +01:00
Asher Baker eceb9008cd Populated initial plugin blacklist (r=psychonic). 2012-09-03 14:46:05 +01:00
Nicholas Hastings 731245773a Fixed core darkm output name in vcxproj (NPOTB). 2012-09-01 11:10:29 -04:00
Nicholas Hastings d4a80ab3d0 Removed line of last commit that wasn't meant to persist (NPOTB). 2012-09-01 00:11:39 -04:00
Nicholas Hastings ce709298cc Merge. 2012-09-01 00:09:46 -04:00
Nicholas Hastings 6ab7a6678c Fixed sourcemod_mm vcxproj l4d2 build (NPOTB). 2012-09-01 00:09:19 -04:00
Asher Baker f62283b595 Fixed resolution of GetProfilerTime on non-Windows platforms (r=me). 2012-08-29 16:35:08 +01:00
Kyle Sanderson e8058912b8 Fixed crash in EntProp natives (bug 5297, r=psychonic). 2012-08-28 16:20:15 -04:00
Nicholas Hastings 4f800fbd00 Updated SDKCall SetSignature to use same hidden-symbols engine list as core (bug 5440, r=me). 2012-08-27 19:31:38 -04:00
Nicholas Hastings e367d456e1 Updated GMod gamedata (bug 5408). 2012-08-27 18:56:33 -04:00
Nicholas Hastings 3025b9b5e0 Merge. 2012-08-26 23:35:18 -04:00
Kyle Sanderson b0075842d1 Fixed minor memory leaks in cstrike ext (bug 5456, r=psychonic). 2012-08-26 23:33:11 -04:00
Nicholas Hastings 0a10d6022f Added build directory to hgignore (NPOTB). 2012-08-26 23:33:11 -04:00
Anthony Iacono a634da2c0a Fixed OnClientConnect blocking not actually functioning (bug 5461, r=psychonic). 2012-08-26 23:33:04 -04:00
Drifter 94f0fc58cc Fixed TTeamScoreOffset in CS:GO cstrike ext gamedata. 2012-08-26 22:51:14 -04:00
Asher Baker bf76be5dfa Overhauled versioning information (bug 5453, r=dvander). 2012-08-26 01:33:54 +01:00
Scott Ehlert a62aeb36d8 Updated sample extension makefiles for CS:GO on Mac OS X (bug 5459, r=psychonic). 2012-08-25 11:32:33 -05:00
Scott Ehlert 0d795fc651 Added support for CS:GO on Mac OS X (bug 5459, r=psychonic). 2012-08-25 11:28:52 -05:00
Nicholas Hastings 7441af67a8 Really fixed issues for today's TF2 engine update (bug 5450). 2012-08-24 01:36:42 -04:00
Nicholas Hastings 9077686998 Updated gamedata for today's TF2 engine update. 2012-08-24 00:52:44 -04:00
Nicholas Hastings d88f07fd31 Updated SDKTools IServer finding on Windows for Ep2v and CSS (bug 5450, r=me). 2012-08-23 07:47:44 -04:00
Nicholas Hastings 805306bdf0 Triggering build. 2012-08-22 21:50:01 -04:00
Asher Baker da53fdb50c Updated cstrike gamedata. 2012-08-22 23:23:31 +01:00
Asher Baker 549e5a85cb Merge 2012-08-22 18:44:27 +01:00
Asher Baker cd75c56ac4 Updated credits. (r=psychonic) 2012-08-22 18:39:16 +01:00
Powerlord 82883d8187 Updated TFHoliday enum (bug 5436, r=asherkin). 2012-08-21 00:44:44 -04:00
Tony 74f49ec38f Added more parameters to PlayerRunCommand forward (bug 5346, r=asherkin). 2012-08-21 00:42:46 -04:00
Nicholas Hastings cb3411481d Triggering build. 2012-08-21 00:17:48 -04:00
Nicholas Hastings 3aad0dff2e Triggering build. 2012-08-20 23:48:22 -04:00
Nicholas Hastings 0510723ac1 Triggering build. 2012-08-20 23:28:15 -04:00
Nicholas Hastings 294a120f14 Project files changes for CS:S as separate build (bug 5370) (NPOTB). 2012-08-20 21:54:42 -04:00
Nicholas Hastings e6313c89bc Gamedata changes for CS:S as separate build (bug 5370). 2012-08-20 21:54:22 -04:00
Nicholas Hastings 8362b8d226 Split CS:S support off to a separate engine/build (bug 5370, r=asherkin). 2012-08-20 21:53:59 -04:00
Nicholas Hastings 7675472b41 Force build. 2012-08-16 07:40:06 -04:00
Asher Baker c07f84911c Force build. 2012-08-16 02:06:31 +01:00
Asher Baker 6f18a50945 Merge. 2012-08-16 01:42:55 +01:00
Nicholas Hastings d5c9ce9125 Updated HL2DM and DODS gamedata for today's game update. 2012-08-15 23:29:07 +01:00
Nicholas Hastings 3b4ac1c64d Updated tf2 weapon and dmg custom defines, added new round state. 2012-08-15 23:29:05 +01:00
Nicholas Hastings 717b4ce4fa Updated gamedata for latest TF2 update. 2012-08-15 23:29:04 +01:00
Nicholas Hastings 6efc6074cc Updated TF2 ext MakeBleed and Regenerate natives for latest TF2 update. 2012-08-15 23:29:00 +01:00
Nicholas Hastings 76fa100c1d Updated jit vcproj/makefile (NPOTB). 2012-08-15 15:10:55 -04:00
Asher Baker 981171f42a Fixed bugs in IDAPython vtable dump script (NPOTB). 2012-08-15 16:05:16 +01:00
Nicholas Hastings 33ef2ff5c9 Merge. 2012-08-10 21:54:03 -04:00
Nicholas Hastings 380d0b9623 Updated CSGO gamedata. 2012-08-10 21:49:40 -04:00
Asher Baker de27cb8a2f Added system to block malware or illegal plugins (bug 5289, r=dvander). 2012-08-09 01:54:43 +01:00
Asher Baker ac6c162a13 Changed TFWeaponSlot enum description (r=me). 2012-08-07 18:04:10 +01:00
Asher Baker a8021e0d79 Updated IDAPython vtable dump script (NPOTB). 2012-08-07 02:11:07 +01:00
David Anderson b52f696d49 Push build. 2012-08-04 13:53:51 -07:00
David Anderson 983e37a0be Upgrade the Windows python version for debugging. 2012-08-04 13:26:52 -07:00
Zach Kanzler f1e01a3cf6 Increase maximum .sp line length to 4095 characters. (bug 5347, r=dvander) 2012-08-04 13:08:08 -07:00
Nicholas Hastings 858c3f653c Updated sqlite ext vc project file and added to meta SM solution (NPOTB). 2012-08-03 16:12:10 -04:00
Nicholas Hastings 4618588494 Updated SQLite for SQLite extension to version 3.7.13 (bug 5235). 2012-08-03 16:10:28 -04:00
Nicholas Hastings cd3c3fffde Updated defines in tf2_stocks.inc. 2012-08-03 07:56:31 -04:00
Ryan Stecker 148b5ea376 Updated TF2 gamedata. 2012-08-02 20:11:02 -04:00
Nicholas Hastings 6f9c197400 Updated Dino D-Day gamedata (bug 5410). 2012-08-01 22:23:03 -04:00
Asher Baker 67ae85b840 Added some useful IDA scripts (NPOTB). 2012-07-29 02:51:50 +01:00
Nicholas Hastings 0f6e8dd311 Updated ZPS gamedata. 2012-07-26 14:09:34 -04:00
Nicholas Hastings cb86d4d967 Merge. 2012-07-25 08:38:11 -04:00
Nicholas Hastings 80fbc25442 Updated vc projs to use MMSOURCE19, added loader & topmenus, fixed CSGO sdk path in cstrike (NPOTB). 2012-07-25 08:31:01 -04:00
Asher Baker c1f9fb6c3a Fixed plugins being compiled with a version number of 1.4.0-dev (r=psychonic). 2012-07-25 00:17:58 +01:00
Michael Busby a46dcd45d7 Added GetEntityAddress native (bug 5269, r=dvander). 2012-07-22 13:40:37 -04:00
Nicholas Hastings 99ff1179cc Triggering another build for bug 5391. 2012-07-22 12:01:35 -04:00
Nicholas Hastings 4871dbaaa1 Triggering build for bug 5391. 2012-07-21 20:41:52 -04:00
Nicholas Hastings 832dc259af Updated DoD:S and HL2:DM gamedata. 2012-07-20 15:43:15 -04:00
Nicholas Hastings 78f4640736 VC10 proj: removed old bintools cfgs, fixed swarm build, fixed jit dll name (NPOTB). 2012-07-20 15:43:15 -04:00
Nicholas Hastings 0b7831c6df Updated Nuclear Dawn gamedata. 2012-07-19 20:13:47 -04:00
Nicholas Hastings 73a701f08c Added missing files to each core and logic makefiles (NPOTB). 2012-07-15 12:31:06 -04:00
Nicholas Hastings 080405c022 Added some missing proj files from last commit (NPOTB). 2012-07-12 19:43:01 -04:00
Nicholas Hastings 58ae7f1cab Overhauled msvc10 proj files, fixed .rc errors, added combined sln, added SMOUTDIR env var support (NPOTB). 2012-07-12 19:40:06 -04:00
Powerlord 59b1bd3d96 Updated TFHoliday enum for latest TF2 updates (bug 5364, r=psychonic). 2012-07-03 18:03:06 -04:00
Nicholas Hastings 4d4979cc98 Updated gdc-psyfork readme (NPOTB). 2012-07-03 10:33:54 -04:00
Nicholas Hastings 542c515bc1 Updated gdc-psyfork with latest (NPOTB). 2012-07-03 10:27:27 -04:00
Nicholas Hastings 3479e452de Fixed clientprefs prefab menu double free crash (bug 5374, r=asherkin). 2012-07-03 07:51:12 -04:00
Nicholas Hastings 49ad25d001 Updated CS:S gamedata. 2012-07-02 23:27:22 -04:00
Nicholas Hastings 13c8336c82 Added RadioMenuMaxPageItems of 9 to csgo core gamedata (bug 5310, r=me). 2012-07-02 12:53:42 -04:00
Nicholas Hastings 601186fd6a Added support for custom maxitems on radio menus (bug 5371, r=asherkin). 2012-07-02 10:57:22 -04:00
Brian Simon dfadfe37f6 Fixed NULL ninvoke ptr in sample ext when SMEXT_ENABLE_NINVOKE defined (bug 5340, r=psychonic). 2012-07-01 12:05:21 -04:00
Nicholas Hastings b3372ebba2 Updated GMod gamedata. 2012-06-30 09:08:06 -04:00
Nicholas Hastings 01de453d25 Added new TF2 weapon and custom dmg defines. 2012-06-28 11:27:31 -04:00
Nicholas Hastings 64b6c0d0eb Updated EmitSentence native for sdk change on ep2v. 2012-06-28 11:27:14 -04:00
Nicholas Hastings 2f684e0255 Updated TF2, DOD:S, and HL2:DM gamedata. 2012-06-27 23:24:38 -04:00
Nicholas Hastings 3a77fcd005 Updated Core and SDK Tools for ep2v EmitSound sdk change. 2012-06-27 22:42:23 -04:00
Nicholas Hastings 06492d18a7 Triggering a build. 2012-06-27 22:18:38 -04:00
Nicholas Hastings 0297e974d4 Updated TF2 gamedata. 2012-06-27 21:41:04 -04:00
Drifter 354279bc1e Fixed CS:S "TTeamScoreOffset" gamedata offset (bug 5352, r=psychonic). 2012-06-26 19:07:22 -04:00
Drifter e0278071cf Fixed CS_GetWeaponPrice sometimes using incorrect weapon id (bug 5363, r=psychonic). 2012-06-26 19:06:41 -04:00
Nicholas Hastings a9bd1ced2e Updated Nuclear Dawn gamedata. 2012-06-20 21:00:53 -04:00
Nicholas Hastings 8cd397e56f Triggering a build to fix vars in SDKTools OnPlayerRunCmd forward on CSGO. 2012-06-14 08:16:59 -04:00
Nicholas Hastings 7423fd9c98 Merge. 2012-06-13 09:25:21 -04:00
Nicholas Hastings cd75262ad1 Updated sample ext project/make files. (NPOTB). 2012-06-13 09:24:45 -04:00
Asher Baker 70f91f8345 Fixed target client index error in TF2 Disguise native (r=me). 2012-06-13 10:07:02 +01:00
Asher Baker 61a28c290b Updated sdktools msvc10 proj file to use MMSOURCE19. (NPOTB). 2012-06-09 20:02:08 -04:00
Asher Baker 40c2674d49 Worked around possible admin detection issues on newer engines (bug 5327, r=psychonic). 2012-06-09 20:00:55 -04:00
Asher Baker b3d38bd4f1 Lowered default think time to 20ms (bug 4733, r=psychonic). 2012-06-08 20:31:42 -04:00
Asher Baker 7e199b0c7c Fixed CStrike extension shutdown crash (bug 5328, r=psychonic). 2012-06-08 20:29:06 -04:00
Nicholas Hastings 6af30e8992 Fixed linux CS:GO logged tier0_i486 startup error and bad sourcetv handling (r=me). 2012-06-02 12:48:54 -04:00
Nicholas Hastings e7c86713c8 Added missing CS:GO GameRulesProxy gamedata. 2012-06-02 10:07:25 -04:00
Nicholas Hastings 7cd480a1a9 Updated TF2 gamedata. 2012-05-31 22:47:08 -04:00
Nicholas Hastings 3f249c2e93 Fixed compile error on gcc. 2012-05-31 07:43:11 -04:00
Drifter 36f5200abc Fixed crash when passed bad ref in ReferenceToEntity (bug 5330, r=asherkin). 2012-05-31 07:32:07 -04:00
Drifter 89325f9995 Fixed linux CTTeamScoreOffset and TTeamScoreOffset offsets for CS:GO. 2012-05-31 00:36:36 -04:00
Nicholas Hastings 83b3c3ab8f Merge. 2012-05-30 23:01:08 -04:00
Drifter 02277225d7 Fix for SDKTools TeamScore natives crash on CS:GO (bug 5319, r=psychonic). 2012-05-30 23:00:16 -04:00
Nicholas Hastings 6f55c3e75a Updated core msvc10 proj to compile against MMSOURCE19 (NPOTB). 2012-05-30 22:37:41 -04:00
Asher Baker 56131fd63a Removed files accidentally commited in 33b39cd05faf. 2012-05-30 14:20:18 +01:00
Tony f65de3bbbb Added GetGameTickCount native (bug 5209, r=psychonic). 2012-05-30 14:13:43 +01:00
Nicholas Hastings 44d9551bd6 Fixed typo in cstrike.inc causing compile error. 2012-05-29 20:17:57 -04:00
Nicholas Hastings 1aab29a958 Added missing sprites for funcommands on some games (bug 5324, r=asherkin). 2012-05-29 18:39:59 -04:00
Nicholas Hastings 0439d08689 Triggering a build for bug 5312. 2012-05-29 18:08:49 -04:00
Asher Baker 618eb254c0 Fixed intermittent crashes in clientprefs (bug 4660, r=psychonic). 2012-05-29 17:41:48 +01:00
Drifter e2340363e3 Typo fix in cstrike.inc (r=psychonic). 2012-05-28 11:42:58 -04:00
Drifter a68125a5ee Fixed some CS:GO gamedata for CStrike extension. 2012-05-28 11:08:57 -04:00
Ryan Stecker 3d25938dd7 Added TF2_CanPlayerTeleport forward to the TF2 game extension (bug 5283, r=asherkin). 2012-05-28 01:14:46 +01:00
Ryan Stecker 70994cb4b2 Exposed GetLanguageInfo in ITranslator interface (bug 5249, r=asherkin). 2012-05-28 00:58:59 +01:00
Asher Baker 0d5ef132f3 Fixed erroneous const-qualification of name param of GetAdminUsername (bug 5267, r=psychonic). 2012-05-28 00:52:59 +01:00
Drifter 5610aeb917 Added natives for changing team score and mvp stars on CSS/CSGO (bug 5295, r=psychonic). 2012-05-27 19:07:44 -04:00
Drifter 02f8991fb3 Added missing CSWeaponID tag on CS_AliasToWeaponID (r=psychonic). 2012-05-27 18:48:54 -04:00
Drifter f53255570d Added new CSRoundEnd entries for CS:GO (r=psychonic). 2012-05-27 18:48:22 -04:00
Nicholas Hastings 543f3440dc ANOTHER typo fix. 2012-05-27 17:47:41 -04:00
Nicholas Hastings 1a8417951f Fixed package script on mac. 2012-05-27 17:44:46 -04:00
Nicholas Hastings 2f68781ff9 Updated package script for cstrike extension changes. 2012-05-27 17:40:42 -04:00
Nicholas Hastings d29e546678 Fixed cstrike extension not building for ep2v on mac. 2012-05-27 17:40:12 -04:00
Nicholas Hastings a39943d57d Windows build fix. 2012-05-27 17:21:05 -04:00
Nicholas Hastings c20ac116a8 Typo fix. 2012-05-27 17:19:17 -04:00
Nicholas Hastings c8f5ef8afb (Real) Cstrike extension mac build fix. 2012-05-27 17:17:30 -04:00
Nicholas Hastings 1ebef323de Cstrike extension mac build fix. 2012-05-27 17:11:29 -04:00
Drifter 3b18745bcd Added support for CS:GO to cstrike extension (bug 5299, r=asherkin). 2012-05-26 18:31:23 -04:00
Nicholas Hastings 236579a930 Build fix (casing issue with sdk Color.h include). 2012-05-27 16:51:29 -04:00
Nicholas Hastings 9b49b2694d Triggering build. 2012-05-27 16:28:36 -04:00
Nicholas Hastings 62336b60b2 Triggering build. 2012-05-27 16:26:30 -04:00
Nicholas Hastings 917b6d4521 Added support for CS: Global Offensive (bug 5299, r=asherkin). 2012-05-27 16:08:03 -04:00
Nicholas Hastings fdec003973 Added example scripts missing from last commit (NPOTB). 2012-05-27 11:39:50 -04:00
Nicholas Hastings 55b4854cd4 Added "psyfork" of gdc and example scripts to tools/ (NPOTB). 2012-05-27 11:36:49 -04:00
Ryan Stecker 6aca18193a Added missing SteamAuthstringValidation config option (bug 4837, r=asherkin). 2012-05-27 02:11:01 +01:00
Ryan Stecker 745b2f0668 Exposed extensions list to clients (bug 5221, r=asherkin). 2012-05-27 01:51:08 +01:00
Tony 2b207359f9 Adding missing SetMenuNoVoteButton native declaration (bug 4522, r=asherkin). 2012-05-27 01:51:06 +01:00
Asher Baker 6121c098c8 Fixed possible crash when reloading a plugin with an invalid binary (bug 5288, r=psychonic). 2012-05-27 01:51:03 +01:00
Asher Baker c15a91dbcc Fixed intermittent crash when looking for an invalid signature (bug 5301, r=fyren). 2012-05-27 01:51:02 +01:00
Asher Baker f46c58deaa Fixed error when reloading dependant plugins using aliased natives (bug 5302, r=psychonic). 2012-05-27 01:50:57 +01:00
FlaminSarge c9b7e9f9aa Updated TF2 condition defines (bug 5259, r=psychonic). 2012-05-26 19:17:49 -04:00
FlaminSarge 6a8c99eef1 Fixed client console vote output missing newlines (bug 5205, r=psychonic). 2012-05-26 18:25:28 -04:00
FlaminSarge 7025e07e8a Fixed client console vote progress not displaying in some cases (bug 5290, r=psychonic). 2012-05-26 16:25:05 -04:00
Nicholas Hastings 2ba12008c8 Don't add -Wno-delete-non-virtual-dtor for gcc < 4.7. (bug 5205, r=DS). 2012-05-26 15:46:43 -04:00
Ryan Stecker ac2bbf16f6 Require Steam validation before granting admin access (bug 4837, r=asherkin). 2012-05-24 17:55:46 +01:00
Nicholas Hastings d77ebd60cf Log functions now respect sv_logecho (bug 5135, r=asherkin). 2012-05-24 16:09:44 +01:00
Asher Baker 997c7ebbcf Made clientprefs attempt to reconnect to the database on map change (bug 4745, r=dvander). 2012-05-24 16:07:28 +01:00
Asher Baker afe5425163 Updated the location of the blue crab (bug 4959, r=pred). 2012-05-24 16:04:23 +01:00
Asher Baker 32eadc0ea3 Fixed typo in logic bridge (bug 5287, r=psychonic). 2012-05-24 15:59:53 +01:00
Asher Baker e75b244cae Fixed Float negation operator (bug 5292, r=psychonic). 2012-05-24 15:56:19 +01:00
Nicholas Hastings bb448905ac Updated CS:S gamedata for today's update. 2012-05-22 17:32:04 -04:00
Nicholas Hastings 6928ce9cd3 Added msvc10 proj files for cstrike extension (NPOTB). 2012-05-20 12:34:29 -04:00
Nicholas Hastings b7394ad02e Missed a couple of spots on cstrike proj file (¡NPOTB!). 2012-05-18 19:02:05 -04:00
Nicholas Hastings eca39b1a51 Updated sdktools and cstrike ms proj files (NPOTB). 2012-05-18 18:53:46 -04:00
Nicholas Hastings f66e63c690 Updated core msvc10 files (NPOTB). 2012-05-18 18:28:08 -04:00
Paul Clothier 42c2fc61b8 Fixed tier0 error and broken SourceTV detection on L4D1 (bug 5216, r=asherkin). 2012-04-28 13:49:25 -04:00
Nicholas Hastings 24303a5365 Updated Garry's Mod gamedata. 2012-04-28 13:47:35 -04:00
Asher Baker 0ecae8a844 Merge 2012-04-26 17:01:16 +01:00
Asher Baker 9e45f2da9f Fixed client serials not being unique on Windows (bug 5285, r=psychonic). 2012-04-26 16:58:18 +01:00
Asher Baker d676886dee Updated TF2 RemoveDisguise gamedata. 2012-04-18 21:16:01 -04:00
Nicholas Hastings 2d0a0b5a62 Fixed tempents gamedata on GMod. 2012-04-18 07:17:18 -04:00
Ryan Stecker 6fe32b3b49 Updated more TF2 gamedata. 2012-04-18 07:12:19 -04:00
Ryan Stecker 525145f2a3 Updated Windows ep2v tempent gamedata. 2012-04-18 00:16:34 -04:00
Paul Clothier 2b8038d700 Fixed IServer in SDKTools on Windows. 2012-04-17 22:27:03 -04:00
Nicholas Hastings 2454c0baae Always trust Wazz. 2012-04-17 22:12:44 -04:00
Nicholas Hastings 0189c5b990 Fixed tempent gamedata on Windows. Fixed cstrike gamedata. 2012-04-17 22:07:25 -04:00
Nicholas Hastings c70285dcfc Updated more ep2v gamedata. 2012-04-17 21:17:32 -04:00
Paul Clothier f5a392e189 Updated ep2v and TF2 gamedata. 2012-04-17 21:17:09 -04:00
Asher Baker cd729f054c Merge. 2012-04-14 01:14:14 +01:00
Asher Baker 5f551fa67a Backed out changeset: 387b27fb575b (bug 5227) 2012-04-14 01:12:24 +01:00
David Anderson 1e57376cc7 Fix bug in lower-casing API guarantee (r=fyren).
--HG--
extra : rebase_source : aa591e06a6dcf13b8964c893240ab56436a1efd3
2012-04-13 16:50:44 -07:00
Ryan Stecker 4771398e1e Fixed return value of VoteMenuToAll (bug 5254, r=asherkin). 2012-04-14 00:31:50 +01:00
Drifter ee49dfa505 Fixed crash with StoreToAddress if memory wasn't writable (bug 5252, r=asherkin). 2012-04-14 00:31:07 +01:00
Scott Ehlert 20d1551216 Removed hardcoded SDK path for curl on OS X. 2012-03-21 22:04:05 -05:00
Scott Ehlert a3593a5124 Fixed build scripts for OS X 10.7 build slave. 2012-03-21 21:35:07 -05:00
Reuben Morais c7646976fb Removed hardcoded SDK path on OS X (bug 5032, r=ds). 2012-03-21 21:27:26 -05:00
Reuben Morais 8a10cc982c Followup, re-added check for invalid HL2SDK paths (bug 5023, r=ds). 2012-03-21 21:25:34 -05:00
Michael Busby 74e546e145 Fixed StoreToAddress always writing 32 bits and throwing an error. 2012-03-11 18:07:24 -05:00
Nicholas Hastings 5586f7c517 Added some missing compiler flags from AMBuild script to core Makefile. (NPOTB) 2012-03-04 15:16:17 -05:00
Asher Baker fbeeaa4c1e Merge. 2012-03-04 20:03:52 +00:00
Asher Baker 48738bbae9 Partially added minimal-rebuild support for debug info generation. (bug 5227, r=a-very-sad-buildbot) 2012-03-04 20:01:40 +00:00
FlaminSarge 7f74948e91 Fixed potential player lag issue when "drugged" (bug 5217, r=asherkin). 2012-03-04 14:16:58 -05:00
FlaminSarge a31bb79b78 Fixed sm_drug disable functionality not functioning (bug 5218, r=psychonic). 2012-03-04 14:13:38 -05:00
Nicholas Hastings 821fcd5be4 Last fix. 2012-02-25 17:06:23 -05:00
Nicholas Hastings 0c75229250 More mac/linux compile fixes. 2012-02-25 16:41:00 -05:00
Nicholas Hastings 5f67a600fc Linux/Mac build fix. 2012-02-25 15:23:39 -05:00
Nicholas Hastings 4669c320f6 Added better cross-engine support for finding Valve commandline (bug 5216, r=asherkin). 2012-02-25 15:09:56 -05:00
Asher Baker 545868da38 Forcing build. 2012-02-17 12:04:20 +00:00
Asher Baker e154f3edb7 Generate and upload breakpad symbols if BREAKPAD_SYMBOL_SERVER variable is set. (bug 5229, r=dvander) 2012-02-17 03:28:02 +00:00
Asher Baker 393c54fdc2 Generate debugging information during compilation. (bug 5227, r=ds) 2012-02-16 19:26:49 +00:00
Nicholas Hastings 02981cec57 Added new TFHoliday_Christmas to TFHoliday enum (bug 5194, r=asherkin). 2011-12-16 09:43:05 -05:00
Nicholas Hastings 6e499c8213 Added new TF2 weapon defines (r=me). 2011-12-16 00:24:03 -05:00
Nicholas Hastings 9ca1ced6a2 Updated linux CS:S ClanTagOffset gamedata. 2011-12-08 14:52:20 -05:00
Nicholas Hastings 6470222a06 Added gamedata support for No More Room in Hell (bug 5162). 2011-12-07 20:17:34 -05:00
Brian Simon eedf8b845c Increased ServerCommandEx's internal buffer (bug 5169, r=asherkin). 2011-12-07 12:13:52 -05:00
Nicholas Hastings 01c94596a4 Added gamedata support for Adreneline Gamer 2 (bug 5186). 2011-12-07 11:54:53 -05:00
Nicholas Hastings 978d7c0fca Fixed typo in basebans ban reason (bug 5188, r=me). 2011-12-06 14:42:30 -05:00
Nicholas Hastings 3bd53b4f61 Updated gamedata for Garry's Mod. 2011-12-02 10:04:28 -05:00
Nicholas Hastings 8d9c325000 Updated gamedata for HL2MP and DOD:S. 2011-11-29 18:09:51 -05:00
Fyren dfe8ae4fd1 Bring compiler Makefile more in line with ambuild (NPOTB) 2011-11-10 20:26:21 +00:00
Nicholas Hastings 069d67b24b Third try's a charm. 2011-11-09 21:34:30 -05:00
Nicholas Hastings 0c926b84bc Another build fix. 2011-11-09 21:29:36 -05:00
Nicholas Hastings 11bdd68d73 Maybe fixed build. 2011-11-09 21:19:04 -05:00
Nicholas Hastings 1beeaf3d4f Removed GLIBC_2.7 dependency from spcomp (r=fyren). 2011-11-09 21:10:29 -05:00
Nicholas Hastings 8cc850de97 Fixed CS:S gamedata. 2011-11-07 18:23:56 -05:00
Nicholas Hastings 0931794f10 Updated gamedata for today's CS:S update. If wrong, blame gdc! 2011-11-07 18:01:49 -05:00
Matt Woodrow 3b12883a1b Added support for runoff voting in mapchooser (bug 4218, r=dvander). 2011-11-05 20:36:20 -04:00
Nicholas Hastings e18faf085f Merge. 2011-11-04 10:02:32 -04:00
Nicholas Hastings a98edd42d1 Updated TF2_OnIsHolidayActive ret behavior to match doc (bug 5155, r=fyren). 2011-11-04 10:01:33 -04:00
Nicholas Hastings c1aa49ef3a Fixed a few minor spacing things in sp incs to not fool API parser. 2011-11-04 10:01:33 -04:00
Nicholas Hastings 49a860bc9e Fixed sp MaxClients not being updated on map changes after load (5160, r=fyren). 2011-11-04 10:01:28 -04:00
Scott Ehlert 1b94a30c9f Triggering build to hopefully fix mac builds. 2011-11-03 14:16:05 -05:00
Nicholas Hastings 5a52fc3657 Fixed TFHoliday enum (bug 5155, r=asherkin). 2011-11-03 10:03:01 -04:00
Nicholas Hastings df7680aa73 Fixed ff trigger printing in triggerer's language to all (bug 5161, r=asherkin). 2011-11-03 09:59:14 -04:00
Nicholas Hastings f42a16643c Added new TF2 deathflag and dmg custom defines (bug 5157, r=asherkin). 2011-11-03 09:06:59 -04:00
Nicholas Hastings 96e5dc3fc6 Registered basecomm as lib to allow requiring it (bug 5156, r=asherkin). 2011-11-03 09:06:22 -04:00
otstrel 6c0eca0eca Fixed "not connected" error in reserved slots plugin (bug 5158, r=psychonic). 2011-11-03 09:05:40 -04:00
Nicholas Hastings fefff70645 Preemptive gamedata update for tonight's TF2 update. 2011-11-02 18:24:12 -04:00
Nicholas Hastings 18fa18f612 Updated Dino D-Day gamedata for today's update. 2011-10-28 20:27:44 -04:00
Nicholas Hastings b2311e2ea5 Added missing EYE def to halflife.inc, updated EYE def# (bug 5151, r=asherkn). 2011-10-28 19:09:40 -04:00
Nicholas Hastings ee42f09b8d TF2 ext fixes for TF2 holiday system changes (bug 5150, r=asherkin). 2011-10-28 19:07:40 -04:00
Nicholas Hastings e7f5f4a6af Merge. 2011-10-28 11:24:08 -04:00
Nicholas Hastings 4d07acd384 Backed out changeset: 294fded6a0d0 (bug 4902, bug 5068). 2011-10-28 11:23:02 -04:00
David Anderson 2c06bb46ea Pushing build. 2011-10-27 23:18:43 -07:00
David Anderson 3c3bfff0cf Pushing build. 2011-10-27 23:15:55 -07:00
David Anderson a86f6d0e64 Bump major version! 2011-10-27 22:10:46 -07:00
Nicholas Hastings 4d54bfa6b4 Preemptive gamedata update for tonight's TF2 update. 2011-10-27 20:28:26 -04:00
Nicholas Hastings 28d1dab18a Small fixes to reservedslots, including ep2v Replay/SourceTV fix (bug 5094, r=fyren). 2011-10-20 21:42:18 -04:00
Nicholas Hastings f3d19a860a Added detection of Replay and SourceTV, and natives to query (bug 5124, r=fyren). 2011-10-20 21:39:57 -04:00
Nicholas Hastings 5732e34f50 Added check for element in Get/SetEntProp funcs >= 0 (bug 5141, r=fyren). 2011-10-20 21:35:50 -04:00
Asher Baker ca94a61acf Fixed ServerCommandEx native appending to buffer instead of overwriting (bug 5047, r=fyren). 2011-10-17 11:02:42 -04:00
Brian Simon a875c61b5f Added RootConsoleMenu iface support to sample ext (bug 5021, r=psychonic). 2011-10-17 10:55:44 -04:00
David Anderson 5ec70c9e0d Fixed shutdown bug in SDKTools (created EntOutputMgr shutdown func) (bug 5063, r=fyren). 2011-10-17 10:47:13 -04:00
GoD-Tony 4b0373408d Moved client language detection to be earlier (on connect) (bug 3714, r=psychonic). 2011-10-15 12:07:55 -04:00
Nicholas Hastings 7f8c4eff39 Updated GMod gamedata. 2011-10-14 15:21:12 -04:00
Don 00f152910b Added native to clientprefs to alter data on a disconnected player (bug 3882, r=pred). 2011-10-14 11:28:53 -04:00
Nicholas Hastings 95fdeb03c3 Move marking of mapstarted to before calling of map start notifs. (bug 5119, r=asherkin). 2011-10-14 09:25:42 -04:00
Nicholas Hastings 66e9ef9cf6 Updated HL2DM and DOD:S gamedata. 2011-10-13 20:06:40 -04:00
Peace-Maker 6b3221f1da Updated CS:S gamedata. 2011-10-13 19:15:02 -04:00
GoD-Tony 25ad7bcf5e Updated TF2 gamedata for today's update. 2011-10-13 18:31:24 -04:00
GoD-Tony 9a04a6bdb1 Added optional autoload of sdktools to cstrike ext.(bug 5125, r=psychonic). 2011-10-13 13:17:37 -04:00
Nicholas Hastings 1b9fb906e2 Added CS_GetClanTag and CS_SetClanTag natives to cstrike ext (bug 5122, r=fyren). 2011-10-13 13:17:29 -04:00
Nicholas Hastings e23d7ca51b Added TextMsg destination constants to IGameHelpers header (bug 5123, r=fyren). 2011-10-13 13:17:22 -04:00
Fyren 92773c2e1b Fixed client serials not getting cleared on disconnect (bug 5121, r=psychonic). 2011-10-12 00:51:58 -04:00
Nicholas Hastings 776889cfbb Removed error when optional ext dep is missing (bug 5112, r=fyren). 2011-10-11 22:51:24 -04:00
Nicholas Hastings 67163e14e6 Added checks to avoid crashing in some natives before map start (bug 5119, r=fyren). 2011-10-11 22:50:21 -04:00
Nicholas Hastings 45f68840ed Fixed multiple small issues with KickClient/Ex natives (bug 5120, r=fyren). 2011-10-11 19:50:53 -04:00
Nicholas Hastings 325ae5e977 Added better Nuclear Dawn compatibility to base plugins (bug 5117, r=fyren). 2011-10-11 19:47:20 -04:00
Nicholas Hastings 14919c65d9 Fixed wrong values for unsigned, >= 16-bit props in GetEntProp (bug 5105, r=fyren). 2011-10-11 19:41:56 -04:00
Nicholas Hastings 8888e88dc4 Updated tf2 inc files with more condition and custom dmg defs (bug 5118, r=asherkin). 2011-10-10 21:44:36 -04:00
javalia 0533664f90 Removed non-existant param from SetTrieString function doc (bug 5108, r=dvander). 2011-10-10 16:02:44 -04:00
Peace-Maker 64b824f457 Added gamedata for HL2CTF (bug 5114, r=psychonic). 2011-10-10 15:59:48 -04:00
Nicholas Hastings b6592d799f Updated Nuclear Dawn gamedata to use ShowMenu (now works). 2011-09-26 13:54:17 -04:00
Drifter c89711a863 Updated cstrike ext WeaponPrice offset. 2011-09-20 16:21:17 -04:00
Drifter 91a1292b12 Updated cstrike ext gamedata. 2011-09-16 11:36:37 -04:00
Paul Clothier b2d469cb84 Updated TF2 SetPowerplayEnabled gamedata (bug 5095, r=psychonic). 2011-09-15 18:43:33 -04:00
Nicholas Hastings 4f41da34c6 Merge. 2011-09-10 12:10:05 -04:00
Nicholas Hastings f136f2dcaf Added CheckAccess native to check cmd/override access of AdminId (bug 5083, r=fyren). 2011-09-10 12:08:38 -04:00
Reuben Morais e6df54537a Changed build system so that it no longer requires all SDKs to be available (bug 5023, r=ds). 2011-09-09 18:37:09 -05:00
Nicholas Hastings e62278859e Validate ent index bounds in LookupEntity (bug 5080, r=fyren). 2011-09-09 15:29:17 -04:00
Peace-Maker 51b91bce6d Updated Nuclear Dawn gamedata. 2011-09-08 19:59:09 -04:00
Nicholas Hastings d96a23d4f2 Fixed build. 2011-09-03 14:23:46 -04:00
javalia 98e049b336 Added GetDistGainFromSoundLevel native to SDKTools (bug 5066, r=dvander). 2011-09-03 14:18:08 -04:00
FlaminSarge 3c297f5d1d Fixed typo in tf2_stocks (persistant -> persistent) (bug 5074, r=psychonic). 2011-09-03 14:11:38 -04:00
FlaminSarge d64d196409 Fixed mixup of arrow stab and telefrag defs in tf2_stocks (bug 5074, r=psychonic). 2011-09-03 14:10:24 -04:00
Nicholas Hastings b1638e79c0 Added missing clientnatives files to sdktools proj file (NPOTB). 2011-08-29 13:55:11 -04:00
Nicholas Hastings 13753757d4 Fixed error in sdktools msvc10 proj file (NPOTB). 2011-08-28 16:18:48 -04:00
Nicholas Hastings 739e341218 Fixed Nuclear Dawn menus. 2011-08-25 13:58:12 -04:00
Nicholas Hastings fda282604d Added gamedata support for Nuclear Dawn. 2011-08-25 13:20:26 -04:00
Fyren 2cd7fa68d6 Reshove. 2011-08-20 16:45:44 -07:00
Fyren d78a0c87b8 Backed out changeset 42462959f48d 2011-08-20 16:44:16 -07:00
Fyren 88d4abeaf8 Shove. 2011-08-20 16:41:14 -07:00
Nicholas Hastings 1c0abbfce6 Partially fixed build. 2011-08-20 19:21:27 -04:00
Nicholas Hastings 1492e12ca2 Added support for E.Y.E Divine Cybermancy (bug 5035, r=fyren). 2011-08-20 18:58:37 -04:00
Nicholas Hastings 2b9a39e2eb Updated Fortress Forever gamedata to include support for newer features. 2011-08-20 13:25:38 -04:00
Nicholas Hastings 301ae447b4 Added more new TF2 weapon and custom damage defs (bug 5055, r=asherkin). 2011-08-20 13:25:07 -04:00
Asher Baker 3d47010cbd Fail to load a metamod-enabled extension if it refuses to attach to MM:S (bug 5042, r=dvander). 2011-08-15 20:19:07 +01:00
Asher Baker dd0ff999e4 Backed out changeset: 602945928c23 2011-08-15 20:06:14 +01:00
Asher Baker 05e5c93e91 Fail to load a metamod-enabled extension if it refuses to attach to MM:S (bug 5042, r=dvander). 2011-08-15 19:30:56 +01:00
Asher Baker 1bd97730ce Added a reset argument to 'sm cvars' (bug 5043, r=psychonic). 2011-08-14 21:42:32 +01:00
Fyren 458378be66 Let logic binary access ServerLang value on startup (bug 4675, r=dvander). 2011-07-24 19:52:22 -07:00
David Anderson c01101dbd0 Fix build. 2011-07-24 19:44:15 -07:00
Michael (LumiStance) f7364111f2 Fix corner cases with ExplodeString (bug 4629, r=dvander).
--HG--
extra : rebase_source : ebb338bc93d32544e66c16fcba4494d5eae7ee8e
2011-07-24 19:30:15 -07:00
Nicholas Hastings f3b84b8670 Added gamedata for International Online Soccer: Source (bug 5019). 2011-07-22 13:48:34 -04:00
Asher Baker ec11a31d9d Updated sm_rcon to use new ServerCommandEx native (bug 5018, r=ds). 2011-07-18 03:25:01 +01:00
Asher Baker 2271469d1b Added ServerCommandEx native to get the response when running a command (bug 3873, r=ds). 2011-07-18 03:23:03 +01:00
Asher Baker 7fe92d87c2 Added missing brackets back to l4d and l4d2 gamedata (bug 5016, r=psychonic). 2011-07-16 17:55:43 -04:00
Drifter 6046b8fb79 Fixed CS_GetWeaponPrice for some weapon (bug 4994, r=psychonic). 2011-07-14 12:57:18 -04:00
FlaminSarge a65239a8af Added defines for more new TF2 conditions to tf2.inc (bug 5000, r=psychonic). 2011-07-14 12:53:05 -04:00
Nicholas Hastings 746cd5f49c Merge. 2011-07-12 20:07:51 -04:00
Nicholas Hastings 75c315ad8a Fixed maxClients not being updated correctly in some cases/areas (bug 4986, r=fyren). 2011-07-12 20:06:08 -04:00
Nicholas Hastings c1926c6e25 Added FireOutput gamedata support for The Hidden. 2011-07-12 19:58:37 -04:00
Nicholas Hastings 3f8ba353b7 Updated Fistful of Frags gamedata for FoF 3.6 release. 2011-07-12 19:58:30 -04:00
Nicholas Hastings 39a2152a46 Reverted FindEntityByClassname gamedata obliteration from 7aea1316eff7 per bug 4963. 2011-07-12 19:58:16 -04:00
Nicholas Hastings ddd967534b Sped up native impl. of FindEntityByClassname (bug 4963, r=fyren). 2011-07-12 19:48:28 -04:00
Fyren 4d52fe0490 Revert 3336, try fix #2 (bug 4852, r=dvander) 2011-07-09 20:47:43 -07:00
Nicholas Hastings 264ffa80ce Backed out changeset: b5969264060e 2011-07-08 07:55:20 -04:00
Nicholas Hastings 258a9c636a Backed out changeset: 049c7073d1a4 2011-07-08 07:54:21 -04:00
Nicholas Hastings 8015d1827c Backed out changeset: 9007dacc012d 2011-07-08 07:53:31 -04:00
Nicholas Hastings ae10bc6601 Backed out changeset: 344daca49587 2011-07-08 07:53:14 -04:00
Nicholas Hastings 51c27afcd2 Fixed more crashes related to early, nonzero maxclients (bug 5008, r=dvander). 2011-07-07 21:31:07 -04:00
Nicholas Hastings e09d4f2cf2 Merge. 2011-07-07 19:53:56 -04:00
Nicholas Hastings 7e87f56699 Fixed nonzero maxClients startup crash in SDKTools (bug 5010, r=bee). 2011-07-07 19:51:05 -04:00
Scott Ehlert ca9150a731 Triggering build, ugh. 2011-07-07 11:25:00 -05:00
Nicholas Hastings 5250d819d0 Triggering a build, hoping for luck. 2011-07-07 09:27:24 -04:00
Nicholas Hastings d93413a4ae Fixed use of m_Players before init'd in PlayerManager (bug 5008, r=dvander). 2011-07-06 22:34:23 -04:00
Nicholas Hastings bb7f7eff51 Added native interface for Basecomm plugin (bug 2594, r=fyren). 2011-07-06 22:34:21 -04:00
Brian Simon 838e8c7b35 Added InactivateClient and ReconnectClient natives to SDKTools (bug 4931, r=fyren). 2011-07-06 18:11:02 -04:00
David Anderson bb48a16466 Fix compiler creating bogus arrays when missing a dimension (bug 4902, r=fyren). 2011-07-06 17:56:40 -04:00
David Anderson a02ff01d84 Prevent declaring arrays that the compiler is too buggy to handle (bug 4977, r=fyren). 2011-07-06 17:56:03 -04:00
David Anderson 66d27d6ac5 Fix return omission with else-after-return (bug 4852, r=fyren). 2011-07-06 17:55:14 -04:00
Nicholas Hastings 5ba82ef0fc Removed maxClients caching in core (bug 5007, bug 4986, r=fyren). 2011-07-06 17:50:37 -04:00
David Anderson 053b522aff Fixed some vars not being marked for init on first compile pass (bug 4643, r=fyren). 2011-07-06 17:50:26 -04:00
Nicholas Hastings 4521f80e5a Added ability in SDKTools to get/set prop values on gamerules class (bug 4983, r=fyren). 2011-07-06 17:37:35 -04:00
Nicholas Hastings f24efc17c1 Fixed TF2 OnConditionAdded/Removed forwards to catch all cases (bug 4982, r=fyren). 2011-07-06 17:37:35 -04:00
Nicholas Hastings f32d3849e5 Merge. 2011-07-06 15:30:19 -04:00
Michael Busby f2fb064ea6 Fixed typo in GetEntDataFloat function doc (bug 4993, r=psychonic). 2011-07-06 15:27:41 -04:00
Nicholas Hastings ce5093f91f BaseComm now uses CommandListeners for chat hooks (bug 4991, r=fyren). 2011-07-06 15:24:43 -04:00
David Anderson 75121588c4 Clobber 2011-07-04 15:33:11 -07:00
javalia 1ff0f478d4 Increase symbol name limit to 63 characters (bug 4564, r=dvander). 2011-07-04 15:26:08 -07:00
David Anderson 6c68082359 Fix crash when dynamic arrays run out of memory (bug 4632, r=fyren). 2011-07-04 01:57:19 -07:00
David Anderson a752d220cc Use active, not passive FTP. 2011-06-29 16:05:18 -07:00
Drifter ee1bbd5994 Added new CS_GetWeaponPrice native to cstrike extension (bug 4985, r=psychonic). 2011-06-28 20:32:55 -04:00
Michael Busby 91368e5656 Fixed typo in keyvalues.inc doc (bug 4990, r=psychonic). 2011-06-28 20:26:40 -04:00
Drifter c4c554b420 Added some small fixes for new CStrike patch (2ddc75e24c53) (bug 4732, r=psychonic). 2011-06-28 20:16:05 -04:00
Nicholas Hastings 52ec8bf049 Fixed build. 2011-06-27 09:35:38 -04:00
Nicholas Hastings 5c40e02ee6 Added support for gamedata lookups from matchmaking_ds lib (bug 4158, r=Fyren). 2011-06-27 09:30:52 -04:00
Nicholas Hastings d2a89c5856 Added gamedata for TF2 SetInWaitingForPlayers (bug 4704). 2011-06-27 08:29:11 -04:00
Nicholas Hastings 9ec3f1b89d Fixed TF2_RemoveCondition not always removing conditions (bug 4981, r=asherkin). 2011-06-26 21:00:03 -04:00
Nicholas Hastings 3ab81c764d Added more TF2 condition defines (bug 4979, r=asherkin). 2011-06-26 20:55:18 -04:00
Nicholas Hastings c072ce8f0c Fixed TF2 RemoveCondition gamedata. 2011-06-26 18:10:29 -04:00
Nicholas Hastings e44dbd0e77 Merge. 2011-06-26 18:09:55 -04:00
Nicholas Hastings ec12022550 Added msvc10 project files for TF2 ext (NPOTB). 2011-06-26 10:54:12 -04:00
Drifer e0f670499c Add a number of useful forwards and natives to the cstrike extension (bug 4732, r=fyren). 2011-06-26 01:25:42 -07:00
David Anderson 177cc87985 Doc improvement. 2011-06-25 15:31:11 -07:00
David Anderson 3e387f35e9 Updated credits. 2011-06-25 15:26:09 -07:00
Nicholas Hastings 7037723993 Fixed TF2 identifiers and condition stocks (bug 4974, r=me). 2011-06-24 19:45:16 -04:00
Scott Ehlert b1098d6287 Using gcc 4.4 from Debian 6 for Linux builds now. 2011-06-24 17:29:05 -05:00
Nicholas Hastings be222a16ce Updated TF2 identifiers and condition stocks. 2011-06-24 02:01:03 -04:00
Nicholas Hastings 17f9a3eba6 Updated TF2 gamedata. 2011-06-24 00:53:17 -04:00
Scott Ehlert 0ee77c0e7d Triggering a build. 2011-06-23 21:21:27 -05:00
Nicholas Hastings b92fa45da7 Triggering build. 2011-06-23 19:14:58 -04:00
Nicholas Hastings e64c2fc110 Triggering build. 2011-06-23 18:09:31 -04:00
Nicholas Hastings 49a6508888 Added msvc10 project for SDKTools (NPOTB). 2011-06-22 09:46:56 -04:00
David Anderson 859678536f Fixed crash on plugin unload when two cmds exist with same name, different casing (bug 4698, r=Fyren). 2011-06-20 13:30:14 -04:00
Nicholas Hastings 9a5f788807 Normalized line endings in IGameHelpers.h to appease FYREN. 2011-06-18 14:36:20 -04:00
Nicholas Hastings 84b3b1d29c Added HintTextMsg to IGameHelpers (bug 4950, r=Fyren). 2011-06-18 14:34:17 -04:00
Nicholas Hastings 80eb18a425 Moved GetEntityClassname to end of entity.inc to fix plugin compile errors (bug 4798). 2011-06-18 14:31:46 -04:00
Scott Ehlert 3e1ab53abd Fixed clang OS X build. 2011-06-17 18:21:17 -05:00
Scott Ehlert 18c119b4d5 Removed -static-libgcc for Mac OS X build (no bug, r=dvander).
This fixes the ld warning: could not create compact unwind for __Unwind_Resume: non-standard register 0 being saved in prolog
2011-06-17 18:00:32 -05:00
Nicholas Hastings e67a65c0db Fixed build. 2011-06-16 15:59:27 -04:00
Scott Ehlert 4c878c4963 Fixed crash in MemoryUtils::ResolveSymbol() on OS X Lion (10.7) (bug 4951, r=dvander). 2011-06-15 16:02:05 -05:00
Nicholas Hastings e8fbe0f36c Fixed uninit'ed string and other minor issues in basetriggers (bug 4945, r=fyren). 2011-06-05 23:13:25 -04:00
Nicholas Hastings 243b7e25f8 Added array element selection with Get/SetEntProp* on arrays (bug 4160, r=fyren). 2011-06-05 21:52:36 -04:00
John Schoenick f1a4a08c7f Fixed regression in FindEntityByClassname from bug 4899 (bug 4941, r=predcrab). 2011-06-01 20:36:16 -04:00
Fyren c0fa36b9a1 Added support for language aliases (bug 4858, r=dvander). 2011-05-25 21:10:18 -04:00
Nicholas Hastings 835b2d7ced Slight ep1 gamedata cleanup. 2011-05-25 20:56:30 -04:00
Nicholas Hastings 13c2381ba7 Added gamedata for Eternal Silence (bug 4880). 2011-05-25 20:50:51 -04:00
Fyren fbc8e899dd Forcing build. 2011-05-25 13:57:17 -04:00
Nicholas Hastings 5ee8c8ce91 Backed out changeset: a7a73225f8ee 2011-05-25 13:56:34 -04:00
Nicholas Hastings 971793d6a1 Backed out changeset: 065beec73902 2011-05-25 13:56:13 -04:00
Nicholas Hastings 9d7a905fb1 Backed out changeset: 65eb3df32b1c 2011-05-25 13:31:14 -04:00
Nicholas Hastings 731f002175 Backed out changeset: abe4ce9d3e0e 2011-05-25 13:30:40 -04:00
Nicholas Hastings 7e6f3bfd83 Adjusting the proper set of flags this time. 2011-05-25 11:25:20 -04:00
Nicholas Hastings 3e14739b29 Attempting to fix SDKTools build. 2011-05-25 11:21:16 -04:00
Nicholas Hastings d7fb6b2892 Fixed invalid client errors from late-load of SourceTV (bug 4881, r=fyren). 2011-05-25 08:31:12 -04:00
Nicholas Hastings 7527f441ae Switched to using IServerTools in SDKTools where possible. (bug 4899, r=fyren). 2011-05-25 08:27:27 -04:00
Nicholas Hastings 5228ee1d91 Updated garrysmod gamedata. 2011-05-24 20:36:09 -04:00
Nicholas Hastings 297a98e065 Handle leak notice now prints to error log (as well as fatal) (bug 4929, r=dvander). 2011-05-24 18:37:45 -04:00
Nicholas Hastings 727d8afd94 Updated core msvc10 proj file (no smn_profiler) (NPOTB). 2011-05-24 18:35:09 -04:00
Nicholas Hastings c292fba3df Updated core msvc9 proj file (engine defs, -smn_profiler, mms17 -> mms18) (NPOTB). 2011-05-24 18:34:45 -04:00
Nicholas Hastings 9954ff55f5 Added msvc10 project file for sm logic. (NPOTB). 2011-05-24 14:21:24 -04:00
Fyren fefd84d431 Translator now properly falls back on bad server language (bug 4861, r=dvander). 2011-05-24 13:25:28 -04:00
Fyren b4a7d21b9e Removed compiler double include check (bug 4863, r=dvander). 2011-05-24 10:49:40 -04:00
Nicholas Hastings d03e051611 Fixed var names and docs for TF2_MakeBleed native (bug 4928, r=fyren). 2011-05-24 10:17:48 -04:00
John Schoenick e8c141d775 Make SQL_LastInsertId and SQL_GetAffectedRows work on query handles, allowing their use with threaded queries 2011-05-14 20:21:37 -07:00
David Anderson 5b45e29533 Move profile natives to logic, add linux support (bug 4927, r=ds). 2011-05-22 02:04:34 -07:00
FlaminSarge 024d094459 Added TF2 megaheal cond defines to tf2 incs (bug 4916, r=psychonic). 2011-05-12 11:33:50 -04:00
Gareth Clarke df977577e2 Updated ep2v SetUserCvar gamedata (bug 4904). 2011-05-06 08:07:40 -04:00
Scott Ehlert b63b94bc81 Updated buildbot scripts to support clang builders. 2011-05-01 00:17:11 -05:00
Scott Ehlert 7e514f5d34 Moved -static-libgcc to linker flags. 2011-05-01 00:09:25 -05:00
Scott Ehlert cb2de2e5c4 Avoid depending on __isoc99_sscanf@GLIBC_2.7 when building on Linux with glibc >= 2.7 (bug 4894, r=dvander). 2011-04-28 02:43:55 -05:00
Nicholas Hastings f2fedbc3e6 Merge. 2011-04-25 19:05:48 -04:00
Nicholas Hastings 8ef686fd21 Updated dinodday gamedata for today's game update. 2011-04-25 19:05:01 -04:00
Nicholas Hastings 4c96e9a17d Updated zps gamedata for today's game update. 2011-04-25 19:04:34 -04:00
Scott Ehlert 939bc00b2b Added detection for clang compiler and fixed various warnings triggered by it (bug 4878, r=dvander). 2011-04-23 21:53:53 -05:00
Nicholas Hastings 0b06d3412e Updated Windows signature for GMod CreateEntityByName. 2011-04-17 16:12:45 -04:00
Nicholas Hastings 94f6f60105 Merge. 2011-04-15 15:40:38 -04:00
Nicholas Hastings 4bd6bc9683 Updated Garry's Mod gamedata. 2011-04-15 15:16:47 -04:00
David Anderson 3c59621425 Backed out changeset d6853d8d39fd 2011-04-15 10:59:10 -07:00
David Anderson a37e2ab26a Fix bug where globals can be assigned invalid memory (bug 4643, r=ds). 2011-04-15 10:50:09 -07:00
Nicholas Hastings d099febf7b Added new param to CTFPlayerShared::Disguise call in TF2 ext (bug 4866, r=fyren). 2011-04-15 12:11:32 -04:00
Nicholas Hastings b9f82332c8 Shortened __ext name for ClientPrefs to avoid hitting symbol limit (bug 4839). 2011-04-15 02:06:50 -04:00
Nicholas Hastings c02c4c6d6a Gamedata update for CS:S, TF2, DOD:S, and HL2DM. 2011-04-15 01:34:18 -04:00
Nicholas Hastings 17476ec137 Triggering build to (hopefully) fix load on linux. 2011-04-15 00:34:51 -04:00
Nicholas Hastings ee51a68c6f Triggering build... again. 2011-04-14 23:35:08 -04:00
Nicholas Hastings 0120ce5d7c Merge. 2011-04-14 23:30:04 -04:00
Nicholas Hastings 42c6e640fc Triggering build. 2011-04-14 23:26:39 -04:00
Scott Ehlert bc571316b9 Triggering a build for goodness sake. 2011-04-14 20:53:59 -05:00
Scott Ehlert 3cc1af9618 Triggering a build. 2011-04-13 20:25:10 -05:00
Scott Ehlert 6957bf504b Triggering a build. 2011-04-13 19:05:41 -05:00
Scott Ehlert d47dd70141 Attempt #2 at meaningful bootstrap error message. 2011-04-13 18:37:41 -05:00
Scott Ehlert 86eb2360db Attempt at getting a meaningful error message out of buildbot bootstrap. 2011-04-13 18:30:34 -05:00
Scott Ehlert c55e350cb2 Triggering a build, argh. 2011-04-13 17:08:39 -05:00
Scott Ehlert b0fe032b8d Triggering a build. 2011-04-13 16:44:20 -05:00
Scott Ehlert aa25870fb8 Triggering a build. 2011-04-13 16:09:36 -05:00
Nicholas Hastings a8118ea8f4 Merge. 2011-04-13 08:31:02 -04:00
Nicholas Hastings 1a344c1441 SetEntProp now marks edict state as changed at offset (bug 4855, r=fyren). 2011-04-13 08:13:49 -04:00
Berni 86a1641ac1 Fix compiler hanging when #including a directory (bug 4822, r=dvander) 2011-04-13 04:02:22 -07:00
Nicholas Hastings 10129fa568 Removed gEntList failure notify on Windows. (bug 4832, r=fyren). 2011-04-11 22:30:03 -04:00
David Anderson 935a8d36da Triggering build. 2011-04-09 18:18:59 -07:00
Nicholas Hastings 2516a3af8a Updated hgignore to catch msvc temp files (npotb). 2011-04-09 15:52:58 -04:00
Nicholas Hastings 120a265fc3 Removed core/msvc10/sourcemod_mm.sdf from version control (npotb). 2011-04-09 15:43:10 -04:00
Nicholas Hastings 33aebeb727 Added forwards to TF2 ext for cond addition and removal (bug 4851, r=fyren). 2011-04-09 00:33:55 -04:00
Nicholas Hastings 7e06cfb471 Added gamedata for Dino d-day. 2011-04-09 00:29:57 -04:00
Berni f2bcff69a9 Added GetEntityClassname stock (bug 4798, r=dvander). 2011-04-09 00:29:46 -04:00
Nicholas Hastings 39b7d175b9 Merge 2011-04-07 23:03:51 -04:00
Nicholas Hastings b9cebe8d87 triggering build. 2011-04-07 23:01:16 -04:00
Scott Ehlert 6814cfbcd7 Triggering a build, please. 2011-04-07 15:09:56 -05:00
Scott Ehlert 2884696024 Triggering a build, perhaps. 2011-04-07 14:51:56 -05:00
David Anderson 6930046bc6 Triggering build. 2011-04-07 04:16:38 -05:00
David Anderson 174cbfe3b9 Triggering build. 2011-04-07 04:13:54 -05:00
David Anderson 611c7633cf Triggering build. 2011-04-07 04:05:00 -05:00
David Anderson 822d4269c4 Pushing build. 2011-04-07 04:04:02 -05:00
David Anderson 8fd16efc33 Triggering build. 2011-04-07 03:58:20 -05:00
Nicholas Hastings ef082d855c Fixed some gamedata lookups requiring symbols on linux/mac (bug 4832, r=fyren). 2011-04-04 13:44:19 -04:00
Nicholas Hastings a5c4739804 Added better cross-engine entity flag compatibility. (bug 4809, r=fyren). 2011-04-04 13:37:29 -04:00
Nicholas Hastings d1f1a88ffd Mark clientprefs natives as optional when ext not required. (bug 4839, r=fyren). 2011-03-24 09:48:36 -04:00
David Anderson c05f6b7bf3 Trigger build. 2011-03-22 21:45:20 -07:00
Nicholas Hastings 4b5fa26cd6 Changed some instances of LogMessage to LogAction. (bug 4649, r=fyren). 2011-03-20 19:37:25 -04:00
Nicholas Hastings 0162d18343 Updated SM core vcxproj. MMSOURCE17 -> 18, Removed files moved to logic. (NPOTB) 2011-03-13 14:03:33 -04:00
Nicholas Hastings b6415818f6 Added new TF2 condition defines (bug 4834, r=fyren). 2011-03-13 14:03:26 -04:00
David Anderson e16efbf58b Upgraded symstore. 2011-03-12 23:01:29 -08:00
Nicholas Hastings 46804d0faf SM Central fixes for new language natives (bug 4613). 2011-03-12 23:56:04 -05:00
Dr\!fter a81567e2d6 Add OnClientSettingsChanged to IPlayerHelpers (bug 4812, r=fyren) 2011-03-08 12:59:42 -08:00
databomb 217670b54a Fix precedence of voice mute flag versus specific client overrides (bug 4826, r=fyren) 2011-03-08 12:23:34 -08:00
databomb f2e19c0387 Fix mistaken unhooking of voice hooks (bug 4804, r=fyren) 2011-03-08 12:17:21 -08:00
Fyren 9799970042 Update spcomp Makefile 2011-03-08 12:07:06 -08:00
GoD-Tony ca75d0d765 Added new language natives (bug 4613, r+a13=dvander). 2011-03-08 08:38:21 -05:00
Asher Baker 0824e49000 Added missing files to the spcomp project file (bug 4824, r=dvander). 2011-03-07 15:05:51 +07:00
Nicholas Hastings c3a98db0ea Fixed SetTeamScore not updating score on client (bug 2736, r=fyren). 2011-02-28 19:40:21 -05:00
Nicholas Hastings f27685717b Updated SDKTools vc project file (NPOTB). 2011-03-01 21:25:02 -05:00
Nicholas Hastings 55034bfa6f Merge 2011-03-01 21:22:09 -05:00
Nicholas Hastings 6f8b420d0d Backed out changeset: 6da59ea19165 2011-03-01 21:22:01 -05:00
Nicholas Hastings 2ed7e14a99 Merge. 2011-02-28 19:47:14 -05:00
Nicholas Hastings ee3bcef8ab Updated Empires Mod gamedata for version 2.31a. 2011-02-28 19:45:44 -05:00
Nicholas Hastings adbcb97515 Fixed graphical glitches with funcommands effects in L4D1 (bug 3486, r=fyren). 2011-02-28 19:45:36 -05:00
Nicholas Hastings c667723958 Added identifier for new TF2 flag event, 'returned' (bug 4808, r=fyren). 2011-02-28 19:44:41 -05:00
Nicholas Hastings d94634398e Updated TF2 condition idenifiers (bug 4801, r=fyren).
Added TFCond_InHealRadius (amputator glow) and fixed TFCond_Healing.
2011-02-28 19:43:08 -05:00
Nicholas Hastings f348e58508 Fixed SetTeamScore not updating score on client (bug 2736, r=fyren). 2011-02-28 19:40:21 -05:00
David Anderson 60f16970ac Trigger build. 2011-02-27 23:58:10 -08:00
David Anderson 39c5eafafc Trigger build. 2011-02-27 23:33:15 -08:00
David Anderson b7f6c223d8 Push build. 2011-02-27 23:04:10 -08:00
Nicholas Hastings bf9a65338b Forcing build to see if upload is fixed. 2011-02-27 12:43:13 -05:00
Nicholas Hastings 5b3ae5eff9 Updated ZPS gamedata. 2011-02-07 15:50:27 -05:00
Asher Baker f80a8d306b Added defines for TF2 weapon slots (r=dvander). 2011-02-01 14:45:19 -05:00
Nicholas Hastings 9ed9060940 Updated CSPromod gamedata. 2011-02-01 13:50:17 -05:00
Nicholas Hastings 5453e60099 Updated customkill and deathflag defines in tf2_stocks (bug 4799, r=dvander). 2011-01-16 20:25:44 -05:00
Nicholas Hastings 3de61b69ad Raised MAXPLAYERS from 64 to 65 (bug 4490, r=dvander). 2011-01-16 20:06:55 -05:00
Erik Minekus 322a4ed05d Fixed bug in nominations that could cause "Unknown command" error (bug 4797, r=psychonic). 2011-01-16 20:00:44 -05:00
Nicholas Hastings 8f3b4afcf7 Removed tv_enable hook to fix rare max client count issue (bug 4791, r=fyren). 2011-01-12 18:59:34 -05:00
Nicholas Hastings ebdc6b94fc forcing build. 2011-01-12 06:47:13 -05:00
Nicholas Hastings a7218d2e59 Added missing SOURCE_SDK_BLOODYGOODTIME define to halflife.inc (bug 4780, rs=dvander). 2011-01-12 00:30:47 -05:00
Nicholas Hastings 6d93beac8e maybe i was too impatient... 2011-01-12 00:12:06 -05:00
Nicholas Hastings 1fb1309e77 forcing build 2011-01-12 00:07:20 -05:00
Nicholas Hastings 5916f40b7a Added Bloody Good Time gamedata (bug 4780, r=fyren). 2011-01-11 23:36:32 -05:00
Nicholas Hastings 5226714bbd Added support for Bloody Good Time (bug 4780, r=fyren). 2011-01-11 23:35:58 -05:00
Asher Baker dabf486a9f Added missing MENUFLAG_BUTTON_NOVOTE define to menus.inc (bug 4217, r=psychonic). 2011-01-04 11:02:39 -05:00
Zach Kanzler c78f4407ea Exposed ProcessCommandTarget in IPlayerHelpers (bug 4742, r=fyren). 2010-12-31 20:04:59 -05:00
Asher Baker fae4127ddc Added missing unhooking of ClientConnect in PlayerManager (bug 4749, r=fyren). 2010-12-31 20:02:41 -05:00
Zach Kanzler 9cc1497e9e Fixed namespace-related compile issue in INativeInvoker.h (bug 4750, r=fyren). 2010-12-31 20:00:07 -05:00
Nicholas Hastings cdd64d52eb Updated Garry's Mod gamedata (bug 4762, r=fyren). 2010-12-19 14:10:36 -05:00
Nicholas Hastings 4d319c12f8 Updated TF2 includes with new weapon and condition identifiers (bug 4761, r=fyren). 2010-12-18 17:07:42 -05:00
Nicholas Hastings 8fc3e4ab12 Updated HL2DM gamedata (bug 4756, r=fyren). 2010-12-18 00:11:51 -05:00
Nicholas Hastings ed7d68d6a7 Updated DOD:S gamedata (bug 4755, r=fyren). 2010-12-18 00:03:31 -05:00
Nicholas Hastings 59820519ce Updated CS:S gamedata (bug 4754, r=fyren). 2010-12-18 00:03:04 -05:00
Nicholas Hastings 767c807a40 Updated TF2 gamedata (bug 4753, r=DS). 2010-12-17 23:08:49 -05:00
Nicholas Hastings d25adc1b10 Updated Goldeneye:Source gamedata (bug 4751, r=fyren). 2010-12-17 23:07:54 -05:00
Nicholas Hastings 35f0067fe5 Updated Garry's Mod gamedata (bug 4747, r=fyren). 2010-12-15 21:29:59 -05:00
Nicholas Hastings f1b01dd086 Triggering build to fix bug 4729 on L4D1 now. 2010-12-13 15:37:39 -05:00
Asher Baker 3df08d64e2 Fix permissions check in antiflood (bug 4584, r=dvander). 2010-12-12 18:13:05 -08:00
Erik Minekus f56cc43331 Fixed sm_rtv printing "unknown command" (bug 4730, r=psychonic). 2010-12-04 15:28:15 -05:00
Scott Ehlert b4b37daaf6 Triggering build to fix bug 4729. 2010-12-03 23:58:41 -08:00
Nicholas Hastings 1f187d24c8 Updated TF2_GetPlayerConditionFlags to match Valve's current logic. 2010-12-03 17:12:06 -05:00
Nicholas Hastings 5b806a467b Fixed BanClient always banning by IP address (bug 4626, r=fyren). 2010-11-30 13:09:30 -05:00
Jason Booth 20d14d5a10 Fixed profiler flush not clearing, added 'report' and 'clear' (bug 4674, r=dvander). 2010-11-30 13:08:30 -05:00
Nicholas Hastings 043b2df345 Fixed voting crash when client console, chat, and SourceTV are enabled (bug 4676, r=fyren). 2010-11-30 13:04:13 -05:00
Nicholas Hastings 9ec7feb9ab Fixed CDetour crash in TF2 extension when last plugin using forward is unloaded (bug 4713, r=fyren). 2010-11-28 22:41:48 -05:00
Nicholas Hastings 57cf6db4e0 Fixed TF2 GetHoliday Windows signature (bug 4714, r=fyren). 2010-11-24 20:46:17 -05:00
Nicholas Hastings 61b677c073 Add GetGameRules to ISDKTools (bug 4707, r=fyren) 2010-11-19 23:02:27 -05:00
Nicholas Hastings 264e42a4c5 Merge 2010-11-19 15:52:41 -05:00
Nicholas Hastings 251fd660f9 Backed out changeset: 07fb9b761438 2010-11-19 15:52:33 -05:00
Matt Woodrow 6459f53263 Why, oh why, do you do this to me gcc? 2010-11-19 18:16:24 +13:00
Matt Woodrow 55c8d93862 gcc strikes again with the no newline error. Bustage fix 2010-11-19 18:12:40 +13:00
Matt Woodrow c6f83f8c14 Bustage fix. Thanks for nothing Crimson 2010-11-19 18:07:28 +13:00
Brett Powell c9eaca0e56 Add WaitingForPlayers forwards to TF2 extension (bug 4704, r=pred) 2010-11-19 17:58:46 +13:00
Brett Powell 6267c17c6b Extend Nominations API (bug 4677, r=pred) 2010-11-19 17:39:53 +13:00
Brett Powell 616113d384 Add GetGameRules to ISDKTools (bug 4707, r=pred) 2010-11-19 17:37:26 +13:00
Nicholas Hastings ac738aff10 TF2 GetHoliday detour now detours UTIL_GetHoliday (bug 4700, r=fyren). 2010-11-09 21:12:38 -05:00
A.W. Stanley 7627bf80b9 Added TF2_IsPlayerInDuel native to TF2 extension (bug 4695, r=psychonic). 2010-11-07 19:05:32 -05:00
Scott Ehlert 172abb2710 Added support for L4D on Mac OS X (bug 4684, r=fyren). 2010-10-29 20:04:50 -05:00
Scott Ehlert a643c6ef1e Fixed sample ext makefiles for L4D Linux builds (bug 4681, r=fyren). 2010-10-28 12:42:13 -07:00
Nicholas Hastings 64bfb0961e Updated TF2 customkill defines (bug 4682, r=fyren). 2010-10-28 10:23:30 -04:00
Scott Ehlert 68d822f50a Fixed loading L4D on Linux (bug 4681, r=dvander). 2010-10-27 22:05:56 -07:00
Fyren 56e3bab02a vcproj crap (NPOTB) 2010-10-20 05:13:48 -07:00
Fyren 9dd5ab4ebd Fix Windows entity output hooks (bug 4644, r=dvander) 2010-10-20 05:10:13 -07:00
David Anderson b1ef86de75 Follow-up fixes to database conf reading (bug 4286, r=fyren). 2010-10-16 22:27:34 -07:00
Fyren b4a0d7a5b7 Use SH strings for database configs (bug 4286, r=dvander) 2010-10-16 03:52:36 -07:00
Scott Ehlert e6a93a799a Added support for L4D2 on Mac OS X (bug 4647, r=fyren). 2010-10-14 18:27:37 -05:00
Nicholas Hastings 4e175f9cd6 Updated Gmod gamedata (bug 4652, r=fyren). 2010-10-07 18:35:26 -04:00
Nicholas Hastings 62e3fe1414 Merge. 2010-10-06 20:47:16 -04:00
Nicholas Hastings eeb7285528 Updated CSS/DODS/TF2/HL2DM CommitSuicide offset (bug 4650, r=fyren). 2010-10-06 20:46:29 -04:00
Scott Ehlert 0340b62b7c Triggering build against L4D2 SDK changes.
This should fix sm_kick.
2010-10-05 23:32:27 -07:00
Scott Ehlert 5488f60260 Triggering build against L4D1 SDK changes. 2010-10-05 20:07:14 -07:00
Fyren be7ef860d5 Revert mistaken vsound.cpp change 2010-10-04 19:45:21 -07:00
Zach Kanzler 9aba700d8c Added GetMessageName to IUserMessages (bug 4573, r=pred). 2010-10-02 17:58:06 -04:00
Nicholas Hastings 7972acf5bf Added one more missing enum value in tf2_stocks. 2010-10-01 15:24:30 -04:00
Fyren 430c001d58 Static gamedata checker (NPOTB) 2010-10-01 12:15:43 -07:00
Nicholas Hastings 943777e5d0 Fixed/updated TF2_DisguisePlayer (bug 4641, r=fyren). 2010-10-01 10:46:21 -04:00
Nicholas Hastings c086c3b03b Updated more TF2 gamedata and fixed RemoveCondition call (bug 4641, r=fyren). 2010-10-01 09:07:51 -04:00
Nicholas Hastings e517eceb24 Shortened names of some symbols in tf2_stocks (bug 4642, r=fyren). 2010-10-01 08:50:18 -04:00
Nicholas Hastings 7fb57a4064 Updated TF2 includes with more defined identifiers (bug 4640, r=dvander). 2010-09-30 23:40:42 -04:00
Nicholas Hastings 888bca13c0 Updated HL2DM gamedata (bug 4636, r=fyren). 2010-09-30 20:09:10 -04:00
psychonic 8b39e0631d Updated DODS gamedata (bug 4638, r=fyren). 2010-09-30 17:24:19 -04:00
psychonic d0d0148a58 Updated TF2 gamedata (bug 4635, r=fyren). 2010-09-30 17:23:54 -04:00
psychonic a73b62c5bf Updated CSS gamedata (bug 4637, r=fyren). 2010-09-30 17:23:37 -04:00
Nicholas Hastings bee0afd301 forcing build 2010-08-27 20:15:28 -04:00
Nicholas Hastings 8f37940f4c Updated cstrike ext gamedata for 2010-08-26 update (bug 4595, r=fyren). 2010-08-26 22:23:07 -04:00
Nicholas Hastings 0fa8d8cb51 Updated Gmod gamedata, including linux support (bug 4569, r=fyren). 2010-08-24 19:23:57 -04:00
Nicholas Hastings 1f589d0d5d Added AMXX Pawn geshi generation script. 2010-08-23 13:53:44 -04:00
Nicholas Hastings ad36745a7c Normalized spacing and fixed warnings with newest geshi in (Source)Pawn geshi script. 2010-08-23 13:52:42 -04:00
Scott Ehlert 99b9860ea5 Added Alien Swarm build config for sample extension (bug 4530, r=psychonic). 2010-08-20 10:42:16 -05:00
Scott Ehlert dc5f82cce2 Fixed alignment on a couple of SourcePawn debugging structures on OS X (bug 4578, r=dvander).
This problem only affected plugins compiled with a fairly old version of spcomp.
2010-08-19 22:51:42 -05:00
Nicholas Hastings dc3050537b Fixed timeleft not getting reset on Game_Commencing in CS:S (bug 4557, r=fyren). 2010-08-19 21:57:09 -04:00
Nicholas Hastings 5acd0dd2d1 Fixed Curl lib AMBuilder script failing with vs2010 (bug 4575, r=ds). 2010-08-19 13:03:14 -04:00
Scott Ehlert 0d933a1901 Disabled nextmap plugin on Alien Swarm (bug 4571, r=fyren). 2010-08-16 15:13:47 -05:00
Nicholas Hastings 9f21865caf Fixed typo in edd61d1e1e26 (bug 4542) 2010-08-05 19:24:30 -04:00
Nicholas Hastings 2ba81d3fef Added initial gamedata for Alien Swarm (bug 4530, r=ds). 2010-08-02 12:28:38 -04:00
Erik Minekus bcc1c2e658 Fixed typos in some usage replies (bug 4552, r=dvander). 2010-08-02 09:44:49 -04:00
Nicholas Hastings 5fa8972ae6 Fixed Ignite crash on Fistful of Frags (bug 4556, r=fyren). 2010-08-02 09:37:36 -04:00
Nicholas Hastings 96363a0ce3 Fixed Firearms Source FireOutput signature (bug 4555, r=fyren). 2010-08-02 09:36:10 -04:00
Scott Ehlert 817fa9d9be Oh, fixed package script for new bintools binary (bug 4548). 2010-08-01 15:09:48 -05:00
Scott Ehlert 89334bb459 Bintools extension no longer needs a separate build for each engine (bug 4548, r=dvander). 2010-08-01 14:57:54 -05:00
Scott Ehlert 0ae2d99599 Fixed potential crash with IMemUtils::FindPattern on Linux (bug 4554, r=dvander). 2010-07-31 16:06:22 -05:00
Scott Ehlert e1199a02ee Fixed missing version string and compile date for MySQL extension (bug 4547, r=dvander). 2010-07-28 14:48:51 -05:00
Scott Ehlert 9408a61eb1 Ugh, fixed builds for real. How did that even happen? 2010-07-27 20:28:27 -05:00
Scott Ehlert 78d7e1bdfe Hopefully fixed build. 2010-07-27 18:02:37 -05:00
Scott Ehlert dd44a0aaea Added support for Alien Swarm (bug 4530, r=dvander). 2010-07-27 17:32:32 -05:00
Nicholas Hastings b3144dd19a Added gamedata for Fistful of Frags (bug 3883, r=fyren). 2010-07-26 19:26:32 -04:00
Nicholas Hastings 2722e96fac Two more phrases in ice.sp are now able to use translations (bug 4540, r=fyren). 2010-07-26 19:11:06 -04:00
pheadxdll 488de0014e Added TF2_MakeBleed native to TF2 ext (bug 4542, r=fyren,psychonic). 2010-07-26 11:06:08 -04:00
Zach Callear 9c2e0ebd4c Fixed living players hearing dead players if alltalk is disabled while deadtalk is on (bug 4533, r=fyren). 2010-07-26 08:23:49 -04:00
Nicholas Hastings 28cc96cfd0 Fixed errors and missing effects caused by missing sprites on L4D2 (bug 4512, r=fyren). 2010-07-26 08:15:52 -04:00
Erik Minekus 4ab3b15efd Added TF2 object stocks (bug 4536, r=psychonic). 2010-07-23 21:23:35 -04:00
Nicholas Hastings ff363e3893 Added gamedata for Firearms: Source (bug 4537 r=fyren). 2010-07-23 21:16:15 -04:00
Nicholas Hastings cd2c10b6dc Added support for logical entities to gamedata for Synergy. (bug 4534, r=fyren) 2010-07-22 21:38:55 -04:00
Scott Ehlert 563e981902 Fixed Linux and OS X builds. 2010-07-21 22:23:56 -05:00
Fyren c3e20d5d12 FireOutput detour in SDKTools now uses CDetour (bug 4416, r=pred). 2010-07-21 22:09:03 -05:00
Nicholas Hastings 2802486671 Fixed a couple small things in npp xml generation script. 2010-07-21 08:46:52 -04:00
Nicholas Hastings 1507d03c21 Updated TF2 conditions enum and defines (bug 4526, r=fyren) 2010-07-20 11:21:37 -04:00
Jason Booth fbbf193345 Fixed duplicated entries and unnecessary file locking in ProfViewer (bug 4510, r=dvander) 2010-07-18 21:39:15 -04:00
Jason Booth 78e51e6b11 Fixed problems with ProfViewer project file (bug 4510, r=dvander) 2010-07-18 21:37:18 -04:00
Nicholas Hastings be2bbec526 Fixed PlayerRunCmd being hooked when not used. (bug 3990, r=fyren) 2010-07-18 15:43:56 -04:00
Scott Ehlert a366096ef4 Added MSVC10 project file for sample extension (bug 4521, r=dvander). 2010-07-15 15:19:14 -05:00
Scott Ehlert c72222f718 Updated docs on replicate and notify params for SetConVar* and ResetConVar (bug 4517, r=pred). 2010-07-14 20:29:53 -05:00
Scott Ehlert fba0ec93bf Fixed replicate and notify params not working on old engine games (bug 4516, r=pred).
This also fixes an issue where clients could be notified of convar changes twice on newer engines (Orange Box and later).
2010-07-14 20:29:45 -05:00
Scott Ehlert 86f767e1aa Made name param of GetConVarName() non-const (bug 4515, r=pred). 2010-07-14 20:29:29 -05:00
Scott Ehlert 7e54192713 Added gamedata for DOD:S on Mac OS X. (bug 4513, r=dvander). 2010-07-12 21:03:25 -05:00
David Anderson e76a73e276 Fixed Windows build fo' realz. 2010-07-11 18:06:06 -07:00
David Anderson ccf0490624 Windows build fix. 2010-07-11 17:45:35 -07:00
David Anderson fe2721e04e Merge. 2010-07-11 17:33:09 -07:00
David Anderson fdd1a9afef Use hash table for global name lookups (bug 4496, r=fyren). 2010-07-11 17:32:46 -07:00
Scott Ehlert abf7aed880 Triggering a build to compile against L4D2 SDK changes (bug 4509). 2010-07-11 03:00:30 -05:00
Nicholas Hastings d986c7cdc0 Fixed TF2 sigs that broke with recent update (bug 4506, r=fyren) 2010-07-08 21:07:06 -04:00
Scott Ehlert 9d5e994c01 Bleh, fixed compiler error in console.inc caused by previous changeset. 2010-07-07 02:27:59 -05:00
Scott Ehlert 6f16fc77b8 Added GetConVarDefault() native (bug 4502, r=dvander). 2010-07-06 17:32:58 -05:00
David Anderson 651dfb796c Merge. 2010-07-02 18:17:16 -07:00
David Anderson 4f2fc17a8f Fixed staging buffers reallocating on every operation (bug 3820, r=fyren+fyren). 2010-07-02 18:16:50 -07:00
David Anderson 7bc019547f Fixed O(n) insertion of debug strings (bug 4495, r=fyren). 2010-07-02 18:16:15 -07:00
David Anderson f8c2629a3e Fixed O(n^2) generation of debug info tables (bug 4493, r=fyren). 2010-07-02 18:15:59 -07:00
David Anderson b5b4bff2fc Fixed bogus assert in callfunction (bug 4487, r=fyren). 2010-07-02 18:15:21 -07:00
David Anderson 7054b92a14 Fixed bogus assert about name lengths (bug 4486, r=fyren). 2010-07-02 18:12:31 -07:00
Nicholas Hastings 5856f9a45f Gmod gamedata update (bug 4489, r=fyren) 2010-06-29 18:17:25 -04:00
Fyren cec10060c6 How did I even do that. 2010-06-28 17:25:06 -07:00
Fyren 74a479ab41 Fix build 2010-06-28 16:41:08 -07:00
Nicholas Hastings e51ab09bb1 Backed out changeset: f1bfc4089ce5 2010-06-28 19:17:10 -04:00
Nicholas Hastings 0cd98bc353 Another try at fixing build. 2010-06-28 19:12:37 -04:00
Nicholas Hastings 158f9b0dc7 Backed out changeset: 54086a5d694b 2010-06-28 19:12:05 -04:00
Nicholas Hastings 95fe6eaf86 Fix build. 2010-06-28 19:03:16 -04:00
Nicholas Hastings 40b4859b16 newline 2010-06-28 18:37:43 -04:00
Nicholas Hastings e4832f0d08 Added forward/detour for TF2's GetHoliday function (bug 4462, r=pred) 2010-06-28 17:48:14 -04:00
_KaszpiR_ 5d5400a9ac Added FindFlagChar native. (bug 3776, r=dvander) 2010-06-27 19:17:25 -04:00
David Anderson f439cad46c Removed code now dead from CS:S Orange Box move (bug 4399, r=ds). 2010-06-23 23:35:28 -07:00
Nicholas Hastings 9fe2e8e31a Removed cstrike ep1 and cstrike_beta builds and references. 2010-06-23 23:49:06 -04:00
Erik Minekus 92d3fc3d8c Fixed lack of error checking on sm_motd. (bug 4460, r=dvander) 2010-06-23 23:41:47 -04:00
Nicholas Hastings 5d89599799 Backed out changeset: 6c4d95b625ea 2010-06-23 23:40:53 -04:00
Erik Minekus 2eb5b5eb67 Fixed lack of error checking on sm_motd. 2010-06-23 23:39:39 -04:00
Nicholas Hastings 45549a8173 Cstrike ext now recognizes and loads on cstrike_beta (bug 4399, r=fyren) 2010-06-23 10:08:08 -04:00
devicenull d7ebf2edc1 Fixed inaccuracy in CommandListener documentation 2010-06-23 09:22:49 -04:00
Greyscale a9aed2e557 Removed unnecessary tag from return value of SetArrayCell 2010-06-23 09:17:21 -04:00
Nicholas Hastings d691a0cf24 Ep2v cstrike ext now gets added to package. 2010-06-23 08:54:56 -04:00
Nicholas Hastings cbaa959521 Adding building of cstrike ext for ep2v (bug 4399, r=fyren) 2010-06-23 08:19:19 -04:00
Nicholas Hastings 2f128113b6 Added missing TF2 critcola condflag define (bug 4464, r=fyren) 2010-06-22 19:31:33 -04:00
Nicholas Hastings 70251a8b2e Updated TF2 'Burn' signature (bug 4463, r=fyren) 2010-06-22 19:26:07 -04:00
Fyren e332f4e12b Possible dynamic array dimension fix (bug 4428, r=dvander) 2010-06-19 15:15:23 -07:00
Nicholas Hastings 9a140ff93f Fixed outputname null pointer crash in sdktools (bug 4422, r=fyren) 2010-06-14 09:32:50 -04:00
David Anderson 97ab5dd1b5 Fixed switch case comparisons failing with large numbers (bug 4457, r=pred). 2010-06-13 20:26:58 -07:00
Scott Ehlert 075b4e92a9 Added gamedata for TF2 on Mac OS X. (bug 4455, r=dvander). 2010-06-10 17:12:52 -05:00
Nicholas Hastings f22dcfe03c Added missing FireOutput and PlayerRunCmd gamedata for zombie_master (bug 4452, r=fyren) 2010-06-07 19:35:34 -04:00
Scott Ehlert 124086419e Fixed IMemUtils::ResolveSymbol() on Mac OS X (bug 4448, r=dvander). 2010-06-07 13:26:45 -05:00
Nicholas Hastings 0712db0d29 Merge. 2010-06-06 20:53:13 -04:00
Nicholas Hastings 895f7edd12 Added new player condition (TFCond_CritCola) to tf2.inc. (bug 4447, r=fyren) 2010-06-06 20:51:35 -04:00
Matt Woodrow a3c5c0c23a Merge 2010-06-07 10:33:47 +12:00
Matt Woodrow f7a3a6c17b Fixed clientprefs deleting cookies twice in rare cases (bug 4412, r=Fyren) 2010-06-07 10:30:33 +12:00
Nicholas Hastings 98bec2580e Fixed OnClientConnected forward not firing for bots (bug 4443, r=fyren) 2010-06-06 17:53:38 -04:00
Fyren 5ca2d469a8 Fix sdktools voice memory corruption (bug 4415, r=dvander) 2010-06-05 23:15:29 -07:00
Scott Ehlert b413405876 Added gamedata for CS:S Beta (ep2v) on Mac OS X. (bug 4399, r=dvander). 2010-06-04 17:14:52 -05:00
Nicholas Hastings 330ff93e3e Updated Obsidian Conflict gamedata (bug 4439, r=fyren) 2010-06-02 07:47:00 -04:00
Nicholas Hastings fe08104d18 Fixed tf2.inc incorrectly attempting to load tf2 ext on all games (bug 4197, r=fyren) 2010-05-31 16:31:10 -04:00
Scott Ehlert e518605d69 Fixed various areas where code was being compiled for Linux only, but should actually be used on OS X too (bug 4392, r=dvander). 2010-05-29 18:11:47 -04:00
Scott Ehlert 9a35085ac3 Merge. 2010-05-29 00:38:08 -05:00
Scott Ehlert b0cf41de08 Fixed potential problem when using bintools to call functions that return objects by value on OS X (bug 4392, r=dvander).
Objects are only returned in memory when their sizes are greater than 8 or are not a power of 2.
2010-05-29 00:22:21 -05:00
Nicholas Hastings 00c3dc73f3 Updated/fixed SourceForts gamedata (bug 4429, r=fyren) 2010-05-28 13:28:04 -04:00
Scott Ehlert a73cc93d21 Added version information to Mac OS X binaries (bug 4392, r=dvander). 2010-05-27 21:05:32 -05:00
Scott Ehlert 5a10299074 Added Mac OS X build support to sample extension makefiles (bug 4392, r=dvander). 2010-05-27 21:04:49 -05:00
Scott Ehlert 77d243f87f Merge. 2010-05-27 21:04:22 -05:00
Nicholas Hastings fb4f6406c9 Fixed SDKTools sm_dump_datamaps crash on improperly created entities (bug 4424, r=pred) 2010-05-26 08:30:13 -04:00
Scott Ehlert 3133b9b010 Merge. 2010-05-22 01:08:42 -05:00
Nicholas Hastings 12723167fc Added gamedata for Resistance and Liberation (bug 4418, r=fyren) 2010-05-21 14:04:19 -04:00
Nicholas Hastings 2cc22778b5 Added comment to databases.cfg to denote acceptable "host" types 2010-05-21 14:00:33 -04:00
Nicholas Hastings 790d3f12a6 Empires gamedata fixes (bug 4417, r=fyren). 2010-05-21 13:55:29 -04:00
Scott Ehlert beb1ab81e0 Updated .hgignore to ignore dylib binaries on OS X. 2010-05-19 04:31:10 -05:00
Scott Ehlert e5126b4c65 Added support for "mac" in game data files (bug 4393, r=dvander). 2010-05-16 02:27:53 -04:00
Scott Ehlert a2a4df5d06 Triggering build. 2010-05-15 20:50:24 -04:00
Scott Ehlert ac0bd9714b Triggering build. 2010-05-15 20:00:55 -04:00
David Anderson 60226d9195 Fixed windows build. 2010-05-15 13:01:23 -07:00
David Anderson 64455b9852 Moved gameconf code from core to logic (bug 4406 part 11, r=ds).
--HG--
rename : core/GameConfigs.cpp => core/logic/GameConfigs.cpp
rename : core/GameConfigs.h => core/logic/GameConfigs.h
rename : core/smn_gameconfigs.cpp => core/logic/smn_gameconfigs.cpp
2010-05-14 23:35:42 -07:00
David Anderson 96f6cdf677 Moved datapack natives from core to logic (bug 4406 part 10, r=ds).
--HG--
rename : core/smn_datapacks.cpp => core/logic/smn_datapacks.cpp
2010-05-14 21:16:35 -07:00
David Anderson c188491289 Moved handle natives from core to logic (bug 4406 part 9, r=ds).
--HG--
rename : core/smn_handles.cpp => core/logic/smn_handles.cpp
2010-05-14 21:06:06 -07:00
David Anderson e9e4d566a5 Build fix. 2010-05-14 20:56:40 -07:00
David Anderson 85bedca236 Move string natives from logic to core (bug 4406 part 8, r=fyren).
--HG--
rename : core/smn_string.cpp => core/logic/smn_string.cpp
2010-05-14 20:04:44 -07:00
David Anderson d80191df3d Move replace functions from logic to core (bug 4406 part 7, r=fyren). 2010-05-14 20:04:30 -07:00
David Anderson 9137e92c09 Move translator from logic to core (bug 4406 part 6, r=ds).
--HG--
rename : core/PhraseCollection.cpp => core/logic/PhraseCollection.cpp
rename : core/PhraseCollection.h => core/logic/PhraseCollection.h
rename : core/Translator.cpp => core/logic/Translator.cpp
rename : core/Translator.h => core/logic/Translator.h
rename : core/sm_memtable.h => core/logic/sm_memtable.h
rename : core/smn_lang.cpp => core/logic/smn_lang.cpp
2010-05-14 19:43:53 -07:00
David Anderson 721dae3892 Inline sm_memtable (bug 4406 part 5, r=ds). 2010-05-14 19:43:38 -07:00
David Anderson 1cdacf69be Move some string functions from core to logic (bug 4406 part 4, r=fyren). 2010-05-14 19:28:10 -07:00
David Anderson b5b002aa4b Move banning natives from core to logic (bug 4406 part 3, r=fyren).
--HG--
rename : core/smn_banning.cpp => core/logic/smn_banning.cpp
2010-05-14 18:22:03 -07:00
David Anderson 78f5b513c0 Move admin natives from core to logic (bug 4406 part 2, r=ds).
--HG--
rename : core/smn_admin.cpp => core/logic/smn_admin.cpp
2010-05-14 17:46:19 -07:00
David Anderson 0032fcaa66 Move memutils from core to logic (bug 4406, r=ds).
--HG--
rename : core/MemoryUtils.cpp => core/logic/MemoryUtils.cpp
rename : core/MemoryUtils.h => core/logic/MemoryUtils.h
rename : core/sm_symtable.h => core/logic/sm_symtable.h
2010-05-14 16:14:59 -07:00
Scott Ehlert 0fba0923c8 Changed MSVC compiler flag /Ot to /Ox and added /OPT:REF linker flag. 2010-05-14 02:42:08 -05:00
Scott Ehlert e0169f6696 Fixed loader on Mac OS X (bug 4392, r=dvander). 2010-05-14 01:04:17 -05:00
David Anderson 28217f10cb Added ProcessTargetString simple filter API (bug 4404, r=ds). 2010-05-13 12:28:51 -07:00
Scott Ehlert fb28f4bcd0 Fixed package name for Windows (bug 4395). 2010-05-13 04:54:31 -05:00
Scott Ehlert 8852256ab6 Appended OS names to package archives (bug 4395, r=dvander). 2010-05-13 04:23:43 -05:00
Scott Ehlert 95de453677 Compile and link fixes for Mac OS X (bug 4392, r=dvander). 2010-05-13 04:22:31 -05:00
Scott Ehlert 5ef40e15c4 Add support for Mac OS X to ResolveSymbol() and FindPattern() in IMemUtils (bug 4392, r=dvander). 2010-05-13 04:20:41 -05:00
Scott Ehlert 31f223bff5 Merge. 2010-05-13 04:19:39 -05:00
Scott Ehlert 9fce2b1d8e Only build OB-Valve binaries on Mac OS X for now (bug 4392, r=dvander). 2010-05-13 04:18:58 -05:00
David Anderson a6ceb337b2 Move timer natives into logic binary (bug 4402, r=ds).
--HG--
rename : core/smn_timers.cpp => core/logic/smn_timers.cpp
2010-05-13 01:47:12 -07:00
Scott Ehlert f4e22cb44c Backed out changeset 29e6cc6f2124 (bug 4392). 2010-05-12 04:13:56 -05:00
David Anderson ab9750f8b2 Only build OB-Valve binaries on Mac OS X right now (bug 4392, r=ds). 2010-05-11 23:48:39 -05:00
Nicholas Hastings fe8e0b0e0a Merge 2010-05-11 20:41:19 -04:00
Nicholas Hastings c2565cf3b7 Updated gamedata for ep2v cstrike(_beta) (bug 4399, r=fyren) 2010-05-11 20:40:14 -04:00
David Anderson af82971bf5 Fixed Windows build. 2010-05-11 02:07:35 -07:00
David Anderson 271b52158e Mac build fixes (bug 4392, r=me). 2010-05-11 01:46:55 -07:00
Fyren 26c404adee Mac build fixes (bug 4392, r=dvander). 2010-05-11 01:46:54 -07:00
Scott Ehlert f06af54165 Fixed compiler and linker flags for darwin (r=dvander).
The previous commit by 'me' was a fake atrocity created by dvander. :o
2010-05-11 02:36:03 -05:00
Fyren 2a77dfbcd2 Fixed buildbot scripts for darwin (r=dvander). 2010-05-11 00:16:52 -07:00
David Anderson 738fcb6563 Added pcre-7.9 build for darwin. 2010-05-11 00:10:37 -07:00
Scott Ehlert 3d4754d4ad Fixed master amb script for darwin (r=dvander). 2010-05-11 00:10:36 -07:00
Scott Ehlert b9ea1d1be4 Fixed master amb script for darwin (r=dvander). 2010-05-11 00:10:36 -07:00
Nicholas Hastings b1b0484dae Fixed TF2 natives not being marked optional when ext not required (bug 4389, r=fyren) 2010-05-10 18:18:15 -04:00
Nicholas Hastings 20b79784bf Updated Empires gamedata (bug 4390, r=fyren) 2010-05-08 21:37:21 -04:00
Nicholas Hastings 4baa3358df Updated geshi and npp sp language files for SM 1.3.2
Also fixed typo in geshi generator and added 'default' to list of reserved words.
2010-05-08 21:31:32 -04:00
Scott Ehlert 8fe7f8b8d8 Fixed SendConVarValue() on TF2, DOD:S, L4D, and L4D2 (bug 4273, r=dvander). 2010-05-04 22:53:26 -04:00
Scott Ehlert 6996a0db2b Argh, really fixed HookEntityOutput() crash on TF2 (bug 4375). 2010-04-30 11:18:45 -04:00
Scott Ehlert b89a899c82 Fixed HookEntityOutput() crash with recent updates to TF2 and L4D2 (bug 4375, r=pred, a=blocking). 2010-04-30 03:51:35 -04:00
Fyren bbbbb660b3 Triggering build 2010-04-29 20:48:17 -07:00
Scott Ehlert 6ba29219e5 Updated sample extension makefiles to compile against latest changes for L4D2 and TF2 (bug 4374, r=dvander). 2010-04-29 16:06:32 -04:00
Nicholas Hastings dd97bdcc2c Fixed SetUserCvar offset for ep2v (bug 4371, r=fyren) 2010-04-29 14:12:08 -04:00
Nicholas Hastings b63e0f08bf Backed out changeset 907677755029 2010-04-29 14:11:03 -04:00
Nicholas Hastings c5ae9d45ad Fixed SetUserCvar offset for ep2v (bug 4371, r=fyren) 2010-04-29 14:05:22 -04:00
David Anderson e906a0da8c Merge. 2010-04-29 01:28:27 -07:00
David Anderson 2edfb0aaac Fixed regression when using panels (no bug, r=me). 2010-04-29 01:28:11 -07:00
Nicholas Hastings dc116858a9 ep2v gamedata (bug 4371, r=fyren) 2010-04-29 00:09:35 -07:00
Fyren 1a938f8711 ep2v build changes (bug 4371, r=dvander) 2010-04-29 00:08:08 -07:00
David Anderson fc88cd3cb1 Check return value of GetPlayerNetInfo (bug 4315, r=fyren). 2010-04-27 23:40:04 -07:00
David Anderson 55205e631b Merge. 2010-04-27 21:07:59 -07:00
David Anderson a36fa76d21 Root menu handles in callbacks (bug 4353, r=fyren). 2010-04-27 21:03:20 -07:00
Nicholas Hastings b8d512f5e1 Fixed entity output hooks not working in Insurgency (bug 4365, r=fyren) 2010-04-24 21:10:23 -04:00
Nicholas Hastings d4263b59c6 Added obsidian to list of games which support tempents with ep2 gamedata (thread 75480, r=me). 2010-04-24 21:08:06 -04:00
Nicholas Hastings e5e1507dff Fixed functions.inc not having double-include prevention (bug 4342, r=fyren) 2010-04-24 21:06:10 -04:00
Zach Kanzler 2edf63c5fd Fixed IGamePlayer->GetUserId() returning junk (bug 3916, r=fyren) 2010-04-24 21:00:43 -04:00
Fyren 5ec4b3441e Build stuff for L4D2 DLC (bug 4361, r=SAWCE) 2010-04-23 11:39:12 -07:00
Nicholas Hastings dd1757b3c3 Updated L4D2 gamedata for The Passing update (bug 4361, r=pending) 2010-04-23 14:22:41 -04:00
Nicholas Hastings dda26545e5 Updated Insurgency gamedata for Insurgency 2010-04-19 update (bug 4356, r=fyren) 2010-04-23 10:38:16 -04:00
Nicholas Hastings 410ef8ce96 Merge 2010-04-19 11:18:46 -04:00
Nicholas Hastings ce7cb9cf64 Added Notepad++ userDefineLang.xml generator for Sourcepawn
(based on the SP GeSHi generator)
2010-04-19 11:10:26 -04:00
Nicholas Hastings 31a16375ab Enhanced Sourcepawn GeSHi generation script
* Added a few missing keywords.
* Added better preprocessor, number, and string control char highlighting.
* Added default tab width (of 4 spaces).
* Fixed parsing of some enum values.
* Changed keywords to be case sensitive.
* Changed colors to be more sane.
2010-04-19 11:08:23 -04:00
Nicholas Hastings ec7b47da22 Updated Empires gamedata for Empires 2.25a release (bug 4108, r=fyren) 2010-04-19 10:38:28 -04:00
David Anderson 0124020ba4 Added obsidian to list of games which need menu redraws (thread 123237, r=me). 2010-04-04 23:50:27 -07:00
David Anderson 28f71d18bd Added obsidian to radiotimeout game list (t=123237, r=me). 2010-04-04 23:49:28 -07:00
Nicholas Hastings fe226c1c8d Updated sourcepawn GeSHi colors slightly to appease 2.53% of the haterz. 2010-03-31 18:40:03 -04:00
Nicholas Hastings 18e20de4d6 Added GeSHi language file generator for Sourcepawn 2010-03-31 14:27:09 -04:00
Nicholas Hastings 956d345e17 Added TF2_StunPlayer native and TF2_GetPlayerConditionFlags stock to TF2 ext. (bug 4331, r=pred) 2010-03-31 08:51:25 -04:00
Nicholas Hastings ddfb958647 Added missing semicolon in plugins/include/tf2.inc. 2010-03-23 20:06:13 -04:00
Nicholas Hastings 145d0ef37d Added Gamerules SDKCall support to CSPromod gamedata (bug 4320, r=pred) 2010-03-23 19:42:19 -04:00
Nicholas Hastings 019e3956f7 Fixed bad caller crash with HookEntityOutput (bug 4311, r=fyren) 2010-03-20 11:07:45 -04:00
Nicholas Hastings a72daff4ac Added 4 new natives to TF2 ext. (bug 4166, r=pred)
Added natives for Regenerate, add/remove condition, and SetPlayerPowerPlay. Also updated TF2 test plugin.
2010-03-18 11:35:05 -04:00
Nicholas Hastings 58ce9cd37f Added missing core voting cvars to sourcemod.cfg (bug 4309, r=fyren) 2010-03-11 22:00:46 -05:00
Nicholas Hastings 687bdaff8f Added missing core voting cvars to sourcemod.cfg (bug 4224, r=pred) 2010-03-11 17:43:46 -05:00
Nicholas Hastings 2143a66ad6 Fixed incorrect DispatchSpawn signature for ZPS and added ShowMenu and Hudtext support (bug 4279, r=Fyren) 2010-03-09 20:39:56 -05:00
Nicholas Hastings 74892f1562 Re-enabled ShowMenu support for FortressForever (bug 4028, r=dvander) 2010-03-09 18:50:47 -05:00
Nicholas Hastings 4a59ac011f Fixed FireOutput signature for FortressForever (bug 4062, r=dvander) 2010-03-09 18:47:56 -05:00
Nicholas Hastings e0fd2e8f27 Fixed sm_rename on L4D2 on Windows (bug 4131, r=dvander) 2010-03-09 18:44:18 -05:00
Nicholas Hastings ba76506773 Fixed inaccurate description for sm_unban (bug 4245, r=dvander) 2010-03-09 18:41:25 -05:00
Nicholas Hastings d224827544 Fixed CSPromod SDKTools Support (bug 4255, r=dvander) 2010-03-09 18:36:45 -05:00
Nicholas Hastings 8d35b5bd11 Updated PVKII support for PVKII 2.3 (bug 4276, r=dvander) 2010-03-09 18:29:31 -05:00
Nicholas Hastings 9df28c25d7 Fixed CreateGameRulesObject sig for ZPS (bug 4285, r=dvander). 2010-03-09 18:13:21 -05:00
Matt Woodrow 5f9b2a91fd Added optional 'No Vote' option to vote menu (bug 4217, r=dvander) 2010-02-27 14:56:02 +13:00
Erik Minekus 46a46f5e49 Fixed Insurgency gamedata file (bug 4282, r=dvander). 2010-02-24 23:41:06 -08:00
Liam 4bdc495d01 Corrected a typo in the string.inc file. (bug 4207, r=fyren) 2010-02-13 01:49:39 -05:00
Liam e60d5e6aeb Updated VC2010 files. 2010-02-13 01:13:43 -05:00
UNLOZE 7c3387755d Added MSVC10 files for Visual Studio 2010 support. 2010-02-13 00:40:53 -05:00
Fyren 6f04dad428 maxClients -> MaxClients in sdktools_sound.inc (fix bug 3985, r=psychonicsux) 2010-02-10 11:07:21 -08:00
Nicholas Hastings 6ed4720df3 Added missing file for Battlegrounds support (bug 4146). 2010-02-08 20:47:51 -08:00
Nicholas Hastings ac7b454039 Added SDKTools support for CSProMod (bug 4255, r=dvander) 2010-02-08 20:25:11 -08:00
Nicholas Hastings 0af39de346 Fixed base plugins using GetMaxClients() instead of MaxClients (bug 3985, r=dvander). 2010-02-08 20:14:52 -08:00
Nicholas Hastings d484979fe8 Fixed CreateEntityByName for Insurgency (bug 4180, r=dvander). 2010-02-08 20:10:24 -08:00
Nicholas Hastings 6e87e5c05f Updated Garry's Mod offsets (bug 4230, r=dvander). 2010-02-08 20:08:14 -08:00
Nicholas Hastings 7633c8e76e Fixed nextmap errors on Garry's Mod (bug 4268, r=dvander). 2010-02-08 20:06:48 -08:00
Fyren c78e89c3c1 Compiler confused |any| tag with |String| on array arguments. 2010-02-08 20:00:06 -08:00
David Anderson 1852aaf332 Fixed GetClientCookieTime not being exported (bug 4237, r=fyren). 2010-02-08 19:58:36 -08:00
Nicholas Hastings 8b4c8f63c0 Fixed FindEntityByClassname crash in Synergy (bug 4235, r=dvander). 2010-02-08 19:57:20 -08:00
Fyren d7b64c18c2 Fixed NULL-deref in entity handling code. 2010-02-08 19:55:14 -08:00
Nicholas Hastings 09668c972e Fixed Day of Defeat offsets for 20100203 update (bug 4262, r=dvander). 2010-02-04 19:28:06 -06:00
Scott Ehlert 68a0d10443 Webternet and Updater extensions now load on Windows 2000 (bug 4234, r=dvander). 2010-01-20 15:12:57 -06:00
David Anderson 0708e7f8f6 Fixed accidental hook against garbage offset (bug 4231, r=fyren). 2010-01-20 04:03:46 -08:00
David Anderson 1235e989d4 Added PlayerRunCmd offset for DoD:s (bug 4231 mitigation, r=me). 2010-01-20 04:01:39 -08:00
Scott Ehlert 3a6808e4d8 Updated .hgignore for Explorer files beginning with a lowercase letter (argh!) 2010-01-20 02:40:55 -06:00
David Anderson dbfb034548 Mercurial queues... oh, how terrible. 2010-01-18 03:20:44 -08:00
David Anderson 94d01e9e5a Moved CRC32 from core to logic (no bug, r=me). 2010-01-18 03:08:52 -08:00
David Anderson 5e48b49b7e Updated credits for 1.3 release. 2010-01-14 03:29:31 -08:00
Greyscale 3b0785cae0 Fixed missing #endif in adminmenu.inc (bug 4216, r=dvander). 2010-01-14 00:22:45 -08:00
David Anderson bd3b46d624 Fixed command listener spew on server shutdown (bug 4198, r=fyren). 2010-01-13 21:48:51 -08:00
David Anderson 1cbe996831 Linux build fix (bug 3520 fallout). 2010-01-11 22:50:44 -08:00
Downtown1 18865c44c8 Added a new ValveCallType that allows for arbitrary |this| parameters, as well as associated features in gamedata and for reading/writing memory (bug 3520, r=dvander, sr=fyren). 2010-01-11 22:46:44 -08:00
David Anderson ead6ca73e5 Triggering build. 2010-01-11 20:09:34 -08:00
Nicholas Hastings deb3f6d9c4 Changed basechat to use %N instead of GetClientName (bug 4205, r=dvander). 2010-01-10 17:57:34 -08:00
Nicholas Hastings b1b98c5256 Fixed basechat not using color messages on hl2mp (bug 4204, r=dvander). 2010-01-10 17:51:24 -08:00
Nicholas Hastings 4dc2227f23 Fixed lack of quotes on some basechat log messages (bug 4132, r=dvander). 2010-01-10 17:50:30 -08:00
David Anderson a76f9e11fb Backed out changeset 9a52d61fe6ba (bad commit). 2010-01-10 17:49:44 -08:00
Nicholas Hastings abeb91a5e4 Fixed lack of quotes on some basechat log messages (bug 4132, r=dvander). 2010-01-10 17:47:11 -08:00
Nicholas Hastings 6d5e7cbe08 Added missing SDK define for L4D2 (bug 4209, r=dvander). 2010-01-10 17:38:03 -08:00
Nicholas Hastings c468c26ad6 Follow-up to bug 4194 (r=dvander). 2010-01-10 17:29:32 -08:00
David Anderson a0e940c5a9 Merge. 2010-01-10 17:16:08 -08:00
David Anderson 2f1de22cae Backed out changeset 292be4eb9d0c (bug 4211). 2010-01-10 17:16:02 -08:00
David Anderson 4631282709 Fixed reentrancy problems with iterators, forwards, and function removals (bug
4059, r=fyren).
2010-01-10 16:58:17 -08:00
Fyren 306ac5243a Fixed GuessSDKVersion() not working on ep2v (bug 4194, r=dvander). 2010-01-09 11:33:19 -08:00
Nicholas Hastings 956fe42a6c Fixed SetUserCvar (sm_rename) on TF/DoD Linux (bug 4196, r=dvander). 2010-01-07 01:26:01 -08:00
Nicholas Hastings 1824bdfe7e Add Insurgency to list of games that support HUD messages (bug 4136, r=dvander). 2009-12-19 20:42:32 -08:00
David Anderson 5f53284cbd Fixed build, wrong enum comparison. 2009-12-19 18:25:56 -08:00
David Anderson 7a84b71eb2 Fixed crashes from rare plugin loading errors (bug 4153, r=ds). 2009-12-19 18:19:28 -08:00
David Anderson 85382cd6c2 Fixed SourceMod crashing after flushing the profiler (bug 4149, r=ds). 2009-12-19 18:18:17 -08:00
David Anderson 02a99f1e51 Add ability to change dontBroadcast status on hooked events (bug 3886, r=ds). 2009-12-19 18:16:41 -08:00
Nicholas Hastings fe405df704 Another TF2 gamedata fix (bug 4151, r=dvander). 2009-12-19 12:57:26 -08:00
Nicholas Hastings ac5ee90c9b Battlegrounds 2 gamedata support (bug 4146, r=dvander). 2009-12-19 00:03:57 -08:00
Nicholas Hastings fb6b34e155 TF2 gamedata updates (bug 4147, r=dvander). 2009-12-18 22:01:41 -08:00
Fyren caa8932c9a Improve/fix GetEntity (bug 4092, r=pred) 2009-12-15 23:14:53 -08:00
David Anderson 75611f3bca Fixed profiler being set to NULL (bug 4143, r=fyren). 2009-12-14 23:08:15 -08:00
David Anderson f0f14d8a22 Fixed infinite loop in Windows build failure path (bug 4144, r=ds). 2009-12-14 23:07:54 -08:00
Nicholas Hastings 98ad6cd23b Fixed CreateEntityByName for Insurgency (bug 4046, r=dvander). 2009-12-14 20:31:16 -08:00
Nicholas Hastings bd80d1cd76 Updated Synergy gamedata (bug 3987, r=dvander). 2009-12-14 20:30:44 -08:00
Nicholas Hastings 5a4670ec2f Added HudText support for Zombie Master (bug 4004, r=dvander). 2009-12-14 20:30:04 -08:00
Nicholas Hastings 6fd039925a Added Neotokyo support (bug 4126, r=dvander). 2009-12-14 20:29:23 -08:00
David Anderson cd602ab5e3 Fixed basecomm description spelling (bug 4112, r=me). 2009-12-14 20:27:26 -08:00
Dog f59ead54d3 Fixed CommitSuicide offset on DoD:S (bug 4109, r=dvander). 2009-12-14 20:26:45 -08:00
Fyren 4030f1e40d Merge 2009-11-23 01:50:28 -08:00
Fyren b7ac7452f7 Fix wonky handling of path separators for "sm plugins" commands (bug 3857, r=dvander) 2009-11-23 01:47:32 -08:00
Scott Ehlert 5dd6867408 Updated .hgignore to ignore some Windows and OS X files. 2009-11-22 01:39:29 -06:00
Scott Ehlert 9d410df287 Updated sample_ext and mms_sample_ext for Orange Box Valve and Left 4 Dead 2 (bug 4118, r=pred). 2009-11-22 01:33:08 -06:00
David Anderson fe8dc36074 Use GetVSPInfo() from MM:S 1.8 legacy API (bug 4081, r=ds). 2009-11-20 15:18:58 -06:00
Fyren 0cef3fbf27 Fix leak in nominations plugin (bug 4104, r=pred) 2009-11-18 15:44:51 -08:00
Fyren b5d9b18da4 Fix rare basevotes map vote problem (bug 3905, r=dvander) 2009-11-18 15:42:21 -08:00
Scott Ehlert dc0ea197cd Added IMemoryUtils::ResolveSymbol() for resolving symbols hidden via GCC's -fvisibility=hidden (bug 4091, r=dvander,pred).
Right now, this is only used on L4D2 where it is needed.
2009-11-06 16:24:40 -06:00
David Anderson 5bf17fc5ae Clarified handle invariants in clientprefs.inc (no bug, r=me). 2009-11-04 13:52:12 -05:00
Fyren 33ca5943fa Don't call edict_t::StateChanged(ushort) on L4D2 (bug 4090, r=dvander) 2009-11-01 02:53:34 -08:00
Scott Ehlert edc6591041 Use SOURCE_ENGINE_ORANGEBOXVALVE constant from MM:S 1.8 (bug 4087, r=dvander). 2009-10-30 14:04:43 -05:00
Fyren 113ec33743 More L4D2 gamedata changes 2009-10-30 01:24:55 -07:00
Scott Ehlert 8c297832f6 Fixed Windows build, I think. 2009-10-30 00:03:54 -05:00
Fyren e767b2ff94 Typo fix 2009-10-29 20:34:00 -07:00
Scott Ehlert a1ff408c13 Merge. 2009-10-29 21:47:27 -05:00
Matt Woodrow 440184e83c New sdk uses _linux for vstdlib/tier0 2009-10-30 15:20:48 +13:00
Matt Woodrow 8ee6cad7ea Build Trigger 2009-10-30 15:10:34 +13:00
Matt Woodrow edb17b76f0 AMBuild updated to use new MM:S version 2009-10-30 14:58:17 +13:00
Fyren 31dc5f335d Updated GuessSDKVersion 2009-10-30 14:34:34 +13:00
Matt Woodrow eb68e4c627 SourceMod MSVC project files updated, windows tested and loading, gamedata fix. 2009-10-30 14:29:45 +13:00
Matt Woodrow 98e97920ae AMBuild updated for new L4D2 engine 2009-10-30 13:27:19 +13:00
Matt Woodrow 533723cd8b L4D2 gamedata updates 2009-10-30 13:27:05 +13:00
Fyren 9e69afbbd6 Inital SM fixes for l4d2 and linux makefile updates 2009-10-30 13:26:13 +13:00
Scott Ehlert 2dea76dfa1 Changed name in credits. 2009-10-29 17:35:00 -05:00
David Anderson 8a8bafb199 Use GetSourceEngineBuild() from MM:S 1.8 legacy API (bug 4083, r=ds). 2009-10-29 01:33:57 -07:00
David Anderson 5a21d8c24d Let SourceMod use OnUnlinkConCommandBase from MM:S 1.8 legacy API (bug 4080, r=ds). 2009-10-29 00:53:31 -07:00
David Anderson 5111b4799c Fix iloop race when using AddCommandListener and SourceMod unloads (bug 4077, r=pred). 2009-10-29 00:06:12 -07:00
David Anderson 528bbe0116 Build against MM:S 1.8 with core-legacy (bug 4076, r=ds). 2009-10-28 23:30:52 -07:00
David Anderson 3030ab8664 Fixed crash when activating command listeners on EP1 while inside a command callback (bug 4072, r=pred). 2009-10-28 00:50:48 -07:00
David Anderson 2698ff1a04 Added feature testing functionality (bug 4021, r=pred). 2009-10-28 00:37:34 -07:00
David Anderson 084dd1c8dd Build fix. 2009-10-28 00:31:48 -07:00
David Anderson a8392889de Fix maphistory command not returning a value (bug 4069, r=pred). 2009-10-28 00:08:15 -07:00
David Anderson 3bf5edc2b3 Added @spec target (bug 2718, r=fyren). 2009-10-27 03:41:36 -07:00
David Anderson 97be0ff22a Bumped trunk version. 2009-10-27 03:11:34 -07:00
David Anderson b43c8c018b Warn user when adminmenu_custom is going to emit duplicate entries (bug 3894, r=pred). 2009-10-27 01:43:51 -07:00
David Anderson 38a5a4b97b Increase display lengths on custom menus (bug 3677, r=pred). 2009-10-27 01:37:19 -07:00
Matt Woodrow 73d70b6953 Fixed bug in entity output hooks (bug 3988, r=fyren). 2009-10-27 00:03:59 -07:00
David Anderson 6b06733192 Added better random number generator (bug 3831, r=fyren). 2009-10-26 23:59:59 -07:00
David Anderson 359146f60b Don't pass unconnected clients into OnClientCommand (bug 3732, r=fyren). 2009-10-26 23:51:39 -07:00
Fyren 0931c6a7e1 Fix OnConfigsExecuted() executing too early on EP1 with large config files (bug 3828, r=dvander). 2009-10-26 23:44:57 -07:00
Fyren f2049c5910 Fix menu population for sm_who (bug 4030, r=pred) 2009-10-20 15:48:56 -07:00
David Anderson de76827dd8 Fixed using war mode not load_unlocking before reloading (bug 3869, r=pred). 2009-09-27 02:25:32 -04:00
David Anderson 0cae3ac5a1 Use case-insensitive game folder matches for Windows (bug 3913, r=pred). 2009-09-27 02:19:17 -04:00
David Anderson 4fc378d3e2 Target filters now run for "@me" special target (bug 4000, r=pred). 2009-09-27 02:17:23 -04:00
Scott Ehlert e3e11d233c Merge. 2009-10-06 13:37:59 -05:00
Scott Ehlert fcfd5c7419 Fixed crash when a plugin was unloaded before a client convar query had returned results (bug 4044, r=dvander). 2009-10-06 13:37:30 -05:00
Erik Minekus be8c498aea Fix help message for sm cvars (bug 3994, r=dvander). 2009-10-06 03:15:10 -07:00
TESLA-X4 5528b9ba09 HL2DM support for OnPlayerRunCmd (bug 3914, r=dvander). 2009-10-06 03:13:44 -07:00
Nicholas Hastings c60877b6f2 GoldenEye:Source supports ShowMenu (bug 3747, r=dvander). 2009-10-06 03:06:02 -07:00
Scott Ehlert 07901946d0 Fixed building of libcurl on Linux when a build clobber is done. 2009-10-06 01:52:08 -05:00
Scott Ehlert 705ea18b2a Really fixed version.rc file problem by removing and recreating build OUTPUT directory when required (bug 4042, r=dvander). 2009-10-06 01:46:06 -05:00
Scott Ehlert 3277cc3675 Fixed case where version.rc files could have incorrect version number (bug 4042, r=dvander). 2009-10-04 00:52:53 -05:00
David Anderson c09b7bed34 Updated to latest GeoLite Country database (OCT-2009). 2009-10-02 05:08:14 -07:00
Fyren 83e633534d New L4D offset for SetUserCvar (bug 4033, r=dvander). 2009-10-02 04:59:47 -07:00
David Anderson 8a2c299653 Fixed rare crash involving hudtext code and maxclient shifts (bug 4016, r=fyren). 2009-10-02 04:30:46 -07:00
David Anderson 74dc2ed1f9 Re-enabled PDB files. 2009-10-02 03:47:42 -07:00
David Anderson dc0d6a9b4a Fixed crash when reloading blocked plugins fails (bug 4038, r+a=fyren). 2009-10-02 03:33:59 -07:00
David Anderson 3f264097a7 Removed unused files. 2009-10-02 03:30:54 -07:00
Nicholas Hastings e0c7b17bd5 Updated GiveNamedItem for latest L4D update (bug 4035, r=dvander). 2009-10-02 02:35:25 -07:00
Fyren d43b027c25 Fixed crash when block-loading more than 8 plugins (bug 4034, r=dvander). 2009-10-02 02:30:01 -07:00
Eric Minekus 85963cafe7 Fixed several plugins excluding the last client from loops (bug 3984, r=dvander). 2009-10-02 02:26:11 -07:00
Fyren d4deeb4edd Puuuuuush for SDK change (bug 4032) 2009-10-01 08:48:57 -07:00
David Anderson c72bfe3685 Another forgotten-file for bug 4015. Thanks mqueues. 2009-09-26 17:19:47 -04:00
David Anderson 90137f2263 Follow-up to bug 4015: apparently hg patch doesn't commit added files. 2009-09-26 17:14:50 -04:00
David Anderson d8474cfafa Added generic command hooking mechanism, to replace Reg*Cmd which is intended for command creation (bug 4015, r=pred). 2009-09-26 17:12:23 -04:00
Matt Schubert 493a756aaa Typo; missed a quotation mark 2009-09-17 13:08:18 -04:00
Matt Schubert 95d30ba4ec Fixed the Huntsman not firing CalcIsAttackCritical (bug 3927, r=dvander) 2009-09-17 12:42:58 -04:00
Matt Woodrow dbcb3e6192 Merge 2009-09-17 19:04:15 +12:00
Matt Woodrow 4228642b53 Rockthevote 'already voted' message now displays RTV progress (bug 4011, r=Fyren) 2009-09-17 18:55:40 +12:00
Matt Woodrow acba87ae46 Added voting output (bug 1997, r=dvander) 2009-09-17 18:54:40 +12:00
David Anderson 533f17b3b0 Block plugins from registering "sm" command (bug 4013, r=pred). 2009-09-16 22:37:20 -07:00
Matt Woodrow 77de71d79d Fixed gnprintf's translation parameter reordering (bug 4010, r=dvander) 2009-09-16 13:38:04 +12:00
David Anderson caadb7fa27 Fixed invalid array access in PluginSys (bug 3933, r=pred). 2009-09-07 21:29:18 -07:00
David Anderson 1dd862f83d Build fix, bug 3818 fallout. 2009-09-07 17:15:47 -07:00
Fyren 70bb4930f6 Respect clientside mutes and add fixed client listening API (bug 3818, r=pred,dvander). 2009-09-07 17:09:28 -07:00
David Anderson 852eb5c524 Fixed BanClient() crashing if called before certain callbacks (bug 3912, r=pred). 2009-09-07 16:21:48 -07:00
Matt Woodrow 3cfc45c4e8 Fixed TR_GetEntityIndex returning -1 for world ent hits (Logical entities bcompat break) 2009-09-05 19:36:12 +12:00
David Anderson db97c2a5b1 Thanks, Python. 2009-08-30 17:27:44 -07:00
David Anderson 70993256b9 Added -lpthread to sourcemod.logic binary. 2009-08-30 17:26:03 -07:00
David Anderson a439c3be3c Added sourcemod.logic to package script. 2009-08-30 12:06:32 -07:00
David Anderson 0a060982e3 Fixed extension version reporting. 2009-08-30 01:54:45 -07:00
David Anderson 7ffcc176cd Fixed build failure in profiler. 2009-08-30 01:43:05 -07:00
David Anderson 4a9650df80 Added missing version file. 2009-08-30 01:40:39 -07:00
David Anderson f1c6f09f98 Added missing configure script. 2009-08-30 01:38:28 -07:00
David Anderson f039c0636e More build fixes. 2009-08-30 01:34:24 -07:00
David Anderson a620e1490c Build fixes. 2009-08-30 01:19:32 -07:00
David Anderson d682361cfc More changes for new build system. 2009-08-30 00:46:56 -07:00
David Anderson d3f0a14867 Imported support for new build system. 2009-08-30 00:21:42 -07:00
David Anderson 83393f299a Removed auto folders (bug 3949). 2009-08-30 00:03:58 -07:00
Matt Woodrow bf1285567e Build fix 2009-08-24 09:41:53 +12:00
DaFox e315726001 Added PointOutsideWorld native to sdktools (bug 3906, r=dvander) 2009-08-24 09:19:42 +12:00
Erik Minekus 2f3e172162 Added "motd" chat trigger to basetriggers (bug 2694, r=dvander) 2009-08-24 09:13:37 +12:00
Kornelijus Survila d6cf9bd8ae Added manual extension reloading command to root console menu (bug 3934, r=dvander) 2009-08-24 09:11:42 +12:00
Zach Kanzler 5710a35388 Added Kick, Ban and IsInKickQueue to public extension API (bug 3907, r=dvander) 2009-08-24 09:05:54 +12:00
Mr E. Unknown 1156d00538 Fixed 'list' type custom menu entries overwriting admin restrictions (bug 3783, r=pred) 2009-08-24 09:02:10 +12:00
Downtown1 5707354a18 Added sm_resetcvar command to basecommands (bug 3636, r=pred) 2009-08-24 08:55:34 +12:00
Matt Schubert 155cc4573c Fixed ForceRespawn offset for TF2 2009-08-20 03:02:43 -04:00
Matt Woodrow 3288592d30 Fixed tf2 build configs 2009-08-17 11:07:14 +12:00
Matt Woodrow 886b683739 Makefile fix 2009-08-17 10:54:57 +12:00
Matt Woodrow 95cffca5f1 Forgot makefiles patch 2009-08-17 10:53:54 +12:00
Matt Woodrow 85cb592a7e Fixed typo in the build tool 2009-08-17 10:44:35 +12:00
Matt Woodrow 13b9deb5ef Merged the build fixes (hopefully) 2009-08-17 10:42:01 +12:00
Matt Woodrow c307c692a0 Copy of new tf engine changes from 1.2 branch 2009-08-17 10:03:53 +12:00
David Anderson 008e98d980 Fixed incorrect escaping in clientprefs SQLite queries (bug 3904, r+a12=pred). 2009-08-10 22:16:58 -04:00
Fyren b11f597521 Fix SetClientViewModel (bug 3941, r=pred) 2009-08-09 15:35:49 -07:00
Matt Woodrow 944c523a49 Fixed incparser for new functag format and added a sample Crimson Editor template 2009-08-09 14:03:50 +12:00
psychonic 3c365259cc Synergy gamedata updates (bug 3315, r=dvander) 2009-07-30 17:17:48 -07:00
David Anderson 98274d4b17 Linux build of pcre-7.9 (bug 3923). 2009-07-28 12:56:16 -05:00
David Anderson 12a1cb9e97 Check-in of pcre-7.9 source code and win32 static lib (bug 3923). 2009-07-28 17:51:34 -04:00
Matt Woodrow d273750849 Mergé 2009-07-28 15:06:57 +12:00
Matt Woodrow 75c54c6738 Fixed regression with sound natives (bug 3918, r=dvander) 2009-07-28 15:05:47 +12:00
Fyren ffd72fbb4d Improve non-admin to admin chat (bug 3844, r=pred) 2009-07-27 17:02:04 -07:00
Fyren 71dc3d4826 Make Insurgency use SayText for printing to chat (bug 3738, r=dvander) 2009-07-27 16:45:30 -07:00
psychonic b7757d71bf Insurgency gamedata updates (bug 3511, r=dvander) 2009-07-27 16:17:13 -07:00
psychonic 55338e731b ZM gamedata updates (bug 3746, r=dvander) 2009-07-27 16:16:33 -07:00
psychonic 097aa3fa16 Empires gamedata updates (bug 3500, r=dvander) 2009-07-27 16:13:55 -07:00
psychonic 935d6a7cf5 ZPS gamedata updates (bug 3877, r=dvander) 2009-07-27 16:04:43 -07:00
psychonic c69d1c7fb8 AoC gamedata updates (bug 3891, r=dvander) 2009-07-27 13:30:01 -07:00
Fyren b5152c0c48 Fix sm_corecfgfile for modified sm_basepaths (bug 3856, r=dvander) 2009-07-27 13:22:55 -07:00
Matt Woodrow ed02df113f A newline again? Really? 2009-07-24 13:17:26 +12:00
Matt Woodrow 2afdcf54ab I surrender GCC! Please? 2009-07-24 13:09:06 +12:00
Matt Woodrow 764fbe7fac A merge? 2009-07-24 12:59:13 +12:00
Matt Woodrow 0c9160ec8b More build fix attempts 2009-07-24 12:54:08 +12:00
Matt Woodrow 33bed487ac Please GCC? 2009-07-24 12:43:13 +12:00
Matt Woodrow 3e36382b58 Added support for logical (non-networked) entities using entity references - See http://wiki.alliedmods.net/Entity_References_%28SourceMod%29 (bug 2459, r=dvander) 2009-07-24 12:34:31 +12:00
Matt Schubert 7ec656db09 Fix RemoveDisguise Windows signature for TF2 2009-07-09 17:51:12 -04:00
Matt Schubert cf61779b08 Backed out changeset a42b24399f60 2009-07-09 17:49:26 -04:00
Matt Schubert 71600a4f37 Fix RemoveDisguise Windows signature for TF2 (bug 3892) 2009-07-09 17:45:20 -04:00
Fyren 14320f2155 Fix PlayerRunCmd offset for TF2 2009-06-16 19:41:44 -07:00
David Anderson 1923368353 Fixed build. 2009-05-30 20:04:55 -04:00
David Anderson 752bd78de5 Fixed compiler asserting when returning a string literal (bug 3836, r=fyren). 2009-05-30 20:03:56 -04:00
David Anderson c4b17855e5 Fixed compiler erroring when tagging functions for string return (bug 3837, r=fyren). 2009-05-30 20:03:01 -04:00
David Anderson a1543f79cb Fixed compiler not handling constant chained relational operators correctly (bug 3838, r=fyren). 2009-05-30 20:02:05 -04:00
David Anderson d4798ccaa5 Fixed revote bug and inflexibilities in RedrawClientVoteMenu (bug 3834, r=fyren). 2009-05-30 19:59:55 -04:00
Fyren c2c4ed1fe5 Fix crash when unloading a plugin with live user message hooks (bug 3817, r=dvander) 2009-05-25 18:12:26 -07:00
David Anderson 614188c82b Fixed compiler using NDEBUG in debug builds (bug 3815, r=fyren). 2009-05-24 12:08:27 -04:00
David Anderson 53e98c114a Fixed Plugin_Handled acting like a Stop in usermsg hooks (bug 3685, r=fyren). 2009-05-24 12:01:18 -04:00
Fyren 73c8246204 Preliminary TF2 gamedata changes 2009-05-21 20:43:22 -07:00
Matt Woodrow 58d98f8454 Fixed crash on client disconnect 2009-05-19 15:16:25 +12:00
Fyren 7605396e84 Add L4D handling to GuessSDKVersion() (bug 3842, r=dvander) 2009-05-16 16:32:21 -07:00
"David Anderson cec339552e Moved smn_functions to logic binary.
--HG--
rename : core/smn_functions.cpp => core/logic/smn_functions.cpp
2009-05-14 11:38:50 -04:00
"David Anderson fc003db139 Updated MSVC9 files. 2009-05-14 11:28:43 -04:00
"David Anderson caf434aef2 Moved profiler and adt_trie to logic binary.
--HG--
rename : core/Profiler.cpp => core/logic/Profiler.cpp
rename : core/Profiler.h => core/logic/Profiler.h
rename : core/smn_adt_trie.cpp => core/logic/smn_adt_trie.cpp
2009-05-14 11:24:07 -04:00
David Anderson 5261873f39 Fixed Linux build. 2009-05-13 22:07:11 -04:00
David Anderson 421b58f68e Import of core modularization plan (bug 3599). 2009-05-13 21:55:50 -04:00
Fyren 850dbd62c6 Fix pred's failed l2merge merge 2009-05-13 16:24:55 -07:00
David Anderson 2af45da0a8 Merge from 1.2 branch. 2009-05-12 19:43:21 -04:00
David Anderson 685e8bac22 DOS line endings to match 1.2 branch. 2009-05-12 19:43:02 -04:00
David Anderson e2a6ae9ecc Central place to mark releases so buildbot symbols aren't scrapped by purge script (bug 3809, r=me, a12=NPOTB). 2009-05-12 19:06:57 -04:00
David Anderson eb64e66e9f Fixed crash when clientprefs saw disconnect from 64th client (bug 3821, r=pred). 2009-05-12 17:28:43 -04:00
Fyren 6a24b049cb Fixed early tv_enable causing crashes (bug 3766, r=dvander). 2009-05-12 17:27:45 -04:00
David Anderson 1112dfffb3 Merge. 2009-05-12 17:26:47 -04:00
David Anderson 3304bc2f3a Backed out changeset 97d5f4dbae0b 2009-05-12 17:26:39 -04:00
David Anderson 4d2bee192f FortressForever does not support radio menus (bug 3819, r+a12=me). 2009-05-12 12:59:11 -04:00
David Anderson 2d4fb8a463 Merge. 2009-05-12 12:37:24 -04:00
Fyren 56c5012bef Fixed early tv_enable causing crashes (bug 3766, r=dvander). 2009-05-12 12:37:12 -04:00
Fyren 47002f970d Fix bad bintools assert that will always fail in debug (r=pred) 2009-05-11 19:45:51 -07:00
Matt Woodrow f6fd395485 I dislike you GCC 2009-05-12 14:19:06 +12:00
Matt Woodrow 4f426dafef Merged, thanks Fyren 2009-05-12 13:56:00 +12:00
Matt Woodrow 7b6f2863a9 Added PlayerRunCmd hook to sdktools (bug 3289, r=dvander) 2009-05-12 13:54:06 +12:00
Fyren 834a9bc84d Some sdktools string and style changes (r=pred) 2009-05-11 18:46:19 -07:00
Matt Woodrow 7710a1fdb0 Merge from 1.2 branch 2009-05-11 11:45:08 +12:00
Matt Woodrow bd97bdd378 Fixed unhook event crash (bug 3814, r=dvander) 2009-05-11 11:32:59 +12:00
David Anderson 211c5dcfcd Fixed compiler reading uninitialized strings while processing varargs (bug 3811, r=fyren,pred, a12=blocking). 2009-05-10 11:01:19 -04:00
David Anderson 2cdf1897b9 Merge. 2009-05-09 09:24:04 -04:00
David Anderson bf8c57c669 Fixed compiler choosing whether to emit stradjust.pri on dynamic arrays based on uninitialized memory (bug 3810, r=fyren,pred, a12=blocking). 2009-05-09 09:21:14 -04:00
Fyren 7fd6b308f8 Fix Windows L4D CreateFakeClient signature (bug 3792) 2009-05-08 00:10:12 -07:00
Fyren 6908c0f1d0 Fix sdktools MSVC9 project file (and sm_slap) for EP1 games (bug 3768) 2009-05-07 20:15:32 -07:00
Fyren f74380b3e9 Fix casting problems in TextParsers breaking TrimString for non-ASCII (bug 3800, r+a12=dvander) 2009-05-03 11:23:12 -07:00
Matt Woodrow 4abdc29d9e l2merge Fyren 2009-04-24 18:20:55 +12:00
Fyren 5096aef6e7 Remove knife critical stuff and previous "fix" (bug 3791, r=pred) 2009-04-22 19:06:19 -07:00
Fyren d9f5801a68 I can in no way find fault with myself, so I blame buildbot. 2009-04-21 17:55:14 -07:00
Fyren 462e03d150 Fix medigun/CalcIsAttackCritical Windows crash (bug 3791, r=pred) 2009-04-21 02:38:35 -07:00
Fyren 6aded88e14 Fixed CommitSuicide offset for today's TF2 update 2009-04-20 21:38:12 -07:00
Fyren 74a25097b2 Fix OnClientConnect rejectmsg handling, improve doc (bug 3690, r=dvander) 2009-04-13 16:39:53 -07:00
Matt Woodrow 2c190f502f Added new playerhelpers interface 2009-04-13 10:02:55 +12:00
Matt Woodrow 0122686541 Clientprefs now loads cookies for clients on late load (bug 3735, r=dvander) 2009-04-13 09:50:46 +12:00
Fyren 187c0a9bf7 Fix GetCommandFlags for original engine games (bug 3759, r=dvander) 2009-04-07 17:24:22 -07:00
Fyren a4295d1e93 Add a warning to not edit SM's gamedata files; switched to UNIX line endings (bug 3728, r=dvander) 2009-04-07 09:59:21 -07:00
Fyren 9def5e57de Disable nextmap in Synergy and Dystopia (bug 3687, bug 3741; r=liam) 2009-04-01 05:56:51 -07:00
Fyren 3d573c08a1 Fix CommitSuicide offset (bug 3726, r=Srdog) 2009-04-01 04:35:51 -07:00
Fyren c9ff6be881 Fix CommitSuicide offset (bug 3726, r=Srdog) 2009-04-01 04:34:01 -07:00
David Anderson 40a8892cb7 Merge from sourcemod-1.2 branch. 2009-03-30 11:43:16 +02:00
David Anderson e1bb10d859 Removed SSE optimizations from msvc9 project files (bug 3756, r=ds, a12=blocking). 2009-03-30 08:31:35 +02:00
David Anderson 569f4646a0 Fixed builder not passing GCC version in some cases (bug 3750, r=ds, a12=ds). 2009-03-30 08:29:47 +02:00
David Anderson 16756e550f Handle FormatMessage failures from LoadLibrary oddities (bug 3760, r=fyren). 2009-03-29 09:01:40 -04:00
Fyren 933b77e429 Fix sm exts info help message 2009-03-25 21:01:40 -07:00
David Anderson 3ac9ecb4b7 Removed tag system (bug 3751, r=fyren, a12=blocking). 2009-03-25 03:27:32 -04:00
Fyren ccc4386285 Let vtablecheck take class names instead of just vtable symbols (also fix line endings) 2009-03-21 18:17:43 -07:00
Fyren 4364ba46e2 Switch base plugins to APL2; disable nextmap for L4D, Dystopia, Synergy (bugs 3716, 3687, 3741; r=pred) 2009-03-18 22:10:39 -07:00
Fyren d7917a6a9a Add AskPluginLoad2() to allow silent failure, deprecate AskPluginLoad() (bug 3716, r=dvander) 2009-03-18 19:20:40 -07:00
Fyren 81e30e75c4 Merge: this'll teach me to not pull first 2009-03-18 19:15:40 -07:00
Fyren 7a94343dec Fix/restore TF2_IgnitePlayer (bug 3528, r=pred) 2009-03-18 18:50:31 -07:00
Fyren 3ee6bae4ba Fix/restore TF2_IgnitePlayer (bug 3528, r=pred) 2009-03-18 18:50:20 -07:00
Fyren 9a77e6b3cc Gave OnClientAuthorized() its meds. 2009-03-18 18:34:46 -07:00
Fyren a1727cc047 vim syntax file and a perl script to generate a syntax file from the includes 2009-03-18 18:30:35 -07:00
Matt Woodrow 5b012b6509 Merge 2009-03-17 12:31:10 +13:00
Matt Woodrow c23ffa2ce5 Added GetClientCookieTime native (bug 3736, r=dvander) 2009-03-17 12:30:21 +13:00
Matt Woodrow ff68383732 Added GetClientCookieTime native (bug 3736, r=dvander) 2009-03-17 12:29:10 +13:00
Matt Woodrow bce2b2adb6 Added new playerhelpers interface 2009-03-17 12:28:37 +13:00
Matt Woodrow fa8c9a8418 Clientprefs now loads cookies for clients on late load (bug 3735, r=dvander) 2009-03-17 12:28:05 +13:00
David Anderson 2e176b8b8d Fixed auto update URL being set too late (bug 3699, r=pred). 2009-03-16 18:43:34 -04:00
Fyren f6bb6037f3 Allow spaces in compiler command line options (bug 3729, r=dvander) 2009-03-12 18:37:04 -07:00
Scott Ehlert 7fac7c8713 Pushing a build to test buildbot against mercurial 1.2. 2009-03-09 06:38:20 -05:00
David Anderson bdaef0b0dc Pushing build to test buildbot. 2009-03-09 01:21:01 -04:00
Liam 5b21fc89fc Fixed typo in code that broke buildbot. (Bug 3698 r=Liam) 2009-03-07 23:27:10 -05:00
Liam bc7b90a1b4 Removed the alive check from sm_rename. Improved mod support between various engines. (Bug 3698 r=pred) 2009-03-07 17:11:11 -05:00
Liam 134cb68396 Removed the alive check from sm_rename. Added in additional support for CSS / OB engines. 2009-03-07 16:58:14 -05:00
David Anderson c0ee2ce345 Fixed assorted updater bugs (bug 3697, r=pred, a121=blocking). 2009-03-06 17:41:35 -05:00
David Anderson a299533508 Bumping merge node so buildbot doesn't puke. 2009-03-06 14:45:03 -05:00
David Anderson d4bcbc3771 Merge from 1.2 branch. 2009-03-06 14:44:25 -05:00
Fyren 2c7555366f Fixed SetEntityHealth (bug 3693, r+a12=dvander). 2009-03-06 14:40:30 -05:00
Scott Ehlert d8264fada7 Merge from 1.2 branch. 2009-03-05 15:48:38 -06:00
Scott Ehlert 72da49415e Added -dev tag back to version.h files for manual builds. 2009-03-05 14:59:09 -06:00
David Anderson 8e744ec5f7 Re-added -dev tag, bumped version to 1.2.1. 2009-03-05 02:36:27 -05:00
David Anderson 7372b66680 Added tag sourcemod-1.2.0 for changeset 3a73bbf60f34 2009-03-05 02:35:44 -05:00
David Anderson 8dfbcf5a9f Bumped versions. 2009-03-05 02:07:44 -05:00
David Anderson 01ff2cca0c Removed -dev tag for release. 2009-03-05 02:06:59 -05:00
David Anderson e981c2b43f Updated changelog. 2009-03-05 02:05:56 -05:00
David Anderson 1f636bf7a9 Bumped trunk to 1.3.0. 2009-03-05 01:48:18 -05:00
David Anderson 68bc33ef4d Pushing build. 2009-03-05 00:01:07 -05:00
Matt Woodrow a7e447a3f5 Merge 2009-03-05 12:00:31 +13:00
Matt Woodrow 096a04b3e4 Added SourceMod to the sv_tags list and added a tags API for plugins (bug 3688, r=dvander) 2009-03-05 11:59:49 +13:00
David Anderson 86e600000d Added -lrt to webternet from suggestion in bug 3686. 2009-03-04 06:45:50 -05:00
David Anderson a0128d9b7c Fixed SetEntityHealth not compiling, darkm regression (bug 3684). 2009-03-03 09:41:55 -05:00
Matt Woodrow 65996254c6 Triggering automatic break.. uh build. 2009-03-03 11:07:50 +13:00
Fyren a85031be53 Gently disable nextmap on L4D, rather than fail load (bug 3683, r+a12=dvander). 2009-03-01 21:15:14 -05:00
Matt Woodrow 8509f0857a Build Push! 2009-03-02 14:44:33 +13:00
David Anderson b24c75b400 Moved structs.gamedata.txt out of the way.
--HG--
rename : gamedata/structs.gamedata.txt => extensions/structs/structs.gamedata.txt
2009-03-01 17:45:04 -05:00
FLOOR_MASTER d372e789a4 Performance improvements to admin-sql-prefetch (bug 3354, r+a12=dvander). 2009-03-01 16:59:12 -05:00
Fyren d9f7e4c9e0 Added more detail to certain player-oriented menu titles (bug 2740, r=liam, a12=dvander). 2009-03-01 16:51:15 -05:00
Fyren e6ea726b69 Improved docs of TIMER_HNDL_CLOSE (bug 3641, r=dvander). 2009-03-01 16:48:55 -05:00
Fyren 98c1a18e57 Improved error message for handle leakage (bug 3646, r,a12=dvander). 2009-03-01 16:43:48 -05:00
Fyren e04d2a4a10 Added case insensitivity search to ReplaceString (bug 3639, r=dvander). 2009-03-01 16:41:44 -05:00
David Anderson 96a3671bb6 Improved user message interception API (bug 3631, r=pred). 2009-03-01 16:39:25 -05:00
David Anderson 0c028ca9d0 Fixed CommitSuicide offset for Insurgency (bug 2560). 2009-03-01 16:35:01 -05:00
David Anderson 64124447d5 Fixed shutdown breakage from updater landing. 2009-03-01 03:49:59 -05:00
David Anderson 037ea592ab Fixed Linux build. 2009-03-01 01:58:42 -05:00
David Anderson 6ebbb48f9f Re-landed automating updating (bug 3530, r=pred). 2009-03-01 01:35:39 -05:00
David Anderson 2e8a53ff34 Normalized gamedata line endings to Windows. 2009-03-01 01:19:51 -05:00
David Anderson f104438802 Do binary writes instead. 2009-03-01 01:18:09 -05:00
David Anderson eb25650e26 Merge. 2009-02-28 23:15:23 -05:00
David Anderson c4cba5254c Added auto-restart functionality to the Updater extensions (bug 3530, r=pred). 2009-02-28 23:14:16 -05:00
Scott Ehlert c90dda908a Merge from 1.1 branch. 2009-02-27 00:50:12 -06:00
Scott Ehlert 6aca0a8bfc Added -dev tag back to version.h files for manual builds. 2009-02-27 00:22:59 -06:00
Matt Woodrow 864376e7ba Merging from 1.1 branch 2009-02-27 12:20:36 +13:00
Matt Woodrow 71794fe511 Updated branch for 1.1.3 development 2009-02-26 17:41:42 -05:00
Matt Woodrow c69989c56f Added tag sourcemod-1.1.2 for changeset b3ffa8a4511c 2009-02-26 17:37:57 -05:00
Matt Woodrow cc91beece7 Bumped all versions 2009-02-26 16:54:03 -05:00
Matt Woodrow 0d6c6bdb58 Updated changelog and removed -dev tag 2009-02-26 16:48:31 -05:00
Matt Woodrow e234b1537c Merge 2009-02-27 10:20:47 +13:00
Matt Woodrow 407e58604f Fixed Critical hits being permanently disabled (bug 2674, r=dvander) 2009-02-27 10:19:46 +13:00
Scott Ehlert 2c3bf7dd23 Ran versionchanger script for consistency. 2009-02-25 23:44:18 -06:00
Scott Ehlert 5e6417eac0 Merged changes from 1.1 2009-02-25 23:17:37 -06:00
Scott Ehlert a4db34a419 Re-added -dev tag. 2009-02-25 23:05:31 -06:00
Scott Ehlert 8c493576cc Fixed 1.1.1 tag for great justice! 2009-02-25 23:00:59 -06:00
David Anderson 110a0d98fa Added tag sourcemod-1.1.1 for changeset 46c76edb0875 2009-02-25 20:25:23 -05:00
David Anderson 449b52e5a4 Removed tag sourcemod-1.1.1 2009-02-25 20:25:20 -05:00
David Anderson d0fda1f919 Bumped all versions. 2009-02-25 20:24:56 -05:00
David Anderson 79ea33beda Pushing build. 2009-02-25 20:21:47 -05:00
David Anderson fef5bd321c Added tag sourcemod-1.1.1 for changeset ffa740152efd 2009-02-25 20:10:12 -05:00
David Anderson 6c7a763b76 Fixed changelog. 2009-02-25 20:09:22 -05:00
David Anderson 78fa1c9995 Merge. 2009-02-25 20:07:20 -05:00
David Anderson 3623ee3ce8 Backed out changeset fa286305bd3f 2009-02-25 20:07:12 -05:00
David Anderson ba28da5fdc Removed -dev tag for release build. 2009-02-25 20:02:47 -05:00
David Anderson c2b7bd10ec Updated changelog. 2009-02-25 19:38:45 -05:00
David Anderson 35ab37c76c Merge. 2009-02-25 19:22:47 -05:00
David Anderson c968dfa113 Allow for second private chat trigger (bug 3667, r,a11=pred). 2009-02-25 19:22:36 -05:00
Matt Woodrow 09b24e45f9 Merge from 1.1 branch 2009-02-26 12:47:56 +13:00
Matt Woodrow 8541040bb9 Fixed CommitSuicide offset. 2009-02-26 12:42:59 +13:00
Matt Woodrow 8ae003046c Updated CDetour code in TF2 extension to prevent crashes with spies. Updated windows sig. 2009-02-26 12:42:13 +13:00
Matt Woodrow fc7f9ac6e9 Fixed linux offset for SetClientInfo (bug 3652, r=Fyren) 2009-02-23 10:09:51 +13:00
Matt Woodrow 7dcc7ea99c And again with the linux fixing (bug 3657) 2009-02-23 08:58:14 +13:00
Matt Woodrow 4590015ed6 Fixed linux build 2009-02-22 14:58:05 +13:00
Matt Woodrow 79f9dc61a4 Added edict_t and CBaseHandle conversion functions to IGameHelpers (bug 2616, r=dvander) 2009-02-22 14:38:05 +13:00
Matt Woodrow 3fac7d027a Fixed SetClientInfo offset after TF2 update (bug 3652) 2009-02-21 11:29:28 +13:00
Matt Woodrow 10ba5809d2 Fixed mapchooser not checking for an existing vote with mp_fraglimit (bug 3503) 2009-02-19 20:35:41 +13:00
Matt Woodrow 792204bd06 This has to be the worst GCC error ever. 2009-02-19 19:35:45 +13:00
Matt Woodrow f19cb010a0 Upgraded clientprefs to use the client serial API (bug 3616) 2009-02-19 19:28:50 +13:00
Matt Woodrow ca3df3bd50 Added a client verification serial API (bug 3616, r=dvander) 2009-02-19 19:19:44 +13:00
Matt Woodrow db43487b5a Merging changes from 1.1 branch 2009-02-19 14:23:36 +13:00
Fyren 38c37b8160 Fixed modules.versions not including clientprefs (bug 3647, r=dvander) 2009-02-19 14:22:22 +13:00
Scott Ehlert 44a04e6167 DS fails once again. Fixed Linux build once and for all. 2009-02-18 03:25:01 -06:00
Scott Ehlert 9d6a9eb615 Ugh, fixed Linux build for real by removing stray underscores. 2009-02-18 03:13:25 -06:00
Scott Ehlert 27070af1b9 Added Dark Messiah build config to sample_ext. 2009-02-18 03:08:02 -06:00
Scott Ehlert 32d2d4107d Fixed Linux build. 2009-02-18 02:58:03 -06:00
Scott Ehlert 75ebac822d Merge. 2009-02-18 02:30:21 -06:00
Scott Ehlert bd9fab6cf5 Added support for Dark Messiah engine and game. (no bug, r=me).
The development of this feature would not be possible without the support of the following people from the game's community:
Dylan Riggs, Carl Pettengill, Ed Moreland, and Christian.
2009-02-18 02:19:22 -06:00
Matt Woodrow d75f8f11e1 Oops - FormatPath missing a param (bug 3645) 2009-02-18 19:59:14 +13:00
Matt Woodrow 47900db414 Merging changes from 1.1 branch 2009-02-18 19:14:27 +13:00
Matt Woodrow aec3469c03 Fixed CalcCriticalKnife signature for TF2 (r=bl4nk) 2009-02-18 19:13:08 +13:00
Matt Woodrow b61542242c Build Fix! 2009-02-18 15:30:43 +13:00
Matt Woodrow 13c1fd09c4 Added custom gamedata file parsing (bug 3644, r=dvander) 2009-02-18 15:08:17 +13:00
Matt Woodrow fddb69e49e Fixed MsgSentNotify callbacks not firing on intercept hook (bug3631, r=dvander) 2009-02-18 15:03:17 +13:00
David Anderson ed51d5cf84 Disallow ".." to appear in paths from the updater. 2009-02-17 16:58:17 -05:00
David Anderson 3d7b0db114 Updater uses a core.cfg specified URL now. 2009-02-17 16:39:02 -05:00
David Anderson 9e445a5adf Added API to grab arbitrary kv pairs from core.cfg. 2009-02-17 16:19:11 -05:00
David Anderson 97e25c37de Deprecated Acquire/ReleaseLock from IGameConfigManager, use thread pump in updater. 2009-02-17 15:59:51 -05:00
David Anderson 16033c1307 Deprecated sm_corecfgfile for sm_basepath (bug 2693, r=ds). 2009-02-17 14:03:20 -05:00
David Anderson 15d64b8486 Fixed documentation typos in dbi.inc (bug 3587). 2009-02-08 15:40:48 -05:00
David Anderson 5d06aa3c8c Pushing build because buildbot is delicate and needs its hand held to cross the street and put on underwear. 2009-02-08 01:06:31 -05:00
David Anderson e276223b61 Merge from sourcemod-1.1. 2009-02-08 00:02:58 -05:00
David Anderson 71b48fad0f Merge. 2009-02-07 23:57:11 -05:00
David Anderson a3fade1c1d Fixed EventManager holding onto stale pointers (bug 3548, r=ds). 2009-02-07 23:56:48 -05:00
David Anderson 6530f47b2d Renamed translation file with deprecated naming scheme.
--HG--
rename : translations/plugin.playercommands.txt => translations/playercommands.phrases.txt
2009-02-07 22:32:55 -05:00
Milo 3ab1ef139f Fixed documentation typo on TF2_GetPlayerClass (bug 3608, r=dvander). 2009-02-07 22:05:04 -05:00
mr.e.unk 36bd6423c2 Allow longer path strings in adminmenu (bug 3620, r=pred). 2009-02-07 22:01:09 -05:00
David Anderson ffd8ff099a Initial import of updater extension, currently incomplete - just getting it in the tree (bug 3530). 2009-02-02 15:41:25 -05:00
mr.e.unk 178347f9f1 Removed RTV section from maplists.cfg. (bug 3611 r=Liam) 2009-02-01 20:39:23 -05:00
David Anderson e194f89b25 Removed UTIL_Format from webternet extension. 2009-02-01 20:38:59 -05:00
David Anderson 3bfc70aa3b Normalized line endings. 2009-02-01 20:37:50 -05:00
David Anderson 93a6a0f211 Merge. 2009-02-01 20:31:48 -05:00
David Anderson cef6a2e389 Added an SMC stream reader to ITextParser (bug 3530, r=pred). 2009-02-01 20:31:27 -05:00
mr.e.unk 4f5764e4a5 Removed RTV section from maplists.cfg. (bug 3611 r=Liam) 2009-02-01 20:22:50 -05:00
David Anderson 21770ff10f Corrected IWebternet version number. 2009-02-01 19:58:16 -05:00
David Anderson 2b97461f54 Added snprintf/vsnprintf helpers to ISourceMod, finally (bug 3530, r=pred). 2009-02-01 19:57:09 -05:00
David Anderson 0cf5f4ae2a Added form POSTing and HTTP error code handling to Webternet (bug 3530, r=pred). 2009-02-01 19:56:24 -05:00
David Anderson 7b6dcfce87 Removed md5 files from core, as they are unused. 2009-02-01 17:50:44 -05:00
David Anderson f9d472847c Merge from sourcemod-1.1. 2009-02-01 02:37:00 -05:00
David Anderson d69d97402b Fixed nits from bug 3570. 2009-02-01 02:35:19 -05:00
David Anderson 643c39690f Added client "sm", "sm credits", and "sm plugins" commands (bug 3570, r=ds,pred). 2009-02-01 02:33:31 -05:00
David Anderson 6048144310 RegConsoleCmd is now case insensitive for client-only commands (bug 3602, r=ds). 2009-02-01 02:13:17 -05:00
[email protected] 94303ea9a0 Fixed nextmap trigger showing wrong output with end-of-map voting disabled and sm_trigger_show set to zero (bug 3597, r=pred). 2009-02-01 02:09:15 -05:00
David Anderson a017e4820a Added the ability for extensions to invoke arbitrary natives (bug 3605, r=ds,theY4Kman). 2009-02-01 02:03:03 -05:00
David Anderson 50e1c5ba1f Database fallback for clientprefs is now more "intelligent" (bug 3564, r=pred). 2009-01-31 23:42:35 -05:00
David Anderson c5ec369388 Fixed STEAM_0 reference in common.phrases.txt (bug 3577). 2009-01-31 22:51:48 -05:00
David Anderson 7d3ebce7d1 Fixed sm_sql_addgroup not working (bug 3578, r=liam). 2009-01-31 22:46:34 -05:00
Liam 52826342fc Removed sounds translations from funcommands.phrases.txt, created and added sounds.phrases.txt, modified sounds.sp to include translation files (bug 3603, r=dvander) 2009-01-31 22:39:36 -05:00
Liam 29b357a2f6 Insurgency game_start / game_newmap event fix (bug 3497, +dvander) 2009-01-31 22:21:37 -05:00
David Anderson 747ed1e59a Fixed bugs in the Knight shared files (not that these are used in SM). 2009-01-29 12:50:32 -05:00
Scott Ehlert 992c05b6aa Wow, buildbot, just wow. You built 1.1 instead of 1.2 again. 2009-01-28 02:14:41 -06:00
Scott Ehlert f4a5457941 Merged changes from sourcemod-1.1 branch. 2009-01-28 00:00:19 -06:00
Scott Ehlert 7167a807bf Fixed a crash in the Event Manager when a game fired an event from a listener that was looking for the same event (bug 3468, r=me).
In other words it was a problem where our FireEvent hooks were being re-entered for the _same_ game event. The Event Manager was not able to handle this and crashed.
2009-01-27 23:53:48 -06:00
Scott Ehlert 22675ba2e7 Fixed crash in GetClientInfo() native on L4D (bug 3569, r=me).
The CreateFakeClient signature (used for verification before retrieving the IServer interface pointer) changed in a recent update. The IServer pointer was therefore null and GetClientInfo() did not check for this.

The CreateFakeClient signature is also no longer hardcoded. It is modifiable in gamedata/sdktools.games/engine.*.txt.
2009-01-22 15:20:45 -06:00
Matt Woodrow 80602b011d Build fixed hopefully. 2009-01-17 13:45:51 +13:00
Matt Woodrow abea8e2195 Fixed bintools compile options 2009-01-17 13:17:55 +13:00
Liam 9075aecb18 Updated basebans.sp to support L4D and allow future expansion of the STEAM_ identifier. (bug 3567 r=dvander) 2009-01-15 12:08:33 -05:00
Liam 6e9ac875d7 Fixed the bug in sounds.sp. (Bug 3568 r=dvander) 2009-01-15 10:37:54 -05:00
Fyren 100ecb12e9 Fixed admin-sql-threaded not working on L4D (bug 3559, r=dvander). 2009-01-14 17:00:24 -05:00
David Anderson 57b4701e57 Fixed gamedata bug in SDKTools (no bug, r=me). 2009-01-14 12:20:22 -05:00
David Anderson fffc211989 Whoops, updated build tool to correctly copy new gamedata files. 2009-01-14 00:55:28 -05:00
jonasfietz 5a0528de26 Improve compile.sh to accept filenames (bug 3550, r=dvander). 2009-01-13 16:14:44 -05:00
Rothgar fb8f46ea45 Updated SDKTools definitions for Zombie Panic Source (bug 2467, r=dvander). 2009-01-13 15:58:29 -05:00
TheDOO a8e1a4f2fd Update of Obsidian CommitSuicide offset (bug 2699, r=dvander).
(transplanted from sourcemod-central ffc584a3c382c064006b857e6697c99fff1a681d)

--HG--
extra : transplant_source : %FF%C5%84%A3%C3%82%C0d%00k%85%7Ef%97%C9%9F%FF%1Ah%1D
2009-01-12 02:33:03 -05:00
Scott Ehlert 157f050f89 Fixed a memory leak when game events were hooked as EventHookMode_Post (no bug, r=me).
The duplicated event data that was being carried over to the IGameEventManager2::FireEvent post hook was not being freed. EventHookMode_Post is the default so this leak could have happened fairly often.
2009-01-27 13:41:57 -06:00
TheDOO 3653f56331 Update of Obsidian CommitSuicide offset (bug 2699, r=dvander). 2009-01-12 02:33:03 -05:00
David Anderson e31cbbfe21 New gamedata organization (bug 3546, r=ds,pred). 2009-01-12 02:28:22 -05:00
David Anderson bc3491c5bd Another build fix for Windows. 2009-01-12 01:32:53 -05:00
David Anderson 9a7c25047d Fixed windows build. 2009-01-12 01:15:29 -05:00
David Anderson 7cef8b7363 Attempt at getting webternet extension into build process. 2009-01-12 00:36:36 -05:00
David Anderson e449b8384c Webternet extension now exposes API and acts like other SM extensions. 2009-01-11 23:56:34 -05:00
David Anderson 9514c12982 Initial import of untested curl extension (bug 3560, r=pred,ds). 2009-01-11 23:48:17 -05:00
David Anderson 489d6c5a65 Imported libcurl source code. 2009-01-08 18:31:00 -05:00
David Anderson ccc59ecdaf Pre-emptive removal of gamedata updater pending rewrite. 2009-01-08 16:11:59 -05:00
David Anderson d2ce50f989 Merge from sourcemod-1.1 branch. 2009-01-08 13:39:16 -05:00
David Anderson 14e409adb4 Fixed another build issue. 2009-01-08 02:38:31 -05:00
David Anderson 4a0f639e89 Fixed build, removed stale build entries. 2009-01-08 02:19:17 -05:00
David Anderson 32c5925652 Whitespace patrol - fixed soft tabs leaking into build tool. 2009-01-08 01:54:55 -05:00
Matt Woodrow 4c91dd8621 Fixed build 2009-01-08 00:44:48 -05:00
Matt Woodrow f641aa92f5 Added Dynamic Hooking to BinTools (bug 2616 r=dvander,DS) 2009-01-08 18:17:17 +13:00
David Anderson 3bdc8583e5 Exposed IServer through SDKTools (bug 3545, r=ds). 2009-01-07 22:55:40 -05:00
David Anderson 4e37900d93 Updated build to have the sounds plugin (follow-up from bug 3498). 2009-01-07 19:28:42 -05:00
David Anderson c676ecc026 Fixed regression in printing floats with no precision (bug 3447, r=ds). 2009-01-07 19:23:24 -05:00
Liam db760dc29b Rewrote timer system in funcommands. Cleaned up the code. Moved sounds to a seperate plugin. Misc code optimizations. (bug 3498 r=dvander) 2009-01-07 19:21:54 -05:00
David Anderson 0fbb87e3b2 Fixed various wrong offsets in Insurgency (bug 3544, r=me). 2009-01-07 16:43:23 -05:00
David Anderson 29996d0133 Cleaned up SourceForts entries in sdktools.games.txt (bug 3492). 2009-01-07 04:06:18 -05:00
The DOO 7807f3e31a Added basic SDKTools/core support for Obsidian Conflict (bug 2699). 2009-01-07 03:33:45 -05:00
IceMatrix e246d14a6b Added Age of Chivalry offsets (bug 3366). 2009-01-07 03:25:53 -05:00
David Anderson a34a27be65 Fixed top menu categories being available even if not usable (bug 3256, r=me). 2009-01-07 02:08:14 -05:00
Scott Ehlert e1d2b88c23 Fixed some inconsistencies in admins_simple.ini (bug 3540). 2009-01-02 00:31:23 -06:00
Liam f96ca17f17 Updated the game check with GetGameFolderName instead of GetGameDesc. (Bug 3473 r=dvander) 2008-12-31 23:05:36 -05:00
Liam 50580498c4 Fixed nexmap issue (Bug 2150 r=Liam) 2008-12-30 19:17:13 -05:00
Liam a21e688c96 Modified the ProcessRename function to use SetClientInfo instead of ClientCommand (Bug 2150 r=DS) 2008-12-29 23:38:28 -05:00
Scott Ehlert 4b1deee7e1 El merge. 2008-12-29 00:12:37 -06:00
Scott Ehlert bf5fefe84f Merge from sourcemod-1.1 branch. 2008-12-29 00:11:32 -06:00
Scott Ehlert 5c92b0d154 Bumped version to 1.1.1 and added back -dev build string. 2008-12-28 23:50:26 -06:00
Scott Ehlert 2b7ccf6625 Tagging SourceMod 1.1.0 2008-12-28 23:41:14 -06:00
Liam 004d450844 Removed the if (ident==NULL) from BindAdminCache 2008-12-29 00:31:16 -05:00
Liam 7705e88b57 Prevented blank/empty admins from being created. (Bug 3431 r=dvander) 2008-12-28 23:45:18 -05:00
David Anderson 3f250ba42d Bumped version files. 2008-12-28 20:35:51 -05:00
David Anderson 1b8bb4e049 Removed -dev tag for release build. 2008-12-28 20:33:21 -05:00
David Anderson 1577fab93a Ran versionchanger.pl over trunk to get 1.2.0 into headers (bug 3521). 2008-12-28 19:59:40 -05:00
David Anderson 181fe74b09 Merge from sourcemod-1.1 branch. 2008-12-28 19:56:40 -05:00
David Anderson 34b8d00548 Updated changelog. 2008-12-28 19:55:52 -05:00
David Anderson 0a6cbadcd8 Merge. 2008-12-28 18:54:51 -05:00
David Anderson 701fef1ba4 Log file name consistency for gamedata logs (no bug). 2008-12-28 18:54:36 -05:00
Liam cdd78b2ec3 Added rename command to PlayerCommands. Merged rename.phrases.txt and slapslay.phrases.txt into plugin.playercommands.txt. (Bug 2150 r=dvander) 2008-12-28 18:28:57 -05:00
Matt Woodrow ba04132142 SDKTools didn't NULL check after GetMemSig (bug 3504, r=dvander). 2008-12-28 17:52:33 -05:00
Liam ddc42bedf5 Modified Command_Kick to display the reason (if given) on the kick message.
Modified the translation file to use the new reason style.
2008-12-28 16:48:59 -05:00
David Anderson ea84302e28 Clean slate for languages.cfg (no bug). 2008-12-28 16:09:47 -05:00
David Anderson a7a08a7d4e Clean slate for languages.cfg (no bug). 2008-12-28 16:09:15 -05:00
David Anderson 0a33a25a7d Merge from sourcemod-1.1 branch. 2008-12-28 03:23:45 -05:00
Liam 2c9622ea52 Forced nextmap to not load on L4D (bug 3473 r=Liam) 2008-12-28 03:15:15 -05:00
David Anderson 08e2fc8deb Support for 3-letter language codes (bug 3526, r=ds). 2008-12-28 02:38:53 -05:00
David Anderson ebed45a0f6 Fixed Linux build. 2008-12-28 01:10:20 -05:00
David Anderson d3c279fd05 Fixed threading issues in gamedata fetcher, new restart mechanism (bug 3351, r=pred). 2008-12-28 01:02:05 -05:00
David Anderson e69ed4b0da Removed unsafe calls from gamedata threader (bug 3351, r=pred). 2008-12-27 19:50:13 -05:00
David Anderson 4daca3c5ba Another gamedata cleanup sponsored by an r=pred (bug 3351). 2008-12-26 23:26:21 -05:00
David Anderson cb41fa6de4 Fixed JIT build on Linux for real. 2008-12-22 20:12:33 -06:00
David Anderson dc758ead10 Build fix for Linux. 2008-12-23 01:55:20 -05:00
David Anderson 1fe38c7473 SourceMod can now be somewhat compiled on OS X for patch sanity testing (bug 3516, r=ds).
This adds the ability for us to change the GCC version we use more flexibly.
2008-12-23 01:33:37 -05:00
David Anderson 5564c38a2f Pushing build to test buildbot. 2008-12-16 21:04:03 -06:00
David Anderson 2a853a23d7 Pushing build to test buildbot. 2008-12-16 20:46:11 -06:00
David Anderson 37da98c9bb Pushing build to test buildbot. 2008-12-16 20:43:16 -06:00
Matt Woodrow 5a5172be57 Merge 2008-12-15 00:48:54 -05:00
Matt Woodrow 58ec9a4f38 Merge 2008-12-15 18:47:11 +13:00
Matt Woodrow b7477fc321 Cleaned up vtable_scanner code a bit to diagnose l4d crashes 2008-12-15 18:45:33 +13:00
Matt Woodrow 88afac51f0 Merge 2008-12-12 23:24:13 -05:00
Matt Woodrow 2bb3e5fd6b Gamedata cleanup and security fix (bug 3351 r=dvander) 2008-12-12 23:20:35 -05:00
Scott Ehlert dd338d40f3 Triggering build. 2008-12-08 03:28:08 -06:00
Scott Ehlert 1cc8440900 Triggering build. 2008-12-08 00:46:54 -06:00
Scott Ehlert 47cf8f4233 Merge from 1.1 branch. 2008-12-07 21:07:14 -06:00
Scott Ehlert eedfd2d70d Shell script code in Makefiles is _really_ POSIX compliant now.
Missed an equal sign :\
2008-12-07 21:05:51 -06:00
Scott Ehlert 4e88626d65 Merge, agh. 2008-12-07 20:54:23 -06:00
Scott Ehlert a1b91ac136 Merge from 1.1 branch. 2008-12-07 20:52:06 -06:00
Scott Ehlert 4bbd74b702 Shell script code in Makefiles is now POSIX compliant and is able to be run on dash. 2008-12-07 20:40:31 -06:00
Scott Ehlert 1d07d24054 Triggering a build? 2008-12-07 00:49:29 -06:00
Scott Ehlert 0a0fd0c64a Triggering yet another build. 2008-12-07 01:26:03 -05:00
Scott Ehlert a7c6fc12d8 Triggering a build on an off chance. 2008-12-06 23:53:55 -06:00
Scott Ehlert 48f0a49f9b Triggering a build perhaps. 2008-12-06 23:26:18 -06:00
Scott Ehlert b63d714a06 Triggering a build maybe. 2008-12-06 22:17:51 -06:00
Scott Ehlert 7bdcea5814 Merged changes from 1.1 branch. 2008-12-05 15:57:49 -06:00
Scott Ehlert f418f38589 Added L4D build config to sample extension's project files. 2008-12-05 15:56:36 -06:00
Matt Schubert 7d3e32b65f Attempted fix for GiveNamedItem crashing on Windows (bug 3472, r=dvander) 2008-12-03 13:04:48 -05:00
Scott Ehlert 52377b509b Triggering another build to fix bug 3478 for real. 2008-12-03 10:41:00 -06:00
Scott Ehlert 14152bb7ba Triggering build to fix bug 3478.
The structure of typedescription_t in our L4D SDK was wrong and it has been updated.
Not only does this fix sm_dump_datamaps in SDKTools, but it also fixes issues with the datamap-related natives in Core where there was a datamap within a datamap.
2008-12-03 10:34:32 -06:00
Scott Ehlert d51aaec97d Fixed a memory leak that occurred when a ConCmdIter handle was closed. (L4D engine)
Note: These handles are used by the FindFirstConCommand and FindNextConCommand natives.
2008-12-02 10:57:42 -06:00
Matt Schubert ea3fe754f4 Fixed missing slap sounds in L4D (bug 3453, r=dvander) 2008-11-30 12:53:18 -05:00
David Anderson 04354a809c Fixed FindTeamByName using wrong case sensitivity (bug 3446, r=pred). 2008-11-29 23:28:28 -06:00
David Anderson 3cf30f5e62 Added filetest.sp to testsuite. 2008-11-29 22:44:11 -06:00
David Anderson 7ff0129f36 Fixed ReadFileString ignoring fourth parameter (bug 3459, r=ds). 2008-11-29 22:43:30 -06:00
David Anderson b684d3aad7 Various nits on smupdate tool (bug 3351, r=pred). 2008-11-29 20:07:43 -06:00
Matt Schubert f164419baa Fixed hsay/tsay not checking for in-game players 2008-11-29 18:49:10 -05:00
David Anderson f20603ad06 Triggered build, something funky happened.... 2008-11-29 16:58:59 -06:00
David Anderson bac975331d Merge from sourcemod-1.1. 2008-11-29 16:28:50 -06:00
David Anderson dcccfbd26a Fixed sm_sql_addadmin reading the immunity field as a password (bug 3395, r=pred). 2008-11-29 16:27:52 -06:00
Matt Schubert 4baf847062 Fixed hsay/tsay not checking for in-game players 2008-11-29 13:16:33 -05:00
Scott Ehlert 90a44ea6c8 Pushed build. 2008-11-28 23:49:37 -06:00
Scott Ehlert fef83838f9 Merged another change from 1.1 branch. 2008-11-28 23:34:18 -06:00
Scott Ehlert 1422a9abe3 Merged changes from 1.1 branch. 2008-11-28 23:32:59 -06:00
David Anderson 2fc0520895 Fixed ReadFile sign-extending instead of zero-extending (bug 3449, r=ds). 2008-11-28 20:01:23 -06:00
Scott Ehlert 7b1adfe00b Added msvc9 project file for sample_ext
Also updated msvc8 project file for compilation against MM:S 1.7
2008-11-27 02:37:31 -06:00
Scott Ehlert 28e1568eb7 Missed a reference to SOURCEMM16 in JIT project files (bug 3445). 2008-11-27 02:20:08 -06:00
Scott Ehlert 0a6eac7c27 Added .hgignore so that 'hg status' can ignore untracked files of certain types. 2008-11-27 00:49:37 -06:00
Scott Ehlert ecaced40f2 Now compiles against Metamod:Source 1.7 (bug 3445). 2008-11-27 01:13:51 -06:00
Matt Woodrow 984a2d26f4 Merge! 2008-11-25 19:14:02 +13:00
Matt Woodrow f85bb7e490 SourceMod now handles steamid's internally without the STEAM_*: part (bug 3428) 2008-11-25 19:13:08 +13:00
Matt Woodrow 321443450a SourceMod now handles steamid's internally without the STEAM_*: part (bug 3428) 2008-11-25 19:10:52 +13:00
Scott Ehlert 25a0a192a2 Added /MP back to core and sdktools MSVC project files. 2008-11-24 09:41:46 -06:00
Scott Ehlert 843ff25de4 Moved SE_* constants from PrePreprocessorDefinitions to AdditionalOptions in MSVC project files.
-Doing this should make it a bit easier to maintain in the future.

Also added back /MP to core and sdktools.
2008-11-24 09:33:11 -06:00
Scott Ehlert 4563c00deb Merge. 2008-11-24 08:39:46 -06:00
Scott Ehlert 7a38e5584c OriginalFilename field in core/version.rc now has correct filename based on engine. 2008-11-24 08:37:06 -06:00
Scott Ehlert e26ce2b457 OriginalFilename field in core/version.rc now has correct filename based on engine. 2008-11-24 08:25:36 -06:00
Scott Ehlert 9c1e45d97c Fixed crash when L4D server went into hibernation mode after having had an active bot and a reserved name was used by this bot
- When going into hibernation, ClientSettingsChanged is called for remaining bots
- Hook checks bot's name against reserved names in admins config and tries to kick using IClient::Disconnect
- Method of getting IClient relies on client having an INetChannel pointer
- Bots do not have an INetChannel pointer so this results in a crash
2008-11-21 14:09:50 -06:00
Scott Ehlert c2756c731f Try 2 of eliminating VPK warning.
Previous commit was more complicated then it really needed to be.
2008-11-19 02:38:28 -06:00
Scott Ehlert d6fc82f8fa Merge. 2008-11-19 02:16:45 -06:00
Scott Ehlert 2acf1b08d5 'Relatized' the path passed to FileToKeyValues() native.
This eliminates the annoying warning in L4D:
***VPK: FindFile Attempting to use full path with VPK file!
2008-11-19 02:14:43 -06:00
David Anderson 6ffd39ac77 Merge changes from 1.1 branch.
--HG--
rename : core/systems/ExtensionSys.cpp => core/ExtensionSys.cpp
rename : core/systems/PluginSys.h => core/PluginSys.h
2008-11-18 06:08:48 -08:00
Scott Ehlert 9ae456b9d1 Updated makefiles to link against binaries at l4d directory instead of l4d_demo 2008-11-18 06:00:31 -06:00
Scott Ehlert 5bbeddc134 Oops, removed something I shouldn't have 2008-11-17 22:13:32 -06:00
Scott Ehlert 373fbb6ca3 Removed debugging code from ConVarManager 2008-11-17 22:11:06 -06:00
David Anderson d1405f2ab3 Updated core Makefile. 2008-11-16 18:41:14 -06:00
David Anderson 2ff9b0aada Removed pointless "systems" folder from core.
--HG--
rename : core/systems/ExtensionSys.cpp => core/ExtensionSys.cpp
rename : core/systems/ExtensionSys.h => core/ExtensionSys.h
rename : core/systems/ForwardSys.cpp => core/ForwardSys.cpp
rename : core/systems/ForwardSys.h => core/ForwardSys.h
rename : core/systems/HandleSys.cpp => core/HandleSys.cpp
rename : core/systems/HandleSys.h => core/HandleSys.h
rename : core/systems/LibrarySys.cpp => core/LibrarySys.cpp
rename : core/systems/LibrarySys.h => core/LibrarySys.h
rename : core/systems/PluginInfoDatabase.cpp => core/PluginInfoDatabase.cpp
rename : core/systems/PluginInfoDatabase.h => core/PluginInfoDatabase.h
rename : core/systems/PluginSys.cpp => core/PluginSys.cpp
rename : core/systems/PluginSys.h => core/PluginSys.h
rename : core/systems/ShareSys.cpp => core/ShareSys.cpp
rename : core/systems/ShareSys.h => core/ShareSys.h
2008-11-16 16:06:18 -08:00
Scott Ehlert 43f5d71724 Fixed IndexOfEdict and PEntityOfEntIndex inlines to be in line with updated edict_t structure in SDK 2008-11-14 23:08:24 -06:00
Scott Ehlert 41b61ed36f Fixed tab inconsistency in some build tool source files. 2008-11-14 16:55:09 -06:00
Scott Ehlert 31e30faace Triggering build 2008-11-14 09:58:40 -06:00
Scott Ehlert ff7a2c6b73 Added preliminary support for Left 4 Dead; some things may not yet work. 2008-11-14 09:18:30 -06:00
Scott Ehlert acea705df8 Moved IDA scripts from editor/ida to tools/ida_scripts
--HG--
rename : editor/ida/gcc_fpic.idc => tools/ida_scripts/gcc_fpic.idc
rename : editor/ida/linux_vtable_dump.idc => tools/ida_scripts/linux_vtable_dump.idc
2008-11-14 03:51:57 -06:00
Scott Ehlert 7e3f9ada31 Moved IDA scripts from editor/ida to tools/ida_scripts
--HG--
rename : editor/ida/gcc_fpic.idc => tools/ida_scripts/gcc_fpic.idc
rename : editor/ida/linux_vtable_dump.idc => tools/ida_scripts/linux_vtable_dump.idc
2008-11-14 03:38:59 -06:00
David Anderson 0a956115eb Bumped version on trunk. 2008-11-12 22:47:24 -08:00
David Anderson 30174c07de Forcing build. 2008-11-12 22:41:17 -08:00
David Anderson 8e5c7713fc Forcing build. 2008-11-12 22:34:52 -08:00
David Anderson 7b45342955 Forcing build. 2008-11-12 22:32:04 -08:00
Scott Ehlert 2f0965c14b Fixed Linux build 2008-11-12 23:22:33 -06:00
Scott Ehlert c1c5d2656c The replicate and notify parameters for SetConVarX and ResetConVar are now ignored on Orange Box.
- OB engine automatically replicates and fires server_cvar event notification for changes cvars.
- Added a note about this in comments for affected natives.
2008-11-12 23:14:49 -06:00
David Anderson af2af91300 Take-two at fixing bug 3410. 2008-11-11 02:21:25 -08:00
David Anderson c880919466 Merge. 2008-11-11 01:37:24 -08:00
David Anderson b1646accb9 Attempted to lcase dll dirs in the symstore. 2008-11-11 01:36:15 -08:00
Scott Ehlert 00bb796db2 Version 1.2 of fPIC script
- Now works with GCC 4.3 compiled binaries (like Left 4 Dead)
- Fixed: Redefining alignment blocks as data caused IDA to pop up an annoying warning
2008-11-06 17:07:53 -06:00
Scott Ehlert 6c1259f6e6 Import of IDA script to demangle fPIC on x86 (checkin=dvander). 2008-11-06 00:08:24 -08:00
David Anderson a04521b55a Fixed "nextmap" command being spammable (bug 3391, r=pred). 2008-11-05 21:02:07 -08:00
David Anderson c8b3c82a12 Moved structs.inc out of plugins\include.
--HG--
rename : plugins/include/structs.inc => extensions/structs/structs.inc
2008-11-01 00:02:53 -07:00
David Anderson c1c8a4c988 Backed out structs extension from being in builds - it's not ready to land. 2008-10-31 23:20:40 -07:00
David Anderson 335febca34 Fixed windows offset in structs extension. 2008-10-31 23:15:34 -07:00
David Anderson e191d446a7 Fixed structs extension using the wrong filename. 2008-10-31 22:54:19 -07:00
David Anderson 412ad74aad Fixed gamedata file refcounting bug in the structs extension. 2008-10-31 22:47:13 -07:00
David Anderson e70fc299ac Fixed accidental NULLing of natives in the native name cache but not filled. 2008-10-31 22:35:27 -07:00
David Anderson b3b972caf7 Fixed missing semi-colon in sdktools_stocks.inc (bug 3376). 2008-10-31 08:38:44 -05:00
David Anderson c25017e1a4 Fixed basechat not checking client in-game status for display center text (bug 3372). 2008-10-31 08:35:27 -05:00
David Anderson be1d12f94f Merge. 2008-10-31 08:28:24 -05:00
David Anderson 3c18289465 Fixed race condition where client cookie callbacks could be fired against wrong clients (bug 3375). 2008-10-31 08:28:08 -05:00
David Anderson ed29c837fa Fixed failed timers leaking dangling plugin references (bug 3381). 2008-10-29 01:27:56 -07:00
David Anderson 8d78c74554 Fixed horrendous crash in the JIT from packing change in the debug table (bug 3334, r=me).
I accidentally changed the debug table packing in a commit a while ago.  This explains the nonsense debug output and crashes people have been getting on the 1.1 branch.  Fortunately this is (mostly) detectable via the "debug.natives" table and the JIT will unpack symbols based on that information.
2008-10-27 02:02:14 -05:00
David Anderson e48bba5b4d Fixed leaking relocation table memory in JIT. 2008-10-26 23:50:54 -05:00
David Anderson 547f7aecc1 Fixed crash when using ISourcePawnEngine2::LoadPlugin with a non-existant file. 2008-10-26 23:40:24 -05:00
David Anderson 67ba04bcee Fixed IsClientTimingOut spelling in native export table. 2008-10-24 20:59:26 -05:00
David Anderson a1d84347ed Fixed bounds checking in ReadHandle routine (bug 3359). 2008-10-21 23:52:50 -07:00
David Anderson 253109d1c9 Rewrote querying in client prefs to not use prepared queries (bug 2698, r=pred).
Prepared queries had annoying race conditions and became unusable on connection timeouts.
2008-10-20 03:40:46 -05:00
David Anderson c0c9fc3267 Fixed buffer reallocation in dbi.mysql leaving stale pointers behind and crashing (bug 3352). 2008-10-19 22:57:28 -07:00
Matt Woodrow 918bec36d9 Fixed regression in send/revc calls in the gamedata fetcher 2008-10-20 18:42:22 +13:00
Matt Woodrow 7b8cd751e1 I should get more sleep. 2008-10-19 17:44:19 +13:00
Matt Woodrow 849c4a70ae And again with the build breaking.. 2008-10-19 17:37:21 +13:00
Matt Woodrow c231375e19 Mergesaurus Rex 2008-10-19 17:28:45 +13:00
Matt Woodrow d8babe2a71 Gamedata fetching cleanup - Part 1 (bug 3351 r=dvander) 2008-10-19 17:27:54 +13:00
Matt Woodrow 4e88a5a431 Updated rockthevote to use new OnClientConnected forward (bug 3311) 2008-10-19 16:18:22 +13:00
David Anderson a6579c7bcb Added new OnClientConnected callback with correct pairing intent (bug 3311, r=pred). 2008-10-18 22:14:13 -05:00
David Anderson 5a2f8afd33 Fixed calling the wrong GetError(), causing misleading spew (part of bug 2698). 2008-10-17 02:04:09 -05:00
Matt Woodrow 3c12db8637 Merging like a zip! 2008-10-16 10:55:42 +13:00
Matt Woodrow 07cbe39552 Updated basetriggers to use more translation friendly phrases (bug 3330, r=dvander).
Basetriggers now counts rounds remaining for mp_maxrounds output.
2008-10-16 10:54:23 +13:00
David Anderson 974f31c149 Various clientprefs logging to try and catch bug 2698 in the act. 2008-10-15 01:01:36 -07:00
Matt Woodrow 4a1c565b62 Updated rockthevote to use new MaxClients variable 2008-10-15 20:42:47 +13:00
Matt Woodrow 32f9c46424 Struct Test should compile now 2008-10-15 20:42:26 +13:00
Matt Woodrow 34d2d7760b Fixed bug 3312 - Added Radio Menu Timeout for synergy 2008-10-14 12:31:22 +13:00
David Anderson 2f36e3b231 Deprecated SQL_ConnectEx for SQL_ConnectCustom, which expresses the API intent better (bug 3307, r=pred). 2008-10-13 01:13:39 -05:00
Matt Woodrow b0d6e39035 Merge 2008-10-09 20:19:22 +13:00
Matt Woodrow b7a2f221f2 Fixed a couple of plugin errors with third party mods (bug 3305) 2008-10-09 20:18:16 +13:00
David Anderson 6d2bb90f51 Added radio menu support for Fortress Forever (bug 3260). 2008-10-08 23:53:31 -07:00
David Anderson fa1336623f Added GiveNamedItem/EquipPlayerWeapon back to TF2 (bug 3276, r=bl4nk). 2008-10-08 22:53:49 -07:00
David Anderson 2b65e2496d Added radio menu support for Synergy (bug 3301). 2008-10-08 22:43:57 -07:00
David Anderson 4953b1d889 Added radio menu support for D.I.P.R.I.P. (bug 3304). 2008-10-08 22:41:44 -07:00
Matt Woodrow ed75da0f85 Reworked unavailable nominations showing in the menu (bug 3269)
Fixed a non-const String in mapchooser.inc
2008-10-09 14:24:30 +13:00
Matt Woodrow ff7cb43f6a Build fix attempt one (1) 2008-10-09 13:58:53 +13:00
Matt Woodrow dc3b4a57cc Structs now builds for the old engine (bug 3286) - again. 2008-10-09 13:35:14 +13:00
Matt Woodrow 7009e755fe Backed out changeset: 44b02986c01b
Damn you tortoisehg
2008-10-09 13:33:47 +13:00
Matt Woodrow bba2cfc6f7 Structs now builds for the old engine (bug 3286) 2008-10-09 13:24:44 +13:00
Matt Woodrow 759c76e188 Maps nominated by owner=0 should not be replaced. Fixes sm_nominate_addmap only allowing a single map to be added (bug 3272) 2008-10-08 21:02:01 +13:00
Matt Woodrow db5a0be4ca Backed out changeset: 19331eae67ad 2008-10-08 20:59:56 +13:00
Matt Woodrow 29e57e77f7 Maps nominated by owner=0 should not be replaced. Fixes sm_nominate_addmap only allowing a single map to be added (bug 3272) 2008-10-08 20:58:25 +13:00
David Anderson f50c7469ca Added MaxClients public var to replace GetMaxClients (bug 3283, r=pred).
This is a hard bump of the plugin version number.  1.1 plugins compiled against this include set
will not run against earlier versions of SourceMod.
2008-10-05 15:20:17 -07:00
David Anderson d9af295a29 Corrected case in a nominations phrase. 2008-10-05 04:19:39 -07:00
David Anderson 4147bf7444 Language files are now additive, and are sniffed from translations/[iso code].
This is so translations can be maintained easier without any merging pains on behalf of users or developers.
2008-10-05 04:08:48 -07:00
David Anderson 99e304d6b5 Fixed a bug where SourceMod failed trying to default back to English when missing translations. 2008-10-05 04:06:18 -07:00
David Anderson 4e7000368f Fixed clientprefs race condition on first run (bug 3294, r=pred). 2008-10-05 01:09:58 -05:00
David Anderson 04b7b7b9ff Removed pointless performance warning. 2008-10-04 12:59:21 -07:00
David Anderson 2534fd1ce2 Fixed reverse order of evaluation in mapchooser causing an invalid handle read (bug 3290, r=bl4nk). 2008-09-30 22:45:26 -07:00
David Anderson e10dd226ff Fixed OnConfigsExecuted() not working on listen servers (bug 3287, r=me). 2008-09-29 20:02:19 -07:00
David Anderson b016623fb5 Removed debug spew left in adminmenu.sp. 2008-09-28 15:38:32 -07:00
Matt Woodrow 49d14111e2 Fixed mapchooser not starting a vote if RTV result is "Don't change" (bug 2734, r=bl4nk). 2008-09-27 21:46:07 -07:00
David Anderson f0a11d3cb7 Fixed project file name mismatch in the build tool. 2008-09-27 18:04:10 -07:00
David Anderson 168f42323b Missing regex vc9 project files (this is getting really tiresome). 2008-09-27 17:54:02 -07:00
David Anderson 64e7d0b737 Forgot to commit game.cstrike.ext msvc9 project files. 2008-09-27 17:43:30 -07:00
David Anderson 2e8c0c8f7d Added environment variable for MySQL5 since vcbuild.exe is being a pain. 2008-09-27 17:25:53 -07:00
David Anderson 8f555543cc Switch to vcbuilder.exe since devenv.com is not available in express editions. 2008-09-27 16:19:56 -07:00
David Anderson 88a71ddad4 Migrated to Visual Studio 2008 for default builds (bug 3257). 2008-09-27 14:59:09 -07:00
David Anderson 02e31bb576 Compiler now emits debug info about natives (bug 3282, r=sawce). 2008-09-27 13:46:42 -07:00
David Anderson 32f7bec6c8 Fixed building on GCC and some valgrind warnings. Read .dbg.natives table now. 2008-09-27 15:34:59 -05:00
Matt Woodrow a935e6f90d Merge! 2008-09-26 19:10:40 +12:00
Matt Woodrow f4dba84ae5 Core now detects and handles a changed maxplayers value (bug 2537 and bug 2758) 2008-09-26 19:08:49 +12:00
David Anderson 5cb4acf590 Added some notion of def-use to unfold copy propagation across registers and the eval stack.
At some point we will need to walk the expr tree to fold this back where appropriate, i.e. single use for calls.
2008-09-23 22:00:47 -07:00
David Anderson e83526aa63 Merge. 2008-09-23 21:21:03 -07:00
David Anderson 04021ed8b1 Initial import/sketch of opcode analyzer (bug 3279).
Uses single static assignment to recover expression trees from straight-line byte code.
2008-09-23 21:20:40 -07:00
David Anderson 31a4f40c9a Merge. 2008-09-23 01:17:40 -05:00
David Anderson 4001b0f804 Various chat commands now follow sm_show_activity (bug 2080, r=pred).
Added FormatActivitySource() native to assist in emulating ShowActivity().
2008-09-23 01:17:15 -05:00
David Anderson a838276ec2 Changed functag syntax so public keyword is in the normal place. The old style is still allowed. 2008-09-21 14:56:38 -07:00
David Anderson 6192efc078 Fixed realloc/delete[] mismatch (thank sawce), corrected some whitespace. 2008-09-21 14:05:13 -07:00
Matt Woodrow 4517031861 Updated randomcycle to use the Nextmap API 2008-09-21 14:20:01 +12:00
Matt Woodrow 187ff255bd GCC will not beat me! 2008-09-18 18:42:13 +12:00
Matt Woodrow dec172f0e1 Mergey Mergey 2008-09-18 18:28:17 +12:00
Matt Woodrow a0107299f3 Predcrab - Destroyer of builds strikes again 2008-09-18 18:27:41 +12:00
David Anderson bbbc2ce22c Merge (A la Worms 2, The First of Many!) 2008-09-18 00:15:34 -05:00
David Anderson def0a8a0d6 Attempt at solving this stdout redirection mess for buildbot. 2008-09-18 00:11:24 -05:00
Matt Woodrow 46095d797c Merge 2008-09-18 15:33:50 +12:00
Matt Woodrow 5687a7ba90 Added Struct Abstraction extension (bug 2666 and bug 2663)
--HG--
rename : extensions/structs/structs.txt => gamedata/structs.gamedata.txt
rename : extensions/structs/structs.inc => plugins/include/structs.inc
rename : extensions/structs/structtest.sp => plugins/testsuite/structtest.sp
2008-09-18 15:32:22 +12:00
David Anderson 556c03babf Added CreateDirectory() native and a few permissions macros (bug 3253, r=ds). 2008-09-17 02:07:19 -05:00
David Anderson 09ea2e13aa Fixed SDKTools not cleaning up its handle types on shutdown (but 2753). 2008-09-15 04:28:26 -05:00
David Anderson ef62e3d665 Fixed IHandleSys::RemoveType() not removing the type name from the name cache (bug 2753). 2008-09-15 04:26:58 -05:00
David Anderson fb2f0795c5 Fixed JIT 1.2 not compiling code for the SYSREQ.C opcode (bug 2764). This caused LDuke's TF2Nades to crash because spcomp doesn't seem to peephole optimize some sysreq.c's away for float operators (oddity discovered by sawce). 2008-09-14 23:42:20 -07:00
David Anderson fb44b51d26 Updated version files so I can build again. 2008-09-14 22:16:35 -07:00
David Anderson 8680d07e0a Triggering build. 2008-09-14 19:42:04 -05:00
David Anderson 9d8445b693 Triggering build. 2008-09-14 19:34:33 -05:00
David Anderson 5de80c03db Triggering build. 2008-09-14 19:28:48 -05:00
David Anderson c5df0bf58f Triggering build. 2008-09-14 19:28:03 -05:00
David Anderson 8c1502278b Triggering build. 2008-09-14 18:59:21 -05:00
David Anderson 08e3e3b53d Triggering build. 2008-09-14 18:57:01 -05:00
David Anderson 86591356b0 Triggering build. 2008-09-14 18:52:59 -05:00
David Anderson f62cf04f91 Triggering build. 2008-09-14 18:29:11 -05:00
David Anderson cf621eaf10 Triggering build. 2008-09-14 18:25:44 -05:00
David Anderson b8214a80c2 Cleared out NOTICE.txt. 2008-09-14 18:16:28 -05:00
David Anderson f79c9eec82 Changes to buildbot scripts for Mercurial. 2008-09-14 16:40:49 -05:00
David Anderson 8fcecf3dec Updated versionchanger.pl for Mercurial, FINALLY fixed its whitespace. 2008-09-14 16:26:38 -05:00
Scott Ehlert 326e8ee205 Fixed tags for sourcemod-central
sourcemod-1.0.0 - Orginally tagged by David Anderson <[email protected]> on Mon Mar 17 01:28:54 2008 UTC
2008-09-14 03:43:26 -05:00
Scott Ehlert bda56bf33f Eliminated head: da55a80522cf, a remnant of sourcemod-1.1.0 branch 2008-09-14 03:01:05 -05:00
Scott Ehlert 7439f15d7e Eliminated head for dead branch: refac-jit 2008-09-14 02:59:26 -05:00
Scott Ehlert 7a4967abc9 Eliminated head for dead branch: sourcemod-1.1.0 2008-09-14 02:58:58 -05:00
Scott Ehlert 6749545991 Eliminated head for dead branch: dvander 2008-09-14 02:58:07 -05:00
Scott Ehlert 124c3f4575 Eliminated head for dead branch: faluco 2008-09-14 02:57:14 -05:00
Scott Ehlert 56b77a536f Removed files for dead branch: refac-jit
--HG--
branch : refac-jit
2008-09-14 02:55:49 -05:00
Scott Ehlert e175cce776 Removed files for dead branch: sourcemod-1.1.0
--HG--
branch : sourcemod-1.1.0
2008-09-14 02:55:25 -05:00
Scott Ehlert 097f42a01c Removed files for dead branch: faluco
--HG--
branch : faluco
2008-09-14 02:54:50 -05:00
David Anderson bcf1b092ae Mirrored buildbot/version template changes from branch.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402539
2008-09-14 06:13:25 +00:00
Matt Schubert d707ea0de5 Fixed amb1929 - Banning via console should now work properly
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402533
2008-09-12 20:36:53 +00:00
Matt Woodrow 2c107e3601 Fixed amb1990 - Translator warnings not evaluating format params
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402532
2008-09-09 02:45:29 +00:00
David Anderson 29d1246b8d Fixed another sdktools team native crash, if m_szTeamName wasn't available (bug amb1779, r=pred).
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402530
2008-09-08 07:00:34 +00:00
David Anderson 514fc7dfe8 Fixed missing translation for funvotes (bug amb1968).
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402528
2008-09-08 06:38:10 +00:00
David Anderson 0691bca512 Added "antiflood.txt" to Core's IPhraseCollection to prevent error spew (bug amb1922).
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402527
2008-09-08 06:20:54 +00:00
David Anderson e1f8a0fd68 Fixed the compiler eating too many characters in macro subsitutions (bug amb1938).
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402526
2008-09-08 02:13:17 +00:00
David Anderson e141cf74d5 Fixed three bugs with team natives that appeared on INS: bounds checking had wrong binary shortcut order, bounds checking was off by one, error condition was not returned properly. Out-of-range team indexes no longer cause crashes now.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402523
2008-09-07 22:17:12 +00:00
David Anderson 9ca1ca62ea Fixed a nasty compiler bug where if the rhs of a ternary operator was larger than the lhs, the copy length emitted would only fit the lhs. The hier13() function now returns the larger of the lvalue sizes. (bug amb1853)
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402521
2008-09-07 09:51:38 +00:00
David Anderson 99d27b979d Triggering rebuild for win32-trunk.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402519
2008-09-07 03:56:45 +00:00
David Anderson 681747d02c Fixed long strings with internal static copybacks causing buffer overflows (bug amb1986).
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402518
2008-09-07 03:24:51 +00:00
David Anderson 1ec936daf6 Testing pushing of build.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402516
2008-09-07 00:18:18 +00:00
David Anderson 8eb6d9ccf5 Added master.cfg from buildbot for safe keeping.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402514
2008-09-06 23:36:04 +00:00
David Anderson d3394453ff Fixed, hopefully, one of the last bugs in the symstore script.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402513
2008-09-06 23:26:52 +00:00
David Anderson 5caeebf807 Bugfixes to buildbot scripts, added symstore script.
Removed soon-to-be-outdated fetchdlls program.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402512
2008-09-06 23:24:56 +00:00
David Anderson d6a9cb427f Added product version file, first step to removing modules.versions someday.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402506
2008-09-06 14:33:48 +00:00
David Anderson cb4b1dce71 Another PathFormat.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402505
2008-09-06 14:10:21 +00:00
David Anderson e6c5adfa24 PathFormat in bootstrap.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402504
2008-09-06 14:03:50 +00:00
David Anderson 444896104f Enclose bootstrapper command in quotes.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402503
2008-09-06 14:02:48 +00:00
David Anderson e2791a3702 Packager now gets a config file on the command line (more secure for buildbot).
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402502
2008-09-06 13:04:54 +00:00
David Anderson 16ed584e39 Added packaging script.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402501
2008-09-06 12:19:33 +00:00
David Anderson d6a0cb8992 Removed some debug code, and hopefully fixed misleading failures.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402500
2008-09-06 10:18:26 +00:00
David Anderson f99b82b53a Added default return code of 0.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402499
2008-09-06 09:40:44 +00:00
David Anderson 32b7e2df98 startbuild is now a direct pipe.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402498
2008-09-06 09:32:12 +00:00
David Anderson 0137219fb8 Added startbuild script.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402497
2008-09-06 09:24:39 +00:00
David Anderson 51f914fb30 Bootstrap performs all steps up to executing builer now.
Builder sends error code on failure now.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402496
2008-09-06 09:12:21 +00:00
David Anderson f85eeb2adb Finally, paths sorted out I think.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402495
2008-09-06 08:35:27 +00:00
David Anderson 6b213a9caf Ugh.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402494
2008-09-06 08:19:05 +00:00
David Anderson 35f31b0f1a More buildbot path nonsense.
--HG--
rename : tools/buildbot/build_builder.pl => tools/buildbot/bootstrap.pl
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402493
2008-09-06 08:09:19 +00:00
David Anderson 56a68f4dfd Paths should be relative to working folder.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402492
2008-09-06 07:47:29 +00:00
David Anderson 6e930f6048 Added buildbot script for building builder tool.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402491
2008-09-06 07:39:10 +00:00
David Anderson 4fc7fce4fd No spaces!
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402490
2008-09-06 07:23:04 +00:00
David Anderson f27202202b Fixed profiler being initialized at the wrong time, causing a paired callback mismatch (bug amb1977).
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402489
2008-09-05 06:15:54 +00:00
Matt Woodrow deb7a123a6 Added a nominations section to maplists.cfg
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402488
2008-09-02 07:10:11 +00:00
Matt Woodrow 9ef7dca666 Added amb1978 - Core.cfg now has parameters to set the gamedata auto-updater server and port.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402487
2008-09-02 06:29:50 +00:00
David Anderson fe4e39a2dd Fixed amb1935 - When deleting a topmenu category, child objects were not removed from the name cache.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402485
2008-09-02 06:01:12 +00:00
David Anderson 4951dccded Fixed amb1927 - client command case sensitivity did not match the server's logic.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402483
2008-09-02 03:58:34 +00:00
Matt Woodrow 58870a30fb Fixed structs sig.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402481
2008-08-29 02:26:22 +00:00
David Anderson 05e18833ac Fixed IHandleSys doc for failure outparams.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402479
2008-08-28 17:18:26 +00:00
David Anderson 08c2a087d8 Fixed plugins not being unloadable from files not being closed (amb 1875).
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402478
2008-08-28 16:59:41 +00:00
Matt Woodrow 05c8681336 Couple of small mapchooser tweaks
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402477
2008-08-27 01:45:10 +00:00
Matt Woodrow bf5ee181fa Removed a few debug messages from mapchooser
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402476
2008-08-27 01:00:01 +00:00
Matt Woodrow 094acb1039 Fixed amb1957 - Mapchooser now counts arena rounds correctly.
Fixed amb1925 - Mapchooser countly rounds incorrectly during an RTV
Fixed amb1920 - Cleared retry timer
Fixed amb1921 - Cancelling a vote now marks the vote as complete

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402475
2008-08-27 00:49:56 +00:00
Scott Ehlert 93944e7f4b Fixed build.
"Nice" improvement DS.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402474
2008-08-24 05:05:04 +00:00
Scott Ehlert 1251093ec1 Improved bot detection slightly. This was meant to go along with the fix for amb1801.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402473
2008-08-24 04:35:48 +00:00
David Anderson c951a6ca7c Reverted to old cmd functionality for original engine.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402469
2008-08-23 19:59:18 +00:00
David Anderson 70a594f354 Fixed bug 1750 and bug 1801. Orange Box changes the command processing heuristics without telling anyone, it looks like executing commands during the command buffer processing causes insertion to the beginning of the stream rather than end. Moving our callbacks to occur in a new frame seems to alleviate this.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402468
2008-08-23 19:51:02 +00:00
David Anderson 9b03490b1a Fixed crash when TF2 extension couldn't load.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402467
2008-08-23 09:46:52 +00:00
David Anderson edb7b49c25 Fixed bogus warning from GCC.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402466
2008-08-23 09:29:27 +00:00
David Anderson 0c1c984eaf Add a poor man's build trigger.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402465
2008-08-23 08:02:44 +00:00
David Anderson b595047fdf Fixed OP_SWITCH accidentally using the wrong address to get the pcode base (regression based on assumption of JitWriter::inbase).
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402464
2008-08-19 06:40:25 +00:00
David Anderson 2c25c09420 Ew! No spaces in filenames.
--HG--
rename : tools/gamedata md5/Makefile => tools/gamedata_md5/Makefile
rename : tools/gamedata md5/TextParsers.cpp => tools/gamedata_md5/TextParsers.cpp
rename : tools/gamedata md5/TextParsers.h => tools/gamedata_md5/TextParsers.h
rename : tools/gamedata md5/main.cpp => tools/gamedata_md5/main.cpp
rename : tools/gamedata md5/main.h => tools/gamedata_md5/main.h
rename : tools/gamedata md5/md5.cpp => tools/gamedata_md5/md5.cpp
rename : tools/gamedata md5/md5.h => tools/gamedata_md5/md5.h
rename : tools/gamedata md5/msvc9/gamedatamd5.sln => tools/gamedata_md5/msvc9/gamedatamd5.sln
rename : tools/gamedata md5/msvc9/gamedatamd5.vcproj => tools/gamedata_md5/msvc9/gamedatamd5.vcproj
rename : tools/gamedata md5/sm_memtable.cpp => tools/gamedata_md5/sm_memtable.cpp
rename : tools/gamedata md5/sm_memtable.h => tools/gamedata_md5/sm_memtable.h
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402463
2008-08-17 18:27:51 +00:00
David Anderson f6b088c2e6 Fixed amb1928 (EndOfMapVoteEnabled should be optional).
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402462
2008-08-15 17:21:48 +00:00
David Anderson 1cf87d4ad9 Fixed build for new jit. Can't seem to kill off one of Microsoft's retarded NONSTDC warning, oh well.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402461
2008-08-15 05:41:20 +00:00
David Anderson 0aad4353cf Removed debug mode from plugin_settings.cfg.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402460
2008-08-15 05:33:57 +00:00
David Anderson 7875fe1acd Landed sourcepawn-1.2. The big changes:
1) JIT compilation/optimization now occurs per-function, and only when functions are first used.  We're now officially a whole-method JIT rather than an AOT compiler (albiet, still a simple JIT).  This has two implications: Functions are now much better abstracted internally, and loading a plugin is now much less expensive.  If a function contains calls to other functions, THOSE functions are only compiled when they're invoked as well.

2) I've removed debug mode.  We always show full backtraces now, as there was a very cheap way to implement this which really cleaned up everything.  This is great for a number of reasons -- there's less code, the JIT is better designed, we don't need to relocate debug tables, and best of all we no longer have to tell users to enable debug mode at their own expense.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402459
2008-08-15 05:22:26 +00:00
Matt Woodrow 95aca7b61b Fixed amb1924 - Nextmap command now checks if end of map voting is enabled
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402441
2008-08-10 05:39:25 +00:00
Matt Woodrow e52e3c4639 Initial Import of beta structs extension.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402440
2008-08-08 00:17:37 +00:00
Matt Woodrow eee77228e6 amb1919 - HasEndOfMapVote finished should be separate from determining if the vote will run at all.
amb1915 - Mapchooser should disable round end changes if forced to change early.
amb1901 - Timer errors with mapchooser

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402439
2008-08-08 00:06:14 +00:00
Matt Woodrow 2b0cc7b4ea Fixed amb1899 - Duplicate maps in auto generated maplists
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402438
2008-08-07 23:32:09 +00:00
Matt Woodrow eaccf6f90b Fixed amb1918 - Ban menu should compare userids, not client indexes
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402436
2008-08-07 23:16:16 +00:00
Matt Woodrow a01848c774 Increased Clientprefs error reporting and a rare leak on database connection failed.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402434
2008-08-05 08:00:54 +00:00
Matt Woodrow ea748cfdbd Fixed a few file handle leaks
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402432
2008-07-31 21:08:00 +00:00
Matt Woodrow 401c6b445d Fixed amb1891 : Basechat didn't check for blank message in private say's
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402431
2008-07-30 08:08:19 +00:00
Matt Woodrow 3c0b289694 Added custom gamedata section parsing to GameConfigs.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402429
2008-07-30 00:03:10 +00:00
Matt Woodrow 8182bdb476 More file handle leaks fixed.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402428
2008-07-29 06:12:52 +00:00
Matt Woodrow ae7e5a6a4b Pending Map should no longer be shown when mapvotes are disabled.
Removed tf2 include from mapchooser.
Moved sm_setnextmap to mapchooser and made it block the end of map vote.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402427
2008-07-28 07:47:28 +00:00
David Anderson 50eb77926e fixed amb1885: regression in IsInExec() which caused ThrowNativeError to fail
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402426
2008-07-27 06:29:58 +00:00
Matt Woodrow bd24893837 Probably helps to close files after opening them.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402425
2008-07-27 00:01:17 +00:00
Matt Woodrow dad66c9204 Nextmap command (basetriggers.sp) will now show 'Pending Vote' if mapchooser is running, and the vote has not yet occured.
Few cvar description changes in rockthevote.sp

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402423
2008-07-17 07:47:11 +00:00
David Anderson 9292e0f816 Fixed a bug where natives with no owner could be bound (crashing).
Fixed a bug where FakeNative entries were leaked.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402422
2008-07-16 03:46:10 +00:00
David Anderson 4d48fc7ae5 Fixed double-period showing on native failures.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402421
2008-07-16 03:37:37 +00:00
David Anderson 463cfb0015 fixed a crash-on-load bug in clientprefs
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402420
2008-07-16 02:48:50 +00:00
Matt Woodrow 3ed5d1e8d7 Fixed build. I <3 you too gcc.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402419
2008-07-15 02:26:22 +00:00
Matt Woodrow e64e2534eb Fixed amb1810 - Clientprefs no longer blocks load.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402418
2008-07-15 00:24:08 +00:00
Matt Woodrow 67e28d7475 Moved nextmap command into basetriggers.sp
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402417
2008-07-13 07:01:54 +00:00
Matt Woodrow 64b8049d70 Fixed build
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402416
2008-07-13 06:13:28 +00:00
Matt Woodrow dd75e88cbb Identities are now dropped before extensions unload.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402415
2008-07-13 05:36:52 +00:00
Matt Woodrow c75d607a00 - Added ForceChangeLevel and Map History to nextmap api
- Changed base plugins to use new api
- Added sm_maphistory command to nextmap.sp

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402413
2008-07-13 05:13:37 +00:00
David Anderson 8126aa6bb8 using 'goto' is now an error
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402412
2008-07-12 22:28:10 +00:00
Scott Ehlert 846caf1298 Builds against latest OB SDK now
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402410
2008-07-12 09:05:19 +00:00
Scott Ehlert c2917a8dd4 Fixed Windows build
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402409
2008-07-12 04:08:41 +00:00
David Anderson 9e443cfdd3 fixed release build
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402408
2008-07-12 03:30:00 +00:00
David Anderson b743af8a72 fixed cstrike build
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402407
2008-07-12 03:19:55 +00:00
David Anderson 8a4c96b252 fixed build (I hope)
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402404
2008-07-11 09:28:04 +00:00
David Anderson 0392e55ef7 fixed module version path
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402403
2008-07-11 09:27:03 +00:00
David Anderson fa5ee3287f fixed regressions in debug mode
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402402
2008-07-11 09:24:12 +00:00
Matt Woodrow e1882f97a1 Added amb1826 - 'nextmap' command now attempts to obey 'sm_trigger_show' if available.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402401
2008-07-11 08:31:57 +00:00
David Anderson 1a156deca5 landed massive refactoring of the JIT. contexts are actually contexts now, and a higher level structure wraps sp_plugin_t info. on that note, both sp_plugin_t and sp_context_t are entirely opaque, and not even core has access to them. amazingly, i managed to keep binary compatibility here although a large number of functions are deprecated (and core should eventually stop calling them).
NOTE: the JIT is now embeddable out-of-box and usable by other projects which is pretty cool.  I will commit a shell app demonstrating this soon

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402400
2008-07-11 08:18:43 +00:00
David Anderson 5668f23b50 fixed a compat regression, forgot msvc does funky things with overloaded virtual calls
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402399
2008-07-11 06:51:21 +00:00
David Anderson 232f344c41 FindPluginByContext works again
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402398
2008-07-11 05:15:43 +00:00
David Anderson 79cf4e07eb GetContext() now returns 'this' as a hack (shouldn't+can't be accessed anyway)
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402397
2008-07-11 05:14:32 +00:00
David Anderson f9b294d89e updated makefile to actually work
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402396
2008-07-10 05:42:10 +00:00
David Anderson a88d7c1cdc fixed a number of regressions, things are starting to load
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402395
2008-07-10 05:38:54 +00:00
David Anderson 85760603b7 fixed linux build
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402394
2008-07-10 03:38:04 +00:00
Matt Woodrow ea1f5e86c0 Gamedata fetcher now unlocks gamedata files after a successful query
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402393
2008-07-10 01:26:02 +00:00
Matt Woodrow b1072d3b09 Fixed amb1838 - Mapchooser should not instantly start a new vote if the current one was cancelled (and caused a stack overflow)
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402392
2008-07-10 01:11:51 +00:00
Matt Woodrow 81632dda97 Fixed unload crash with tf2 extension.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402391
2008-07-09 02:03:13 +00:00
Matt Woodrow 80fdbcf8c7 Fixed regression in ForwardSys with ET_LowEvent
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402390
2008-07-08 23:55:29 +00:00
Scott Ehlert bd2361c8ae Bumped IForwardSys
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402388
2008-07-08 21:17:05 +00:00
Scott Ehlert c9a81c0651 - Fixed amb1802: Crash when client was disconnected as a result of false being returned in OnClientConnect and a function that operated on this client was used. A client's connection state was not reset when this happened.
- Removed IForwardFilter due to overall horribleness (should be safe since no one seems to use it). Perhaps it might be back one day?
- Added ET_LowEvent forward exec type which is exactly the same as ET_Event, except that it returns the lowest value rather than the highest

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402386
2008-07-08 09:20:47 +00:00
David Anderson aa096f2385 fixed a few really dumb crash bugs in refac-jit
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402383
2008-07-08 07:59:33 +00:00
Matt Woodrow 53acb70260 Fixed build
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402382
2008-07-07 23:12:21 +00:00
Matt Woodrow 6ef4c4b3ad Fixed amb1828 - Not killing timers properly
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402381
2008-07-07 22:17:55 +00:00
Matt Woodrow 4ac38946f2 Fixed amb1815 - Custom admin menu wasn't escaping input
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402380
2008-07-07 22:11:49 +00:00
David Anderson af54ae6af7 fixed some build issues. deprecated ISourceMod::GetScriptingVM
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402378
2008-07-07 06:33:42 +00:00
David Anderson 2c23544b29 amazingly, core now builds. it probably crashes horribly but i'll test tomorrow.
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402377
2008-07-07 06:25:15 +00:00
David Anderson 5351bbec71 more api for core
sets profiler+debugger now

--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402376
2008-07-07 06:24:54 +00:00
David Anderson 492c913aa9 added api calls needed by core
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402375
2008-07-07 05:28:42 +00:00
David Anderson 31dd23fbd9 committed public api changes (context and plugin are now private)
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402374
2008-07-07 04:58:49 +00:00
David Anderson 3f38171d8c refac-jit is almost done i think, next comes getting core compatible.
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402373
2008-07-07 04:56:29 +00:00
David Anderson 307adb34ab moved more files around
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402371
2008-07-06 05:04:38 +00:00
David Anderson 8a4af4d22f moved files around pre-emptively
--HG--
branch : refac-jit
rename : sourcepawn/jit/x86/msvc8/jit-x86.sln => sourcepawn/jit/msvc8/jit-x86.sln
rename : sourcepawn/jit/x86/msvc8/jit-x86.vcproj => sourcepawn/jit/msvc8/jit-x86.vcproj
rename : core/vm/sp_vm_basecontext.cpp => sourcepawn/jit/sp_vm_basecontext.cpp
rename : core/vm/sp_vm_basecontext.h => sourcepawn/jit/sp_vm_basecontext.h
rename : core/vm/sp_vm_engine.cpp => sourcepawn/jit/sp_vm_engine.cpp
rename : core/vm/sp_vm_engine.h => sourcepawn/jit/sp_vm_engine.h
rename : core/vm/sp_vm_function.cpp => sourcepawn/jit/sp_vm_function.cpp
rename : core/vm/sp_vm_function.h => sourcepawn/jit/sp_vm_function.h
rename : core/zlib/adler32.c => sourcepawn/jit/zlib/adler32.c
rename : core/zlib/compress.c => sourcepawn/jit/zlib/compress.c
rename : core/zlib/crc32.c => sourcepawn/jit/zlib/crc32.c
rename : core/zlib/crc32.h => sourcepawn/jit/zlib/crc32.h
rename : core/zlib/deflate.c => sourcepawn/jit/zlib/deflate.c
rename : core/zlib/deflate.h => sourcepawn/jit/zlib/deflate.h
rename : core/zlib/gzio.c => sourcepawn/jit/zlib/gzio.c
rename : core/zlib/infback.c => sourcepawn/jit/zlib/infback.c
rename : core/zlib/inffast.c => sourcepawn/jit/zlib/inffast.c
rename : core/zlib/inffast.h => sourcepawn/jit/zlib/inffast.h
rename : core/zlib/inffixed.h => sourcepawn/jit/zlib/inffixed.h
rename : core/zlib/inflate.c => sourcepawn/jit/zlib/inflate.c
rename : core/zlib/inflate.h => sourcepawn/jit/zlib/inflate.h
rename : core/zlib/inftrees.c => sourcepawn/jit/zlib/inftrees.c
rename : core/zlib/inftrees.h => sourcepawn/jit/zlib/inftrees.h
rename : core/zlib/trees.c => sourcepawn/jit/zlib/trees.c
rename : core/zlib/trees.h => sourcepawn/jit/zlib/trees.h
rename : core/zlib/uncompr.c => sourcepawn/jit/zlib/uncompr.c
rename : core/zlib/zconf.h => sourcepawn/jit/zlib/zconf.h
rename : core/zlib/zlib.h => sourcepawn/jit/zlib/zlib.h
rename : core/zlib/zutil.c => sourcepawn/jit/zlib/zutil.c
rename : core/zlib/zutil.h => sourcepawn/jit/zlib/zutil.h
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402370
2008-07-06 04:59:39 +00:00
David Anderson 2e7b6b5ba5 jit refactoring branch
--HG--
branch : refac-jit
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/refac-jit%402369
2008-07-06 04:49:55 +00:00
David Anderson 9a02cb9dc8 synced dod:s gamedata changes from 1.0.3
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402368
2008-07-06 03:37:40 +00:00
David Anderson 43c085eea3 synced config changes from 1.0.3
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402367
2008-07-06 03:35:58 +00:00
Matt Woodrow 6a834ffef7 Fixed requiring dependencies at the wrong time.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402366
2008-07-06 03:30:06 +00:00
David Anderson 86c8ec847a fixed crazybuilds
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402365
2008-07-06 02:28:00 +00:00
David Anderson 2df2b791d8 amb1797 - reduced query staggering time from 500ms to 50ms
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402364
2008-07-06 00:51:05 +00:00
David Anderson 0e1ae4d85b fixed amb1808 - KickClient() is delayed and does not crash -- KickClientEx() is the old functionality
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402363
2008-07-06 00:45:26 +00:00
David Anderson 3d96f8f127 fixed amb1763 - clear function call status on a new call
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402361
2008-07-06 00:02:11 +00:00
David Anderson 2cc809be0c fixed amb1748 - timeleft was spammable from console
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402359
2008-07-05 23:02:27 +00:00
Matt Woodrow d2d2578314 Fixed more critical hit crashes when compiled on msvc8.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402358
2008-07-05 22:28:02 +00:00
Matt Woodrow 76b51aed07 Fixed trunk versioning properly this time.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402356
2008-07-05 09:23:55 +00:00
Borja Ferrer d0cbd943f1 fixed eyeangles helper not being freed
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402345
2008-07-05 00:15:18 +00:00
Matt Woodrow c67a3cd749 Nominations not blocking current map and excluded maps when used from console.
Removed error causing debug stuff from mapchooser.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402343
2008-07-04 22:54:14 +00:00
Borja Ferrer bf0354dbb9 fixed amb1801, IsFakeClient() wasn't working for TF2 causing false results and crashes
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402341
2008-07-04 19:04:33 +00:00
Matt Woodrow bc4f24e94d Temporarily added back version numbers to builds.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402339
2008-07-04 00:21:34 +00:00
Matt Woodrow 73203fb7b3 Removed unneeded dod:s beta scan script.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402338
2008-07-03 08:54:58 +00:00
Matt Woodrow 89c49c3976 And again with the fixes
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402337
2008-07-03 07:30:50 +00:00
Matt Woodrow 89a56ac3e1 Output now shows params for overloaded functions
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402336
2008-07-03 06:52:28 +00:00
Matt Woodrow 3cc5bebfa9 Hopefully fixed trunk build.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402335
2008-07-03 06:26:28 +00:00
David Anderson f9cfe7e9da fixed regression in build tool
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402334
2008-07-03 04:32:30 +00:00
Matt Woodrow 5c58f8c97b Updated gamedata files now that dod:s is no longer in beta.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402332
2008-07-03 02:35:35 +00:00
Matt Woodrow bb9f31e555 Changed dod script to support dod:s no longer being beta
--HG--
rename : tools/Vtable scanner/dodsbetascan.sh => tools/Vtable scanner/dodscan.sh
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402331
2008-07-03 02:30:59 +00:00
Matt Woodrow ce57617744 Gamedata query no longer detects a failed query as a crash.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402330
2008-07-02 02:57:08 +00:00
Matt Woodrow 77a7bf385b Added a vtable scan script for dod:s beta
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402329
2008-07-02 01:34:46 +00:00
Matt Woodrow 52d2a1797d A null check that lets the program keep running is somewhat pointless.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402328
2008-07-01 23:44:33 +00:00
Matt Woodrow 111a3a7169 Added a null check on the vtable symbol
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402327
2008-07-01 23:42:19 +00:00
Matt Woodrow a513a2a6f8 And the most important piece: Import of experimental gamedata autoupdater. Also new debug command "sm_gamedata_md5 <filename>"
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402323
2008-07-01 09:48:17 +00:00
Matt Woodrow f3f46fc126 Minor fix to the filename reading logic. Almost done!
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402322
2008-07-01 09:38:20 +00:00
Matt Woodrow 3cff457c6d More changes to support the shell script.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402321
2008-07-01 09:29:02 +00:00
Matt Woodrow 853b080aa4 Updated shell script to remove windows line endings
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402320
2008-07-01 09:24:22 +00:00
Matt Woodrow 261023800e Updated gamedatamd5 to print the md5 in a more usable format and added shell script (thanks wowsawce!) for updating gamedata files.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402319
2008-07-01 09:13:27 +00:00
Matt Woodrow 7314d81947 Forgot SM doesn't use the new sdk yet
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402318
2008-07-01 09:10:21 +00:00
Matt Woodrow d530d0c726 Big critical hits cleanup. Cleaner, easier to maintain, uses less memory and should be much less likely to cause crashes when valve change things on me.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402317
2008-07-01 09:04:00 +00:00
David Anderson b01dd0798c clientprefs now uses the new dbi dependency shim
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402316
2008-07-01 06:13:09 +00:00
David Anderson 968045ae62 - Interface dropping semantics are now changed, any pointer can be piped through.
- IDBDriver lets you bind driver dependencies and cleanly shutdown now

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402315
2008-07-01 06:12:16 +00:00
Matt Woodrow 4106620928 New mapchooser, rockthevote and nominations plugins finally ready. Removed the existing mapmanager stuff.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402313
2008-07-01 01:18:52 +00:00
Matt Woodrow ac9b9f8c2a Removed DEBUG from admin-sql-threaded.sp (amb1780)
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402312
2008-06-30 23:18:26 +00:00
Matt Woodrow cdf54a3db1 Fixed mem leak in clientprefs
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402310
2008-06-30 23:07:54 +00:00
Scott Ehlert 8a5d833c89 Updated DOD:S Beta offsets
Added FireOutput support for DOD:S (amb1749)

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402309
2008-06-30 05:43:31 +00:00
Matt Woodrow 57bba6d83f Import of gamedata daemon. I love imported stuff.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402304
2008-06-30 02:34:21 +00:00
Matt Woodrow 2c08bb3a96 FORGOTTEN QUOTE
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402303
2008-06-30 02:11:58 +00:00
Matt Woodrow 6d4938f6b5 Removed cruft.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402302
2008-06-30 02:04:30 +00:00
Matt Woodrow 7104e187cc Import of Vtable scanner
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402301
2008-06-30 02:03:56 +00:00
Matt Woodrow 2fc7a017e1 Import of GameData MD5 hashing app.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402298
2008-06-29 22:23:14 +00:00
Matt Woodrow e0a69507a0 Single most annoying and hard to find bug ive ever come across. I'd like to thank MSVC for not firing the one breakpoint I actually needed. Oh and a possible fix to sdktools.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402295
2008-06-29 05:04:41 +00:00
Matt Woodrow 29de57d415 Fixed an uninitialised string causing weird results.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402292
2008-06-29 03:27:15 +00:00
Matt Woodrow 42359a243a Entity Outputs now fail silently if the mod is not supported.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402282
2008-06-26 08:07:47 +00:00
Matt Woodrow 81e40c32c8 Slight change to the vtable dump because it wasn't working all the time.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402271
2008-06-21 09:28:42 +00:00
David Anderson 350044c9a8 changelog for 1.0.3
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402266
2008-06-21 08:18:12 +00:00
Matt Woodrow bc1bb2cba2 Fixed ForcePlayerSuicide.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402263
2008-06-20 23:35:00 +00:00
David Anderson 6079c927ad fixed amb1765 - GiveNamedItem was supported even though it didn't work
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402260
2008-06-20 03:58:36 +00:00
Matt Woodrow 42f61acc45 Fixed gamedata files for the pyro update
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402257
2008-06-19 23:42:08 +00:00
Matt Woodrow bc8c9ba691 Should fix amb1756 - Invalid access on TraceRay handles.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402256
2008-06-19 03:13:57 +00:00
David Anderson 6e59d8ae5c updated licenses
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402255
2008-06-13 07:26:09 +00:00
David Anderson 749177d0b3 updated license
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402254
2008-06-13 07:24:43 +00:00
Scott Ehlert 4a32aff158 Fixed regression (introduced by revision 2242 aka Phase 0) where 'sm plugins list' displayed all plugins as having an id of 1
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402253
2008-06-11 08:28:34 +00:00
Scott Ehlert ac68a441ee All natives that use a recipient filter now actually validate the clients passed to them.
This includes StartMessage(), StartMessageEx() from Core as well as EmitSound(), EmitSentence(), and TE_Send() from SDKTools

(Warning: This may potentially cause a minor compatibility problem with plugins that don't check client validity before passing to these natives)

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402252
2008-06-11 08:07:17 +00:00
Matt Woodrow 119592eefe Fixed typo in banning.inc
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402251
2008-06-09 22:17:09 +00:00
Matt Woodrow 72a1fb06d0 I'm sure i'll get this right eventually.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402250
2008-06-09 07:24:24 +00:00
Matt Woodrow 8a7ced18de Second attempt at fixing SetUserInfo (try committing the right file this time)
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402249
2008-06-09 07:21:26 +00:00
Matt Woodrow 06c8f3a093 Fixed SetUserInfo to work on bots
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402248
2008-06-09 07:18:49 +00:00
Matt Woodrow 22aa6561b5 Added SetUserInfo command to sdktools.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402247
2008-06-09 07:12:32 +00:00
Scott Ehlert 9ac54e5fb2 Fixed rare crash in event manager when a null IGameEvent pointer was passed to the IGameEventManager2::FireEvent() hooks
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402245
2008-06-06 04:55:27 +00:00
David Anderson 2c94b1268a phase0, new versioning. we don't use build numbers anymore except (VS_VERSIONINFO stays until phase 3 is done)
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402242
2008-06-02 05:03:27 +00:00
Matt Woodrow 46ce91c4f7 Fixed amb1735 - Client Prefs create table queries typo
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402241
2008-06-01 22:31:58 +00:00
Matt Woodrow 953da3f6e0 Fixed amb1734 - Escape characters are now enabled for the custom admin menu config.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402240
2008-06-01 22:24:11 +00:00
Scott Ehlert 076b5191c9 Removed TF2_GivePlayerWeapon() and TF2_EquipPlayerClassWeapons() stocks as they no longer work at all
The 'weapons' paramater in the TF2_SetPlayerClass() class is now ignored since it no longer works

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402237
2008-05-31 22:33:17 +00:00
David Anderson 20d12fad9f added links to the doc in the adminmenu configs
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402230
2008-05-31 19:01:46 +00:00
David Anderson b18bd78c51 fixed build
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402229
2008-05-31 09:27:33 +00:00
David Anderson c3492f0192 removed dynamicmenu folder -- everything is consistent now
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402226
2008-05-31 07:57:33 +00:00
Scott Ehlert d595e020cd Added #pragma deprecated to GetEntDataEnt() and SetEntDataEnt()
(these were already considered deprecated, but now the compiler will officially complain about them)

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402225
2008-05-30 22:42:30 +00:00
Scott Ehlert 5b4f98b354 Fixed amb1727 - TF2_Disguise and TF2_RemoveDisguise had incorrect signatures
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402223
2008-05-30 22:38:04 +00:00
David Anderson 6e2ac7376e updated changelog (i should have done these two in one commit)
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402222
2008-05-29 05:40:51 +00:00
David Anderson 1a86604d99 fixed amb1686 - ReplaceString or ReplaceStringEx with an empty search string would crash. it now throws an error instead.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402220
2008-05-29 05:39:29 +00:00
David Anderson 049f63e6fd added 1.0.2 preliminary changelog
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402219
2008-05-29 05:01:50 +00:00
David Anderson 3aea76cfb3 insignificant changes from branch
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402218
2008-05-29 04:50:59 +00:00
David Anderson 3b4c800baa (merging from branch) fixed amb1583 - MySQL string fetch from prepared queries returned corrupted data.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402217
2008-05-29 04:47:42 +00:00
David Anderson ca9b2784bd extensions now use the repository build number intsead of their local commit number
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402204
2008-05-29 03:19:55 +00:00
Scott Ehlert df83dbc04e Fixed Windows trunk build
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402202
2008-05-28 04:28:04 +00:00
David Anderson 81af704f58 added amb1715 - tracehull
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402201
2008-05-28 03:04:28 +00:00
David Anderson 627e4fd115 committed two forgotten files and updated the linux makefile
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402200
2008-05-26 07:52:27 +00:00
Matt Woodrow 044ee841f2 Fixed amb1690 - Client prefs tables now create themselves.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402199
2008-05-26 07:51:36 +00:00
David Anderson c93d05f622 rewrite of the native and dependency binding/interaction code. this will ease the transition for native overrides, and greatly simplifies most of the logic. all native binding code now takes place almost entirely in ShareSys, and PluginSys supplements this logic where appropriate. extensionsys has been cleaned up
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402198
2008-05-26 07:51:11 +00:00
David Anderson c824afc61e oh
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402197
2008-05-26 07:48:26 +00:00
David Anderson 3d015908d9 deleted msvc9 files
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402196
2008-05-26 01:50:48 +00:00
Matt Woodrow bff2b0a95d Added amb1665 and amb1381 - Added other map limits to 'timeleft' and handling of timeleft/nextmap console commands.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402195
2008-05-26 01:09:10 +00:00
Matt Woodrow c9b320d645 Fixed amb1713 - The tiniest of tiny mixups in description orders.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402194
2008-05-25 20:50:11 +00:00
Matt Woodrow 29ee014a94 Quick build fix until my mapchooser changes are completed.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402192
2008-05-25 20:25:59 +00:00
Scott Ehlert aa73e41f29 Fixed CrazyDebug not working with Episode One games
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402191
2008-05-25 12:46:03 +00:00
Matt Woodrow 0a829027eb Fixed amb1663 - Dynamic Menu didn't use the ExitBack functionality
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402189
2008-05-25 07:54:30 +00:00
Matt Woodrow 9c7249a1e9 Fixed amb1709 - Dynamic Menu selections not resetting on exit
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402187
2008-05-25 07:44:58 +00:00
Matt Woodrow d9357d5224 Fixed amb1454 - Nextmap broken on mods that use the scores usermsg differently to CS:S
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402185
2008-05-25 07:11:16 +00:00
Matt Woodrow 73a20de2ff Added server check to clientprefs
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402184
2008-05-25 03:26:31 +00:00
Matt Woodrow 8cd8228251 Fixed amb1358 - Timeleft not reseting on TF2 restarts
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402183
2008-05-25 02:07:52 +00:00
David Anderson 02faa8fbd6 looks like valve is trying to degrade radio menus to deprecate them. thanks guys, quality!
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402180
2008-05-24 09:57:40 +00:00
David Anderson 79485eef38 fixed amb1684 - regression in password handling
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402179
2008-05-24 09:17:35 +00:00
David Anderson b2d25f2a77 added quick tool for fetching dlls of mdmps
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402177
2008-05-24 06:48:35 +00:00
Scott Ehlert e794883b1f Added support for recent Day of Defeat Beta
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402175
2008-05-24 06:06:13 +00:00
David Anderson 2a11739e86 added amb1694 - FindCharInString()
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402174
2008-05-24 05:02:35 +00:00
Matt Woodrow dea6b06e2c Added a load-block for incorrect mods to TF2 and cstrike extensions.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402173
2008-05-24 04:08:29 +00:00
David Anderson 13cf254f08 how did i forget to commit this? sm_revote
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402171
2008-05-24 03:04:10 +00:00
Matt Woodrow 531c359fb9 Updated crit hit offsets.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402170
2008-05-21 23:45:18 +00:00
David Anderson 9550e55160 added a changelog
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402169
2008-05-21 05:43:44 +00:00
David Anderson 40e0857a29 added a forward that helps prevent against race conditions in map config plugins
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402162
2008-05-21 02:12:12 +00:00
Scott Ehlert 47fa9d9464 Fixed amb1688 - Linux GivePlayerItem/GiveNamedItem offset for Day of Defeat was incorrect
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402161
2008-05-20 09:45:13 +00:00
David Anderson d827c0fd2d added amb1685 - GetTickInterval()
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402158
2008-05-20 05:39:37 +00:00
Matt Woodrow c16afc9cd3 Fixed amb1687 - Infinite loop in Entity Outputs
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402157
2008-05-20 02:51:02 +00:00
David Anderson a18b1e0790 fixed a bug where if a plugin errored during the instantiation process, then its index could be reported as -1 from debug messages
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402156
2008-05-20 02:30:55 +00:00
David Anderson 80b2ea646a fixed a delayed unload crash in sdktools
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402155
2008-05-20 02:24:42 +00:00
Matt Woodrow f7613f80f1 Fixed Crit hits sigs for Windows and cleaned up the code somewhat
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402154
2008-05-18 00:51:51 +00:00
David Anderson b90386276f fixed wrong re-use of variable
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402153
2008-05-17 18:14:34 +00:00
David Anderson 8ad5d61878 added a new ia32 macro for the mov eax opcode
cleaned up a bit of the crit hook code

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402152
2008-05-17 08:30:17 +00:00
David Anderson b2fbd9691d added amb1119 - sm_revote command
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402151
2008-05-17 05:12:52 +00:00
David Anderson 0fac3fd74e fixed a bug in the new translation code usage
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402150
2008-05-17 05:10:36 +00:00
David Anderson 3342a84cf4 fixed amb1646 - implemented NetFlow_Both functionality
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402149
2008-05-15 05:52:30 +00:00
Matt Woodrow 21359ea17e Fixed amb1657 - Server should see admin version of sm_who
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402148
2008-05-14 22:40:36 +00:00
David Anderson a7cc2609e1 added amb1448 - duplicate admins are now combined rather than excluded
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402145
2008-05-14 05:31:14 +00:00
Scott Ehlert 9023afff0d Trunk build fixes
Fixed up IGameHelpers.h such that it no longer requires HL2SDK headers if a function doesn't need them

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402144
2008-05-13 08:22:49 +00:00
Matt Woodrow f388b0612b Build fix attempt
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402142
2008-05-12 09:18:50 +00:00
Matt Woodrow c7dbacc134 Quick renaming
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402141
2008-05-12 08:56:24 +00:00
Matt Woodrow d88ba02fde CLIENT PREFS ARE GO!!1!shiftone!!1!
Fully implemented amb734 - Including console interface and menu for clients to use.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402140
2008-05-12 08:06:47 +00:00
Scott Ehlert 6e91780e73 Err, fixed Linux build
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402139
2008-05-12 02:05:57 +00:00
Scott Ehlert 77ff2c40bd Symbols no longer stripped on Linux for easier debugging
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402137
2008-05-11 07:49:30 +00:00
David Anderson aee95b6c74 bug fix, optimization
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402135
2008-05-10 19:21:11 +00:00
David Anderson f1ef53cdff implemented amb1613 - p2p voice filters now work
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402134
2008-05-10 19:17:21 +00:00
David Anderson 9a7c884c21 fixed linux build
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402133
2008-05-10 09:30:13 +00:00
David Anderson c7418e70ba added amb1666 - rehaul over the ml api so extensions can easily use translations
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402132
2008-05-10 09:23:55 +00:00
Scott Ehlert 1e70b04f48 Removed odd debug code, err, in CrazyDebug of all places
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402131
2008-05-09 08:22:39 +00:00
Scott Ehlert 1adb549a8d CrazyDebug just got crazier!
1) Now works with SrcDS -console + DEP on Windows
2) Updated vcproj files for OB, Episode 1, etc

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402129
2008-05-09 08:04:27 +00:00
Matt Woodrow 35eb2f2ce5 A sad response to amb1655 - TF2_SetPlayerInvuln is broken and now removed.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402127
2008-05-08 23:43:02 +00:00
Borja Ferrer 2030ef9114 removed these functions in tf2 for now to avoid more crashes
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402125
2008-05-04 15:52:34 +00:00
Scott Ehlert c5330c73b7 Attempted fix for amb1648 - stack corruption when GetClientEyeAngles() is called on Windows
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402124
2008-05-02 07:47:38 +00:00
Matt Woodrow 7a968cb33c Re-added the msvc8 folder that I broke.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402122
2008-05-02 01:31:15 +00:00
Matt Woodrow a2aa6b0daf Added msvc9 Project files to sdktools. Badly.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402121
2008-05-01 23:48:27 +00:00
Matt Woodrow 8df36003a8 Updated TF2 Extension to fix critical hits.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402119
2008-05-01 07:29:46 +00:00
Matt Woodrow f226e6d70b Missing ! in sample_ext
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402115
2008-05-01 02:43:32 +00:00
Matt Woodrow 394424c52f Moved mapchooser tf2 fix into trunk
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402112
2008-05-01 02:39:35 +00:00
Scott Ehlert 5c6a2868d9 Updated TF2 virtual offsets for goldrush/medic update
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402109
2008-04-30 04:15:09 +00:00
David Anderson 62047b6d0d fixed amb1645 - command help typo
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402107
2008-04-29 15:14:50 +00:00
Borja Ferrer 5e721623a0 fixed a math mistake
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402104
2008-04-27 19:41:51 +00:00
Matt Woodrow 90b739ae48 I love you gcc.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402102
2008-04-25 06:05:35 +00:00
Matt Woodrow 7262dd5e79 TF2 Round count mapchooser fix.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402100
2008-04-25 05:26:39 +00:00
Matt Woodrow f41aefc525 Cleaned up a few sdktools files.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402097
2008-04-25 05:20:17 +00:00
Matt Woodrow 0c22ab3972 Trying to upgrade clientprefs to msvc9 - Part 2
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402096
2008-04-25 00:08:27 +00:00
Matt Woodrow 221e7d48a7 Trying to upgrade clientprefs to msvc9 - Part 1
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402095
2008-04-24 23:27:50 +00:00
Scott Ehlert 21c0466b3d Added any tag to ADT array functions to fix potential tag mismatches
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402094
2008-04-24 10:25:44 +00:00
Matt Woodrow 47f8d0eef5 Added amb1623 - More reserved slots kick types.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402092
2008-04-22 22:50:27 +00:00
Matt Woodrow d0286c1391 Fixed amb1634 - GetPlayerResourceData incorrectly memorising offsets.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402091
2008-04-22 22:05:03 +00:00
David Anderson eac0e274a6 amb1597 - renamed legacy translation files
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402089
2008-04-22 00:44:14 +00:00
Matt Woodrow af05dbbcdf Incparser upgrades.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402088
2008-04-21 21:41:38 +00:00
Matt Woodrow ac256a6c24 Bail's pedantic parser made me do it.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402087
2008-04-19 10:35:24 +00:00
Matt Woodrow 0771411eac Fixed linux build
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402085
2008-04-19 04:14:47 +00:00
Matt Woodrow e6de7c0c2d Fixed amb1607 - TF2 extension critical hit crashes.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402083
2008-04-19 03:41:14 +00:00
David Anderson 8d021c6caf fixed some doc inconsistencies on ProcessTargetString
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402081
2008-04-19 00:44:28 +00:00
Scott Ehlert 9487f9d631 Updated NOTICE.txt to describe how to add svn:keywords to existing files
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402079
2008-04-17 10:00:52 +00:00
Scott Ehlert 678cb82ec0 Gah, finalized the revised ILibrarySys::GetFileExtension() code
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402078
2008-04-17 09:28:46 +00:00
Scott Ehlert c4c8948d95 Oops. Fixed ILibrarySys::GetFileExtension() to work properly on Windows again.
(Had accidentally copied revised version from my Linux-only propcheck program)

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402075
2008-04-17 09:23:18 +00:00
Scott Ehlert 1e1f0de4ec Rewrote ILibrarySys::GetFileExtension() to fix the following issues:
- Crash when NULL was passed
- Crash when blank string '\0' was passed
- Incorrect result returned when file name began with a period. These files are now considered to not have any extension.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402074
2008-04-17 09:19:36 +00:00
Matt Woodrow 84bde330cd Fixed build.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402073
2008-04-17 06:08:18 +00:00
Matt Woodrow e63a5cd3dc Initial import of amb734 - Client preferences extension.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402072
2008-04-17 04:58:09 +00:00
Matt Woodrow 6c38c9264e Added Active support for TF2
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402071
2008-04-17 02:46:31 +00:00
David Anderson 946834b868 added amb1620 - ActivateEntity
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402068
2008-04-16 23:29:03 +00:00
Matt Woodrow 726aa68be9 added amb1181 - New reserve slot type
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402067
2008-04-16 07:35:52 +00:00
Matt Woodrow 16bdac4635 Added amb1609 - Persistant option to TF2_SetPlayerClass
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402066
2008-04-16 05:41:34 +00:00
David Anderson d014010a99 added amb1610 - StripQuotes()
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402063
2008-04-16 05:27:09 +00:00
David Anderson 07915461e9 fixed typo
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402062
2008-04-16 05:04:33 +00:00
David Anderson e24f15e7df fixed amb1615 (typo)
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402061
2008-04-14 14:15:44 +00:00
Matt Woodrow 90d4fed4a9 Fixed minor player selection bug in tf2 extension
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402059
2008-04-14 03:13:15 +00:00
David Anderson 101d2359de fixed a gcc whine
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402057
2008-04-13 06:08:47 +00:00
David Anderson 046ce18e8b added amb1538 - adt_stack
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402056
2008-04-13 06:06:27 +00:00
David Anderson 883e77bc60 fixed crash bug (regression) when extensions failed to load
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402055
2008-04-13 04:00:44 +00:00
Borja Ferrer 6d2a3a7964 fixed amb1586 for real
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402052
2008-04-12 23:03:30 +00:00
David Anderson 2fbd32cd1a fixed amb1591 - mods like IOS:S which, in listen server mode add bots before the player, caused crashes in SM
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402050
2008-04-12 02:18:03 +00:00
Borja Ferrer 800838d76a fixed build
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402048
2008-04-12 02:11:16 +00:00
Borja Ferrer 93b2edde8c forgot to commit this
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402046
2008-04-12 01:58:07 +00:00
Borja Ferrer a483ec5dc5 experimental fix for amb1586 - team native crash
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402044
2008-04-12 01:35:45 +00:00
David Anderson c42a26bb66 fixed crash bug on shutdown
removed implementations from header

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402043
2008-04-12 01:33:55 +00:00
Matt Woodrow 75a77c1925 Fixed amb1611 - Spy knife critical detour reading from wrong gamedata key
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402041
2008-04-12 00:58:34 +00:00
Scott Ehlert c473d75d3d Added more missing svn:keywords properties to some files (this should be the last of them before I never have to do this again)
Moved sm_memtable files in sqlite extension to sdk directory (to be consistent with topmenus)
Some extension source files had an incorrect extension name in their headers

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402037
2008-04-11 17:16:36 +00:00
Matt Woodrow 0c5e4b5a2f Fixed amb1601 - Wrong ConVar handle in vote FF menu
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402036
2008-04-11 08:04:11 +00:00
Matt Woodrow dcb9efa131 Fixed amb1594 - SetPlayerClass issues with spawning
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402034
2008-04-11 07:58:06 +00:00
Scott Ehlert 70301419b1 Added svn:keywords property to some files that didn't have them already
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402030
2008-04-10 19:28:26 +00:00
Borja Ferrer ad37496d34 just some cleaning
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402029
2008-04-10 19:25:50 +00:00
David Anderson 472e9969d9 added util.cpp to makefile
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402027
2008-04-10 18:44:15 +00:00
Scott Ehlert e1aba62c15 added debug out for fopen failure - really
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402026
2008-04-10 18:14:30 +00:00
David Anderson 3a061aa38d added dynamicmenu to packager
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402025
2008-04-10 17:21:32 +00:00
David Anderson d5f5239eeb added debug output for fopen failure
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402023
2008-04-10 17:16:21 +00:00
Matt Woodrow 8ba1d5e333 Forgot a semicolon
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402021
2008-04-10 05:22:51 +00:00
David Anderson e618900688 new macros actually work now
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402019
2008-04-10 05:21:27 +00:00
Matt Woodrow ec69b34cbb Added Critical Hit hook to TF2 extension
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402016
2008-04-10 04:49:17 +00:00
David Anderson 430a860927 added amb1558 - __BINARY_PATH__ and __BINARY_FILE__
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402015
2008-04-10 00:10:45 +00:00
Scott Ehlert f08ce7f62f Oh god, Spring Cleaning Part San (3) - Finaare
- Removed batsupport extension
 - Made EVERY makefile consistent with the changes originally made to the sample extensions's makefile
 - Sample MM:S extension now uses unified makefile
 - Various innumerable changes to VS project files

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402012
2008-04-09 09:10:28 +00:00
David Anderson 13e8cf9ed8 reverted compiler change that didn't work out so well
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402011
2008-04-09 05:59:21 +00:00
David Anderson 53d11eae63 fix for amb1594 part 1 - missing semicolons
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402009
2008-04-08 23:42:17 +00:00
David Anderson 72b6510e61 fix for amb1595
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402007
2008-04-08 23:35:58 +00:00
David Anderson ea189849de fixed amb1590 - tf2 didn't autoload
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402004
2008-04-06 17:54:53 +00:00
David Anderson 8a2c175420 addressed amb1585 - url wasn't canonical
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402001
2008-04-06 17:21:13 +00:00
David Anderson 544ed79284 fixed typo in the tf version files
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401999
2008-04-06 08:20:22 +00:00
David Anderson 222b543adb added regex versioning to windows
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401998
2008-04-06 08:20:02 +00:00
David Anderson 2bec3aaa49 added versioning to regex (linux only)
added regex/tf to version markup list
bumped all svn_versions to 1.1

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401997
2008-04-06 08:13:30 +00:00
David Anderson 50c50a8f6c build tool now has regex+tf2 extensions
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401995
2008-04-06 07:49:50 +00:00
David Anderson f0f44687b6 fixed linux build
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401994
2008-04-06 07:37:03 +00:00
David Anderson f295c6f4fd new makefile
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401993
2008-04-06 07:13:00 +00:00
David Anderson b455ac4f4e merged changes back from 1.0.1
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401992
2008-04-06 06:56:45 +00:00
Matt Woodrow 3d349378ad Forgot license headers for the tf2 include files.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401988
2008-04-05 00:06:27 +00:00
Matt Woodrow b865f96886 Added amb1186 - TF2 Extension.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401987
2008-04-04 22:37:14 +00:00
Matt Woodrow 10bd6c298e Fixed amb1579 bug in entity outputs and added hl2mp to the supported games.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401982
2008-04-03 23:57:54 +00:00
Scott Ehlert 4d3d51b5dd Fixed amb1577 - CreateConVar return documentation was incorrect
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401980
2008-04-02 17:43:58 +00:00
Matt Woodrow 51d5f79f1e Changed UnHook -> Unhook for entity output natives.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401979
2008-04-02 01:58:45 +00:00
Matt Woodrow 9b4bdd05b5 Removed a stray debug message from entity outputs.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401978
2008-04-02 01:46:20 +00:00
Matt Woodrow a0b05dc624 Added amb1528 - Entity Output Hooking.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401977
2008-04-02 01:22:02 +00:00
Scott Ehlert 79fb305722 Spring Cleaning, Part Ni (2)
- Renamed output file in regex extension project file from sample.ext.dll to regex.ext.dll
- Revampled sample extension Makefile. It is now possible to build an extension that doesn't require the use of Metamod using it.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401976
2008-04-01 04:22:47 +00:00
Matt Woodrow fbe46934a4 Added EquipPlayerWeapon to SDKTools. Offsets for CS:S and TF2 added.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401975
2008-04-01 00:51:21 +00:00
Matt Woodrow b9bd1b1037 How the hell did that get there.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401974
2008-04-01 00:06:08 +00:00
Matt Woodrow b9aac380d4 Added sm_dump_datamaps server command.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401973
2008-03-31 23:13:31 +00:00
Matt Woodrow 127c89de4e Big changes to dynamic menu. Removed constant kv tracking. Tested everything.
Import of config files.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401972
2008-03-31 22:44:18 +00:00
Scott Ehlert 251cced1f8 Spring Cleaning, Part Ichi (1)
Various minor things done to project files
Updated sample extension project file and updated makefile to the new unified version (more changes likely on the way)
Updated regex project file and makefile

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401971
2008-03-30 07:00:22 +00:00
Scott Ehlert 02931c94cf Changed env var used in include paths: SOURCEMM -> SORCEMM16
Removed some unneccessary build configuartations in some project files

--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401970
2008-03-28 06:21:34 +00:00
Scott Ehlert 3a14544385 Changed env var used in include paths: SOURCEMM -> SORCEMM16
Changed env var used in include paths: SOURCEMM142 -> SORCEMM14
Removed some unneccessary build configuartations in some project files

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401969
2008-03-28 06:18:26 +00:00
Scott Ehlert 33b2847ec3 Added scripting/adminmenu directory to build tool
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401968
2008-03-28 04:51:53 +00:00
Scott Ehlert a3d5a0151d Err, these got added accidentally apparently. Thanks a lot TSVN.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401965
2008-03-27 05:02:00 +00:00
Scott Ehlert 97c26eee3c Updated copyright year
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401964
2008-03-27 04:54:56 +00:00
Scott Ehlert cc3c16c079 Changed the environment variable used in the include paths from SOURCEMM -> SOURCEMM16
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401961
2008-03-27 04:00:57 +00:00
David Anderson c5af41d983 merged branch-1.1.0 back into trunk
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401960
2008-03-26 03:52:37 +00:00
Scott Ehlert 3bcd296d99 Merged crash fix (amb1539) from 1.0.1 branch
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401958
2008-03-21 04:26:53 +00:00
Scott Ehlert 83a1ebcf0f Removed debug code?
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401954
2008-03-20 19:52:30 +00:00
David Anderson 8ba6d5cbba bumped trunk version
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401953
2008-03-17 15:30:39 +00:00
David Anderson bb85c5eda2 -branch, implemented "goto"
-branch, added a new jit opcode -- 165/op.stackadjust(1), stk = frm+n

--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401937
2008-03-13 17:08:05 +00:00
David Anderson a64894bbe4 updated to trunk code
--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401936
2008-03-13 17:04:25 +00:00
Matt Woodrow 50760d853f Cleaned up a few things in regex extension and updated project files to build on both engines. Linux makefiles probably still won't work.
--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401925
2008-03-04 23:18:16 +00:00
Matt Woodrow 62b08e923c Import of some basic tf2 stuff. Needs debugging properly.
--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401855
2008-01-17 00:31:58 +00:00
Matt Woodrow 2f41af814e Initial import of regex extension
--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401848
2008-01-10 22:01:36 +00:00
Matt Woodrow d28eca4bb3 Increased max length for list items
--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401831
2007-12-28 02:41:52 +00:00
Matt Woodrow 306be48027 Fixed dynamic menu reading userid2 as userid
--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401830
2007-12-26 02:41:04 +00:00
Matt Woodrow 4ad308897f Few dynamic menu bug fixes.
--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401829
2007-12-26 01:16:38 +00:00
Michael McKoy f6b6dff4c0 Don't even bother trying to compile these, it's not finished. Just committing for archiving purposes, this is not intended for 1.0 release.
--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401813
2007-12-19 22:19:34 +00:00
Matt Woodrow 3ba7c63862 Initial import of dynamic menu code (amb1039)
--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401788
2007-12-10 21:02:00 +00:00
David Anderson 20112fe6cc skeleton tf2 extension for ferret
--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401722
2007-11-23 05:27:58 +00:00
David Anderson 3f49d29274 merged trunk back into 1.1.0 branch for "safety"
--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401721
2007-11-23 05:10:33 +00:00
David Anderson 0601988e80 branched trunk to 1.1.0
--HG--
branch : sourcemod-1.1.0
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.1.0%401681
2007-11-11 20:59:20 +00:00
David Anderson 9eb41bc475 removed local branch
--HG--
branch : dvander
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/dvander%4027
2006-07-15 05:11:30 +00:00
Borja Ferrer 7cd5c96087 identaAaAtion
--HG--
branch : faluco
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/faluco%4017
2006-07-15 01:36:48 +00:00
2744 changed files with 985191 additions and 186589 deletions
+5
View File
@@ -0,0 +1,5 @@
{
"project_id" : "sourcemod",
"conduit_uri" : "https://phabricator.alliedmods.net/",
"history.immutable" : false
}
+74
View File
@@ -0,0 +1,74 @@
# Contributing to SourceMod
## Issue reports
Please consider the following guidelines when reporting an issue.
#### Not for general support
This is not the right place to get help with using or installing SourceMod, or for issues with specific, third-party SourceMod plugins or extensions.
For help with SourceMod, please consult the [AlliedModders forums](https://forums.alliedmods.net/forumdisplay.php?f=52). Similarly, for assistance with, or to report issues with, third-party SourceMod plugins or extensions, you should post in the existing thread for that plugin or extension on the [AlliedModders forums](https://forums.alliedmods.net/forumdisplay.php?f=52).
#### Details, details, details
Provide as much detail as possible when reporting an issue.
For bugs or other undesired behavior, answers to the following questions are a great start:
* What is the issue?
* What behavior are you expecting instead?
* On what operating system is the game server running?
* What game is the game server running?
* What exact version (full x.y.z.a version number) of Metamod:Source and SourceMod are installed on the game server?
* What is the specific, shortest path to reproducing this issue? If this issue can be reproduced with plugin code, please try to shorten it to the minimum required to trigger the problem.
If this is a feature request, the following are helpful. Generally, not all will apply, but whatever you can answer ahead of time will shorten back and forth conversation.
* What is your end goal, or what are you trying to accomplish?
* Why is this necessary, or what benefit do you see with it?
* Will this be useful to others?
#### Issues with security implications
Please report any security bugs to [[email protected]](mailto:[email protected]) rather than to this public issue tracker.
#### We're only human
Please keep in mind that we maintain this project in our spare time, at no cost. There is no SLA, and you are not owed a response or a fix.
#### Conduct
Please refer to the [AlliedModders forum rules.](https://forums.alliedmods.net/misc.php?do=showrules)
## Pull Requests
Firstly, thank you for considering contributing changes to the project!
However, if this is anything more than a small fix such as a gamedata update, a glaring code flaw, or a simple typo in a file like this one, please file an issue first so that it can be discussed, unless you have already spoken to multiple members of the development team about it on IRC or the AlliedModders forums.
We don't like to have to reject pull requests, so we want to avoid those scenarios. We wouldn't want you to feel like you wasted your time writing something only for us to shoot it down.
#### Rejection
*Copied from Phabricator's [Contributing Code guidelines](https://secure.phabricator.com/book/phabcontrib/article/contributing_code/#rejecting-patches), as we largely feel the same way about this.*
> If you send us a patch without coordinating it with us first, it will probably be immediately rejected, or sit in limbo for a long time and eventually be rejected. The reasons we do this vary from patch to patch, but some of the most common reasons are:
>
> **Unjustifiable Costs**: We support code in the upstream forever. Support is enormously expensive and takes up a huge amount of our time. The cost to support a change over its lifetime is often 10x or 100x or 1000x greater than the cost to write the first version of it. Many uncoordinated patches we receive are "white elephants", which would cost much more to maintain than the value they provide.
>
> As an author, it may look like you're giving us free work and we're rejecting it as too expensive, but this viewpoint doesn't align with the reality of a large project which is actively supported by a small, experienced team. Writing code is cheap; maintaining it is expensive.
>
> By coordinating with us first, you can make sure the patch is something we consider valuable enough to put long-term support resources behind, and that you're building it in a way that we're comfortable taking over.
>
> **Not a Good Fit**: Many patches aren't good fits for the upstream: they implement features we simply don't want. You can find more information in Contributing Feature Requests. Coordinating with us first helps make sure we're on the same page and interested in a feature.
>
> The most common type of patch along these lines is a patch which adds new configuration options. We consider additional configuration options to have an exceptionally high lifetime support cost and are very unlikely to accept them. Coordinate with us first.
>
> **Not a Priority**: If you send us a patch against something which isn't a priority, we probably won't have time to look at it. We don't give special treatment to low-priority issues just because there's code written: we'd still be spending time on something lower-priority when we could be spending it on something higher-priority instead.
>
> If you coordinate with us first, you can make sure your patch is in an area of the codebase that we can prioritize.
>
> **Overly Ambitious Patches**: Sometimes we'll get huge patches from new contributors. These can have a lot of fundamental problems and require a huge amount of our time to review and correct. If you're interested in contributing, you'll have more success if you start small and learn as you go.
>
> We can help you break a large change into smaller pieces and learn how the codebase works as you proceed through the implementation, but only if you coordinate with us first.
>
> **Generality**: We often receive several feature requests which ask for similar features, and can come up with a general approach which covers all of the use cases. If you send us a patch for your use case only, the approach may be too specific. When a cleaner and more general approach is available, we usually prefer to pursue it.
>
> By coordinating with us first, we can make you aware of similar use cases and opportunities to generalize an approach. These changes are often small, but can have a big impact on how useful a piece of code is.
>
> **Infrastructure and Sequencing**: Sometimes patches are written against a piece of infrastructure with major planned changes. We don't want to accept these because they'll make the infrastructure changes more difficult to implement.
>
> Coordinate with us first to make sure a change doesn't need to wait on other pieces of infrastructure. We can help you identify technical blockers and possibly guide you through resolving them if you're interested.
+8
View File
@@ -0,0 +1,8 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: https://www.sourcemod.net/donate.php
+26
View File
@@ -0,0 +1,26 @@
# Help us help you
- [ ] I have checked that my issue [doesn't exist yet](https://github.com/alliedmodders/sourcemod/issues).
- [ ] I have tried my absolute best to reduce the problem-space and have provided the absolute smallest test-case possible.
- [ ] I can always reproduce the issue with the provided description below.
# Environment
* Operating System version:
* Game/AppID (with version if applicable):
* Current SourceMod version:
* Current SourceMod snapshot:
* Current Metamod: Source snapshot:
- [ ] I have updated SourceMod to the [latest version](https://www.sourcemod.net/downloads.php) and it still happens.
- [ ] I have updated SourceMod to the [latest snapshot](https://www.sourcemod.net/downloads.php?branch=dev) and it still happens.
- [ ] I have updated SourceMM to the [latest snapshot](https://sourcemm.net/downloads.php?branch=dev) and it still happens.
# Description
# Problematic Code (or Steps to Reproduce)
```
// TODO(you): code here to reproduce the problem
```
# Logs
* Please attach in separate files: game output, library logs, kernel logs, and any other supporting information.
* In case of a crash, please attach minidump or dump analyze output.
+38
View File
@@ -0,0 +1,38 @@
# Binaries
*.dll
*.dylib
*.exe
*.so
# Files generated by Visual Studio
*.aps
*.ipch
*.ncb
*.opensdf
*.sdf
*.suo
*.user
# Build directories
CrazyDebug*/
Debug*/
Release*/
LIB-Release/
LIB-Debug/
# Files generated by Mac OS X Finder
.DS_Store
# Files generated by Windows Explorer
[Dd]esktop.ini
[Tt]humbs.db
# AMBuild build directories
build/
obj-*/
*~
*.rej
*.orig
*.smx
*.swp
*.gdb_history
+6
View File
@@ -0,0 +1,6 @@
[submodule "public/amtl"]
path = public/amtl
url = https://github.com/alliedmodders/amtl
[submodule "sourcepawn"]
path = sourcepawn
url = https://github.com/alliedmodders/sourcepawn
+118
View File
@@ -0,0 +1,118 @@
git:
depth: 3
sudo: false
language: cpp
os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-3.9
- llvm-toolchain-trusty-4.0
- llvm-toolchain-trusty-5.0
packages:
- lib32stdc++6
- lib32z1-dev
- libc6-dev-i386
- linux-libc-dev
- g++-multilib
# - clang-3.6
# - clang-3.8
# - clang-4.0
# - clang-5.0
# - g++-6
# - g++-6-multilib
- clang-3.9
- g++-4.8-multilib
- g++-4.8
- g++-4.9-multilib
- g++-4.9
- g++-5-multilib
- g++-5
- g++-7-multilib
- g++-7
cache:
directories:
- ../mysql-5.0
env:
- MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9"
- MATRIX_EVAL="CC=gcc-4.8 && CXX=g++-4.8"
- MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
matrix:
fast_finish: true
include:
- os: linux
sudo: false
language: cpp
addons:
apt:
packages: ['clang-3.6', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib']
cache:
directories: ['../mysql-5.0']
env: ['MATRIX_EVAL="CC=clang-3.6 && CXX=clang++-3.6"']
- os: linux
sudo: false
language: cpp
addons:
apt:
packages: ['clang-3.8', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib']
cache:
directories: ['../mysql-5.0']
env: ['MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"']
- os: linux
sudo: false
language: cpp
addons:
apt:
sources: ['llvm-toolchain-trusty-4.0']
packages: ['clang-4.0', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib']
cache:
directories: ['../mysql-5.0']
env: ['MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0"']
- os: linux
sudo: false
language: cpp
addons:
apt:
sources: ['llvm-toolchain-trusty-5.0']
packages: ['clang-5.0', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib']
cache:
directories: ['../mysql-5.0']
env: ['MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"']
- os: linux
sudo: false
language: cpp
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-6', 'g++-6-multilib', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib']
cache:
directories: ['../mysql-5.0']
env: ['MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"']
allow_failures:
- env: MATRIX_EVAL="CC=clang-3.7 && CXX=clang++-3.7"
- env: MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9"
- env: MATRIX_EVAL="CC=gcc-4.8 && CXX=g++-4.8"
- env: MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
- env: MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
- env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
before_script:
- CHECKOUT_DIR=$PWD && cd .. && $CHECKOUT_DIR/tools/checkout-deps.sh && cd $CHECKOUT_DIR
script:
- mkdir build && cd build
- PATH="~/.local/bin:$PATH"
- eval "${MATRIX_EVAL}"
- python ../configure.py --enable-optimize --sdks=episode1,css,tf2,l4d2,csgo,dota
- ambuild
+671
View File
@@ -0,0 +1,671 @@
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
import os, sys
class SDK(object):
def __init__(self, sdk, ext, aDef, name, platform, dir):
self.folder = 'hl2sdk-' + dir
self.envvar = sdk
self.ext = ext
self.code = aDef
self.define = name
self.platform = platform
self.name = dir
self.path = None # Actual path
self.platformSpec = platform
# By default, nothing supports x64.
if type(platform) is list:
self.platformSpec = {p: ['x86'] for p in platform}
else:
self.platformSpec = platform
def shouldBuild(self, target, archs):
if target.platform not in self.platformSpec:
return False
if not len([i for i in self.platformSpec[target.platform] if i in archs]):
return False
return True
WinOnly = ['windows']
WinLinux = ['windows', 'linux']
WinLinuxMac = ['windows', 'linux', 'mac']
CSGO = {
'windows': ['x86'],
'linux': ['x86', 'x64'],
'mac': ['x64']
}
PossibleSDKs = {
'episode1': SDK('HL2SDK', '2.ep1', '1', 'EPISODEONE', WinLinux, 'episode1'),
'ep2': SDK('HL2SDKOB', '2.ep2', '3', 'ORANGEBOX', WinLinux, 'orangebox'),
'css': SDK('HL2SDKCSS', '2.css', '6', 'CSS', WinLinuxMac, 'css'),
'hl2dm': SDK('HL2SDKHL2DM', '2.hl2dm', '7', 'HL2DM', WinLinuxMac, 'hl2dm'),
'dods': SDK('HL2SDKDODS', '2.dods', '8', 'DODS', WinLinuxMac, 'dods'),
'sdk2013': SDK('HL2SDK2013', '2.sdk2013', '9', 'SDK2013', WinLinuxMac, 'sdk2013'),
'tf2': SDK('HL2SDKTF2', '2.tf2', '11', 'TF2', WinLinuxMac, 'tf2'),
'l4d': SDK('HL2SDKL4D', '2.l4d', '12', 'LEFT4DEAD', WinLinuxMac, 'l4d'),
'nucleardawn': SDK('HL2SDKND', '2.nd', '13', 'NUCLEARDAWN', WinLinuxMac, 'nucleardawn'),
'l4d2': SDK('HL2SDKL4D2', '2.l4d2', '15', 'LEFT4DEAD2', WinLinuxMac, 'l4d2'),
'darkm': SDK('HL2SDK-DARKM', '2.darkm', '2', 'DARKMESSIAH', WinOnly, 'darkm'),
'swarm': SDK('HL2SDK-SWARM', '2.swarm', '16', 'ALIENSWARM', WinOnly, 'swarm'),
'bgt': SDK('HL2SDK-BGT', '2.bgt', '4', 'BLOODYGOODTIME', WinOnly, 'bgt'),
'eye': SDK('HL2SDK-EYE', '2.eye', '5', 'EYE', WinOnly, 'eye'),
'csgo': SDK('HL2SDKCSGO', '2.csgo', '21', 'CSGO', CSGO, 'csgo'),
'portal2': SDK('HL2SDKPORTAL2', '2.portal2', '17', 'PORTAL2', [], 'portal2'),
'blade': SDK('HL2SDKBLADE', '2.blade', '18', 'BLADE', WinLinux, 'blade'),
'insurgency': SDK('HL2SDKINSURGENCY', '2.insurgency', '19', 'INSURGENCY', WinLinuxMac, 'insurgency'),
'contagion': SDK('HL2SDKCONTAGION', '2.contagion', '14', 'CONTAGION', WinOnly, 'contagion'),
'bms': SDK('HL2SDKBMS', '2.bms', '10', 'BMS', WinLinux, 'bms'),
'doi': SDK('HL2SDKDOI', '2.doi', '20', 'DOI', WinLinuxMac, 'doi'),
}
def ResolveEnvPath(env, folder):
if env in os.environ:
path = os.environ[env]
if os.path.isdir(path):
return path
return None
head = os.getcwd()
oldhead = None
while head != None and head != oldhead:
path = os.path.join(head, folder)
if os.path.isdir(path):
return path
oldhead = head
head, tail = os.path.split(head)
return None
def Normalize(path):
return os.path.abspath(os.path.normpath(path))
def SetArchFlags(compiler, arch, platform):
if compiler.behavior == 'gcc':
if arch == 'x86':
compiler.cflags += ['-m32']
compiler.linkflags += ['-m32']
if platform == 'mac':
compiler.linkflags += ['-arch', 'i386']
elif arch == 'x64':
compiler.cflags += ['-m64', '-fPIC']
compiler.linkflags += ['-m64']
if platform == 'mac':
compiler.linkflags += ['-arch', 'x86_64']
elif compiler.like('msvc'):
if builder.target.arch == 'x86':
compiler.linkflags += ['/MACHINE:X86']
elif builder.target.arch == 'x64':
compiler.linkflags += ['/MACHINE:X64']
def AppendArchSuffix(binary, name, arch):
if arch == 'x64':
binary.localFolder = name + '.x64'
class SMConfig(object):
def __init__(self):
self.sdks = {}
self.binaries = []
self.extensions = []
self.generated_headers = None
self.mms_root = None
self.mysql_root = {}
self.spcomp = None
self.spcomp_bins = None
self.smx_files = {}
self.versionlib = None
self.archs = builder.target.arch.replace('x86_64', 'x64').split(',')
def use_auto_versioning(self):
if builder.backend != 'amb2':
return False
return not getattr(builder.options, 'disable_auto_versioning', False)
@property
def tag(self):
if builder.options.debug == '1':
return 'Debug'
return 'Release'
def detectProductVersion(self):
builder.AddConfigureFile('product.version')
# For OS X dylib versioning
import re
with open(os.path.join(builder.sourcePath, 'product.version'), 'r') as fp:
productContents = fp.read()
m = re.match('(\d+)\.(\d+)\.(\d+).*', productContents)
if m == None:
self.productVersion = '1.0.0'
else:
major, minor, release = m.groups()
self.productVersion = '{0}.{1}.{2}'.format(major, minor, release)
def detectSDKs(self):
sdk_list = builder.options.sdks.split(',')
use_all = sdk_list[0] == 'all'
use_present = sdk_list[0] == 'present'
for sdk_name in PossibleSDKs:
sdk = PossibleSDKs[sdk_name]
if sdk.shouldBuild(builder.target, self.archs):
if builder.options.hl2sdk_root:
sdk_path = os.path.join(builder.options.hl2sdk_root, sdk.folder)
else:
sdk_path = ResolveEnvPath(sdk.envvar, sdk.folder)
if sdk_path is None or not os.path.isdir(sdk_path):
if use_all or sdk_name in sdk_list:
raise Exception('Could not find a valid path for {0}'.format(sdk.envvar))
continue
if use_all or use_present or sdk_name in sdk_list:
sdk.path = Normalize(sdk_path)
self.sdks[sdk_name] = sdk
if len(self.sdks) < 1 and len(sdk_list):
raise Exception('No SDKs were found that build on {0}-{1}, nothing to do.'.format(
builder.target.platform, builder.target.arch))
if builder.options.mms_path:
self.mms_root = builder.options.mms_path
else:
self.mms_root = ResolveEnvPath('MMSOURCE110', 'mmsource-1.10')
if not self.mms_root:
self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'metamod-source')
if not self.mms_root:
self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'mmsource-central')
if not self.mms_root or not os.path.isdir(self.mms_root):
raise Exception('Could not find a source copy of Metamod:Source')
self.mms_root = Normalize(self.mms_root)
if builder.options.hasMySql:
if builder.options.mysql_path:
self.mysql_root['x86'] = builder.options.mysql_path
else:
for i in range(10):
self.mysql_root['x86'] = ResolveEnvPath('MYSQL55', 'mysql-5.' + str(i))
if self.mysql_root['x86']:
break
if not self.mysql_root['x86'] or not os.path.isdir(self.mysql_root['x86']):
raise Exception('Could not find a path to MySQL!')
self.mysql_root['x86'] = Normalize(self.mysql_root['x86'])
# For now, ignore 64-bit MySQL on Windows
if 'x64' in self.archs and builder.target.platform != 'windows':
if builder.options.mysql64_path:
self.mysql_root['x64'] = builder.options.mysql64_path
else:
for i in range(10):
self.mysql_root['x64'] = ResolveEnvPath('MYSQL55_64', 'mysql-5.' + str(i) + '-x86_64')
if self.mysql_root['x64']:
break
if not self.mysql_root['x64'] or not os.path.isdir(self.mysql_root['x64']):
raise Exception('Could not find a path to 64-bit MySQL!')
self.mysql_root['x64'] = Normalize(self.mysql_root['x64'])
def configure(self):
builder.AddConfigureFile('pushbuild.txt')
if not set(self.archs).issubset(['x86', 'x64']):
raise Exception('Unknown target architecture: {0}'.format(builder.target.arch))
cxx = builder.DetectCxx()
if cxx.like('msvc') and len(self.archs) > 1:
raise Exception('Building multiple archs with MSVC is not currently supported')
if cxx.like('gcc'):
self.configure_gcc(cxx)
elif cxx.family == 'msvc':
self.configure_msvc(cxx)
# Optimizaiton
if builder.options.opt == '1':
cxx.defines += ['NDEBUG']
# Debugging
if builder.options.debug == '1':
cxx.defines += ['DEBUG', '_DEBUG']
# Platform-specifics
if builder.target.platform == 'linux':
self.configure_linux(cxx)
elif builder.target.platform == 'mac':
self.configure_mac(cxx)
elif builder.target.platform == 'windows':
self.configure_windows(cxx)
# Finish up.
cxx.defines += [
'SOURCEMOD_BUILD',
'SM_USE_VERSIONLIB',
]
cxx.includes += [
os.path.join(builder.sourcePath, 'public'),
]
if self.use_auto_versioning():
cxx.defines += ['SM_GENERATED_BUILD']
cxx.includes += [
os.path.join(builder.buildPath, 'includes'),
os.path.join(builder.sourcePath, 'versionlib'),
]
def configure_gcc(self, cxx):
cxx.defines += [
'stricmp=strcasecmp',
'_stricmp=strcasecmp',
'_snprintf=snprintf',
'_vsnprintf=vsnprintf',
'HAVE_STDINT_H',
'GNUC',
]
cxx.cflags += [
'-pipe',
'-fno-strict-aliasing',
'-Wall',
'-Werror',
'-Wno-unused',
'-Wno-switch',
'-Wno-array-bounds',
'-msse',
'-fvisibility=hidden',
]
cxx.cxxflags += [
'-std=c++11',
'-fno-exceptions',
'-fno-threadsafe-statics',
'-Wno-non-virtual-dtor',
'-Wno-overloaded-virtual',
'-fvisibility-inlines-hidden',
]
have_gcc = cxx.family == 'gcc'
have_clang = cxx.family == 'clang'
if cxx.version >= 'clang-3.9':
cxx.cxxflags += ['-Wno-expansion-to-defined']
if cxx.version == 'clang-3.9' or cxx.version == 'apple-clang-8.0':
cxx.cflags += ['-Wno-varargs']
if cxx.version >= 'clang-3.6' or cxx.version >= 'apple-clang-7.0':
cxx.cxxflags += ['-Wno-inconsistent-missing-override']
if cxx.version >= 'clang-2.9' or cxx.version >= 'apple-clang-3.0':
cxx.cxxflags += ['-Wno-null-dereference']
if have_clang or (cxx.version >= 'gcc-4.6'):
cxx.cflags += ['-Wno-narrowing']
if have_clang or (cxx.version >= 'gcc-4.7'):
cxx.cxxflags += ['-Wno-delete-non-virtual-dtor']
if cxx.version >= 'gcc-4.8':
cxx.cflags += ['-Wno-unused-result']
if cxx.version >= 'gcc-9.0':
cxx.cxxflags += ['-Wno-class-memaccess', '-Wno-packed-not-aligned']
if have_clang:
cxx.cxxflags += ['-Wno-implicit-exception-spec-mismatch']
if cxx.version >= 'apple-clang-5.1' or cxx.version >= 'clang-3.4':
cxx.cxxflags += ['-Wno-deprecated-register']
else:
cxx.cxxflags += ['-Wno-deprecated']
cxx.cflags += ['-Wno-sometimes-uninitialized']
if have_gcc:
cxx.cflags += ['-mfpmath=sse']
cxx.cflags += ['-Wno-maybe-uninitialized']
if builder.options.opt == '1':
cxx.cflags += ['-O3']
def configure_msvc(self, cxx):
if builder.options.debug == '1':
cxx.cflags += ['/MTd']
cxx.linkflags += ['/NODEFAULTLIB:libcmt']
else:
cxx.cflags += ['/MT']
cxx.defines += [
'_CRT_SECURE_NO_DEPRECATE',
'_CRT_SECURE_NO_WARNINGS',
'_CRT_NONSTDC_NO_DEPRECATE',
'_ITERATOR_DEBUG_LEVEL=0',
]
cxx.cflags += [
'/W3',
]
cxx.cxxflags += [
'/EHsc',
'/GR-',
'/TP',
]
cxx.linkflags += [
'kernel32.lib',
'user32.lib',
'gdi32.lib',
'winspool.lib',
'comdlg32.lib',
'advapi32.lib',
'shell32.lib',
'ole32.lib',
'oleaut32.lib',
'uuid.lib',
'odbc32.lib',
'odbccp32.lib',
]
if builder.options.opt == '1':
cxx.cflags += ['/Ox', '/Zo']
cxx.linkflags += ['/OPT:ICF', '/OPT:REF']
if builder.options.debug == '1':
cxx.cflags += ['/Od', '/RTC1']
# This needs to be after our optimization flags which could otherwise disable it.
# Don't omit the frame pointer.
cxx.cflags += ['/Oy-']
def configure_linux(self, cxx):
cxx.defines += ['_LINUX', 'POSIX', '_FILE_OFFSET_BITS=64']
cxx.linkflags += ['-lm']
if cxx.family == 'gcc':
cxx.linkflags += ['-static-libgcc']
elif cxx.family == 'clang':
cxx.linkflags += ['-lgcc_eh']
def configure_mac(self, cxx):
cxx.defines += ['OSX', '_OSX', 'POSIX', 'KE_ABSOLUTELY_NO_STL']
cxx.cflags += ['-mmacosx-version-min=10.5']
cxx.linkflags += [
'-mmacosx-version-min=10.5',
'-lstdc++',
'-stdlib=libstdc++',
]
cxx.cxxflags += ['-stdlib=libstdc++']
def configure_windows(self, cxx):
cxx.defines += ['WIN32', '_WINDOWS']
def AddVersioning(self, binary, arch):
if builder.target.platform == 'windows':
binary.sources += ['version.rc']
binary.compiler.rcdefines += [
'BINARY_NAME="{0}"'.format(binary.outputFile),
'RC_COMPILE',
]
if self.use_auto_versioning():
binary.compiler.rcdefines += ['SM_GENERATED_BUILD']
elif builder.target.platform == 'mac':
if binary.type == 'library':
binary.compiler.postlink += [
'-compatibility_version', '1.0.0',
'-current_version', self.productVersion
]
if self.use_auto_versioning():
binary.compiler.linkflags += [self.versionlib[arch]]
binary.compiler.sourcedeps += SM.generated_headers
return binary
def LibraryBuilder(self, compiler, name, arch):
binary = compiler.Library(name)
AppendArchSuffix(binary, name, arch)
self.AddVersioning(binary, arch)
if binary.compiler.like('msvc'):
binary.compiler.linkflags += ['/SUBSYSTEM:WINDOWS']
return binary
def ProgramBuilder(self, compiler, name, arch):
binary = compiler.Program(name)
AppendArchSuffix(binary, name, arch)
self.AddVersioning(binary, arch)
if '-static-libgcc' in binary.compiler.linkflags:
binary.compiler.linkflags.remove('-static-libgcc')
if '-lgcc_eh' in binary.compiler.linkflags:
binary.compiler.linkflags.remove('-lgcc_eh')
if binary.compiler.like('gcc'):
binary.compiler.linkflags += ['-lstdc++', '-lpthread']
if binary.compiler.like('msvc'):
binary.compiler.linkflags += ['/SUBSYSTEM:CONSOLE']
return binary
def StaticLibraryBuilder(self, compiler, name, arch):
binary = compiler.StaticLibrary(name)
AppendArchSuffix(binary, name, arch)
return binary;
def Library(self, context, name, arch):
compiler = context.cxx.clone()
SetArchFlags(compiler, arch, builder.target.platform)
return self.LibraryBuilder(compiler, name, arch)
def Program(self, context, name, arch):
compiler = context.cxx.clone()
SetArchFlags(compiler, arch, builder.target.platform)
return self.ProgramBuilder(compiler, name, arch)
def StaticLibrary(self, context, name, arch):
compiler = context.cxx.clone()
SetArchFlags(compiler, arch, builder.target.platform)
return self.StaticLibraryBuilder(compiler, name, arch)
def ConfigureForExtension(self, context, compiler):
compiler.cxxincludes += [
os.path.join(context.currentSourcePath),
os.path.join(context.currentSourcePath, 'sdk'),
os.path.join(builder.sourcePath, 'public', 'extensions'),
os.path.join(builder.sourcePath, 'sourcepawn', 'include'),
os.path.join(builder.sourcePath, 'public', 'amtl', 'amtl'),
os.path.join(builder.sourcePath, 'public', 'amtl'),
]
return compiler
def ExtLibrary(self, context, name, arch):
binary = self.Library(context, name, arch)
self.ConfigureForExtension(context, binary.compiler)
return binary
def ConfigureForHL2(self, binary, sdk, arch):
compiler = binary.compiler
SetArchFlags(compiler, arch, builder.target.platform)
compiler.cxxincludes += [
os.path.join(self.mms_root, 'core'),
os.path.join(self.mms_root, 'core', 'sourcehook'),
]
defines = ['SE_' + PossibleSDKs[i].define + '=' + PossibleSDKs[i].code for i in PossibleSDKs]
compiler.defines += defines
paths = [
['public'],
['public', 'engine'],
['public', 'mathlib'],
['public', 'vstdlib'],
['public', 'tier0'],
['public', 'tier1']
]
if sdk.name == 'episode1' or sdk.name == 'darkm':
paths.append(['public', 'dlls'])
paths.append(['game_shared'])
else:
paths.append(['public', 'game', 'server'])
paths.append(['public', 'toolframework'])
paths.append(['game', 'shared'])
paths.append(['common'])
compiler.defines += ['SOURCE_ENGINE=' + sdk.code]
if sdk.name in ['sdk2013', 'bms'] and compiler.like('gcc'):
# The 2013 SDK already has these in public/tier0/basetypes.h
compiler.defines.remove('stricmp=strcasecmp')
compiler.defines.remove('_stricmp=strcasecmp')
compiler.defines.remove('_snprintf=snprintf')
compiler.defines.remove('_vsnprintf=vsnprintf')
if compiler.like('msvc'):
compiler.defines += ['COMPILER_MSVC', 'COMPILER_MSVC32']
if compiler.version >= 1900:
compiler.linkflags += ['legacy_stdio_definitions.lib']
else:
compiler.defines += ['COMPILER_GCC']
if arch == 'x64':
compiler.defines += ['X64BITS', 'PLATFORM_64BITS']
# For everything after Swarm, this needs to be defined for entity networking
# to work properly with sendprop value changes.
if sdk.name in ['blade', 'insurgency', 'doi', 'csgo']:
compiler.defines += ['NETWORK_VARS_ENABLED']
if sdk.name in ['css', 'hl2dm', 'dods', 'sdk2013', 'bms', 'tf2', 'l4d', 'nucleardawn', 'l4d2']:
if builder.target.platform in ['linux', 'mac']:
compiler.defines += ['NO_HOOK_MALLOC', 'NO_MALLOC_OVERRIDE']
if sdk.name == 'csgo' and builder.target.platform == 'linux':
compiler.linkflags += ['-lstdc++']
compiler.defines += ['_GLIBCXX_USE_CXX11_ABI=0']
for path in paths:
compiler.cxxincludes += [os.path.join(sdk.path, *path)]
if builder.target.platform == 'linux':
if sdk.name == 'episode1':
lib_folder = os.path.join(sdk.path, 'linux_sdk')
elif sdk.name in ['sdk2013', 'bms']:
lib_folder = os.path.join(sdk.path, 'lib', 'public', 'linux32')
elif arch == 'x64':
lib_folder = os.path.join(sdk.path, 'lib', 'linux64')
else:
lib_folder = os.path.join(sdk.path, 'lib', 'linux')
elif builder.target.platform == 'mac':
if sdk.name in ['sdk2013', 'bms']:
lib_folder = os.path.join(sdk.path, 'lib', 'public', 'osx32')
elif arch == 'x64':
lib_folder = os.path.join(sdk.path, 'lib', 'osx64')
else:
lib_folder = os.path.join(sdk.path, 'lib', 'mac')
if builder.target.platform in ['linux', 'mac']:
if sdk.name in ['sdk2013', 'bms'] or arch == 'x64':
compiler.postlink += [
compiler.Dep(os.path.join(lib_folder, 'tier1.a')),
compiler.Dep(os.path.join(lib_folder, 'mathlib.a'))
]
else:
compiler.postlink += [
compiler.Dep(os.path.join(lib_folder, 'tier1_i486.a')),
compiler.Dep(os.path.join(lib_folder, 'mathlib_i486.a'))
]
if sdk.name in ['blade', 'insurgency', 'doi', 'csgo']:
if arch == 'x64':
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'interfaces.a'))]
else:
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'interfaces_i486.a'))]
dynamic_libs = []
if builder.target.platform == 'linux':
if sdk.name in ['css', 'hl2dm', 'dods', 'tf2', 'sdk2013', 'bms', 'nucleardawn', 'l4d2', 'insurgency', 'doi']:
dynamic_libs = ['libtier0_srv.so', 'libvstdlib_srv.so']
elif arch == 'x64' and sdk.name == 'csgo':
dynamic_libs = ['libtier0_client.so', 'libvstdlib_client.so']
elif sdk.name in ['l4d', 'blade', 'insurgency', 'doi', 'csgo']:
dynamic_libs = ['libtier0.so', 'libvstdlib.so']
else:
dynamic_libs = ['tier0_i486.so', 'vstdlib_i486.so']
elif builder.target.platform == 'mac':
compiler.linkflags.append('-liconv')
dynamic_libs = ['libtier0.dylib', 'libvstdlib.dylib']
elif builder.target.platform == 'windows':
libs = ['tier0', 'tier1', 'vstdlib', 'mathlib']
if sdk.name in ['swarm', 'blade', 'insurgency', 'doi', 'csgo']:
libs.append('interfaces')
for lib in libs:
lib_path = os.path.join(sdk.path, 'lib', 'public', lib) + '.lib'
compiler.linkflags.append(compiler.Dep(lib_path))
for library in dynamic_libs:
source_path = os.path.join(lib_folder, library)
output_path = os.path.join(binary.localFolder, library)
def make_linker(source_path, output_path):
def link(context, binary):
cmd_node, (output,) = context.AddSymlink(source_path, output_path)
return output
return link
linker = make_linker(source_path, output_path)
compiler.linkflags[0:0] = [compiler.Dep(library, linker)]
return binary
def HL2Library(self, context, name, sdk, arch):
binary = self.Library(context, name, arch)
self.ConfigureForExtension(context, binary.compiler)
return self.ConfigureForHL2(binary, sdk, arch)
def HL2Project(self, context, name):
project = context.cxx.LibraryProject(name)
self.ConfigureForExtension(context, project.compiler)
return project
def HL2Config(self, project, name, sdk, arch):
binary = project.Configure(name, '{0} - {1}'.format(self.tag, sdk.name))
AppendArchSuffix(binary, name, arch)
self.AddVersioning(binary, arch)
return self.ConfigureForHL2(binary, sdk, arch)
SM = SMConfig()
SM.detectProductVersion()
SM.detectSDKs()
SM.configure()
if SM.use_auto_versioning():
SM.generated_headers = builder.Build(
'tools/buildbot/Versioning',
{ 'SM': SM }
)
SM.versionlib = builder.Build(
'versionlib/AMBuilder',
{ 'SM': SM }
)
# Build SourcePawn externally.
SP = builder.Build('sourcepawn/AMBuildScript', {
'external_root': SM,
'external_amtl': os.path.join(builder.sourcePath, 'public', 'amtl'),
'external_build': ['core'],
})
if len(SP.spcomp) > 1:
SM.spcomp = SP.spcomp['x86']
else:
SM.spcomp = SP.spcomp[list(SP.spcomp.keys())[0]]
SM.spcomp_bins = list(SP.spcomp.values())
for arch in SM.archs:
SM.binaries += [
SP.libsourcepawn[arch]
]
BuildScripts = [
'loader/AMBuilder',
'core/AMBuilder',
'core/logic/AMBuilder',
'extensions/bintools/AMBuilder',
'extensions/clientprefs/AMBuilder',
'extensions/curl/AMBuilder',
'extensions/cstrike/AMBuilder',
'extensions/geoip/AMBuilder',
'extensions/mysql/AMBuilder',
'extensions/regex/AMBuilder',
'extensions/sdkhooks/AMBuilder',
'extensions/sdktools/AMBuilder',
'extensions/sqlite/AMBuilder',
'extensions/tf2/AMBuilder',
'extensions/topmenus/AMBuilder',
'extensions/updater/AMBuilder',
]
if builder.backend == 'amb2':
BuildScripts += [
'plugins/AMBuilder',
'tools/buildbot/PackageScript',
]
builder.Build(BuildScripts, { 'SM': SM })
if builder.options.breakpad_dump:
builder.Build('tools/buildbot/BreakpadSymbols', { 'SM': SM })
-21
View File
@@ -1,21 +0,0 @@
We now use svn:keywords "Id" on all .c/.cpp/.h/.sp/.inc files. Please make sure your client is configured properly.
WINDOWS:
Open your Application Data folder.
Windows XP/2000: C:\Documents and Settings\<user>\Application Data
Windows Vista: C:\Users\<user>\AppData\Roaming
Now go to Subversion. Open the "config" file with a text editor.
LINUX:
Open ~/.subversion/config with your favorite text editor.
Under [miscellany], uncomment this line:
# enable-auto-props = yes
Under [auto-props], add these lines:
*.c = svn:keywords=Id
*.cpp = svn:keywords=Id
*.h = svn:keywords=Id
*.sp = svn:keywords=Id
*.inc = svn:keywords=Id
+27
View File
@@ -0,0 +1,27 @@
SourceMod
=========
General
-------
- [SourceMod website](http://www.sourcemod.net): Source Engine scripting and server administration
- [Forum](https://forums.alliedmods.net/forumdisplay.php?f=52): Discussion forum including plugin/extension development
- [General documentation](https://wiki.alliedmods.net/Category:SourceMod_Documentation): Miscellaneous information about SourceMod
- [Stable builds](http://www.sourcemod.net/downloads.php?branch=stable): The latest stable SourceMod releases
- [Dev builds](http://www.sourcemod.net/downloads.php?branch=dev): Builds of recent development versions
Development
-----------
- [Issue tracker](https://github.com/alliedmodders/sourcemod/issues): Issues that require back and forth communication
- [Building SourceMod](https://wiki.alliedmods.net/Building_SourceMod): Instructions on how to build SourceMod itself using [AMBuild](https://github.com/alliedmodders/ambuild)
- [SourcePawn scripting](https://wiki.alliedmods.net/Category:SourceMod_Scripting): SourcePawn examples and introduction to the language
- [SourceMod plugin API](https://sm.alliedmods.net/new-api): Online SourceMod plugin API reference generated from the include files
- [SourceMod extension development](https://wiki.alliedmods.net/Category:SourceMod_Development): C++ examples and introduction to various extension interfaces
Contact
-------
- Connect with us on [GameSurge](https://gamesurge.net) IRC in #sourcemod
- Alternatively feel free to join our [Discord](https://discord.gg/HgZctSS) server
License
-------
SourceMod is licensed under the GNU General Public License version 3. Special exceptions are outlined in the LICENSE.txt file inside of the licenses folder.
+46
View File
@@ -0,0 +1,46 @@
// vim: set ts=4 sw=4 tw=99 noet:
// =============================================================================
// SourceMod
// Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#ifndef _INCLUDE_SOURCEMOD_BRIDGE_API_H_
#define _INCLUDE_SOURCEMOD_BRIDGE_API_H_
#include <bridge/include/CoreProvider.h>
#include <bridge/include/LogicProvider.h>
#include <stdint.h>
namespace SourceMod {
// Add 1 to the RHS of this expression to bump the intercom file
// This is to prevent mismatching core/logic binaries
static const uint32_t SM_LOGIC_MAGIC = 0x0F47C0DE - 57;
} // namespace SourceMod
typedef void (*LogicInitFunction)(SourceMod::CoreProvider *core, SourceMod::sm_logic_t *logic);
typedef LogicInitFunction (*LogicLoadFunction)(uint32_t magic);
typedef SourceMod::ITextParsers *(*GetITextParsers)();
#endif // _INCLUDE_SOURCEMOD_BRIDGE_API_H_
+140
View File
@@ -0,0 +1,140 @@
// vim: set ts=4 sw=4 tw=99 noet:
// =============================================================================
// SourceMod
// Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#ifndef _INCLUDE_SOURCEMOD_CORE_PROVIDER_API_H_
#define _INCLUDE_SOURCEMOD_CORE_PROVIDER_API_H_
#include <stddef.h>
#include <stdint.h>
#include <IAdminSystem.h>
#include <amtl/am-function.h>
namespace SourcePawn {
class ISourcePawnEngine;
class ISourcePawnEngine2;
} // namespace SourcePawn
// SDK types.
#if defined(SM_LOGIC)
class ConCommandBase {};
class ConVar : public ConCommandBase {};
#else
class ConCommandBase;
class ConVar;
#endif
class KeyValues;
struct ServerGlobals
{
const double *universalTime;
float *interval_per_tick;
float *frametime;
};
namespace SourceMod {
class ISourceMod;
class IVEngineServerBridge;
class IFileSystemBridge;
class ITimerSystem;
class IPlayerManager;
class IGameHelpers;
class IMenuManager;
struct DatabaseInfo;
class IPlayerInfoBridge;
class ICommandArgs;
typedef ke::Lambda<bool(int client, const ICommandArgs*)> CommandFunc;
class CoreProvider
{
public:
/* Objects */
ISourceMod *sm;
IVEngineServerBridge *engine;
IFileSystemBridge *filesystem;
IPlayerInfoBridge *playerInfo;
ITimerSystem *timersys;
IPlayerManager *playerhelpers;
IGameHelpers *gamehelpers;
IMenuManager *menus;
SourcePawn::ISourcePawnEngine **spe1;
SourcePawn::ISourcePawnEngine2 **spe2;
const char *gamesuffix;
/* Data */
ServerGlobals *serverGlobals;
void * serverFactory;
void * engineFactory;
void * matchmakingDSFactory;
SMGlobalClass * listeners;
// ConVar functions.
virtual ConVar *FindConVar(const char *name) = 0;
virtual const char *GetCvarString(ConVar *cvar) = 0;
virtual bool GetCvarBool(ConVar* cvar) = 0;
// Command functions.
virtual void DefineCommand(const char *cmd, const char *help, const CommandFunc &callback) = 0;
// Game description functions.
virtual bool GetGameName(char *buffer, size_t maxlength) = 0;
virtual const char *GetGameDescription() = 0;
virtual const char *GetSourceEngineName() = 0;
virtual bool SymbolsAreHidden() = 0;
// Game state and helper functions.
virtual bool IsMapLoading() = 0;
virtual bool IsMapRunning() = 0;
virtual int MaxClients() = 0;
virtual bool DescribePlayer(int index, const char **namep, const char **authp, int *useridp) = 0;
virtual void LogToGame(const char *message) = 0;
virtual void ConPrint(const char *message) = 0;
virtual void ConsolePrint(const char *fmt, ...) = 0;
virtual void ConsolePrintVa(const char *fmt, va_list ap) = 0;
// Game engine helper functions.
virtual bool IsClientConVarQueryingSupported() = 0;
virtual int QueryClientConVar(int client, const char *cvar) = 0;
// Metamod:Source functions.
virtual int LoadMMSPlugin(const char *file, bool *ok, char *error, size_t maxlength) = 0;
virtual void UnloadMMSPlugin(int id) = 0;
const char * (*GetCoreConfigValue)(const char*);
void (*DoGlobalPluginLoads)();
bool (*AreConfigsExecuted)();
void (*ExecuteConfigs)(IPluginContext *ctx);
void (*GetDBInfoFromKeyValues)(KeyValues *, DatabaseInfo *);
int (*GetActivityFlags)();
int (*GetImmunityMode)();
void (*UpdateAdminCmdFlags)(const char *cmd, OverrideType type, FlagBits bits, bool remove);
bool (*LookForCommandAdminFlags)(const char *cmd, FlagBits *pFlags);
int (*GetGlobalTarget)();
};
} // namespace SourceMod
#endif // _INCLUDE_SOURCEMOD_CORE_PROVIDER_API_H_
+81
View File
@@ -0,0 +1,81 @@
// vim: set ts=4 sw=4 tw=99 noet:
// =============================================================================
// SourceMod
// Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#ifndef _INCLUDE_SOURCEMOD_BRIDGE_INCLUDE_IEXTBRIDGE_H_
#define _INCLUDE_SOURCEMOD_BRIDGE_INCLUDE_IEXTBRIDGE_H_
#include <sp_vm_api.h>
#include <IExtensionSys.h>
#include <sh_vector.h>
struct edict_t;
namespace SourceMod {
using namespace SourceHook;
using namespace SourcePawn;
class SMPlugin;
class IExtensionSys : public IExtensionManager
{
public:
virtual IExtension *LoadAutoExtension(const char *name, bool bErrorOnMissing=true) = 0;
virtual void TryAutoload() = 0;
virtual void Shutdown() = 0;
virtual IExtension *FindExtensionByFile(const char *name) = 0;
virtual bool LibraryExists(const char *name) = 0;
virtual void CallOnCoreMapStart(edict_t *edictList, int edictCount, int maxClients) = 0;
virtual IExtension *GetExtensionFromIdent(IdentityToken_t *token) = 0;
virtual void BindChildPlugin(IExtension *ext, SMPlugin *plugin) = 0;
virtual void AddRawDependency(IExtension *myself, IdentityToken_t *token, void *iface) = 0;
virtual const CVector<IExtension *> *ListExtensions() = 0;
virtual void FreeExtensionList(const CVector<IExtension *> *list) = 0;
virtual void CallOnCoreMapEnd() = 0;
};
class AutoExtensionList
{
public:
AutoExtensionList(IExtensionSys *extensions)
: extensions_(extensions), list_(extensions_->ListExtensions())
{
}
~AutoExtensionList()
{
extensions_->FreeExtensionList(list_);
}
const CVector<IExtension *> *operator ->()
{
return list_;
}
private:
IExtensionSys *extensions_;
const CVector<IExtension *> *list_;
};
} // namespace SourceMod
#endif // _INCLUDE_SOURCEMOD_BRIDGE_INCLUDE_IEXTBRIDGE_H_
+63
View File
@@ -0,0 +1,63 @@
// vim: set ts=4 sw=4 tw=99 noet:
// =============================================================================
// SourceMod
// Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#ifndef _INCLUDE_SOURCEMOD_BRIDGE_IFILESYSTEM_H_
#define _INCLUDE_SOURCEMOD_BRIDGE_IFILESYSTEM_H_
typedef void * FileHandle_t;
typedef int FileFindHandle_t;
namespace SourceMod {
class IFileSystemBridge
{
public:
virtual const char *FindFirstEx(const char *pWildCard, const char *pPathID, FileFindHandle_t *pHandle) = 0;
virtual const char *FindNext(FileFindHandle_t handle) = 0;
virtual bool FindIsDirectory(FileFindHandle_t handle) = 0;
virtual void FindClose(FileFindHandle_t handle) = 0;
virtual FileHandle_t Open(const char *pFileName, const char *pOptions, const char *pathID = 0) = 0;
virtual void Close(FileHandle_t file) = 0;
virtual char *ReadLine(char *pOutput, int maxChars, FileHandle_t file) = 0;
virtual bool EndOfFile(FileHandle_t file) = 0;
virtual bool FileExists(const char *pFileName, const char *pPathID = 0) = 0;
virtual unsigned int Size(const char *pFileName, const char *pPathID = 0) = 0;
virtual int Read(void* pOutput, int size, FileHandle_t file) = 0;
virtual int Write(void const* pInput, int size, FileHandle_t file) = 0;
virtual void Seek(FileHandle_t file, int post, int seekType) = 0;
virtual unsigned int Tell(FileHandle_t file) = 0;
virtual int FPrint(FileHandle_t file, const char *pData) = 0;
virtual void Flush(FileHandle_t file) = 0;
virtual bool IsOk(FileHandle_t file) = 0;
virtual void RemoveFile(const char *pRelativePath, const char *pathID = 0) = 0;
virtual void RenameFile(char const *pOldPath, char const *pNewPath, const char *pathID = 0) = 0;
virtual bool IsDirectory(const char *pFileName, const char *pathID = 0) = 0;
virtual void CreateDirHierarchy(const char *path, const char *pathID = 0) = 0;
};
} // namespace SourceMod
#endif // _INCLUDE_SOURCEMOD_BRIDGE_IFILESYSTEM_H_
+43
View File
@@ -0,0 +1,43 @@
// vim: set ts=4 sw=4 tw=99 noet:
// =============================================================================
// SourceMod
// Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#ifndef _INCLUDE_SOURCEMOD_BRIDGE_LOGGER_H_
#define _INCLUDE_SOURCEMOD_BRIDGE_LOGGER_H_
namespace SourceMod {
class ILogger
{
public:
virtual void LogMessage(const char *msg, ...) = 0;
virtual void LogError(const char *msg, ...) = 0;
virtual void LogFatal(const char *msg, ...) = 0;
};
} // namespace SourceMod
#endif // _INCLUDE_SOURCEMOD_BRIDGE_LOGGER_H_
+55
View File
@@ -0,0 +1,55 @@
// vim: set ts=4 sw=4 tw=99 noet:
// =============================================================================
// SourceMod
// Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#ifndef _INCLUDE_SOURCEMOD_BRIDGE_INCLUDE_IPLAYERINFO_H_
#define _INCLUDE_SOURCEMOD_BRIDGE_INCLUDE_IPLAYERINFO_H_
class IPlayerInfo;
namespace SourceMod {
class IPlayerInfoBridge
{
public:
virtual bool IsObserver(IPlayerInfo *pInfo) = 0;
virtual int GetTeamIndex(IPlayerInfo *pInfo) = 0;
virtual int GetFragCount(IPlayerInfo *pInfo) = 0;
virtual int GetDeathCount(IPlayerInfo *pInfo) = 0;
virtual int GetArmorValue(IPlayerInfo *pInfo) = 0;
virtual void GetAbsOrigin(IPlayerInfo *pInfo, float *x, float *y, float *z) = 0;
virtual void GetAbsAngles(IPlayerInfo *pInfo, float *x, float *y, float *z) = 0;
virtual void GetPlayerMins(IPlayerInfo *pInfo, float *x, float *y, float *z) = 0;
virtual void GetPlayerMaxs(IPlayerInfo *pInfo, float *x, float *y, float *z) = 0;
virtual const char *GetWeaponName(IPlayerInfo *pInfo) = 0;
virtual const char *GetModelName(IPlayerInfo *pInfo) = 0;
virtual int GetHealth(IPlayerInfo *pInfo) = 0;
virtual void ChangeTeam(IPlayerInfo *pInfo, int iTeamNum) = 0;
};
} // namespace SourceMod
#endif // _INCLUDE_SOURCEMOD_BRIDGE_INCLUDE_IPLAYERINFO_H_
+45
View File
@@ -0,0 +1,45 @@
// vim: set ts=4 sw=4 tw=99 noet:
// =============================================================================
// SourceMod
// Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#ifndef _INCLUDE_SOURCEMOD_BRIDGE_INCLUDE_IPROVIDERCALLBACK_H_
#define _INCLUDE_SOURCEMOD_BRIDGE_INCLUDE_IPROVIDERCALLBACK_H_
namespace SourceMod {
// Global callbacks provided to Core.
class IProviderCallbacks
{
public:
// Called when a log message is printed. Return true to supercede.
virtual bool OnLogPrint(const char *msg) = 0;
// Called each frame tick.
virtual void OnThink(bool simulating) = 0;
};
} // namespace SourceMod
#endif // _INCLUDE_SOURCEMOD_BRIDGE_INCLUDE_IPROVIDERCALLBACK_H_
+112
View File
@@ -0,0 +1,112 @@
// vim: set ts=4 sw=4 tw=99 noet:
// =============================================================================
// SourceMod
// Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#ifndef _INCLUDE_SOURCEMOD_BRIDGE_INCLUDE_ISCRIPTMANAGER_H_
#define _INCLUDE_SOURCEMOD_BRIDGE_INCLUDE_ISCRIPTMANAGER_H_
#include <sp_vm_api.h>
#include <IPluginSys.h>
#include <sh_vector.h>
#include <sh_string.h>
namespace SourceMod {
using namespace SourceHook;
using namespace SourcePawn;
class IChangeableForward;
enum LibraryAction
{
LibraryAction_Removed,
LibraryAction_Added
};
struct AutoConfig
{
SourceHook::String autocfg;
SourceHook::String folder;
bool create;
};
class SMPlugin : public IPlugin
{
public:
virtual size_t GetConfigCount() = 0;
virtual AutoConfig *GetConfig(size_t i) = 0;
virtual void AddLibrary(const char *name) = 0;
virtual void AddConfig(bool create, const char *cfg, const char *folder) = 0;
virtual void EvictWithError(PluginStatus status, const char *fmt, ...) = 0;
};
class IScriptManager
{
public:
virtual void LoadAll(const char *config_path, const char *plugins_path) = 0;
virtual void RefreshAll() = 0;
virtual void Shutdown() = 0;
virtual IdentityToken_t *GetIdentity() = 0;
virtual void SyncMaxClients(int maxClients) = 0;
virtual void AddPluginsListener(IPluginsListener *listener) = 0;
virtual void RemovePluginsListener(IPluginsListener *listener) = 0;
virtual IPluginIterator *GetPluginIterator() = 0;
virtual void OnLibraryAction(const char *name, LibraryAction action) = 0;
virtual bool LibraryExists(const char *name) = 0;
virtual SMPlugin *FindPluginByOrder(unsigned num) = 0;
virtual SMPlugin *FindPluginByIdentity(IdentityToken_t *ident) = 0;
virtual SMPlugin *FindPluginByContext(IPluginContext *ctx) = 0;
virtual SMPlugin *FindPluginByContext(sp_context_t *ctx) = 0;
virtual SMPlugin *FindPluginByConsoleArg(const char *text) = 0;
virtual SMPlugin *FindPluginByHandle(Handle_t hndl, HandleError *errp) = 0;
virtual bool UnloadPlugin(IPlugin *plugin) = 0;
virtual const CVector<SMPlugin *> *ListPlugins() = 0;
virtual void FreePluginList(const CVector<SMPlugin *> *list) = 0;
virtual void AddFunctionsToForward(const char *name, IChangeableForward *fwd) = 0;
};
class AutoPluginList
{
public:
AutoPluginList(IScriptManager *scripts)
: scripts_(scripts), list_(scripts->ListPlugins())
{
}
~AutoPluginList()
{
scripts_->FreePluginList(list_);
}
const CVector<SMPlugin *> *operator ->()
{
return list_;
}
private:
IScriptManager *scripts_;
const CVector<SMPlugin *> *list_;
};
} // namespace SourceMod
#endif // _INCLUDE_SOURCEMOD_BRIDGE_INCLUDE_ISCRIPTMANAGER_H_
+48
View File
@@ -0,0 +1,48 @@
// vim: set ts=4 sw=4 tw=99 noet:
// =============================================================================
// SourceMod
// Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#ifndef _INCLUDE_SOURCEMOD_BRIDGE_IVENGINESERVER_H_
#define _INCLUDE_SOURCEMOD_BRIDGE_IVENGINESERVER_H_
struct edict_t;
namespace SourceMod {
class IVEngineServerBridge
{
public:
virtual bool IsDedicatedServer() = 0;
virtual void InsertServerCommand(const char *cmd) = 0;
virtual void ServerCommand(const char *cmd) = 0;
virtual void ServerExecute() = 0;
virtual const char *GetClientConVarValue(int clientIndex, const char *name) = 0;
virtual void ClientCommand(edict_t *pEdict, const char *szCommand) = 0;
virtual void FakeClientCommand(edict_t *pEdict, const char *szCommand) = 0;
};
} // namespace SourceMod
#endif // _INCLUDE_SOURCEMOD_BRIDGE_IVENGINESERVER_H_
+92
View File
@@ -0,0 +1,92 @@
// vim: set ts=4 sw=4 tw=99 noet:
// =============================================================================
// SourceMod
// Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#ifndef _INCLUDE_SOURCEMOD_LOGIC_PROVIDER_API_H_
#define _INCLUDE_SOURCEMOD_LOGIC_PROVIDER_API_H_
#include <sp_vm_api.h>
class SMGlobalClass;
namespace SourceMod {
using namespace SourcePawn;
class CoreProvider;
class IThreader;
class ITranslator;
class IGameConfig;
class IScriptManager;
class IShareSys;
class IHandleSys;
class ICommandArgs;
class IForwardManager;
class IAdminSystem;
class IRootConsole;
class IProviderCallbacks;
class IExtensionSys;
class ITextParsers;
class ILogger;
class ICellArray;
struct sm_logic_t
{
SMGlobalClass *head;
IThreader *threader;
ITranslator *translator;
const char *(*stristr)(const char *, const char *);
size_t (*atcprintf)(char *, size_t, const char *, IPluginContext *, const cell_t *, int *);
bool (*CoreTranslate)(char *, size_t, const char *, unsigned int, size_t *, ...);
void (*AddCorePhraseFile)(const char *filename);
unsigned int (*ReplaceAll)(char*, size_t, const char *, const char *, bool);
char *(*ReplaceEx)(char *, size_t, const char *, size_t, const char *, size_t, bool);
size_t (*DecodeHexString)(unsigned char *, size_t, const char *);
IGameConfig * (*GetCoreGameConfig)();
IDebugListener *debugger;
void (*GenerateError)(IPluginContext *, cell_t, int, const char *, ...);
void (*AddNatives)(sp_nativeinfo_t *natives);
void (*RegisterProfiler)(IProfilingTool *tool);
ICellArray * (*CreateCellArray)(size_t blocksize);
void (*FreeCellArray)(ICellArray *arr);
void * (*FromPseudoAddress)(uint32_t pseudoAddr);
uint32_t (*ToPseudoAddress)(void *addr);
IScriptManager *scripts;
IShareSys *sharesys;
IExtensionSys *extsys;
IHandleSys *handlesys;
IForwardManager *forwardsys;
IAdminSystem *adminsys;
IdentityToken_t *core_ident;
ILogger *logger;
IRootConsole *rootmenu;
IProviderCallbacks *callbacks;
float sentinel;
};
} // namespace SourceMod
#endif // _INCLUDE_SOURCEMOD_LOGIC_PROVIDER_API_H_
+472
View File
@@ -0,0 +1,472 @@
SourceMod Changelog
----------------------------
SourceMod 1.3.6 [2010-10-31]
URL: http://wiki.alliedmods.net/SourceMod_1.3.6_Release_Notes
User Changes:
- Updated support for latest Left 4 Dead 1 (bug 4681).
Developer Changes:
- Updated TF2 custom kill defines (bug 4682).
----------------------------
SourceMod 1.3.5 [2010-10-17]
URL: http://wiki.alliedmods.net/SourceMod_1.3.5_Release_Notes
User Changes:
- Updated support for CS:S, Garry's Mod, DoD:S, TF2, HL2DM.
- Added support for Firearms: Source (bug 4537).
- Added support for Fistful of Frags (bug 3883).
- Added support for Alien Swarm (bug 4530).
- Fixed living players hearing dead players if alltalk is disabled while deadtalk is on (bug 4533, thanks Zach Callear).
- Fixed timeleft not getting reset on Game_Commencing in CS:S (bug 4557).
- Fixed PlayerRunCmd being hooked when not used (bug 3990).
- Fixed errors and missing effects caused by missing sprites on L4D2 (bug 4512).
- Fixed 'sm plugins' public command skipping plugins in recommended listing (bug 4501).
- Fixed corruption with large database.cfg files (bug 4286).
Developer Changes:
- Added TF2 object stocks (bug 4536).
- Added TF2_MakeBleed native to TF2 ext (bug 4542).
- Added support for logical entities in Synergy (bug 4534).
- Updated TF2 conditions enum and defines (bug 4526).
- Fixed potential crash with IMemUtils::FindPattern on Linux (bug 4554).
----------------------------
SourceMod 1.3.4 [2010-07-18]
URL: http://wiki.alliedmods.net/SourceMod_1.3.4_Release_Notes
User Changes:
- Support for latest TF update (bug 4506).
- Support for latest L4D2 update (bug 4509).
Developer Changes:
- Added FindFlagChar native (bug 3776).
- Added GetConVarDefault native (bug 4502).
- Added forward for TF's GetHoliday function (bug 4462).
----------------------------
SourceMod 1.3.3 [2010-06-23]
URL: http://wiki.alliedmods.net/SourceMod_1.3.3_Release_Notes
User Changes:
- Added support for CS:S on Orange Box
- Added gamedata for Resistance and Liberation (bug 4418).
- Updated gamedata for SourceForts, Empires, Obsidian Conflict, Zombie Master.
- Fixed memory corruption and leaks with some voice functionality (bug 4415).
- Fixed UI bug in sm_motd (bug 4460).
Developer Changes:
- Added new player condition (TFCond_CritCola, bug 4447).
- Fixed clientprefs deleting cookies twice in rare cases (bug 4412).
- Fixed OnClientConnected forward not firing for bots (bug 4443).
- Fixed sm_dump_datamaps crash (bug 4424).
- Fixed switch case comparisons failing with large numbers (bug 4457).
- Fixed rare crash in output hooks (bug 4422).
- Fixed bug with dynamically sized arrays being sliced (bug 4428).
- Fixed SendConVarValue() on TF2, DOD:S, L4D, and L4D2 (bug 4273).
- Fixed TF2 natives not being marked optional (bug 4389).
----------------------------
SourceMod 1.3.2 [2010-05-02]
URL: http://wiki.alliedmods.net/SourceMod_1.3.2_Release_Notes
User Changes:
- Support for recent TF, DoD, and L4D2 updates (bug 4356, bug 4361, bug 4371, bug 4374, bug 4375).
- Fixed rare crash when replicating cvars to clients (bug 4315).
- Lots of extra game support for Insurgency, ZPS, CSProMod, PVKII, and FortressForever (thanks
Nicholas "psychonic" hastings).
Developer Changes:
- Added TF functions for stunning, conditions, regeneration, and power play (bug 4166, bug 4331).
----------------------------
SourceMod 1.3.1 [2010-02-09]
URL: http://wiki.alliedmods.net/SourceMod_1.3.1_Release_Notes
User Changes:
- Added extended support for CSProMod (bug 4255).
- Fixed client disconnect crash on many third party games (bug 4231).
- Improved support for Battlegrounds 2 (bug 4146).
- Improved support for Insurgency (bug 4180).
- Improved support for Garry's Mod (bug 4230, bug 4268).
- Improved support for Synergy (bug 4235).
- Updated Day of Defeat support for 20010123 update (bug 4262).
- Fixed Webternet extension not loading on Windows 2000 (bug 4234).
Developer Changes:
- Fixed compiler complaints when using |any| tag on array arguments (bug 4274).
- Fixed GetClientCookieTime not being exported (bug 4237).
- Fixed potential crash in entity handling code (bug 4249).
----------------------------
SourceMod 1.3.0 [2010-01-15]
URL: http://wiki.alliedmods.net/SourceMod_1.3.0_Release_Notes
Major Features:
* Left 4 Dead 2 support
* Non-networked entity support
User Changes:
- Added Left 4 Dead 2 support (bug 4075).
- Added much richer voting progress feedback (bug 1997).
- Improved support for various third-party games (Nicholas "psychonic" Hastings).
- Added @spec target (bug 2718).
- Added sm_resetcvar command (bug 3636).
- Added "motd" chat trigger (bug 2694).
- Updated GeoIP to OCT-2009.
- Fixed rare map vote error (bug 3905).
- Fixed small leak in the nominations plugin (bug 4104).
- Fixed last client being excluded from some command effects (bug 3984).
- Fixed crashes in plugin [|un|re]loading (bug 4034, bug 4038, bug 4044, bug 4153).
- Special target "@me" is now filtered for certain statuses properly (bug 4000).
- Improved non-admin to admin chat (bug 3844).
- Removed "auto.*" extension folders (bug 3949).
Developer Changes:
- Added non-networked entity support (bug 2459).
- Added improved random number generator (bug 3831).
- Added GetClientCookieTime native (bug 3736).
- Added AskPluginLoad2 callback (bug 3716).
- Added PlayerRunCmd callback (bug 3289).
- Added PointOutsideWorld native (bug 3906).
- Added API for "blanket" command hooks (bug 4015).
- Added ability to test for SourceMod features (bug 4021).
- Added ability to change broadcast status on hooked events (bug 3886).
- OnClientCommand no longer receives unconnected clients (bug 3732).
- Fixed various bugs in client listening API (bug 3818).
- Fixed crash in BanClient (bug 3912).
- Fixed various crashes in self-removing callbacks (bug 4059).
- Fixed rare HUD text crash on TF (bug 4016).
- Fixed OnConfigsExecuted not running on EP1 games with large configs (bug 3828).
- Fixed entity output hooks not working (bug 3988).
- Gamedata folder matches are now case-insensitive (bug 3913).
- Blocked plugins from hooking "sm" command (bug 4013).
----------------------------
SourceMod 1.2.4 [2009-10-03]
URL: http://wiki.alliedmods.net/SourceMod_1.2.4_Release_Notes
- Updated for L4D changes (bugs 4032, 4033, 4035).
- Updated GeoLite Country database for GeoIP extension.
- Fixed crash when block-loading more than eight plugins (bug 4034).
- Fixed rare crash in hudtext code on TF (bug 4016).
- Fixed crash when reloading a blocked plugin failed (bug 4038).
- Fixed Huntsman not firing critical callback on TF (bug 3927).
- Registering the "sm" command no longer has any effect (bug 4013).
- Fixed translation bug in extension API (bug 4010).
----------------------------
SourceMod 1.2.3 [2009-08-28]
URL: http://wiki.alliedmods.net/SourceMod_1.2.3_Release_Notes
- Fix extension filename lookup. (bug 3975).
----------------------------
SourceMod 1.2.2 [2009-08-28]
URL: http://wiki.alliedmods.net/SourceMod_1.2.2_Release_Notes
- Removed auto folders. (bug 3949).
- Added PointOutsideWorld native to sdktools. (bug 3906).
- Added "motd" chat trigger to basetriggers. (bug 2694).
- Added manual extension reloading command to root console menu. (bug 3934)
- Fixed 'list' type custom menu entries overwriting admin restrictions. (bug 3783).
- Added sm_resetcvar command to basecommands. (bug 3636).
- Updated gamedata for DOD:S. (bug 3948).
- Updated gamedata for TF2. (bug 3948).
- Added new .ep2v build config for valve OB based games. (bug 3948).
- Fixed incorrect escaping in clientprefs SQLite queries. (bug 3904)
- Updated gamedata for Synergy. (bug 3315).
- Upgraded to pcre-7.9 (bug 3923).
- Switched Insurgency chat printing to SayText. (bug 3738).
- Updated gamedata for Insurgency. (bug 3511).
- Updated gamedata for ZM. (bug 3746).
- Updated gamedata for Empires. (bug 3500).
- Updated gamedata for ZPS. (bug 3877).
- Updated gamedata for AoC. (bug 3891).
- Fixed RemovePlayerDisguise signature for TF2. (bug 3892).
----------------------------
SourceMod 1.2.1 [2009-05-31]
URL: http://wiki.alliedmods.net/SourceMod_1.2.1_Release_Notes
- Updated SDKTools for latest Team Fortress update.
- Added L4D handling to GuessSDKVersion() (bug 3842).
- Updated Zombie Panic Source offsets (bug 3632).
- Fixed crash when clientprefs saw disconnect from 64th client (bug 3821).
- Fixed Plugin_Handled acting like a Stop in usermsg hooks (bug 3685).
- Fixed early tv_enable causing crashes (bug 3766).
- Fixed unhook event crash (bug 3814).
- Fixed compiler reading uninitialized strings while processing varargs (bug 3811).
- Fixed compiler choosing whether to emit stradjust.pri on dynamic arrays based on uninitialized memory (bug 3810).
- Fixed Windows L4D CreateFakeClient signature (bug 3792).
- Fixed sm_slap for EP1 games (bug 3768).
- Fixed casting problems in TextParsers breaking TrimString for non-ASCII characters (bug 3800).
- Fixed OnClientConnect rejectmsg handling, improved doc (bug 3690).
- Fixed clientprefs not loading cookies for clients on late load (bug 3735).
- Fixed GetCommandFlags on original engine games (bug 3759).
- Fixed compiler asserting when returning a string literal (bug 3836).
- Fixed compiler erroring when tagging functions for string return (bug 3837).
- Fixed compiler not handling constant chained relational operators correctly (bug 3838).
- Fixed revote bug and inflexibilities in RedrawClientVoteMenu (bug 3834).
- Fixed auto update URL being set too late (bug 3699).
- Disabled nextmap in Synergy and Dystopia (bug 3687, bug 3741).
- Removed unnecessary SSE optimizations from msvc9 project files (bug 3756).
- Removed short-lived tag system (bug 3751).
- Removed the alive check from sm_rename. (bug 3698).
- Switched FortressForever to Valve menus (bug 3819).
----------------------------
SourceMod 1.2.0 [2009-03-05]
URL: http://wiki.alliedmods.net/SourceMod_1.2.0_Release_Notes
Major Features:
* Left 4 Dead Support
* Dark Messiah Support
* New and Improved Updater
Changes:
- Added Left 4 Dead support (bug 3414).
- Added Dark Messiah game support (requires Metamod:Source 1.7.1 or higher).
- Added sm_name command (bug 2150).
- Added extension-level dynamic hooking to bintools (bug 2616).
- Added client validation API to replace passing userids asynchronously.
- Added cURL extension, available to other extensions (bug 3560).
- Added parsing of custom gamedata files (bug 3644).
- Added case insensitivity search to ReplaceString (bug 3639, Fyren).
- Added more detail to certain player-oriented menu titles (bug 2740, Fyren).
- Added sv_tags API (bug 3677).
- Greatly improved admin-sql-prefetch performance for large tables (bug 3354, FLOOR_MASTER).
- Exposed IServer address to extensions (bug 3545).
- New gamedata organization; files are now smaller and per-game (bug 3546).
- Split sound functions into a new plugin, sounds.smx.
- Fixed slap and slay on Insurgency (bug 2560).
- Fixed blank admins being created from invalid admin file lines (bug 3431).
- Fixed basetriggers not working on Insurgency (bug 3497).
- Fixed client preferences missing some clients (bug 3616).
- Improved database fallback mechanism in clientprefs (bug 3564).
- Improved timer handling in funcommands (bug 3498).
- Improved compile.sh to take filenames (bug 3550, jonasfietz).
- sm_kick now shows the kick reason when available.
- Fixed MsgPostHook (ex MsgSentNotify) callbacks not firing on intercept hook (bug 3631).
- Note: SourceMod now adds "sourcemod" to the sv_tags cvar.
----------------------------
SourceMod 1.1.2 [2009-02-26]
URL: http://wiki.alliedmods.net/SourceMod_1.1.2_Release_Notes
Changes:
- Fixed critical hits being permanently disabled (bug 2674)
----------------------------
SourceMod 1.1.1 [2009-02-25]
URL: http://wiki.alliedmods.net/SourceMod_1.1.1_Release_Notes
Changes:
- Added Age of Chivalry support (bug 3366, IceMatrix).
- Added Obsidian Conflict support (bug 2699, The DOO).
- Fixed compatibility issues with latest TF2 update.
- Fixed crash when an event handler fired an event of the same name (bug 3468).
- Fixed rare crash in the event manager on post hooks (bug 3548).
- Fixed formatting error with zero precision floats (bug 3447).
- Fixed various Insurgency offsets (bug 3544).
- Fixed admin menu (topmenu) categories being selectable when not usable (bug 3256).
- Fixed sm_sql_addgroup not working (bug 3578).
- Fixed memory leak when events were hooked as EventHookMode_Post.
- Fixed nextmap trigger showing wrong output with end-of-map voting disabled and sm_trigger_show set to zero (bug 3597, mr.e.unk).
----------------------------
SourceMod 1.1.0 [2008-12-28]
URL: http://wiki.alliedmods.net/SourceMod_1.1.0_Release_Notes
Major features:
* New map management plugins.
* New reserved slot type.
* GameData updates are retrieved remotely
* Client Preferences extension for per-client "cookies"
* New incremental and independent JIT
Changes:
- Added new client preferences extension (API in clientprefs.inc, bug 1925).
- Added new gamedata auto-update functionality (bug 2602).
- Revamped and greatly expanded map management plugins and their functionality (bug 2201).
- Debug mode is now always on; as there is no longer a performance loss, there is no non-debug mode.
- The timeleft trigger can now handle mp_winlimit, mp_fraglimit, and mp_maxrounds (bug 2344).
- Translations can now be in separate files and placed in language-unique folders.
- The leading "STEAM_0:" or "STEAM_1:" in SteamIDs can now be omitted from admin files.
- Added sm_revote command so clients can participate in a vote that fell off their screen (bug 2156).
- Added Core API for creating stack structures (adt_stack.inc, bug 2441).
- Added API for extending mapchooser (mapchooser.inc, bug 2201).
- Added Core API for map transition control and history (nextmap.inc).
- Added TF2 forward for overriding how critical hits are calculated.
- Added SetClientInfo() native for modifying how a server sees a client's setinfo properties.
- Added CreateDirectory() native (bug 3253).
- Added "magic" MaxClients variable to replace slower GetMaxClients() call.
- Added support for three-letter language codes (bug 3526).
- Functions to control client versus client mic listening now work as described (bug 2498).
- Fixed SDKTools not being reloadable, and fixed a related bug in Handle type removal (bug 2753).
- Rewrote internal translation handling. Extensions now have access to an ITranslator API (bug 2535).
- Rewrote internal handling of dependencies (especially relating to native providers) (bug 2466).
- Added user config hooks to IGameConfigManager, for parsing user-defined sections.
- Revamped SourcePawn API. Removed and deprecated many structures and functions accidentally exposed publicly.
- Revamped SourcePawn structure, it is now separable from SourceMod for other projects.
- Renamed basefuncommands.phrases.txt to funcommands.phrases.txt (bug 2485).
- Renamed basefunvotes.phrases.txt to funvotes.phrases.txt (bug 2485).
- Added IDBDriver API call for extensions to handle IDBDriver dependencies properly.
- Usermessage natives now validate clients to prevent crashing.
- Fixed OnConfigsExecuted not working on listen servers.
- Fixed out-of-handle conditions in CreateTimer() causing crashes (bug 3381).
- Fixed accessing invalid Handles causing crashes (bug 3359).
- Fixed memory corruption with MySQL + FetchString (bug 3352).
- Fixed ReadFileString ignoring its fourth parameter (bug 3459).
- Fixed sm_sql_addadmin reading the immunity field as a password (bug 3395).
- Fixed ReadFile sign-extending instead of zero-extending (bug 3449).
----------------------------
SourceMod 1.0.4 [2008-09-14]
Changes:
- Fixed amb1986: Format() with very long strings could crash if the input and output buffers overlapped.
- Fixed amb1938: The compiler ate too many characters in preprocessor macros.
- Fixed amb1935: Topmenu child names were not uncached when a category was deleted.
- Fixed amb1929: Banning via the console threw a runtime error.
- Fixed amb1918: Ban menu should compare userids, not client indexes
- Fixed amb1916: Threaded query delay is now 50ms instead of 500ms.
- Fixed amb1899: Duplicate maps in auto generated maplists.
- Fixed amb1891: Basechat didn't check for blank message in private says.
- Fixed amb1853: Ternary operators with string assignments could chop strings off.
- Fixed amb1815: Custom admin menu wasn't escaping input.
- Fixed amb1808: KickClient() is now delayed to prevent crashes, use KickClientEx for old functionality.
- Fixed amb1802: Possible crash when a client disconnected.
- Fixed amb1801: Improved bot detection, and fixed bots crashing if inside an OrangeBox server.cfg.
- Fixed amb1780: admin-sql-threaded had a debug spew turned on.
- Fixed amb1779: Crash in GetTeamName() on mods that don't support it.
- Fixed amb1763: Function call status is now cleared on a new function call.
- Fixed amb1749: Updated and improved DoD:S SDKTools coverage.
- Fixed team native crashes in SDKTools for mods like Insurgency.
- Fixed various file handle leaks.
----------------------------
SourceMod 1.0.3 [2008-06-21]
Changes:
- Fixed SDKTools compatibility for latest TF2 update.
- Fixed amb1750: OnAutoConfigsBuffered() inserted before "exec server.cfg".
- Fixed a logic bug where OnConfigsExecuted() could be executed before "exec server.cfg" finished.
- Fixed a rare crash in the event manager that manifested on Zombie Panic! Source.
----------------------------
SourceMod 1.0.2 [2008-05-31]
Changes:
- The admin menu is now user-modifiable (the "Dynamic Admin Menu").
- Added a TF2 extension with Team Fortress functions.
- Added a RegEx extension with regular expression functions.
- Added functions to SDKTools for hooking entity outputs.
- Added preliminary support for the DoD:S Orange Box beta.
- Added a forward for map config plugins for preventing race conditions.
- Added a %b format specifier for binary printing.
- Added sm_dump_datamaps command (SDKTools) for enumerating datamap properties.
- Added sm_dump_admcache command for debugging the admin cache.
- Added amb1715 - TraceHull functions to SDKTools (complementing TraceRay).
- Added amb1694 - FindCharInString() function.
- Added amb1685 - GetTickInterval() function.
- Added amb1620 - ActivateEntity() function to SDKTools (for Orange Box particle system).
- Added amb1610 - StripQuotes() function.
- Added amb1558 - Compiler now has __BINARY_PATH__ and __BINARY_FILE__ macros.
- Fixed amb1686 - ReplaceString* with an empty search string crashed; it now throws an error.
- Fixed amb1684 - Blank passwords required an empty but set password.
- Fixed amb1595 - Extension load failures did not show a platform error message.
- Fixed amb1583 - MySQL string fetch from prepared queries returned corrupted data.
- Fixed amb1358 - Timeleft did not reset on TF2 restarts.
- Fixed cases where the JIT was too cautious in space optimizations.
- Fixed TF2/Cstrike extensions being loadable on incompatible games.
- Fixed various documentation inconsistencies and typos.
- Fixed internal bugs with file extension handling.
Notes:
There is a possible compatibility regression from amb1684. SetAdminPassword()
has been modified to remove any set password when given an empty string. Previously,
a blank password ("") would force an admin to use "setinfo" to set an empty password,
but this functionality was deemed unuseful and unintended. Blank passwords now
remove any set password.
----------------------------
SourceMod 1.0.1 [2008-05-20]
Changes:
- Fixed SDKTools compatibility for latest TF2 update.
- Removed GivePlayerItem from TF2 (TF2 update broke functionality).
- Fixed amb1688: GivePlayerItem offset was wrong for DoD:S Linux.
- Fixed amb1657: Server console did not see admin version of sm_who.
- Fixed amb1648: Stack corruption from GetClientEyeAngles() on Windows.
- Fixed amb1646: NetFlow_Both did not work for client network statistics.
- Fixed amb1601: Vote FF menu reading from sv_alltalk cvar instead of mp_friendlyfire.
- Fixed amb1591: Fixed listen server crashes on mods like IOS:S which pre-add more than one bot.
- Fixed amb1586: GetTeamName() could crash the server if called on load.
- Fixed mapchooser's round counting for TF2.
- Fixed a bug where an RTE on plugin load would throw a message referring to the plugin as "-1".
- Symbols are no longer stripped on Linux.
- Minor SourceMod SDK fixes.
Notes:
The extension interface version has been bumped. Any extensions compiled against 1.0.1 will require 1.0.1 or higher to run. Extensions against 1.0.0 will continue to run normally.
+12
View File
@@ -0,0 +1,12 @@
// Custom admin menu commands.
// For more information:
//
// http://wiki.alliedmods.net/Custom_Admin_Menu_%28SourceMod%29
//
// Note: This file must be in Valve KeyValues format (no multiline comments)
//
"Commands"
{
}
+20
View File
@@ -0,0 +1,20 @@
/* Add group options to be added to 'group' or 'groupplayer' type submenus
* The left side is the name that will show in the menu, right is the command that will be fired
*
* For more information: http://wiki.alliedmods.net/Custom_Admin_Menu_%28SourceMod%29
*/
Groups
{
"All" "@all"
"Bots" "@bots"
"Alive" "@alive"
"Dead" "@dead"
"Humans" "@humans"
"Current aim" "@aim"
/* You can enable these if you are using Counter-Strike Source and running the cstrike extension */
// "Terrorists" "@t"
// "Counter-Terrorists" "@ct"
}
+3 -3
View File
@@ -16,7 +16,7 @@
// "@Full Admins"
//
// You can also specify immunity values. Two examples:
// "83:abcdefg" //Immunity is 83, flags are abcefgh
// "83:abcdefgh" //Immunity is 83, flags are abcdefgh
// "6:@Full Admins" //Immunity is 6, group is "Full Admins"
//
// Immunity values can be any number. An admin cannot target an admin with
@@ -37,9 +37,9 @@
////////////////////////////////
// Examples: (do not put // in front of real lines, as // means 'comment')
//
// "STEAM_0:1:16" "bce" //kick, ban, slay for this steam ID, no immunity
// "STEAM_0:1:16" "bce" //generic, kick, unban for this steam ID, no immunity
// "!127.0.0.1" "99:z" //all permissions for this ip, immunity value is 99
// "BAILOPAN" "abc" "Gab3n" //name BAILOPAN, password "Gab3n": gets reservation, kick, ban
// "BAILOPAN" "abc" "Gab3n" //name BAILOPAN, password "Gab3n": gets reservation, generic, kick
//
////////////////////////////////
+16
View File
@@ -0,0 +1,16 @@
"banreasons"
{
"Abusive" "Abusive"
"Racism" "Racism"
"General cheating/exploits" "General cheating/exploits"
"Wallhack" "Wallhack"
"Aimbot" "Aimbot"
"Speedhacking" "Speedhacking"
"Mic spamming" "Mic spamming"
"Admin disrespect" "Admin disrespect"
"Camping" "Camping"
"Team killing" "Team killing"
"Unacceptable Spray" "Unacceptable Spray"
"Breaking Server Rules" "Breaking Server Rules"
"Other" "Other"
}
+1
View File
@@ -1,6 +1,7 @@
//This file unloads all plugins, re-loads a few "safe" ones, and then prevents
//any more plugins from being loaded.
sm plugins unload_all
sm plugins load_unlock
sm plugins load basebans.smx
sm plugins load basecommands.smx
sm plugins load admin-flatfile.smx
+35 -6
View File
@@ -65,6 +65,10 @@ sm_flood_time 0.75
// no reserved slot access (spectator players are selected first) is kicked to make room. Thus, the reserved
// slots always remains free. The only situation where the reserved slot(s) can become properly occupied is
// if the server is full with reserve slot access clients.
// 2 : The same as sm_reserve_type 1 except once a certain number of admins have been reached, the reserve slot
// stops kicking people and anyone can join to fill the server. You can use this to simulate having a large
// number of reserved slots with sm_reserve_type 0 but with only need to have 1 slot unavailable when there are
// less admins connected.
// --
// Requires: reservedslots.smx
// Default: 0
@@ -80,21 +84,21 @@ sm_reserve_type 0
sm_reserved_slots 0
// Specifies whether or not reserved slots will be hidden (subtracted from max
// slot count). Valid values are 0 (visible) or 1 (hidden).
// slot count). Valid values are 0 (Visible) or 1 (Hidden).
// --
// Requires: reservedslots.smx
// Default: 0
sm_hide_slots 0
// Specifies whether or not non-admins can send messages to admins using
// say_team @<message>. Valid values are 0 (disabled) or 1 (enabled)
// say_team @<message>. Valid values are 0 (Disabled) or 1 (Enabled)
// --
// Requires: basechat.smx
// Default: 1
sm_chat_mode 1
// Specifies whether or not "timeleft" will automaticly be triggered every
// x seconds. Valid values are 0 (disabled) to 1800 seconds.
// Specifies whether or not "timeleft" will automatically be triggered every
// x seconds. Valid values are 0 (Disabled) to 1800 seconds.
// --
// Requires: basetriggers.smx
// Default: 0
@@ -105,5 +109,30 @@ sm_timeleft_interval 0
// 1 (Enabled)
// --
// Requires: basetriggers.smx
// Default: 1
sm_trigger_show 1
// Default: 0
sm_trigger_show 0
// Specifies whether or not to display vote progress to clients in the
// "hint" box (near the bottom of the screen in most games).
// Valid values are 0 (Disabled) or 1 (Enabled).
// --
// Default: 0
sm_vote_progress_hintbox 0
// Specifies whether or not to display vote progress to clients in the
// chat area. Valid values are 0 (Disabled) or 1 (Enabled).
// --
// Default: 0
sm_vote_progress_chat 0
// Specifies whether or not to display vote progress in the server console.
// Valid values are 0 (Disabled) or 1 (Enabled).
// --
// Default: 0
sm_vote_progress_console 0
// Specifies whether or not to display vote progress to clients in the
// client console. Valid values are 0 (Disabled) or 1 (Enabled).
// --
// Default: 0
sm_vote_progress_client_console 0
+69 -11
View File
@@ -4,14 +4,6 @@
*/
"Core"
{
/**
* Relative path to SourceMod's base directory. This is relative to the game/mod directory.
* Only change this if you have installed SourceMod in a non-default location.
*
* The default value is "addons/sourcemod"
*/
"BasePath" "addons/sourcemod"
/**
* This option determines if SourceMod logging is enabled.
*
@@ -38,12 +30,12 @@
"ServerLang" "en"
/**
* String to use as the public chat trigger. Set an empty string to disable.
* List of characters to use for public chat triggers. Set an empty list to disable.
*/
"PublicChatTrigger" "!"
/**
* String to use as the silent chat trigger. Set an empty string to disable.
* List of characters to use for silent chat triggers. Set an empty list to disable.
*/
"SilentChatTrigger" "/"
@@ -52,7 +44,7 @@
* but it does not evaluate to an actual command, it will be displayed
* publicly. This setting allows you to suppress accidental typings.
*
* The default value is "no". A value of "yes" will supress.
* The default value is "no". A value of "yes" will suppress.
*/
"SilentFailSuppress" "no"
@@ -88,4 +80,70 @@
* "off" - Translate using default server's language
*/
"AllowClLanguageVar" "On"
/**
* Enables or Disables SourceMod's automatic gamedata updating.
*
* The default value is "no". A value of "yes" will block the Auto Updater.
*/
"DisableAutoUpdate" "no"
/**
* If set to yes, a successful gamedata update will attempt to restart SourceMod.
* SourceMod is unloaded and reloaded, and the map is changed to the current map.
* Since gamedata updates occur when the server loads, impact should be minimal.
* But to be safe, this option is disabled by default.
*/
"ForceRestartAfterUpdate" "no"
/**
* URL to use for retrieving update information.
* SSL is not yet supported.
*/
"AutoUpdateURL" "http://update.sourcemod.net/update/"
/**
* Whether to show debug spew.
* Currently this will log details about the gamedata updating process.
*/
"DebugSpew" "no"
/**
* If set to yes, SourceMod will validate steamid auth strings with the Steam backend before giving out admin access.
* This can prevent malicious users from impersonating admins with stolen Steam apptickets.
* If Steam is down, admins will not be authenticated until Steam comes back up.
* This option increases the security of your server, but is still experimental.
*/
"SteamAuthstringValidation" "yes"
/**
* Enables or disables whether SourceMod blocks known or potentially malicious plugins from loading.
* It is STRONGLY advised that this is left enabled, there have been cases in the past with plugins that
* allow anyone to delete files on the server, gain full rcon control, etc.
*
* "yes" - Block malware or illegal plugins from loading (default)
* "no" - Warn about malware or illegal plugins loading
*/
"BlockBadPlugins" "yes"
/**
* If a plugin takes too long to execute, hanging or freezing the game server in the process,
* SourceMod will attempt to terminate that plugin after the specified timeout length has
* passed. You can disable this feature by setting the value to "0".
*/
"SlowScriptTimeout" "8"
/**
* Per "http://blog.counter-strike.net/index.php/server_guidelines/", certain plugin
* functionality will trigger all of the game server owner's Game Server Login Tokens
* (GSLTs) to get banned when executed on a Counter-Strike: Global Offensive game server.
*
* Enabling this option will block plugins from using functionality that is known to cause this.
* This option only has any effect on CS:GO. Note that this does NOT guarantee that you cannot
* receive a ban.
*
* Disable this option at your own risk.
*/
"FollowCSGOServerGuidelines" "yes"
}
+13
View File
@@ -2,6 +2,8 @@
{
"driver_default" "mysql"
// When specifying "host", you may use an IP address, a hostname, or a socket file path
"default"
{
"driver" "default"
@@ -18,4 +20,15 @@
"driver" "sqlite"
"database" "sourcemod-local"
}
"clientprefs"
{
"driver" "sqlite"
"host" "localhost"
"database" "clientprefs-sqlite"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}
}
Binary file not shown.
-2
View File
@@ -1,6 +1,4 @@
"Languages"
{
"en" "English"
"es" "Español"
}
+2 -2
View File
@@ -51,8 +51,8 @@
"target" "default"
}
/* For the "randomcycle" plugin */
"rockthevote"
/* For the "nominations" plugin */
"nominations"
{
"target" "default"
}
-38
View File
@@ -1,38 +0,0 @@
/**
* Each sub-section of "Plugins" should have a title which specifies a plugin filename.
* Filenames have a wildcard of *. Appending .smx is not required.
* If the filename has no explicit path, it will be patched to any sub-path in the plugins folder.
*
* Available properties for plugins are:
* "pause" - Whether or not the plugin should load paused - "yes" or "no" (default)
* "lifetime" - Lifetime of the plugin. Options:
* "mapsync" - Plugins should be reloaded on mapchange if changed (default)
* "global" - Plugin will never be unloaded or updated
* "blockload" - Plugin will always be blocked from loading. Implicit (automatic) loads
* produce no error, but explicit (manual) loads will show an error message.
* (Options are one of "yes" or "no")
*
* You can also have an "Options" section declaring options to pass onto the JIT:
* "debug" - Whether or not to load the plugin in debug mode
* "profile" - Bit flags for profiling level. Add flags together to reach a value.
* WARNING: Profiler is _ALPHA_ software! Use it at your own risk for
* development cycles only (not production setups).
* See the wiki article "SourceMod Profiler" for more information.
* 1 - Profile natives
* 2 - Profile callbacks
* 4 - Profile internal plugin function calls
*/
"Plugins"
{
"*"
{
"pause" "no"
"lifetime" "mapsync"
"Options"
{
"debug" "no"
}
}
}
@@ -0,0 +1,17 @@
CREATE TABLE sm_cookies
(
id INTEGER unsigned NOT NULL auto_increment,
name varchar(30) NOT NULL UNIQUE,
description varchar(255),
access INTEGER,
PRIMARY KEY (id)
);
CREATE TABLE sm_cookie_cache
(
player varchar(65) NOT NULL,
cookie_id int(10) NOT NULL,
value varchar(100),
timestamp int NOT NULL,
PRIMARY KEY (player, cookie_id)
);
@@ -0,0 +1,16 @@
CREATE TABLE sm_cookies
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name varchar(30) NOT NULL UNIQUE,
description varchar(255),
access INTEGER
);
CREATE TABLE sm_cookie_cache
(
player varchar(65) NOT NULL,
cookie_id int(10) NOT NULL,
value varchar(100),
timestamp int,
PRIMARY KEY (player, cookie_id)
);
+42
View File
@@ -0,0 +1,42 @@
# vim: set ts=2 sw=2 tw=99 noet:
import sys
try:
from ambuild2 import run, util
except:
try:
import ambuild
sys.stderr.write('It looks like you have AMBuild 1 installed, but this project uses AMBuild 2.\n')
sys.stderr.write('Upgrade to the latest version of AMBuild to continue.\n')
except:
sys.stderr.write('AMBuild must be installed to build this project.\n')
sys.stderr.write('http://www.alliedmods.net/ambuild\n')
sys.exit(1)
def make_objdir_name(p):
return 'obj-' + util.Platform() + '-' + p.target_arch
parser = run.BuildParser(sourcePath=sys.path[0], api='2.1')
parser.default_arch = 'x86'
parser.default_build_folder = make_objdir_name
parser.options.add_option('--hl2sdk-root', type=str, dest='hl2sdk_root', default=None,
help='Root search folder for HL2SDKs')
parser.options.add_option('--mysql-path', type=str, dest='mysql_path', default=None,
help='Path to MySQL 5')
parser.options.add_option('--mysql64-path', type=str, dest='mysql64_path', default=None,
help='Path to 64-bit MySQL 5')
parser.options.add_option('--mms-path', type=str, dest='mms_path', default=None,
help='Path to Metamod:Source')
parser.options.add_option('--enable-debug', action='store_const', const='1', dest='debug',
help='Enable debugging symbols')
parser.options.add_option('--enable-optimize', action='store_const', const='1', dest='opt',
help='Enable optimization')
parser.options.add_option('--no-mysql', action='store_false', default=True, dest='hasMySql',
help='Disable building MySQL extension')
parser.options.add_option('-s', '--sdks', default='all', dest='sdks',
help='Build against specified SDKs; valid args are "all", "present", or '
'comma-delimited list of engine names (default: %default)')
parser.options.add_option('--breakpad-dump', action='store_true', dest='breakpad_dump',
default=False, help='Dump and upload breakpad symbols')
parser.options.add_option('--disable-auto-versioning', action='store_true', dest='disable_auto_versioning',
default=False, help='Disable the auto versioning script')
parser.Configure()
+113
View File
@@ -0,0 +1,113 @@
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
import os
project = SM.HL2Project(builder, 'sourcemod')
project.sources += [
'MenuStyle_Valve.cpp',
'logic_bridge.cpp',
'smn_entities.cpp',
'sm_stringutil.cpp',
'MenuVoting.cpp',
'smn_events.cpp',
'frame_hooks.cpp',
'smn_nextmap.cpp',
'sourcemm_api.cpp',
'ChatTriggers.cpp',
'smn_player.cpp',
'sourcemod.cpp',
'concmd_cleaner.cpp',
'HalfLife2.cpp',
'NextMap.cpp',
'ConCmdManager.cpp',
'ConVarManager.cpp',
'PlayerManager.cpp',
'TimerSys.cpp',
'CoreConfig.cpp',
'Logger.cpp',
'smn_halflife.cpp',
'smn_console.cpp',
'UserMessages.cpp',
'MenuManager.cpp',
'smn_hudtext.cpp',
'smn_usermsgs.cpp',
'MenuStyle_Base.cpp',
'smn_keyvalues.cpp',
'smn_vector.cpp',
'EventManager.cpp',
'MenuStyle_Radio.cpp',
'sm_autonatives.cpp',
'ConsoleDetours.cpp',
'vprof_tool.cpp',
'smn_commandline.cpp',
'GameHooks.cpp',
]
for sdk_name in SM.sdks:
sdk = SM.sdks[sdk_name]
for arch in SM.archs:
if not arch in sdk.platformSpec[builder.target.platform]:
continue
binary_name = 'sourcemod.' + sdk.ext
binary = SM.HL2Config(project, binary_name, sdk, arch)
compiler = binary.compiler
compiler.cxxincludes += [
builder.sourcePath
]
if sdk.name == 'csgo':
compiler.cxxincludes += [
os.path.join(sdk.path, 'common', 'protobuf-2.5.0', 'src'),
os.path.join(sdk.path, 'public', 'engine', 'protobuf'),
os.path.join(sdk.path, 'public', 'game', 'shared', 'csgo', 'protobuf')
]
if compiler.like('msvc'):
compiler.defines += ['_ALLOW_KEYWORD_MACROS']
if builder.target.platform == 'linux':
compiler.postlink += ['-lpthread', '-lrt']
if sdk.name == 'csgo':
if builder.target.platform == 'linux':
if arch == 'x86':
lib_path = os.path.join(sdk.path, 'lib', 'linux32', 'release', 'libprotobuf.a')
elif arch == 'x64':
lib_path = os.path.join(sdk.path, 'lib', 'linux64', 'release', 'libprotobuf.a')
compiler.linkflags += ['-Wl,--exclude-libs=libprotobuf.a']
elif builder.target.platform == 'mac':
if arch == 'x86':
lib_path = os.path.join(sdk.path, 'lib', 'osx32', 'release', 'libprotobuf.a')
elif arch == 'x64':
lib_path = os.path.join(sdk.path, 'lib', 'osx64', 'release', 'libprotobuf.a')
elif builder.target.platform == 'windows':
msvc_ver = compiler.version
vs_year = ''
if msvc_ver == 1800:
vs_year = '2013'
elif 1900 <= msvc_ver < 2000:
vs_year = '2015'
else:
raise Exception('Cannot find libprotobuf for MSVC version "' + str(compiler.version) + '"')
if 'DEBUG' in compiler.defines:
lib_path = os.path.join(sdk.path, 'lib', 'win32', 'debug', 'vs' + vs_year, 'libprotobuf.lib')
else:
lib_path = os.path.join(sdk.path, 'lib', 'win32', 'release', 'vs' + vs_year, 'libprotobuf.lib')
compiler.linkflags.insert(0, binary.Dep(lib_path))
if sdk.name == 'csgo':
binary.sources += ['smn_protobuf.cpp']
else:
binary.sources += ['smn_bitbuffer.cpp']
if sdk.name == 'csgo':
binary.sources += [
os.path.join(sdk.path, 'public', 'engine', 'protobuf', 'netmessages.pb.cc'),
os.path.join(sdk.path, 'public', 'game', 'shared', 'csgo', 'protobuf', 'cstrike15_usermessages.pb.cc'),
os.path.join(sdk.path, 'public', 'game', 'shared', 'csgo', 'protobuf', 'cstrike15_usermessage_helpers.cpp'),
]
SM.binaries += builder.Add(project)
-259
View File
@@ -1,259 +0,0 @@
/**
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#include <malloc.h>
#include <string.h>
#include "CDataPack.h"
#define DATAPACK_INITIAL_SIZE 512
CDataPack::CDataPack()
{
m_pBase = (char *)malloc(DATAPACK_INITIAL_SIZE);
m_capacity = DATAPACK_INITIAL_SIZE;
Initialize();
}
CDataPack::~CDataPack()
{
free(m_pBase);
}
void CDataPack::Initialize()
{
m_curptr = m_pBase;
m_size = 0;
}
void CDataPack::CheckSize(size_t typesize)
{
if (m_curptr - m_pBase + typesize <= m_capacity)
{
return;
}
size_t pos = m_curptr - m_pBase;
do
{
m_capacity *= 2;
m_pBase = (char *)realloc(m_pBase, m_capacity);
m_curptr = m_pBase + pos;
} while (m_curptr - m_pBase + typesize > m_capacity);
}
void CDataPack::ResetSize()
{
m_size = 0;
}
size_t CDataPack::CreateMemory(size_t size, void **addr)
{
CheckSize(sizeof(size_t) + size);
size_t pos = m_curptr - m_pBase;
*(size_t *)m_curptr = size;
m_curptr += sizeof(size_t);
if (addr)
{
*addr = m_curptr;
}
m_curptr += size;
m_size += sizeof(size_t) + size;
return pos;
}
void CDataPack::PackCell(cell_t cell)
{
CheckSize(sizeof(size_t) + sizeof(cell_t));
*(size_t *)m_curptr = sizeof(cell_t);
m_curptr += sizeof(size_t);
*(cell_t *)m_curptr = cell;
m_curptr += sizeof(cell_t);
m_size += sizeof(size_t) + sizeof(cell_t);
}
void CDataPack::PackFloat(float val)
{
CheckSize(sizeof(size_t) + sizeof(float));
*(size_t *)m_curptr = sizeof(float);
m_curptr += sizeof(size_t);
*(float *)m_curptr = val;
m_curptr += sizeof(float);
m_size += sizeof(size_t) + sizeof(float);
}
void CDataPack::PackString(const char *string)
{
size_t len = strlen(string);
size_t maxsize = sizeof(size_t) + len + 1;
CheckSize(maxsize);
// Pack the string length first for buffer overrun checking.
*(size_t *)m_curptr = len;
m_curptr += sizeof(size_t);
// Now pack the string.
memcpy(m_curptr, string, len);
m_curptr[len] = '\0';
m_curptr += len + 1;
m_size += maxsize;
}
void CDataPack::Reset() const
{
m_curptr = m_pBase;
}
size_t CDataPack::GetPosition() const
{
return static_cast<size_t>(m_curptr - m_pBase);
}
bool CDataPack::SetPosition(size_t pos) const
{
if (pos > m_size-1)
{
return false;
}
m_curptr = m_pBase + pos;
return true;
}
cell_t CDataPack::ReadCell() const
{
if (!IsReadable(sizeof(size_t) + sizeof(cell_t)))
{
return 0;
}
if (*reinterpret_cast<size_t *>(m_curptr) != sizeof(cell_t))
{
return 0;
}
m_curptr += sizeof(size_t);
cell_t val = *reinterpret_cast<cell_t *>(m_curptr);
m_curptr += sizeof(cell_t);
return val;
}
float CDataPack::ReadFloat() const
{
if (!IsReadable(sizeof(size_t) + sizeof(float)))
{
return 0;
}
if (*reinterpret_cast<size_t *>(m_curptr) != sizeof(float))
{
return 0;
}
m_curptr += sizeof(size_t);
float val = *reinterpret_cast<float *>(m_curptr);
m_curptr += sizeof(float);
return val;
}
bool CDataPack::IsReadable(size_t bytes) const
{
return (bytes + (m_curptr - m_pBase) > m_size) ? false : true;
}
const char *CDataPack::ReadString(size_t *len) const
{
if (!IsReadable(sizeof(size_t)))
{
return NULL;
}
size_t real_len = *(size_t *)m_curptr;
m_curptr += sizeof(size_t);
char *str = (char *)m_curptr;
if ((strlen(str) != real_len) || !(IsReadable(real_len+1)))
{
return NULL;
}
if (len)
{
*len = real_len;
}
m_curptr += real_len + 1;
return str;
}
void *CDataPack::GetMemory() const
{
return m_curptr;
}
void *CDataPack::ReadMemory(size_t *size) const
{
if (!IsReadable(sizeof(size_t)))
{
return NULL;
}
size_t bytecount = *(size_t *)m_curptr;
m_curptr += sizeof(size_t);
if (!IsReadable(bytecount))
{
return NULL;
}
void *ptr = m_curptr;
if (size)
{
*size = bytecount;
}
m_curptr += bytecount;
return ptr;
}
+9 -3
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -81,11 +81,17 @@ inline int CellRecipientFilter::GetRecipientCount() const
inline int CellRecipientFilter::GetRecipientIndex(int slot) const
{
int ret;
if ((slot < 0) || (slot >= GetRecipientCount()))
{
return -1;
ret = -1;
}
return static_cast<int>(m_Players[slot]);
else
{
ret = static_cast<int>(m_Players[slot]);
}
return ret;
}
inline void CellRecipientFilter::SetToInit(bool isinitmsg)
+223 -205
View File
@@ -1,14 +1,14 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
@@ -34,67 +34,71 @@
#include "sm_stringutil.h"
#include "ConCmdManager.h"
#include "PlayerManager.h"
#include "Translator.h"
#include "HalfLife2.h"
/* :HACKHACK: We can't SH_DECL here because ConCmdManager.cpp does.
* While the OB build only runs on MM:S 1.6.0+ (SH 5+), the older one
* can technically be compiled against any MM:S version after 1.4.2.
*/
#if defined ORANGEBOX_BUILD
extern bool __SourceHook_FHRemoveConCommandDispatch(void *, bool, class fastdelegate::FastDelegate1<const CCommand &, void>);
extern int __SourceHook_FHAddConCommandDispatch(void *, ISourceHook::AddHookMode, bool, class fastdelegate::FastDelegate1<const CCommand &, void>);
#else
extern bool __SourceHook_FHRemoveConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0<void>);
#if SH_IMPL_VERSION >= 5
extern int __SourceHook_FHAddConCommandDispatch(void *, ISourceHook::AddHookMode, bool, class fastdelegate::FastDelegate0<void>);
#elif SH_IMPL_VERSION == 4
extern int __SourceHook_FHAddConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0<void>);
#elif SH_IMPL_VERSION == 3
extern bool __SourceHook_FHAddConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0<void>);
#endif //SH_IMPL_VERSION
#endif //ORANGEBOX_BUILD
#include "logic_bridge.h"
#include "sourcemod.h"
#include "provider.h"
#include <bridge/include/ILogger.h>
#include <amtl/am-string.h>
ChatTriggers g_ChatTriggers;
bool g_bSupressSilentFails = false;
CPhraseFile *g_pFloodPhrases = NULL;
ChatTriggers::ChatTriggers() : m_pSayCmd(NULL), m_bWillProcessInPost(false),
m_bTriggerWasSilent(false), m_ReplyTo(SM_REPLY_CONSOLE)
ChatTriggers::ChatTriggers() : m_bWillProcessInPost(false),
m_ReplyTo(SM_REPLY_CONSOLE), m_ArgSBackup(NULL)
{
m_PubTrigger = sm_strdup("!");
m_PrivTrigger = sm_strdup("/");
m_PubTriggerSize = 1;
m_PrivTriggerSize = 1;
m_PubTrigger = "!";
m_PrivTrigger = "/";
m_bIsChatTrigger = false;
m_bPluginIgnored = true;
#if SOURCE_ENGINE == SE_EPISODEONE
m_bIsINS = false;
#endif
}
ChatTriggers::~ChatTriggers()
{
delete [] m_PubTrigger;
m_PubTrigger = NULL;
delete [] m_PrivTrigger;
m_PrivTrigger = NULL;
delete [] m_ArgSBackup;
m_ArgSBackup = NULL;
}
ConfigResult ChatTriggers::OnSourceModConfigChanged(const char *key,
const char *value,
void ChatTriggers::SetChatTrigger(ChatTriggerType type, const char *value)
{
ke::AutoPtr<char[]> filtered(new char[strlen(value) + 1]);
const char *src = value;
char *dest = filtered.get();
char c;
while ((c = *src++) != '\0') {
if (c <= ' ' || c == '"' || c == '\'' || (c >= '0' && c <= '9') || c == ';' || (c >= 'A' && c <= 'Z') || c == '\\' || (c >= 'a' && c <= 'z') || c >= 0x7F) {
logger->LogError("Ignoring %s chat trigger character '%c', not in valid set: %s", (type == ChatTrigger_Private ? "silent" : "public"), c, "!#$%&()*+,-./:<=>?@[]^_`{|}~");
continue;
}
*dest++ = c;
}
*dest = '\0';
if (type == ChatTrigger_Private) {
m_PrivTrigger = filtered.get();
} else {
m_PubTrigger = filtered.get();
}
}
ConfigResult ChatTriggers::OnSourceModConfigChanged(const char *key,
const char *value,
ConfigSource source,
char *error,
char *error,
size_t maxlength)
{
if (strcmp(key, "PublicChatTrigger") == 0)
{
delete [] m_PubTrigger;
m_PubTrigger = sm_strdup(value);
m_PubTriggerSize = strlen(m_PubTrigger);
SetChatTrigger(ChatTrigger_Public, value);
return ConfigResult_Accept;
}
else if (strcmp(key, "SilentChatTrigger") == 0)
{
delete [] m_PrivTrigger;
m_PrivTrigger = sm_strdup(value);
m_PrivTriggerSize = strlen(m_PrivTrigger);
SetChatTrigger(ChatTrigger_Private, value);
return ConfigResult_Accept;
}
else if (strcmp(key, "SilentFailSuppress") == 0)
@@ -108,231 +112,238 @@ ConfigResult ChatTriggers::OnSourceModConfigChanged(const char *key,
void ChatTriggers::OnSourceModAllInitialized()
{
m_pShouldFloodBlock = g_Forwards.CreateForward("OnClientFloodCheck", ET_Event, 1, NULL, Param_Cell);
m_pDidFloodBlock = g_Forwards.CreateForward("OnClientFloodResult", ET_Event, 2, NULL, Param_Cell, Param_Cell);
m_pShouldFloodBlock = forwardsys->CreateForward("OnClientFloodCheck", ET_Event, 1, NULL, Param_Cell);
m_pDidFloodBlock = forwardsys->CreateForward("OnClientFloodResult", ET_Event, 2, NULL, Param_Cell, Param_Cell);
m_pOnClientSayCmd = forwardsys->CreateForward("OnClientSayCommand", ET_Event, 3, NULL, Param_Cell, Param_String, Param_String);
m_pOnClientSayCmd_Post = forwardsys->CreateForward("OnClientSayCommand_Post", ET_Ignore, 3, NULL, Param_Cell, Param_String, Param_String);
}
void ChatTriggers::OnSourceModAllInitialized_Post()
{
unsigned int file_id;
file_id = g_Translator.FindOrAddPhraseFile("antiflood.phrases.txt");
g_pFloodPhrases = g_Translator.GetFileByIndex(file_id);
logicore.AddCorePhraseFile("antiflood.phrases");
}
void ChatTriggers::OnSourceModGameInitialized()
{
unsigned int total = 2;
ConCommandBase *pCmd = icvar->GetCommands();
const char *name;
while (pCmd)
{
if (pCmd->IsCommand())
{
name = pCmd->GetName();
if (!m_pSayCmd && strcmp(name, "say") == 0)
{
m_pSayCmd = (ConCommand *)pCmd;
if (--total == 0)
{
break;
}
} else if (!m_pSayTeamCmd && strcmp(name, "say_team") == 0) {
m_pSayTeamCmd = (ConCommand *)pCmd;
if (--total == 0)
{
break;
}
}
}
pCmd = const_cast<ConCommandBase *>(pCmd->GetNext());
ConCommand *say_team = FindCommand("say_team");
CommandHook::Callback pre_hook = [this] (int client, const ICommandArgs *args) -> bool {
return this->OnSayCommand_Pre(client, args);
};
CommandHook::Callback post_hook = [this] (int client, const ICommandArgs *args) -> bool {
return this->OnSayCommand_Post(client, args);
};
if (ConCommand *say = FindCommand("say")) {
hooks_.append(sCoreProviderImpl.AddCommandHook(say, pre_hook));
hooks_.append(sCoreProviderImpl.AddPostCommandHook(say, post_hook));
}
if (ConCommand *say_team = FindCommand("say_team")) {
hooks_.append(sCoreProviderImpl.AddCommandHook(say_team, pre_hook));
hooks_.append(sCoreProviderImpl.AddPostCommandHook(say_team, post_hook));
}
if (m_pSayCmd)
{
SH_ADD_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayCmd, this, &ChatTriggers::OnSayCommand_Pre, false);
SH_ADD_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayCmd, this, &ChatTriggers::OnSayCommand_Post, true);
#if SOURCE_ENGINE == SE_EPISODEONE
m_bIsINS = (strcmp(g_SourceMod.GetGameFolderName(), "insurgency") == 0);
if (m_bIsINS) {
if (ConCommand *say2 = FindCommand("say2")) {
hooks_.append(sCoreProviderImpl.AddCommandHook(say2, pre_hook));
hooks_.append(sCoreProviderImpl.AddPostCommandHook(say2, post_hook));
}
}
if (m_pSayTeamCmd)
{
SH_ADD_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayTeamCmd, this, &ChatTriggers::OnSayCommand_Pre, false);
SH_ADD_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayTeamCmd, this, &ChatTriggers::OnSayCommand_Post, true);
#elif SOURCE_ENGINE == SE_NUCLEARDAWN
if (ConCommand *say_squad = FindCommand("say_squad")) {
hooks_.append(sCoreProviderImpl.AddCommandHook(say_squad, pre_hook));
hooks_.append(sCoreProviderImpl.AddPostCommandHook(say_squad, post_hook));
}
#endif
}
void ChatTriggers::OnSourceModShutdown()
{
if (m_pSayTeamCmd)
{
SH_REMOVE_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayTeamCmd, this, &ChatTriggers::OnSayCommand_Post, true);
SH_REMOVE_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayTeamCmd, this, &ChatTriggers::OnSayCommand_Pre, false);
}
if (m_pSayCmd)
{
SH_REMOVE_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayCmd, this, &ChatTriggers::OnSayCommand_Post, true);
SH_REMOVE_HOOK_MEMFUNC(ConCommand, Dispatch, m_pSayCmd, this, &ChatTriggers::OnSayCommand_Pre, false);
}
hooks_.clear();
g_Forwards.ReleaseForward(m_pShouldFloodBlock);
g_Forwards.ReleaseForward(m_pDidFloodBlock);
forwardsys->ReleaseForward(m_pShouldFloodBlock);
forwardsys->ReleaseForward(m_pDidFloodBlock);
forwardsys->ReleaseForward(m_pOnClientSayCmd);
forwardsys->ReleaseForward(m_pOnClientSayCmd_Post);
}
#if defined ORANGEBOX_BUILD
void ChatTriggers::OnSayCommand_Pre(const CCommand &command)
bool ChatTriggers::OnSayCommand_Pre(int client, const ICommandArgs *command)
{
#else
void ChatTriggers::OnSayCommand_Pre()
{
CCommand command;
#endif
int client;
CPlayer *pPlayer;
client = g_ConCmds.GetCommandClient();
m_bIsChatTrigger = false;
m_bWasFloodedMessage = false;
m_bPluginIgnored = true;
const char *args = command->ArgS();
if (!args)
return false;
/* Save these off for post hook as the command data returned from the engine in older engine versions
* can be NULL, despite the data still being there and valid. */
m_Arg0Backup = command->Arg(0);
size_t len = strlen(args);
#if SOURCE_ENGINE == SE_EPISODEONE
if (m_bIsINS)
{
if (strcmp(m_Arg0Backup, "say2") == 0 && len >= 4)
{
args += 4;
len -= 4;
}
if (len == 0)
return true;
}
#endif
/* The first pair of quotes are stripped from client say commands, but not console ones.
* We do not want the forwards to differ from what is displayed.
* So only strip the first pair of quotes from client say commands. */
bool is_quoted = false;
if (
#if SOURCE_ENGINE == SE_EPISODEONE
!m_bIsINS &&
#endif
client != 0 && args[0] == '"' && args[len-1] == '"')
{
/* The server normally won't display empty say commands, but in this case it does.
* I don't think it's desired so let's block it. */
if (len <= 2)
return true;
args++;
len--;
is_quoted = true;
}
/* Some? engines strip the last quote when printing the string to chat.
* This results in having a double-quoted message passed to the OnClientSayCommand ("message") forward,
* but losing the last quote in the OnClientSayCommand_Post ("message) forward.
* To compensate this, we copy the args into our own buffer where the engine won't mess with
* and strip the quotes. */
delete [] m_ArgSBackup;
m_ArgSBackup = new char[CCommand::MaxCommandLength()+1];
memcpy(m_ArgSBackup, args, len+1);
/* Strip the quotes from the argument */
if (is_quoted)
{
if (m_ArgSBackup[len-1] == '"')
{
m_ArgSBackup[--len] = '\0';
}
}
/* The server console cannot do this */
if (client == 0 || (pPlayer = g_Players.GetPlayerByIndex(client)) == NULL)
if (client == 0)
{
RETURN_META(MRES_IGNORED);
if (CallOnClientSayCommand(client) >= Pl_Handled)
return true;
return false;
}
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
/* We guarantee the client is connected */
if (!pPlayer->IsConnected())
{
RETURN_META(MRES_IGNORED);
}
const char *args = command.ArgS();
if (!args)
{
RETURN_META(MRES_IGNORED);
}
if (!pPlayer || !pPlayer->IsConnected())
return false;
/* Check if we need to block this message from being sent */
if (ClientIsFlooding(client))
{
char buffer[128];
/* :TODO: log an error? */
if (g_Translator.CoreTransEx(g_pFloodPhrases,
client,
buffer,
sizeof(buffer),
"Flooding the server",
NULL,
NULL)
!= Trans_Okay)
{
UTIL_Format(buffer, sizeof(buffer), "You are flooding the server!");
}
if (!logicore.CoreTranslate(buffer, sizeof(buffer), "%T", 2, NULL, "Flooding the server", &client))
ke::SafeSprintf(buffer, sizeof(buffer), "You are flooding the server!");
/* :TODO: we should probably kick people who spam too much. */
char fullbuffer[192];
UTIL_Format(fullbuffer, sizeof(fullbuffer), "[SM] %s", buffer);
ke::SafeSprintf(fullbuffer, sizeof(fullbuffer), "[SM] %s", buffer);
g_HL2.TextMsg(client, HUD_PRINTTALK, fullbuffer);
m_bWasFloodedMessage = true;
RETURN_META(MRES_SUPERCEDE);
}
/* Handle quoted string sets */
bool is_quoted = false;
if (args[0] == '"')
{
args++;
is_quoted = true;
return true;
}
bool is_trigger = false;
bool is_silent = false;
/* Check for either trigger */
if (m_PubTriggerSize && strncmp(args, m_PubTrigger, m_PubTriggerSize) == 0)
{
is_trigger = true;
args = &args[m_PubTriggerSize];
}
else if (m_PrivTriggerSize && strncmp(args, m_PrivTrigger, m_PrivTriggerSize) == 0)
{
// Prefer the silent trigger in case of clashes.
if (strchr(m_PrivTrigger.chars(), m_ArgSBackup[0])) {
is_trigger = true;
is_silent = true;
args = &args[m_PrivTriggerSize];
} else if (strchr(m_PubTrigger.chars(), m_ArgSBackup[0])) {
is_trigger = true;
}
if (!is_trigger)
{
RETURN_META(MRES_IGNORED);
if (is_trigger) {
// Bump the args past the chat trigger - we only support single-character triggers now.
args = &m_ArgSBackup[1];
}
/**
* Test if this is actually a command!
*/
if (!PreProcessTrigger(engine->PEntityOfEntIndex(client), args, is_quoted))
if (is_trigger && PreProcessTrigger(PEntityOfEntIndex(client), args))
{
CPlayer *pPlayer;
if (is_silent
&& g_bSupressSilentFails
&& client != 0
&& (pPlayer = g_Players.GetPlayerByIndex(client)) != NULL
&& pPlayer->GetAdminId() != INVALID_ADMIN_ID)
{
RETURN_META(MRES_SUPERCEDE);
}
RETURN_META(MRES_IGNORED);
m_bIsChatTrigger = true;
/**
* We'll execute it in post.
*/
m_bWillProcessInPost = true;
}
m_bIsChatTrigger = true;
if (is_silent && (m_bIsChatTrigger || (g_bSupressSilentFails && pPlayer->GetAdminId() != INVALID_ADMIN_ID)))
return true;
/**
* We'll execute it in post.
*/
m_bWillProcessInPost = true;
m_bTriggerWasSilent = is_silent;
/* If we're silent, block */
if (is_silent)
{
RETURN_META(MRES_SUPERCEDE);
}
if (CallOnClientSayCommand(client) >= Pl_Handled)
return true;
/* Otherwise, let the command continue */
RETURN_META(MRES_IGNORED);
return false;
}
#if defined ORANGEBOX_BUILD
void ChatTriggers::OnSayCommand_Post(const CCommand &command)
#else
void ChatTriggers::OnSayCommand_Post()
#endif
bool ChatTriggers::OnSayCommand_Post(int client, const ICommandArgs *command)
{
m_bIsChatTrigger = false;
m_bWasFloodedMessage = false;
if (m_bWillProcessInPost)
{
/* Reset this for re-entrancy */
m_bWillProcessInPost = false;
/* Execute the cached command */
int client = g_ConCmds.GetCommandClient();
unsigned int old = SetReplyTo(SM_REPLY_CHAT);
serverpluginhelpers->ClientCommand(engine->PEntityOfEntIndex(client), m_ToExecute);
serverpluginhelpers->ClientCommand(PEntityOfEntIndex(client), m_ToExecute);
SetReplyTo(old);
}
if (!m_bPluginIgnored && m_pOnClientSayCmd_Post->GetFunctionCount() != 0)
{
m_pOnClientSayCmd_Post->PushCell(client);
m_pOnClientSayCmd_Post->PushString(m_Arg0Backup);
m_pOnClientSayCmd_Post->PushString(m_ArgSBackup);
m_pOnClientSayCmd_Post->Execute(NULL);
}
m_bIsChatTrigger = false;
m_bWasFloodedMessage = false;
return false;
}
bool ChatTriggers::PreProcessTrigger(edict_t *pEdict, const char *args, bool is_quoted)
bool ChatTriggers::PreProcessTrigger(edict_t *pEdict, const char *args)
{
/* Extract a command. This is kind of sloppy. */
/* Extract a command. This is kind of sloppy. */
char cmd_buf[64];
size_t cmd_len = 0;
const char *inptr = args;
while (*inptr != '\0'
&& !textparsers->IsWhitespace(inptr)
while (*inptr != '\0'
&& !textparsers->IsWhitespace(inptr)
&& *inptr != '"'
&& cmd_len < sizeof(cmd_buf) - 1)
{
@@ -355,50 +366,57 @@ bool ChatTriggers::PreProcessTrigger(edict_t *pEdict, const char *args, bool is_
return false;
}
/* Now, prepend. Don't worry about the buffers. This will
/* Now, prepend. Don't worry about the buffers. This will
* work because the sizes are limited from earlier.
*/
char new_buf[80];
strcpy(new_buf, "sm_");
strncopy(&new_buf[3], cmd_buf, sizeof(new_buf)-3);
ke::SafeStrcpy(&new_buf[3], sizeof(new_buf)-3, cmd_buf);
/* Recheck */
if (!g_ConCmds.LookForSourceModCommand(new_buf))
{
return false;
}
prepended = true;
}
/* See if we need to do extra string manipulation */
if (is_quoted || prepended)
if (prepended)
{
size_t len;
/* Check if we need to prepend sm_ */
if (prepended)
{
len = UTIL_Format(m_ToExecute, sizeof(m_ToExecute), "sm_%s", args);
len = ke::SafeSprintf(m_ToExecute, sizeof(m_ToExecute), "sm_%s", args);
} else {
len = strncopy(m_ToExecute, args, sizeof(m_ToExecute));
}
/* Check if we need to strip a quote */
if (is_quoted)
{
if (m_ToExecute[len-1] == '"')
{
m_ToExecute[--len] = '\0';
}
len = ke::SafeStrcpy(m_ToExecute, sizeof(m_ToExecute), args);
}
} else {
strncopy(m_ToExecute, args, sizeof(m_ToExecute));
ke::SafeStrcpy(m_ToExecute, sizeof(m_ToExecute), args);
}
return true;
}
cell_t ChatTriggers::CallOnClientSayCommand(int client)
{
cell_t res = Pl_Continue;
if (m_pOnClientSayCmd->GetFunctionCount() != 0)
{
m_pOnClientSayCmd->PushCell(client);
m_pOnClientSayCmd->PushString(m_Arg0Backup);
m_pOnClientSayCmd->PushString(m_ArgSBackup);
m_pOnClientSayCmd->Execute(&res);
}
m_bPluginIgnored = (res >= Pl_Stop);
return res;
}
unsigned int ChatTriggers::SetReplyTo(unsigned int reply)
{
unsigned int old = m_ReplyTo;
+28 -21
View File
@@ -1,14 +1,14 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
@@ -34,9 +34,11 @@
#include "sm_globals.h"
#include "sourcemm_api.h"
#include "GameHooks.h"
#include <IGameHelpers.h>
#include <compat_wrappers.h>
#include <IForwardSys.h>
#include <amtl/am-string.h>
class ChatTriggers : public SMGlobalClass
{
@@ -48,42 +50,47 @@ public: //SMGlobalClass
void OnSourceModAllInitialized_Post();
void OnSourceModGameInitialized();
void OnSourceModShutdown();
ConfigResult OnSourceModConfigChanged(const char *key,
const char *value,
ConfigResult OnSourceModConfigChanged(const char *key,
const char *value,
ConfigSource source,
char *error,
char *error,
size_t maxlength);
private: //ConCommand
#if defined ORANGEBOX_BUILD
void OnSayCommand_Pre(const CCommand &command);
void OnSayCommand_Post(const CCommand &command);
#else
void OnSayCommand_Pre();
void OnSayCommand_Post();
#endif
bool OnSayCommand_Pre(int client, const ICommandArgs *args);
bool OnSayCommand_Post(int client, const ICommandArgs *args);
public:
unsigned int GetReplyTo();
unsigned int SetReplyTo(unsigned int reply);
bool IsChatTrigger();
bool WasFloodedMessage();
private:
bool PreProcessTrigger(edict_t *pEdict, const char *args, bool is_quoted);
enum ChatTriggerType {
ChatTrigger_Public,
ChatTrigger_Private,
};
void SetChatTrigger(ChatTriggerType type, const char *value);
bool PreProcessTrigger(edict_t *pEdict, const char *args);
bool ClientIsFlooding(int client);
cell_t CallOnClientSayCommand(int client);
private:
ConCommand *m_pSayCmd;
ConCommand *m_pSayTeamCmd;
char *m_PubTrigger;
size_t m_PubTriggerSize;
char *m_PrivTrigger;
size_t m_PrivTriggerSize;
ke::Vector<ke::RefPtr<CommandHook>> hooks_;
ke::AString m_PubTrigger;
ke::AString m_PrivTrigger;
bool m_bWillProcessInPost;
bool m_bTriggerWasSilent;
bool m_bIsChatTrigger;
bool m_bWasFloodedMessage;
bool m_bPluginIgnored;
unsigned int m_ReplyTo;
char m_ToExecute[300];
const char *m_Arg0Backup;
char *m_ArgSBackup;
IForward *m_pShouldFloodBlock;
IForward *m_pDidFloodBlock;
IForward *m_pOnClientSayCmd;
IForward *m_pOnClientSayCmd_Post;
#if SOURCE_ENGINE == SE_EPISODEONE
bool m_bIsINS;
#endif
};
extern ChatTriggers g_ChatTriggers;
+284 -615
View File
File diff suppressed because it is too large Load Diff
+69 -52
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -34,75 +34,93 @@
#include "sm_globals.h"
#include "sourcemm_api.h"
#include "ForwardSys.h"
#include "sm_trie.h"
#include "sm_memtable.h"
#include <IForwardSys.h>
#include <sh_list.h>
#include <sh_string.h>
#include <IRootConsoleMenu.h>
#include <IAdminSystem.h>
#include "concmd_cleaner.h"
#include "GameHooks.h"
#include <am-autoptr.h>
#include <sm_stringhashmap.h>
#include <am-utility.h>
#include <am-inlinelist.h>
#include <am-linkedlist.h>
#include <am-refcounting.h>
using namespace SourceHook;
enum CmdType
struct CmdHook;
struct ConCmdInfo;
struct CommandGroup : public ke::Refcounted<CommandGroup>
{
Cmd_Server,
Cmd_Console,
Cmd_Admin,
ke::LinkedList<CmdHook *> hooks;
};
struct AdminCmdInfo
{
AdminCmdInfo()
AdminCmdInfo(const ke::RefPtr<CommandGroup> &group, FlagBits flags)
: group(group),
flags(flags),
eflags(0)
{
cmdGrpId = -1;
flags = 0;
eflags = 0;
}
int cmdGrpId; /* index into cmdgroup string table */
ke::RefPtr<CommandGroup> group;
FlagBits flags; /* default flags */
FlagBits eflags; /* effective flags */
};
struct CmdHook
struct CmdHook : public ke::InlineListNode<CmdHook>
{
CmdHook()
enum Type {
Server,
Client
};
CmdHook(Type type, ConCmdInfo *cmd, IPluginFunction *fun, const char *description)
: type(type),
info(cmd),
pf(fun),
helptext(description)
{
pf = NULL;
pAdmin = NULL;
}
IPluginFunction *pf; /* function hook */
String helptext; /* help text */
AdminCmdInfo *pAdmin; /* admin requirements, if any */
Type type;
ConCmdInfo *info;
IPluginFunction *pf; /* function hook */
ke::AString helptext; /* help text */
ke::AutoPtr<AdminCmdInfo> admin; /* admin requirements, if any */
};
typedef ke::InlineList<CmdHook> CmdHookList;
struct ConCmdInfo
{
ConCmdInfo()
{
pPlugin = nullptr;
sourceMod = false;
pCmd = NULL;
pCmd = nullptr;
eflags = 0;
}
bool sourceMod; /**< Determines whether or not concmd was created by a SourceMod plugin */
ConCommand *pCmd; /**< Pointer to the command itself */
List<CmdHook *> srvhooks; /**< Hooks as a server command */
List<CmdHook *> conhooks; /**< Hooks as a console command */
AdminCmdInfo admin; /**< Admin info, if any */
bool is_admin_set; /**< Whether or not admin info is set */
CmdHookList hooks; /**< Hook list */
FlagBits eflags; /**< Effective admin flags */
ke::RefPtr<CommandHook> sh_hook; /**< SourceHook hook, if any. */
IPlugin *pPlugin; /**< Owning plugin handle. */
};
typedef List<ConCmdInfo *> ConCmdList;
class ConCmdManager :
public SMGlobalClass,
public IRootConsoleCommand,
public IPluginsListener,
public IConCommandTracker
{
#if defined ORANGEBOX_BUILD
friend void CommandCallback(const CCommand &command);
#else
friend void CommandCallback();
#endif
friend void CommandCallback(DISPATCH_ARGS);
public:
ConCmdManager();
~ConCmdManager();
@@ -112,50 +130,49 @@ public: //SMGlobalClass
public: //IPluginsListener
void OnPluginDestroyed(IPlugin *plugin);
public: //IRootConsoleCommand
void OnRootConsoleCommand(const char *cmdname, const CCommand &command);
void OnRootConsoleCommand(const char *cmdname, const ICommandArgs *command) override;
public: //IConCommandTracker
void OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name, bool is_read_safe);
void OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name) override;
public:
bool AddServerCommand(IPluginFunction *pFunction, const char *name, const char *description, int flags);
bool AddConsoleCommand(IPluginFunction *pFunction, const char *name, const char *description, int flags);
bool AddServerCommand(IPluginFunction *pFunction, const char *name, const char *description, int flags, IPlugin *pPlugin);
bool AddAdminCommand(IPluginFunction *pFunction,
const char *name,
const char *group,
int adminflags,
const char *description,
int flags);
int flags,
IPlugin *pPlugin);
ResultType DispatchClientCommand(int client, const char *cmd, int args, ResultType type);
void UpdateAdminCmdFlags(const char *cmd, OverrideType type, FlagBits bits, bool remove);
bool LookForSourceModCommand(const char *cmd);
bool LookForCommandAdminFlags(const char *cmd, FlagBits *pFlags);
bool CheckCommandAccess(int client, const char *cmd, FlagBits flags);
private:
void InternalDispatch(const CCommand &command);
bool InternalDispatch(int client, const ICommandArgs *args);
ResultType RunAdminCommand(ConCmdInfo *pInfo, int client, int args);
ConCmdInfo *AddOrFindCommand(const char *name, const char *description, int flags);
void SetCommandClient(int client);
ConCmdInfo *AddOrFindCommand(const char *name, const char *description, int flags, IPlugin *pPlugin);
void AddToCmdList(ConCmdInfo *info);
void RemoveConCmd(ConCmdInfo *info, const char *cmd, bool is_read_safe, bool untrack);
void RemoveConCmds(List<CmdHook *> &cmdlist);
void RemoveConCmds(List<CmdHook *> &cmdlist, IPluginContext *pContext);
void RemoveConCmd(ConCmdInfo *info, const char *cmd, bool untrack);
bool CheckAccess(int client, const char *cmd, AdminCmdInfo *pAdmin);
// Case insensitive
ConCmdList::iterator FindInList(const char *name);
// Case sensitive
ConCmdInfo *FindInTrie(const char *name);
public:
inline int GetCommandClient()
{
return m_CmdClient;
}
inline const List<ConCmdInfo *> & GetCommandList()
{
return m_CmdList;
}
private:
Trie *m_pCmds; /* command lookup */
Trie *m_pCmdGrps; /* command group lookup */
List<ConCmdInfo *> m_CmdList; /* command list */
int m_CmdClient; /* current client */
BaseStringTable m_Strings; /* string table */
typedef StringHashMap<ke::RefPtr<CommandGroup> > GroupMap;
StringHashMap<ConCmdInfo *> m_Cmds; /* command lookup */
GroupMap m_CmdGrps; /* command group map */
ConCmdList m_CmdList; /* command list */
};
extern ConCmdManager g_ConCmds;
#endif // _INCLUDE_SOURCEMOD_CONCMDMANAGER_H_
+89
View File
@@ -0,0 +1,89 @@
/**
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#ifndef _INCLUDE_SOURCEMOD_CON_COMMAND_BASE_ITERATOR_H_
#define _INCLUDE_SOURCEMOD_CON_COMMAND_BASE_ITERATOR_H_
#if SOURCE_ENGINE >= SE_LEFT4DEAD
class ConCommandBaseIterator
{
public:
inline ConCommandBaseIterator() : iter(icvar)
{
iter.SetFirst();
}
inline bool IsValid()
{
return iter.IsValid();
}
inline void Next()
{
iter.Next();
}
inline ConCommandBase *Get()
{
return iter.Get();
}
private:
ICvar::Iterator iter;
};
#else
class ConCommandBaseIterator
{
public:
inline ConCommandBaseIterator()
{
iter = icvar->GetCommands();
}
inline bool IsValid()
{
return iter != NULL;
}
inline void Next()
{
iter = const_cast<ConCommandBase *>(iter->GetNext());
}
inline ConCommandBase *Get()
{
return iter;
}
private:
ConCommandBase *iter;
};
#endif
#endif /* _INCLUDE_SOURCEMOD_CON_COMMAND_BASE_ITERATOR_H_ */
+158 -167
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -25,40 +25,59 @@
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#include "ConVarManager.h"
#include "HalfLife2.h"
#include "PluginSys.h"
#include "ForwardSys.h"
#include "HandleSys.h"
#include "sm_srvcmds.h"
#include "sm_stringutil.h"
#include <sh_vector.h>
#include <sm_trie_tpl.h>
#include <sm_namehashset.h>
#include "logic_bridge.h"
#include "sourcemod.h"
#include "provider.h"
#include <bridge/include/IScriptManager.h>
ConVarManager g_ConVarManager;
#if !defined ORANGEBOX_BUILD
#define CallGlobalChangeCallbacks CallGlobalChangeCallback
#endif
#if defined ORANGEBOX_BUILD
SH_DECL_HOOK3_void(ICvar, CallGlobalChangeCallbacks, SH_NOATTRIB, false, ConVar *, const char *, float);
#else
SH_DECL_HOOK2_void(ICvar, CallGlobalChangeCallbacks, SH_NOATTRIB, false, ConVar *, const char *);
#endif
SH_DECL_HOOK5_void(IServerGameDLL, OnQueryCvarValueFinished, SH_NOATTRIB, 0, QueryCvarCookie_t, edict_t *, EQueryCvarValueStatus, const char *, const char *);
SH_DECL_HOOK5_void(IServerPluginCallbacks, OnQueryCvarValueFinished, SH_NOATTRIB, 0, QueryCvarCookie_t, edict_t *, EQueryCvarValueStatus, const char *, const char *);
const ParamType CONVARCHANGE_PARAMS[] = {Param_Cell, Param_String, Param_String};
typedef List<const ConVar *> ConVarList;
KTrie<ConVarInfo *> convar_cache;
NameHashSet<ConVarInfo *> convar_cache;
ConVarManager::ConVarManager() : m_ConVarType(0), m_bIsDLLQueryHooked(false), m_bIsVSPQueryHooked(false)
class ConVarReentrancyGuard
{
ConVar *cvar;
ConVarReentrancyGuard *up;
public:
static ConVarReentrancyGuard *chain;
ConVarReentrancyGuard(ConVar *cvar)
: cvar(cvar), up(chain)
{
chain = this;
}
~ConVarReentrancyGuard()
{
assert(chain == this);
chain = up;
}
static bool IsCvarInChain(ConVar *cvar)
{
ConVarReentrancyGuard *guard = chain;
while (guard != NULL)
{
if (guard->cvar == cvar)
return true;
guard = guard->up;
}
return false;
}
};
ConVarReentrancyGuard *ConVarReentrancyGuard::chain = NULL;
ConVarManager::ConVarManager() : m_ConVarType(0)
{
}
@@ -76,26 +95,17 @@ void ConVarManager::OnSourceModStartup(bool late)
sec.access[HandleAccess_Clone] = HANDLE_RESTRICT_IDENTITY | HANDLE_RESTRICT_OWNER;
/* Create the 'ConVar' handle type */
m_ConVarType = g_HandleSys.CreateType("ConVar", this, 0, NULL, &sec, g_pCoreIdent, NULL);
m_ConVarType = handlesys->CreateType("ConVar", this, 0, NULL, &sec, g_pCoreIdent, NULL);
}
void ConVarManager::OnSourceModAllInitialized()
{
/**
* Episode 2 has this function by default, but the older versions do not.
*/
#if !defined ORANGEBOX_BUILD
if (g_SMAPI->GetGameDLLVersion() >= 6)
{
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, OnQueryCvarValueFinished, gamedll, this, &ConVarManager::OnQueryCvarValueFinished, false);
m_bIsDLLQueryHooked = true;
}
#endif
g_Players.AddClientListener(this);
SH_ADD_HOOK_STATICFUNC(ICvar, CallGlobalChangeCallbacks, icvar, OnConVarChanged, false);
scripts->AddPluginsListener(this);
/* Add the 'convars' option to the 'sm' console command */
g_RootMenu.AddRootConsoleCommand("cvars", "View convars created by a plugin", this);
rootmenu->AddRootConsoleCommand3("cvars", "View convars created by a plugin", this);
}
void ConVarManager::OnSourceModShutdown()
@@ -110,10 +120,10 @@ void ConVarManager::OnSourceModShutdown()
iter = m_ConVars.erase(iter);
g_HandleSys.FreeHandle(pInfo->handle, &sec);
handlesys->FreeHandle(pInfo->handle, &sec);
if (pInfo->pChangeForward != NULL)
{
g_Forwards.ReleaseForward(pInfo->pChangeForward);
forwardsys->ReleaseForward(pInfo->pChangeForward);
}
if (pInfo->sourceMod)
{
@@ -141,73 +151,23 @@ void ConVarManager::OnSourceModShutdown()
}
convar_cache.clear();
/* Unhook things */
if (m_bIsDLLQueryHooked)
{
SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, OnQueryCvarValueFinished, gamedll, this, &ConVarManager::OnQueryCvarValueFinished, false);
m_bIsDLLQueryHooked = false;
}
else if (m_bIsVSPQueryHooked)
{
SH_REMOVE_HOOK_MEMFUNC(IServerPluginCallbacks, OnQueryCvarValueFinished, vsp_interface, this, &ConVarManager::OnQueryCvarValueFinished, false);
m_bIsVSPQueryHooked = false;
}
SH_REMOVE_HOOK_STATICFUNC(ICvar, CallGlobalChangeCallbacks, icvar, OnConVarChanged, false);
g_Players.RemoveClientListener(this);
/* Remove the 'convars' option from the 'sm' console command */
g_RootMenu.RemoveRootConsoleCommand("cvars", this);
rootmenu->RemoveRootConsoleCommand("cvars", this);
scripts->RemovePluginsListener(this);
/* Remove the 'ConVar' handle type */
g_HandleSys.RemoveType(m_ConVarType, g_pCoreIdent);
}
/**
* Orange Box will never use this.
*/
void ConVarManager::OnSourceModVSPReceived()
{
/**
* Don't bother if the DLL is already hooked.
*/
if (m_bIsDLLQueryHooked)
{
return;
}
/* For later MM:S versions, use the updated API, since it's cleaner. */
#if defined METAMOD_PLAPI_VERSION
int engine = g_SMAPI->GetSourceEngineBuild();
if (engine == SOURCE_ENGINE_ORIGINAL || vsp_version < 2)
{
return;
}
#else
if (g_HL2.IsOriginalEngine() || vsp_version < 2)
{
return;
}
#endif
SH_ADD_HOOK_MEMFUNC(IServerPluginCallbacks, OnQueryCvarValueFinished, vsp_interface, this, &ConVarManager::OnQueryCvarValueFinished, false);
m_bIsVSPQueryHooked = true;
handlesys->RemoveType(m_ConVarType, g_pCoreIdent);
}
bool convar_cache_lookup(const char *name, ConVarInfo **pVar)
{
ConVarInfo **pLookup = convar_cache.retrieve(name);
if (pLookup != NULL)
{
*pVar = *pLookup;
return true;
}
else
{
return false;
}
return convar_cache.retrieve(name, pVar);
}
void ConVarManager::OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name, bool is_read_safe)
void ConVarManager::OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name)
{
/* Only check convars that have not been created by SourceMod's core */
ConVarInfo *pInfo;
@@ -223,7 +183,7 @@ void ConVarManager::OnUnlinkConCommandBase(ConCommandBase *pBase, const char *na
convar_cache.remove(name);
/* Now make sure no plugins are referring to this pointer */
IPluginIterator *pl_iter = g_PluginSys.GetPluginIterator();
IPluginIterator *pl_iter = scripts->GetPluginIterator();
while (pl_iter->MorePlugins())
{
IPlugin *pl = pl_iter->GetPlugin();
@@ -239,19 +199,51 @@ void ConVarManager::OnUnlinkConCommandBase(ConCommandBase *pBase, const char *na
}
/* Free resources */
g_HandleSys.FreeHandle(pInfo->handle, &sec);
handlesys->FreeHandle(pInfo->handle, &sec);
delete pInfo;
}
void ConVarManager::OnPluginUnloaded(IPlugin *plugin)
{
ConVarList *pConVarList;
List<ConVarQuery>::iterator iter;
/* If plugin has a convar list, free its memory */
if (plugin->GetProperty("ConVarList", (void **)&pConVarList, true))
{
delete pConVarList;
}
const IPluginRuntime * pRuntime = plugin->GetRuntime();
/* Remove convar queries for this plugin that haven't returned results yet */
for (iter = m_ConVarQueries.begin(); iter != m_ConVarQueries.end();)
{
ConVarQuery &query = (*iter);
if (query.pCallback->GetParentRuntime() == pRuntime)
{
iter = m_ConVarQueries.erase(iter);
continue;
}
++iter;
}
}
void ConVarManager::OnClientDisconnected(int client)
{
/* Remove convar queries for this client that haven't returned results yet */
for (List<ConVarQuery>::iterator iter = m_ConVarQueries.begin(); iter != m_ConVarQueries.end();)
{
ConVarQuery &query = (*iter);
if (query.client == client)
{
iter = m_ConVarQueries.erase(iter);
continue;
}
++iter;
}
}
void ConVarManager::OnHandleDestroy(HandleType_t type, void *object)
@@ -264,20 +256,27 @@ bool ConVarManager::GetHandleApproxSize(HandleType_t type, void *object, unsigne
return true;
}
void ConVarManager::OnRootConsoleCommand(const char *cmdname, const CCommand &command)
void ConVarManager::OnRootConsoleCommand(const char *cmdname, const ICommandArgs *command)
{
int argcount = command.ArgC();
int argcount = command->ArgC();
if (argcount >= 3)
{
bool wantReset = false;
/* Get plugin index that was passed */
const char *arg = command.Arg(2);
const char *arg = command->Arg(2);
if (argcount >= 4 && strcmp(arg, "reset") == 0)
{
wantReset = true;
arg = command->Arg(3);
}
/* Get plugin object */
CPlugin *plugin = g_PluginSys.FindPluginByConsoleArg(arg);
IPlugin *plugin = scripts->FindPluginByConsoleArg(arg);
if (!plugin)
{
g_RootMenu.ConsolePrint("[SM] Plugin \"%s\" was not found.", arg);
UTIL_ConsolePrint("[SM] Plugin \"%s\" was not found.", arg);
return;
}
@@ -291,25 +290,38 @@ void ConVarManager::OnRootConsoleCommand(const char *cmdname, const CCommand &co
/* If no convar list... */
if (!plugin->GetProperty("ConVarList", (void **)&pConVarList))
{
g_RootMenu.ConsolePrint("[SM] No convars found for: %s", plname);
UTIL_ConsolePrint("[SM] No convars found for: %s", plname);
return;
}
g_RootMenu.ConsolePrint("[SM] Listing %d convars for: %s", pConVarList->size(), plname);
g_RootMenu.ConsolePrint(" %-32.31s %s", "[Name]", "[Value]");
/* Iterate convar list and display each one */
if (!wantReset)
{
UTIL_ConsolePrint("[SM] Listing %d convars for: %s", pConVarList->size(), plname);
UTIL_ConsolePrint(" %-32.31s %s", "[Name]", "[Value]");
}
/* Iterate convar list and display/reset each one */
for (iter = pConVarList->begin(); iter != pConVarList->end(); iter++)
{
const ConVar *pConVar = (*iter);
g_RootMenu.ConsolePrint(" %-32.31s %s", pConVar->GetName(), pConVar->GetString());
/*const */ConVar *pConVar = const_cast<ConVar *>(*iter);
if (!wantReset)
{
UTIL_ConsolePrint(" %-32.31s %s", pConVar->GetName(), pConVar->GetString());
} else {
pConVar->Revert();
}
}
if (wantReset)
{
UTIL_ConsolePrint("[SM] Reset %d convars for: %s", pConVarList->size(), plname);
}
return;
}
/* Display usage of subcommand */
g_RootMenu.ConsolePrint("[SM] Usage: sm convars <plugin #>");
UTIL_ConsolePrint("[SM] Usage: sm cvars [reset] <plugin #>");
}
Handle_t ConVarManager::CreateConVar(IPluginContext *pContext, const char *name, const char *defaultVal, const char *description, int flags, bool hasMin, float min, bool hasMax, float max)
@@ -341,7 +353,7 @@ Handle_t ConVarManager::CreateConVar(IPluginContext *pContext, const char *name,
pInfo->pVar = pConVar;
/* If we don't, then create a new handle from the convar */
hndl = g_HandleSys.CreateHandle(m_ConVarType, pInfo, NULL, g_pCoreIdent, NULL);
hndl = handlesys->CreateHandle(m_ConVarType, pInfo, NULL, g_pCoreIdent, NULL);
if (hndl == BAD_HANDLE)
{
delete pInfo;
@@ -359,17 +371,10 @@ Handle_t ConVarManager::CreateConVar(IPluginContext *pContext, const char *name,
}
}
/* To prevent creating a convar that has the same name as a console command... ugh */
ConCommandBase *pBase = icvar->GetCommands();
while (pBase)
/* Prevent creating a convar that has the same name as a console command */
if (FindCommand(name))
{
if (pBase->IsCommand() && strcmp(pBase->GetName(), name) == 0)
{
return BAD_HANDLE;
}
pBase = const_cast<ConCommandBase *>(pBase->GetNext());
return BAD_HANDLE;
}
/* Create and initialize ConVarInfo structure */
@@ -379,7 +384,7 @@ Handle_t ConVarManager::CreateConVar(IPluginContext *pContext, const char *name,
pInfo->pChangeForward = NULL;
/* Create a handle from the new convar */
hndl = g_HandleSys.CreateHandle(m_ConVarType, pInfo, NULL, g_pCoreIdent, NULL);
hndl = handlesys->CreateHandle(m_ConVarType, pInfo, NULL, g_pCoreIdent, NULL);
if (hndl == BAD_HANDLE)
{
delete pInfo;
@@ -408,7 +413,13 @@ Handle_t ConVarManager::FindConVar(const char *name)
ConVarInfo *pInfo;
Handle_t hndl;
/* Search for convar */
/* Check convar cache to find out if we already have a handle */
if (convar_cache_lookup(name, &pInfo))
{
return pInfo->handle;
}
/* Couldn't find it in cache, so search for it */
pConVar = icvar->FindVar(name);
/* If it doesn't exist, then return an invalid handle */
@@ -417,12 +428,6 @@ Handle_t ConVarManager::FindConVar(const char *name)
return BAD_HANDLE;
}
/* At this point, the convar exists. So, find out if we already have a handle */
if (convar_cache_lookup(name, &pInfo))
{
return pInfo->handle;
}
/* Create and initialize ConVarInfo structure */
pInfo = new ConVarInfo();
pInfo->sourceMod = false;
@@ -430,7 +435,7 @@ Handle_t ConVarManager::FindConVar(const char *name)
pInfo->pVar = pConVar;
/* If we don't have a handle, then create a new one */
hndl = g_HandleSys.CreateHandle(m_ConVarType, pInfo, NULL, g_pCoreIdent, NULL);
hndl = handlesys->CreateHandle(m_ConVarType, pInfo, NULL, g_pCoreIdent, NULL);
if (hndl == BAD_HANDLE)
{
delete pInfo;
@@ -488,7 +493,7 @@ void ConVarManager::HookConVarChange(ConVar *pConVar, IPluginFunction *pFunction
/* If forward does not exist, create it */
if (!pForward)
{
pForward = g_Forwards.CreateForwardEx(NULL, ET_Ignore, 3, CONVARCHANGE_PARAMS);
pForward = forwardsys->CreateForwardEx(NULL, ET_Ignore, 3, CONVARCHANGE_PARAMS);
pInfo->pChangeForward = pForward;
}
@@ -524,10 +529,11 @@ void ConVarManager::UnhookConVarChange(ConVar *pConVar, IPluginFunction *pFuncti
}
/* If the forward now has 0 functions in it... */
if (pForward->GetFunctionCount() == 0)
if (pForward->GetFunctionCount() == 0 &&
!ConVarReentrancyGuard::IsCvarInChain(pConVar))
{
/* Free this forward */
g_Forwards.ReleaseForward(pForward);
forwardsys->ReleaseForward(pForward);
pInfo->pChangeForward = NULL;
}
}
@@ -535,24 +541,13 @@ void ConVarManager::UnhookConVarChange(ConVar *pConVar, IPluginFunction *pFuncti
QueryCvarCookie_t ConVarManager::QueryClientConVar(edict_t *pPlayer, const char *name, IPluginFunction *pCallback, Handle_t hndl)
{
QueryCvarCookie_t cookie;
QueryCvarCookie_t cookie = sCoreProviderImpl.QueryClientConVar(IndexOfEdict(pPlayer), name);
/* Call StartQueryCvarValue() in either the IVEngineServer or IServerPluginHelpers depending on situation */
if (m_bIsDLLQueryHooked)
if (pCallback != NULL)
{
cookie = engine->StartQueryCvarValue(pPlayer, name);
ConVarQuery query = { cookie, pCallback, (cell_t) hndl, IndexOfEdict(pPlayer) };
m_ConVarQueries.push_back(query);
}
else if (m_bIsVSPQueryHooked)
{
cookie = serverpluginhelpers->StartQueryCvarValue(pPlayer, name);
}
else
{
return InvalidQueryCvarCookie;
}
ConVarQuery query = {cookie, pCallback, hndl};
m_ConVarQueries.push_back(query);
return cookie;
}
@@ -564,7 +559,7 @@ void ConVarManager::AddConVarToPluginList(IPluginContext *pContext, const ConVar
bool inserted = false;
const char *orig = pConVar->GetName();
IPlugin *plugin = g_PluginSys.FindPluginByContext(pContext->GetContext());
IPlugin *plugin = scripts->FindPluginByContext(pContext->GetContext());
/* Check plugin for an existing convar list */
if (!plugin->GetProperty("ConVarList", (void **)&pConVarList))
@@ -595,11 +590,7 @@ void ConVarManager::AddConVarToPluginList(IPluginContext *pContext, const ConVar
}
}
#if defined ORANGEBOX_BUILD
void ConVarManager::OnConVarChanged(ConVar *pConVar, const char *oldValue, float flOldValue)
#else
void ConVarManager::OnConVarChanged(ConVar *pConVar, const char *oldValue)
#endif
{
/* If the values are the same, exit early in order to not trigger callbacks */
if (strcmp(pConVar->GetString(), oldValue) == 0)
@@ -619,20 +610,14 @@ void ConVarManager::OnConVarChanged(ConVar *pConVar, const char *oldValue)
if (pInfo->changeListeners.size() != 0)
{
for (List<IConVarChangeListener *>::iterator i = pInfo->changeListeners.begin();
i != pInfo->changeListeners.end();
i++)
{
#if defined ORANGEBOX_BUILD
for (auto i = pInfo->changeListeners.begin(); i != pInfo->changeListeners.end(); i++)
(*i)->OnConVarChanged(pConVar, oldValue, flOldValue);
#else
(*i)->OnConVarChanged(pConVar, oldValue, atof(oldValue));
#endif
}
}
if (pForward != NULL)
{
ConVarReentrancyGuard guard(pConVar);
/* Now call forwards in plugins that have hooked this */
pForward->PushCell(pInfo->handle);
pForward->PushString(oldValue);
@@ -643,10 +628,15 @@ void ConVarManager::OnConVarChanged(ConVar *pConVar, const char *oldValue)
bool ConVarManager::IsQueryingSupported()
{
return (m_bIsDLLQueryHooked || m_bIsVSPQueryHooked);
return sCoreProviderImpl.IsClientConVarQueryingSupported();
}
void ConVarManager::OnQueryCvarValueFinished(QueryCvarCookie_t cookie, edict_t *pPlayer, EQueryCvarValueStatus result, const char *cvarName, const char *cvarValue)
#if SOURCE_ENGINE != SE_DARKMESSIAH
void ConVarManager::OnClientQueryFinished(QueryCvarCookie_t cookie,
int client,
EQueryCvarValueStatus result,
const char *cvarName,
const char *cvarValue)
{
IPluginFunction *pCallback = NULL;
cell_t value = 0;
@@ -668,7 +658,7 @@ void ConVarManager::OnQueryCvarValueFinished(QueryCvarCookie_t cookie, edict_t *
cell_t ret;
pCallback->PushCell(cookie);
pCallback->PushCell(engine->IndexOfEdict(pPlayer));
pCallback->PushCell(client);
pCallback->PushCell(result);
pCallback->PushString(cvarName);
@@ -687,13 +677,14 @@ void ConVarManager::OnQueryCvarValueFinished(QueryCvarCookie_t cookie, edict_t *
m_ConVarQueries.erase(iter);
}
}
#endif
HandleError ConVarManager::ReadConVarHandle(Handle_t hndl, ConVar **pVar)
{
ConVarInfo *pInfo;
HandleError error;
if ((error = g_HandleSys.ReadHandle(hndl, m_ConVarType, NULL, (void **)&pInfo)) != HandleError_None)
if ((error = handlesys->ReadHandle(hndl, m_ConVarType, NULL, (void **)&pInfo)) != HandleError_None)
{
return error;
}
+32 -23
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -39,8 +39,11 @@
#include <IForwardSys.h>
#include <IHandleSys.h>
#include <IRootConsoleMenu.h>
#include <IPlayerHelpers.h>
#include <compat_wrappers.h>
#include "concmd_cleaner.h"
#include "PlayerManager.h"
#include <sm_stringhashmap.h>
using namespace SourceHook;
@@ -60,6 +63,15 @@ struct ConVarInfo
IChangeableForward *pChangeForward; /**< Forward associated with convar */
ConVar *pVar; /**< The actual convar */
List<IConVarChangeListener *> changeListeners;
static inline bool matches(const char *name, const ConVarInfo *info)
{
return strcmp(name, info->pVar->GetName()) == 0;
}
static inline uint32_t hash(const detail::CharsAndLength &key)
{
return key.hash();
}
};
/**
@@ -70,6 +82,7 @@ struct ConVarQuery
QueryCvarCookie_t cookie; /**< Cookie that identifies query */
IPluginFunction *pCallback; /**< Function that will be called when query is finished */
cell_t value; /**< Optional value passed to query function */
cell_t client; /**< Only used for cleaning up on client disconnection */
};
class ConVarManager :
@@ -77,7 +90,8 @@ class ConVarManager :
public IHandleTypeDispatch,
public IPluginsListener,
public IRootConsoleCommand,
public IConCommandTracker
public IConCommandTracker,
public IClientListener
{
public:
ConVarManager();
@@ -86,16 +100,17 @@ public: // SMGlobalClass
void OnSourceModStartup(bool late);
void OnSourceModAllInitialized();
void OnSourceModShutdown();
void OnSourceModVSPReceived();
public: // IHandleTypeDispatch
void OnHandleDestroy(HandleType_t type, void *object);
bool GetHandleApproxSize(HandleType_t type, void *object, unsigned int *pSize);
public: // IPluginsListener
void OnPluginUnloaded(IPlugin *plugin);
public: //IRootConsoleCommand
void OnRootConsoleCommand(const char *cmdname, const CCommand &command);
void OnRootConsoleCommand(const char *cmdname, const ICommandArgs *command) override;
public: //IConCommandTracker
void OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name, bool is_read_safe);
void OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name) override;
public: //IClientListener
void OnClientDisconnected(int client);
public:
/**
* Create a convar and return a handle to it.
@@ -131,32 +146,26 @@ public:
HandleError ReadConVarHandle(Handle_t hndl, ConVar **pVar);
// Called via game hooks.
void OnConVarChanged(ConVar *pConVar, const char *oldValue, float flOldValue);
#if SOURCE_ENGINE != SE_DARKMESSIAH
void OnClientQueryFinished(
QueryCvarCookie_t cookie,
int client,
EQueryCvarValueStatus result,
const char *cvarName,
const char *cvarValue);
#endif
private:
/**
* Adds a convar to a plugin's list.
*/
static void AddConVarToPluginList(IPluginContext *pContext, const ConVar *pConVar);
/**
* Static callback that Valve's ConVar object executes when the convar's value changes.
*/
#if defined ORANGEBOX_BUILD
static void OnConVarChanged(ConVar *pConVar, const char *oldValue, float flOldValue);
#else
static void OnConVarChanged(ConVar *pConVar, const char *oldValue);
#endif
/**
* Callback for when StartQueryCvarValue() has finished.
*/
void OnQueryCvarValueFinished(QueryCvarCookie_t cookie, edict_t *pPlayer, EQueryCvarValueStatus result,
const char *cvarName, const char *cvarValue);
private:
HandleType_t m_ConVarType;
List<ConVarInfo *> m_ConVars;
List<ConVarQuery> m_ConVarQueries;
bool m_bIsDLLQueryHooked;
bool m_bIsVSPQueryHooked;
};
extern ConVarManager g_ConVarManager;
+409
View File
@@ -0,0 +1,409 @@
/**
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
/**
* On SourceHook v4.3 or lower, there are no DVP hooks. Very sad, right?
* Only do this on newer versions. For the older code, we'll do an incredibly
* hacky detour.
*
* The idea of the "non-hacky" (yeah... no) code is that every unique
* ConCommand vtable gets its own DVP hook. We watch for unloading and
* loading commands to remove stale hooks from SH.
*/
#include "sourcemod.h"
#include "sourcemm_api.h"
#include "Logger.h"
#include "compat_wrappers.h"
#include "ConsoleDetours.h"
#include <IGameConfigs.h>
#include "sm_stringutil.h"
#include "ConCmdManager.h"
#include "HalfLife2.h"
#include "ConCommandBaseIterator.h"
#include "logic_bridge.h"
#include "command_args.h"
#include "provider.h"
#include <am-utility.h>
#include <bridge/include/ILogger.h>
#if defined PLATFORM_POSIX
# include <dlfcn.h>
# include <sys/mman.h>
# include <stdint.h>
# include <unistd.h>
#endif
#if SOURCE_ENGINE >= SE_ORANGEBOX
SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
#else
SH_DECL_EXTERN0_void(ConCommand, Dispatch, SH_NOATTRIB, false);
#endif
class GenericCommandHooker : public IConCommandLinkListener
{
struct HackInfo
{
void **vtable;
int hook;
unsigned int refcount;
};
CVector<HackInfo> vtables;
bool enabled;
SourceHook::MemFuncInfo dispatch;
inline void **GetVirtualTable(ConCommandBase *pBase)
{
return *reinterpret_cast<void***>(reinterpret_cast<char*>(pBase) +
dispatch.thisptroffs +
dispatch.vtbloffs);
}
inline bool FindVtable(void **ptr, size_t& index)
{
for (size_t i = 0; i < vtables.size(); i++)
{
if (vtables[i].vtable == ptr)
{
index = i;
return true;
}
}
return false;
}
void MakeHookable(ConCommandBase *pBase)
{
if (!pBase->IsCommand())
return;
ConCommand *cmd = (ConCommand*)pBase;
void **vtable = GetVirtualTable(cmd);
size_t index;
if (!FindVtable(vtable, index))
{
HackInfo hack;
hack.vtable = vtable;
hack.hook = SH_ADD_VPHOOK(ConCommand, Dispatch, cmd, SH_MEMBER(this, &GenericCommandHooker::Dispatch), false);
hack.refcount = 1;
vtables.push_back(hack);
}
else
{
vtables[index].refcount++;
}
}
#if SOURCE_ENGINE >= SE_ORANGEBOX
void Dispatch(const CCommand& args)
#else
void Dispatch()
#endif
{
cell_t res = ConsoleDetours::Dispatch(META_IFACEPTR(ConCommand)
#if SOURCE_ENGINE >= SE_ORANGEBOX
, args
#endif
);
if (res >= Pl_Handled)
RETURN_META(MRES_SUPERCEDE);
}
void ReparseCommandList()
{
for (size_t i = 0; i < vtables.size(); i++)
vtables[i].refcount = 0;
for (ConCommandBaseIterator iter; iter.IsValid(); iter.Next())
MakeHookable(iter.Get());
CVector<HackInfo>::iterator iter = vtables.begin();
while (iter != vtables.end())
{
if ((*iter).refcount)
{
iter++;
continue;
}
/* Damn it. This event happens AFTER the plugin has unloaded!
* There's two options. Remove the hook now and hope SH's memory
* protection will prevent a crash. Otherwise, we can wait until
* the server shuts down and more likely crash then.
*
* This situation only arises if:
* 1) Someone has used AddCommandFilter()
* 2) ... on a Dark Messiah server (mm:s new api)
* 3) ... and another MM:S plugin that uses ConCommands has unloaded.
*
* Even though the impact is really small, we'll wait until the
* server shuts down, so normal operation isn't interrupted.
*
* See bug 4018.
*/
iter = vtables.erase(iter);
}
}
void UnhookCommand(ConCommandBase *pBase)
{
if (!pBase->IsCommand())
return;
ConCommand *cmd = (ConCommand*)pBase;
void **vtable = GetVirtualTable(cmd);
size_t index;
if (!FindVtable(vtable, index))
{
logger->LogError("Console detour tried to unhook command \"%s\" but it wasn't found", pBase->GetName());
return;
}
assert(vtables[index].refcount > 0);
vtables[index].refcount--;
if (vtables[index].refcount == 0)
{
SH_REMOVE_HOOK_ID(vtables[index].hook);
vtables.erase(vtables.iterAt(index));
}
}
public:
GenericCommandHooker() : enabled(false)
{
}
bool Enable()
{
SourceHook::GetFuncInfo(&ConCommand::Dispatch, dispatch);
if (dispatch.thisptroffs < 0)
{
logger->LogError("Command filter could not determine ConCommand layout");
return false;
}
for (ConCommandBaseIterator iter; iter.IsValid(); iter.Next())
MakeHookable(iter.Get());
if (!vtables.size())
{
logger->LogError("Command filter could not find any cvars!");
return false;
}
enabled = true;
return true;
}
void Disable()
{
for (size_t i = 0; i < vtables.size(); i++)
SH_REMOVE_HOOK_ID(vtables[i].hook);
vtables.clear();
}
virtual void OnLinkConCommand(ConCommandBase *pBase)
{
if (!enabled)
return;
MakeHookable(pBase);
}
virtual void OnUnlinkConCommand(ConCommandBase *pBase)
{
if (!enabled)
return;
if (pBase == NULL)
ReparseCommandList();
else
UnhookCommand(pBase);
}
};
/**
* BEGIN THE ACTUALLY GENERIC CODE.
*/
#define FEATURECAP_COMMANDLISTENER "command listener"
static GenericCommandHooker s_GenericHooker;
ConsoleDetours g_ConsoleDetours;
ConsoleDetours::ConsoleDetours() : status(FeatureStatus_Unknown)
{
}
void ConsoleDetours::OnSourceModAllInitialized()
{
m_pForward = forwardsys->CreateForwardEx("OnAnyCommand", ET_Hook, 3, NULL, Param_Cell,
Param_String, Param_Cell);
sharesys->AddCapabilityProvider(NULL, this, FEATURECAP_COMMANDLISTENER);
}
void ConsoleDetours::OnSourceModShutdown()
{
for (StringHashMap<IChangeableForward *>::iterator iter = m_Listeners.iter();
!iter.empty();
iter.next())
{
forwardsys->ReleaseForward(iter->value);
}
forwardsys->ReleaseForward(m_pForward);
s_GenericHooker.Disable();
}
FeatureStatus ConsoleDetours::GetFeatureStatus(FeatureType type, const char *name)
{
return GetStatus();
}
FeatureStatus ConsoleDetours::GetStatus()
{
if (status == FeatureStatus_Unknown)
{
status = s_GenericHooker.Enable() ? FeatureStatus_Available : FeatureStatus_Unavailable;
}
return status;
}
bool ConsoleDetours::AddListener(IPluginFunction *fun, const char *command)
{
if (GetStatus() != FeatureStatus_Available)
return false;
if (command == NULL)
{
m_pForward->AddFunction(fun);
}
else
{
ke::AutoPtr<char[]> str(UTIL_ToLowerCase(command));
IChangeableForward *forward;
if (!m_Listeners.retrieve(str.get(), &forward))
{
forward = forwardsys->CreateForwardEx(NULL, ET_Hook, 3, NULL, Param_Cell,
Param_String, Param_Cell);
m_Listeners.insert(str.get(), forward);
}
forward->AddFunction(fun);
}
return true;
}
bool ConsoleDetours::RemoveListener(IPluginFunction *fun, const char *command)
{
if (command == NULL)
{
return m_pForward->RemoveFunction(fun);
}
else
{
ke::AutoPtr<char[]> str(UTIL_ToLowerCase(command));
IChangeableForward *forward;
if (!m_Listeners.retrieve(str.get(), &forward))
return false;
return forward->RemoveFunction(fun);
}
}
cell_t ConsoleDetours::InternalDispatch(int client, const ICommandArgs *args)
{
char name[255];
const char *realname = args->Arg(0);
size_t len = strlen(realname);
// Disallow command strings that are too long, for now.
if (len >= sizeof(name) - 1)
return Pl_Continue;
for (size_t i = 0; i < len; i++)
{
if (realname[i] >= 'A' && realname[i] <= 'Z')
name[i] = tolower(realname[i]);
else
name[i] = realname[i];
}
name[len] = '\0';
cell_t result = Pl_Continue;
m_pForward->PushCell(client);
m_pForward->PushString(name);
m_pForward->PushCell(args->ArgC() - 1);
m_pForward->Execute(&result, NULL);
/* Don't let plugins block this. */
if (strcmp(name, "sm") == 0)
result = Pl_Continue;
if (result >= Pl_Handled)
return result;
IChangeableForward *forward;
if (!m_Listeners.retrieve(name, &forward))
return result;
if (forward->GetFunctionCount() == 0)
return result;
cell_t result2 = Pl_Continue;
forward->PushCell(client);
forward->PushString(name);
forward->PushCell(args->ArgC() - 1);
forward->Execute(&result2, NULL);
if (result2 > result)
result = result2;
/* "sm" should not have flown through the above. */
assert(strcmp(name, "sm") != 0 || result == Pl_Continue);
return result;
}
#if SOURCE_ENGINE >= SE_ORANGEBOX
cell_t ConsoleDetours::Dispatch(ConCommand *pBase, const CCommand& args)
{
#else
cell_t ConsoleDetours::Dispatch(ConCommand *pBase)
{
CCommand args;
#endif
EngineArgs cargs(args);
cell_t res;
{
AutoEnterCommand autoEnterCommand(&cargs);
res = g_ConsoleDetours.InternalDispatch(sCoreProviderImpl.CommandClient(), &cargs);
}
return res;
}
+39 -45
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -28,61 +28,55 @@
*
* Version: $Id$
*/
#ifndef _INCLUDE_SOURCEMOD_CONSOLE_DETOURS_H_
#define _INCLUDE_SOURCEMOD_CONSOLE_DETOURS_H_
#ifndef _INCLUDE_SOURCEMOD_SERVERCOMMANDS_H_
#define _INCLUDE_SOURCEMOD_SERVERCOMMANDS_H_
#include "sourcemod.h"
#include <IRootConsoleMenu.h>
#include "PluginSys.h"
#include "sm_globals.h"
#include "sourcemm_api.h"
#include <sh_list.h>
#include <sh_string.h>
#include <compat_wrappers.h>
#include "sm_trie.h"
#include <IForwardSys.h>
#include <sm_stringhashmap.h>
using namespace SourceMod;
using namespace SourceHook;
namespace SourceMod {
class ICommandArgs;
} // namespace SourceMod
struct ConsoleEntry
{
String command;
String description;
};
class RootConsoleMenu :
public IConCommandBaseAccessor,
class ConsoleDetours :
public SMGlobalClass,
public IRootConsoleCommand,
public IRootConsole
public IFeatureProvider
{
friend class PlayerManager;
friend class GenericCommandHooker;
public:
RootConsoleMenu();
~RootConsoleMenu();
public:
const char *GetInterfaceName();
unsigned int GetInterfaceVersion();
public: //IConCommandBaseAccessor
bool RegisterConCommandBase(ConCommandBase *pCommand);
ConsoleDetours();
public: //SMGlobalClass
void OnSourceModStartup(bool late);
void OnSourceModAllInitialized();
void OnSourceModShutdown();
public: //IRootConsoleCommand
void OnRootConsoleCommand(const char *cmdname, const CCommand &command);
public: //IRootConsole
bool AddRootConsoleCommand(const char *cmd, const char *text, IRootConsoleCommand *pHandler);
bool RemoveRootConsoleCommand(const char *cmd, IRootConsoleCommand *pHandler);
void ConsolePrint(const char *fmt, ...);
void DrawGenericOption(const char *cmd, const char *text);
public: //IFeatureProvider
FeatureStatus GetFeatureStatus(FeatureType type, const char *name);
public:
void GotRootCmd(const CCommand &cmd);
bool AddListener(IPluginFunction *fun, const char *command);
bool RemoveListener(IPluginFunction *fun, const char *command);
private:
bool m_CfgExecDone;
Trie *m_pCommands;
List<ConsoleEntry *> m_Menu;
cell_t InternalDispatch(int client, const SourceMod::ICommandArgs *args);
#if SOURCE_ENGINE >= SE_ORANGEBOX
static cell_t Dispatch(ConCommand *pBase, const CCommand& args);
#else
static cell_t Dispatch(ConCommand *pBase);
#endif
public:
FeatureStatus GetStatus();
bool IsEnabled()
{
return status == FeatureStatus_Available;
}
private:
FeatureStatus status;
IChangeableForward *m_pForward;
StringHashMap<IChangeableForward *> m_Listeners;
};
extern RootConsoleMenu g_RootMenu;
extern ConsoleDetours g_ConsoleDetours;
#endif /* _INCLUDE_SOURCEMOD_CONSOLE_DETOURS_H_ */
#endif //_INCLUDE_SOURCEMOD_SERVERCOMMANDS_H_
+241 -62
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -33,69 +33,189 @@
#include "CoreConfig.h"
#include "sourcemod.h"
#include "sourcemm_api.h"
#include "sm_srvcmds.h"
#include "sm_version.h"
#include "sm_stringutil.h"
#include "LibrarySys.h"
#include "Logger.h"
#include "PluginSys.h"
#include "ForwardSys.h"
#include "frame_hooks.h"
#include "logic_bridge.h"
#include "compat_wrappers.h"
#include <sourcemod_version.h>
#include <amtl/os/am-path.h>
#include <amtl/os/am-fsutil.h>
#include <sh_list.h>
#include <IForwardSys.h>
#include <bridge/include/IScriptManager.h>
#include <bridge/include/ILogger.h>
using namespace SourceHook;
#ifdef PLATFORM_WINDOWS
ConVar sm_corecfgfile("sm_corecfgfile", "addons\\sourcemod\\configs\\core.cfg", 0, "SourceMod core configuration file");
#elif defined PLATFORM_LINUX
#elif defined PLATFORM_LINUX || defined PLATFORM_APPLE
ConVar sm_corecfgfile("sm_corecfgfile", "addons/sourcemod/configs/core.cfg", 0, "SourceMod core configuration file");
#endif
IForward *g_pOnServerCfg = NULL;
IForward *g_pOnConfigsExecuted = NULL;
IForward *g_pOnAutoConfigsBuffered = NULL;
CoreConfig g_CoreConfig;
bool g_bConfigsExecd = false;
bool g_bServerExecd = false;
bool g_bGotServerStart = false;
bool g_bGotTrigger = false;
ConCommand *g_pExecPtr = NULL;
ConVar *g_ServerCfgFile = NULL;
void CheckAndFinalizeConfigs();
#if SOURCE_ENGINE >= SE_ORANGEBOX
SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
void Hook_ExecDispatchPre(const CCommand &cmd)
#else
SH_DECL_EXTERN0_void(ConCommand, Dispatch, SH_NOATTRIB, false);
void Hook_ExecDispatchPre()
#endif
{
#if SOURCE_ENGINE <= SE_DARKMESSIAH
CCommand cmd;
#endif
const char *arg = cmd.Arg(1);
if (!g_bServerExecd && arg != NULL && strcmp(arg, g_ServerCfgFile->GetString()) == 0)
{
g_bGotTrigger = true;
}
}
#if SOURCE_ENGINE >= SE_ORANGEBOX
void Hook_ExecDispatchPost(const CCommand &cmd)
#else
void Hook_ExecDispatchPost()
#endif
{
if (g_bGotTrigger)
{
g_bGotTrigger = false;
g_bServerExecd = true;
CheckAndFinalizeConfigs();
}
}
void CheckAndFinalizeConfigs()
{
if ((g_bServerExecd || g_ServerCfgFile == NULL) && g_bGotServerStart)
{
g_PendingInternalPush = true;
}
}
void CoreConfig::OnSourceModAllInitialized()
{
g_RootMenu.AddRootConsoleCommand("config", "Set core configuration options", this);
g_pOnServerCfg = g_Forwards.CreateForward("OnServerCfg", ET_Ignore, 0, NULL);
g_pOnConfigsExecuted = g_Forwards.CreateForward("OnConfigsExecuted", ET_Ignore, 0, NULL);
rootmenu->AddRootConsoleCommand3("config", "Set core configuration options", this);
g_pOnServerCfg = forwardsys->CreateForward("OnServerCfg", ET_Ignore, 0, NULL);
g_pOnConfigsExecuted = forwardsys->CreateForward("OnConfigsExecuted", ET_Ignore, 0, NULL);
g_pOnAutoConfigsBuffered = forwardsys->CreateForward("OnAutoConfigsBuffered", ET_Ignore, 0, NULL);
}
CoreConfig::CoreConfig()
{
}
CoreConfig::~CoreConfig()
{
}
void CoreConfig::OnSourceModShutdown()
{
g_RootMenu.RemoveRootConsoleCommand("config", this);
g_Forwards.ReleaseForward(g_pOnServerCfg);
g_Forwards.ReleaseForward(g_pOnConfigsExecuted);
rootmenu->RemoveRootConsoleCommand("config", this);
forwardsys->ReleaseForward(g_pOnServerCfg);
forwardsys->ReleaseForward(g_pOnConfigsExecuted);
forwardsys->ReleaseForward(g_pOnAutoConfigsBuffered);
if (g_pExecPtr != NULL)
{
SH_REMOVE_HOOK(ConCommand, Dispatch, g_pExecPtr, SH_STATIC(Hook_ExecDispatchPre), false);
SH_REMOVE_HOOK(ConCommand, Dispatch, g_pExecPtr, SH_STATIC(Hook_ExecDispatchPost), true);
g_pExecPtr = NULL;
}
}
void CoreConfig::OnSourceModLevelChange(const char *mapName)
{
static bool already_checked = false;
if (!already_checked)
{
if (engine->IsDedicatedServer())
{
g_ServerCfgFile = icvar->FindVar("servercfgfile");
}
else
{
g_ServerCfgFile = icvar->FindVar("lservercfgfile");
}
if (g_ServerCfgFile != NULL)
{
g_pExecPtr = FindCommand("exec");
if (g_pExecPtr != NULL)
{
SH_ADD_HOOK(ConCommand, Dispatch, g_pExecPtr, SH_STATIC(Hook_ExecDispatchPre), false);
SH_ADD_HOOK(ConCommand, Dispatch, g_pExecPtr, SH_STATIC(Hook_ExecDispatchPost), true);
}
else
{
g_ServerCfgFile = NULL;
}
}
already_checked = true;
}
g_bConfigsExecd = false;
g_bServerExecd = false;
g_bGotServerStart = false;
g_bGotTrigger = false;
}
void CoreConfig::OnRootConsoleCommand(const char *cmdname, const CCommand &command)
void CoreConfig::OnRootConsoleCommand(const char *cmdname, const ICommandArgs *command)
{
int argcount = command.ArgC();
int argcount = command->ArgC();
if (argcount >= 4)
{
const char *option = command.Arg(2);
const char *value = command.Arg(3);
const char *option = command->Arg(2);
const char *value = command->Arg(3);
char error[255];
ConfigResult res = SetConfigOption(option, value, ConfigSource_Console, error, sizeof(error));
if (res == ConfigResult_Reject)
{
g_RootMenu.ConsolePrint("[SM] Could not set config option \"%s\" to \"%s\" (%s)", option, value, error);
} else if (res == ConfigResult_Ignore) {
g_RootMenu.ConsolePrint("[SM] No such config option \"%s\" exists.", option);
UTIL_ConsolePrint("[SM] Could not set config option \"%s\" to \"%s\". (%s)", option, value, error);
} else {
g_RootMenu.ConsolePrint("Config option \"%s\" successfully set to \"%s.\"", option, value);
if (res == ConfigResult_Ignore) {
UTIL_ConsolePrint("[SM] WARNING: Config option \"%s\" is not registered.", option);
}
UTIL_ConsolePrint("[SM] Config option \"%s\" set to \"%s\".", option, value);
}
return;
} else if (argcount >= 3) {
const char *option = command->Arg(2);
const char *value = GetCoreConfigValue(option);
if (value == NULL)
{
UTIL_ConsolePrint("[SM] No such config option \"%s\" exists.", option);
} else {
UTIL_ConsolePrint("[SM] Config option \"%s\" is set to \"%s\".", option, value);
}
return;
}
g_RootMenu.ConsolePrint("[SM] Usage: sm config <option> <value>");
UTIL_ConsolePrint("[SM] Usage: sm config <option> [value]");
}
void CoreConfig::Initialize()
@@ -106,21 +226,38 @@ void CoreConfig::Initialize()
/* Try to get command line value of core config convar */
const char *corecfg = icvar->GetCommandLineValue("sm_corecfgfile");
/* If sm_corecfgfile not specified on command line, use default value */
if (!corecfg)
/* If sm_corecfgfile is on the command line, use that
* If sm_corecfgfile isn't there, check sm_basepath on the command line and build the path off that
* If sm_basepath isn't there, just use the default path for the cfg
*/
if (corecfg)
{
corecfg = sm_corecfgfile.GetDefault();
ke::path::Format(filePath, sizeof(filePath), "%s/%s", g_SourceMod.GetGamePath(), corecfg);
}
else
{
const char *basepath = icvar->GetCommandLineValue("sm_basepath");
/* Format path to config file */
if (basepath)
{
ke::path::Format(filePath, sizeof(filePath), "%s/%s/%s", g_SourceMod.GetGamePath(), basepath, "configs/core.cfg");
}
else
{
ke::path::Format(filePath, sizeof(filePath), "%s/%s", g_SourceMod.GetGamePath(), sm_corecfgfile.GetDefault());
}
}
/* Format path to config file */
g_LibSys.PathFormat(filePath, sizeof(filePath), "%s/%s", g_SourceMod.GetGamePath(), corecfg);
/* Reset cached key values */
m_KeyValues.clear();
/* Parse config file */
if ((err=textparsers->ParseFile_SMC(filePath, this, NULL)) != SMCError_Okay)
{
/* :TODO: This won't actually log or print anything :( - So fix that somehow */
const char *error = textparsers->GetSMCErrorString(err);
g_Logger.LogFatal("[SM] Error encountered parsing core config file: %s", error ? error : "");
logger->LogFatal("[SM] Error encountered parsing core config file: %s", error ? error : "");
}
}
@@ -132,7 +269,7 @@ SMCResult CoreConfig::ReadSMC_KeyValue(const SMCStates *states, const char *key,
if (err == ConfigResult_Reject)
{
/* This is a fatal error */
g_Logger.LogFatal("Config error (key: %s) (value: %s) %s", key, value, error);
logger->LogFatal("Config error (key: %s) (value: %s) %s", key, value, error);
}
return SMCResult_Continue;
@@ -140,7 +277,7 @@ SMCResult CoreConfig::ReadSMC_KeyValue(const SMCStates *states, const char *key,
ConfigResult CoreConfig::SetConfigOption(const char *option, const char *value, ConfigSource source, char *error, size_t maxlength)
{
ConfigResult result;
ConfigResult result = ConfigResult_Ignore;
/* Notify! */
SMGlobalClass *pBase = SMGlobalClass::head;
@@ -148,12 +285,23 @@ ConfigResult CoreConfig::SetConfigOption(const char *option, const char *value,
{
if ((result = pBase->OnSourceModConfigChanged(option, value, source, error, maxlength)) != ConfigResult_Ignore)
{
return result;
break;
}
pBase = pBase->m_pGlobalClassNext;
}
return ConfigResult_Ignore;
ke::AString vstr(value);
m_KeyValues.replace(option, ke::Move(vstr));
return result;
}
const char *CoreConfig::GetCoreConfigValue(const char *key)
{
StringHashMap<ke::AString>::Result r = m_KeyValues.find(key);
if (!r.found())
return NULL;
return r->value.chars();
}
bool SM_AreConfigsExecuted()
@@ -165,12 +313,12 @@ inline bool IsPathSepChar(char c)
{
#if defined PLATFORM_WINDOWS
return (c == '\\' || c == '/');
#elif defined PLATFORM_LINUX
#elif defined PLATFORM_LINUX || defined PLATFORM_POSIX
return (c == '/');
#endif
}
bool SM_ExecuteConfig(CPlugin *pl, AutoConfig *cfg, bool can_create)
bool SM_ExecuteConfig(IPlugin *pl, AutoConfig *cfg, bool can_create)
{
bool will_create = false;
@@ -188,12 +336,12 @@ bool SM_ExecuteConfig(CPlugin *pl, AutoConfig *cfg, bool can_create)
g_SourceMod.BuildPath(Path_Game, path, sizeof(path), "cfg/%s", folder);
if (!g_LibSys.IsPathDirectory(path))
if (!ke::file::IsDirectory(path))
{
char *cur_ptr = path;
size_t len;
g_LibSys.PathFormat(path, sizeof(path), "%s", folder);
ke::path::Format(path, sizeof(path), "%s", folder);
len = g_SourceMod.BuildPath(Path_Game, build, sizeof(build), "cfg");
do
@@ -214,14 +362,12 @@ bool SM_ExecuteConfig(CPlugin *pl, AutoConfig *cfg, bool can_create)
{
next_ptr = NULL;
}
len += g_LibSys.PathFormat(&build[len],
len += ke::path::Format(&build[len],
sizeof(build)-len,
"/%s",
cur_ptr);
if (!g_LibSys.CreateFolder(build))
{
if (!ke::file::CreateDirectory(build))
break;
}
cur_ptr = next_ptr;
} while (cur_ptr);
}
@@ -233,13 +379,13 @@ bool SM_ExecuteConfig(CPlugin *pl, AutoConfig *cfg, bool can_create)
if (cfg->folder.size())
{
g_LibSys.PathFormat(local,
sizeof(local),
ke::path::Format(local,
sizeof(local),
"%s/%s.cfg",
cfg->folder.c_str(),
cfg->autocfg.c_str());
} else {
g_LibSys.PathFormat(local,
ke::path::Format(local,
sizeof(local),
"%s.cfg",
cfg->autocfg.c_str());
@@ -247,7 +393,7 @@ bool SM_ExecuteConfig(CPlugin *pl, AutoConfig *cfg, bool can_create)
g_SourceMod.BuildPath(Path_Game, file, sizeof(file), "cfg/%s", local);
bool file_exists = g_LibSys.IsPathFile(file);
bool file_exists = ke::file::IsFile(file);
if (!file_exists && will_create)
{
List<const ConVar *> *convars = NULL;
@@ -257,7 +403,7 @@ bool SM_ExecuteConfig(CPlugin *pl, AutoConfig *cfg, bool can_create)
FILE *fp = fopen(file, "wt");
if (fp)
{
fprintf(fp, "// This file was auto-generated by SourceMod (v%s)\n", SVN_FULL_VERSION);
fprintf(fp, "// This file was auto-generated by SourceMod (v%s)\n", SOURCEMOD_VERSION);
fprintf(fp, "// ConVars for plugin \"%s\"\n", pl->GetFilename());
fprintf(fp, "\n\n");
@@ -266,8 +412,11 @@ bool SM_ExecuteConfig(CPlugin *pl, AutoConfig *cfg, bool can_create)
for (iter = convars->begin(); iter != convars->end(); iter++)
{
const ConVar *cvar = (*iter);
if ((cvar->GetFlags() & FCVAR_DONTRECORD) == FCVAR_DONTRECORD)
#if SOURCE_ENGINE >= SE_ORANGEBOX
if (cvar->IsFlagSet(FCVAR_DONTRECORD))
#else
if (cvar->IsBitSet(FCVAR_DONTRECORD))
#endif
{
continue;
}
@@ -276,7 +425,7 @@ bool SM_ExecuteConfig(CPlugin *pl, AutoConfig *cfg, bool can_create)
char *dptr = descr;
/* Print comments until there is no more */
strncopy(descr, cvar->GetHelpText(), sizeof(descr));
ke::SafeStrcpy(descr, sizeof(descr), cvar->GetHelpText());
while (*dptr != '\0')
{
/* Find the next line */
@@ -314,13 +463,18 @@ bool SM_ExecuteConfig(CPlugin *pl, AutoConfig *cfg, bool can_create)
can_create = false;
fclose(fp);
}
else
{
logger->LogError("Failed to auto generate config for %s, make sure the directory has write permission.", pl->GetFilename());
return can_create;
}
}
}
if (file_exists)
{
char cmd[255];
UTIL_Format(cmd, sizeof(cmd), "exec %s\n", local);
ke::SafeSprintf(cmd, sizeof(cmd), "exec %s\n", local);
engine->ServerCommand(cmd);
}
@@ -344,10 +498,10 @@ void SM_DoSingleExecFwds(IPluginContext *ctx)
void SM_ConfigsExecuted_Plugin(unsigned int serial)
{
IPluginIterator *iter = g_PluginSys.GetPluginIterator();
IPluginIterator *iter = scripts->GetPluginIterator();
while (iter->MorePlugins())
{
CPlugin *plugin = (CPlugin *)(iter->GetPlugin());
IPlugin *plugin = iter->GetPlugin();
if (plugin->GetSerial() == serial)
{
SM_DoSingleExecFwds(plugin->GetBaseContext());
@@ -360,7 +514,7 @@ void SM_ConfigsExecuted_Plugin(unsigned int serial)
void SM_ExecuteForPlugin(IPluginContext *ctx)
{
CPlugin *plugin = (CPlugin *)g_PluginSys.GetPluginByCtx(ctx->GetContext());
SMPlugin *plugin = scripts->FindPluginByContext(ctx->GetContext());
unsigned int num = plugin->GetConfigCount();
if (!num)
@@ -375,35 +529,34 @@ void SM_ExecuteForPlugin(IPluginContext *ctx)
can_create = SM_ExecuteConfig(plugin, plugin->GetConfig(i), can_create);
}
char cmd[255];
UTIL_Format(cmd, sizeof(cmd), "sm internal 2 %d\n", plugin->GetSerial());
ke::SafeSprintf(cmd, sizeof(cmd), "sm_internal 2 %d\n", plugin->GetSerial());
engine->ServerCommand(cmd);
}
}
void SM_ExecuteAllConfigs()
{
if (g_bConfigsExecd)
if (g_bGotServerStart)
{
return;
}
engine->ServerCommand("exec sourcemod/sourcemod.cfg\n");
IPluginIterator *iter = g_PluginSys.GetPluginIterator();
while (iter->MorePlugins())
AutoPluginList plugins(scripts);
for (size_t i = 0; i < plugins->size(); i++)
{
CPlugin *plugin = (CPlugin *)(iter->GetPlugin());
SMPlugin *plugin = plugins->at(i);
unsigned int num = plugin->GetConfigCount();
bool can_create = true;
for (unsigned int i=0; i<num; i++)
{
can_create = SM_ExecuteConfig(plugin, plugin->GetConfig(i), can_create);
}
iter->NextPlugin();
}
iter->Release();
engine->ServerCommand("sm internal 1\n");
g_bGotServerStart = true;
CheckAndFinalizeConfigs();
}
void SM_ConfigsExecuted_Global()
@@ -418,3 +571,29 @@ void SM_ConfigsExecuted_Global()
g_pOnServerCfg->Execute(NULL);
g_pOnConfigsExecuted->Execute(NULL);
}
void SM_InternalCmdTrigger()
{
/* Order is important here. We need to buffer things before we send the command out. */
g_pOnAutoConfigsBuffered->Execute(NULL);
engine->ServerCommand("sm_internal 1\n");
g_PendingInternalPush = false;
}
CON_COMMAND(sm_internal, "")
{
#if SOURCE_ENGINE <= SE_DARKMESSIAH
CCommand args;
#endif
if (args.ArgC() < 1)
return;
const char *arg = args.Arg(1);
if (strcmp(arg, "1") == 0) {
SM_ConfigsExecuted_Global();
} else if (strcmp(arg, "2") == 0) {
if (args.ArgC() >= 3)
SM_ConfigsExecuted_Plugin(atoi(args.Arg(2)));
}
}
+12 -3
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -35,6 +35,8 @@
#include "sm_globals.h"
#include <ITextParsers.h>
#include <IRootConsoleMenu.h>
#include <am-string.h>
#include <sm_stringhashmap.h>
using namespace SourceMod;
@@ -43,6 +45,9 @@ class CoreConfig :
public ITextListener_SMC,
public IRootConsoleCommand
{
public:
CoreConfig();
~CoreConfig();
public: // SMGlobalClass
void OnSourceModAllInitialized();
void OnSourceModShutdown();
@@ -50,17 +55,20 @@ public: // SMGlobalClass
public: // ITextListener_SMC
SMCResult ReadSMC_KeyValue(const SMCStates *states, const char *key, const char *value);
public: // IRootConsoleCommand
void OnRootConsoleCommand(const char *cmdname, const CCommand &command);
void OnRootConsoleCommand(const char *cmdname, const ICommandArgs *command) override;
public:
/**
* Initializes CoreConfig by reading from core.cfg file
*/
void Initialize();
const char *GetCoreConfigValue(const char *key);
private:
/**
* Sets configuration option by notifying SourceMod components that rely on core.cfg
*/
ConfigResult SetConfigOption(const char *option, const char *value, ConfigSource, char *Error, size_t maxlength);
private:
StringHashMap<ke::AString> m_KeyValues;
};
extern bool SM_AreConfigsExecuted();
@@ -68,6 +76,7 @@ extern void SM_ExecuteAllConfigs();
extern void SM_ExecuteForPlugin(IPluginContext *ctx);
extern void SM_ConfigsExecuted_Global();
extern void SM_ConfigsExecuted_Plugin(unsigned int serial);
extern void SM_InternalCmdTrigger();
extern CoreConfig g_CoreConfig;
-145
View File
@@ -1,145 +0,0 @@
/**
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#if 0
#include "sm_globals.h"
#include "sourcemm_api.h"
#include "Tlhelp32.h"
#include "LibrarySys.h"
#include "minidump.h"
BOOL
WINAPI
MiniDumpWriteDump2(
IN HANDLE hProcess,
IN DWORD ProcessId,
IN HANDLE hFile,
IN MINIDUMP_TYPE DumpType,
IN CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, OPTIONAL
IN CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, OPTIONAL
IN CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam OPTIONAL
)
{
DumpType = (MINIDUMP_TYPE)((int)DumpType|MiniDumpWithFullMemory|MiniDumpWithHandleData);
return MiniDumpWriteDump(hProcess, ProcessId, hFile, DumpType, ExceptionParam, UserStreamParam, CallbackParam);
}
FARPROC WINAPI GetProcAddress2(HMODULE hModule, LPCSTR lpProcName)
{
if (strcmp(lpProcName, "MiniDumpWriteDump") == 0)
{
return (FARPROC)MiniDumpWriteDump2;
}
return GetProcAddress(hModule, lpProcName);
}
class CrazyWindowsDebugger : public SMGlobalClass
{
public:
void OnSourceModAllInitialized()
{
HANDLE hModuleList = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId());
MODULEENTRY32 me32;
me32.dwSize = sizeof(MODULEENTRY32);
if (!Module32First(hModuleList, &me32))
{
Error("Could not initialize crazy debugger!");
}
bool found = false;
do
{
if (strcasecmp(me32.szModule, "steam.dll") == 0)
{
IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *)me32.modBaseAddr;
if (dos->e_magic != IMAGE_DOS_SIGNATURE)
{
Error("[SM] Could not detect steam.dll with valid DOS signature");
}
char *base = (char *)dos;
IMAGE_NT_HEADERS *nt = (IMAGE_NT_HEADERS *)(base + dos->e_lfanew);
if (nt->Signature != IMAGE_NT_SIGNATURE)
{
Error("[SM] Could not detect steam.dll with valid NT signature");
}
IMAGE_IMPORT_DESCRIPTOR *desc =
(IMAGE_IMPORT_DESCRIPTOR *)
(base + nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);
if (base == (char *)desc)
{
Error("[SM] Could not find the steam.dll IAT");
}
while (desc->Name)
{
if (desc->FirstThunk != 0)
{
IMAGE_THUNK_DATA *data = (IMAGE_THUNK_DATA *)(base + desc->OriginalFirstThunk);
DWORD *iat = (DWORD *)(base + desc->FirstThunk);
while (data->u1.Function)
{
if ((data->u1.Ordinal & IMAGE_ORDINAL_FLAG32) != IMAGE_ORDINAL_FLAG32)
{
IMAGE_IMPORT_BY_NAME *import = (IMAGE_IMPORT_BY_NAME *)(base + data->u1.AddressOfData);
if (strcmp((char *)import->Name, "GetProcAddress") == 0)
{
DWORD oldprot, oldprot2;
VirtualProtect(iat, 4, PAGE_READWRITE, &oldprot);
*iat = (DWORD)GetProcAddress2;
VirtualProtect(iat, 4, oldprot, &oldprot2);
found = true;
goto _end;
}
}
data++;
iat++;
}
}
desc++;
}
break;
}
} while (Module32Next(hModuleList, &me32));
_end:
if (!found)
{
Error("Could not find steam.dll's GetProcAddress IAT entry");
}
CloseHandle(hModuleList);
}
} s_CrazyDebugger;
#endif
+120 -53
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -30,10 +30,11 @@
*/
#include "EventManager.h"
#include "ForwardSys.h"
#include "HandleSys.h"
#include "PluginSys.h"
#include "sm_stringutil.h"
#include "PlayerManager.h"
#include "logic_bridge.h"
#include <bridge/include/IScriptManager.h>
EventManager g_EventManager;
@@ -42,16 +43,26 @@ SH_DECL_HOOK2(IGameEventManager2, FireEvent, SH_NOATTRIB, 0, bool, IGameEvent *,
const ParamType GAMEEVENT_PARAMS[] = {Param_Cell, Param_String, Param_Cell};
typedef List<EventHook *> EventHookList;
class EventForwardFilter : public IForwardFilter
{
EventInfo *pEventInfo;
public:
EventForwardFilter(EventInfo *pEventInfo) : pEventInfo(pEventInfo)
{
}
void Preprocess(IPluginFunction *fun, FwdParamInfo *params)
{
params[2].val = pEventInfo->bDontBroadcast ? 1 : 0;
}
};
EventManager::EventManager() : m_EventType(0)
{
/* Create an event lookup trie */
m_EventHooks = sm_trie_create();
}
EventManager::~EventManager()
{
sm_trie_destroy(m_EventHooks);
/* Free memory used by EventInfo structs if any */
CStack<EventInfo *>::iterator iter;
for (iter = m_FreeEvents.begin(); iter != m_FreeEvents.end(); iter++)
@@ -65,8 +76,8 @@ EventManager::~EventManager()
void EventManager::OnSourceModAllInitialized()
{
/* Add a hook for IGameEventManager2::FireEvent() */
SH_ADD_HOOK_MEMFUNC(IGameEventManager2, FireEvent, gameevents, this, &EventManager::OnFireEvent, false);
SH_ADD_HOOK_MEMFUNC(IGameEventManager2, FireEvent, gameevents, this, &EventManager::OnFireEvent_Post, true);
SH_ADD_HOOK(IGameEventManager2, FireEvent, gameevents, SH_MEMBER(this, &EventManager::OnFireEvent), false);
SH_ADD_HOOK(IGameEventManager2, FireEvent, gameevents, SH_MEMBER(this, &EventManager::OnFireEvent_Post), true);
HandleAccess sec;
@@ -76,17 +87,17 @@ void EventManager::OnSourceModAllInitialized()
sec.access[HandleAccess_Clone] = HANDLE_RESTRICT_IDENTITY | HANDLE_RESTRICT_OWNER;
/* Create the 'GameEvent' handle type */
m_EventType = g_HandleSys.CreateType("GameEvent", this, 0, NULL, &sec, g_pCoreIdent, NULL);
m_EventType = handlesys->CreateType("GameEvent", this, 0, NULL, &sec, g_pCoreIdent, NULL);
}
void EventManager::OnSourceModShutdown()
{
/* Remove hook for IGameEventManager2::FireEvent() */
SH_REMOVE_HOOK_MEMFUNC(IGameEventManager2, FireEvent, gameevents, this, &EventManager::OnFireEvent, false);
SH_REMOVE_HOOK_MEMFUNC(IGameEventManager2, FireEvent, gameevents, this, &EventManager::OnFireEvent_Post, true);
SH_REMOVE_HOOK(IGameEventManager2, FireEvent, gameevents, SH_MEMBER(this, &EventManager::OnFireEvent), false);
SH_REMOVE_HOOK(IGameEventManager2, FireEvent, gameevents, SH_MEMBER(this, &EventManager::OnFireEvent_Post), true);
/* Remove the 'GameEvent' handle type */
g_HandleSys.RemoveType(m_EventType, g_pCoreIdent);
handlesys->RemoveType(m_EventType, g_pCoreIdent);
/* Remove ourselves as listener for events */
gameevents->RemoveListener(this);
@@ -124,12 +135,12 @@ void EventManager::OnPluginUnloaded(IPlugin *plugin)
{
if (pHook->pPreHook)
{
g_Forwards.ReleaseForward(pHook->pPreHook);
forwardsys->ReleaseForward(pHook->pPreHook);
}
if (pHook->pPostHook)
{
g_Forwards.ReleaseForward(pHook->pPostHook);
forwardsys->ReleaseForward(pHook->pPostHook);
}
delete pHook;
@@ -147,6 +158,13 @@ void EventManager::FireGameEvent(IGameEvent *pEvent)
Just need to add ourselves as a listener to make our hook on IGameEventManager2::FireEvent work */
}
#if SOURCE_ENGINE >= SE_LEFT4DEAD
int EventManager::GetEventDebugID()
{
return EVENT_DEBUG_ID_INIT;
}
#endif
EventHookError EventManager::HookEvent(const char *name, IPluginFunction *pFunction, EventHookMode mode)
{
EventHook *pHook;
@@ -163,10 +181,10 @@ EventHookError EventManager::HookEvent(const char *name, IPluginFunction *pFunct
}
/* If a hook structure does not exist... */
if (!sm_trie_retrieve(m_EventHooks, name, (void **)&pHook))
if (!m_EventHooks.retrieve(name, &pHook))
{
EventHookList *pHookList;
IPlugin *plugin = g_PluginSys.GetPluginByCtx(pFunction->GetParentContext()->GetContext());
IPlugin *plugin = scripts->FindPluginByContext(pFunction->GetParentContext()->GetContext());
/* Check plugin for an existing EventHook list */
if (!plugin->GetProperty("EventHooks", (void **)&pHookList))
@@ -181,24 +199,27 @@ EventHookError EventManager::HookEvent(const char *name, IPluginFunction *pFunct
if (mode == EventHookMode_Pre)
{
/* Create forward for a pre hook */
pHook->pPreHook = g_Forwards.CreateForwardEx(NULL, ET_Hook, 3, GAMEEVENT_PARAMS);
pHook->pPreHook = forwardsys->CreateForwardEx(NULL, ET_Hook, 3, GAMEEVENT_PARAMS);
/* Add to forward list */
pHook->pPreHook->AddFunction(pFunction);
} else {
/* Create forward for a post hook */
pHook->pPostHook = g_Forwards.CreateForwardEx(NULL, ET_Ignore, 3, GAMEEVENT_PARAMS);
pHook->pPostHook = forwardsys->CreateForwardEx(NULL, ET_Ignore, 3, GAMEEVENT_PARAMS);
/* Should we copy data from a pre hook to the post hook? */
pHook->postCopy = (mode == EventHookMode_Post);
/* Add to forward list */
pHook->pPostHook->AddFunction(pFunction);
}
/* Cache the name for post hooks */
pHook->name = name;
/* Increase reference count */
pHook->refCount++;
/* Add hook structure to hook lists */
pHookList->push_back(pHook);
sm_trie_insert(m_EventHooks, name, pHook);
m_EventHooks.insert(name, pHook);
return EventHookErr_Okay;
}
@@ -210,7 +231,7 @@ EventHookError EventManager::HookEvent(const char *name, IPluginFunction *pFunct
/* Create pre hook forward if necessary */
if (!pHook->pPreHook)
{
pHook->pPreHook = g_Forwards.CreateForwardEx(NULL, ET_Event, 3, GAMEEVENT_PARAMS);
pHook->pPreHook = forwardsys->CreateForwardEx(NULL, ET_Event, 3, GAMEEVENT_PARAMS);
}
/* Add plugin function to forward list */
@@ -219,7 +240,7 @@ EventHookError EventManager::HookEvent(const char *name, IPluginFunction *pFunct
/* Create post hook forward if necessary */
if (!pHook->pPostHook)
{
pHook->pPostHook = g_Forwards.CreateForwardEx(NULL, ET_Ignore, 3, GAMEEVENT_PARAMS);
pHook->pPostHook = forwardsys->CreateForwardEx(NULL, ET_Ignore, 3, GAMEEVENT_PARAMS);
}
/* If postCopy is false, then we may want to set it to true */
@@ -244,7 +265,7 @@ EventHookError EventManager::UnhookEvent(const char *name, IPluginFunction *pFun
IChangeableForward **pEventForward;
/* If hook does not exist at all */
if (!sm_trie_retrieve(m_EventHooks, name, (void **)&pHook))
if (!m_EventHooks.retrieve(name, &pHook))
{
return EventHookErr_NotActive;
}
@@ -266,7 +287,7 @@ EventHookError EventManager::UnhookEvent(const char *name, IPluginFunction *pFun
/* If forward's list contains 0 functions now, free it */
if ((*pEventForward)->GetFunctionCount() == 0)
{
g_Forwards.ReleaseForward(*pEventForward);
forwardsys->ReleaseForward(*pEventForward);
*pEventForward = NULL;
}
@@ -276,7 +297,7 @@ EventHookError EventManager::UnhookEvent(const char *name, IPluginFunction *pFun
/* If reference count is now 0, free hook structure */
EventHookList *pHookList;
IPlugin *plugin = g_PluginSys.GetPluginByCtx(pFunction->GetParentContext()->GetContext());
IPlugin *plugin = scripts->FindPluginByContext(pFunction->GetParentContext()->GetContext());
/* Get plugin's event hook list */
if (!plugin->GetProperty("EventHooks", (void**)&pHookList))
@@ -294,7 +315,7 @@ EventHookError EventManager::UnhookEvent(const char *name, IPluginFunction *pFun
pHookList->remove(pHook);
/* Delete entry in trie */
sm_trie_delete(m_EventHooks, name);
m_EventHooks.remove(name);
/* And finally free structure memory */
delete pHook;
@@ -321,6 +342,7 @@ EventInfo *EventManager::CreateEvent(IPluginContext *pContext, const char *name,
pInfo->pEvent = pEvent;
pInfo->pOwner = pContext->GetIdentity();
pInfo->bDontBroadcast = false;
return pInfo;
}
@@ -340,6 +362,13 @@ void EventManager::FireEvent(EventInfo *pInfo, bool bDontBroadcast)
m_FreeEvents.push(pInfo);
}
void EventManager::FireEventToClient(EventInfo *pInfo, IClient *pClient)
{
// The IClient vtable is +sizeof(void *) from the IGameEventListener2 (CBaseClient) vtable due to multiple inheritance.
IGameEventListener2 *pGameClient = (IGameEventListener2 *)((intptr_t)pClient - sizeof(void *));
pGameClient->FireGameEvent(pInfo->pEvent);
}
void EventManager::CancelCreatedEvent(EventInfo *pInfo)
{
/* Free event from IGameEventManager2 */
@@ -359,41 +388,64 @@ bool EventManager::OnFireEvent(IGameEvent *pEvent, bool bDontBroadcast)
IChangeableForward *pForward;
const char *name;
cell_t res = Pl_Continue;
/* Get the event name, we're going to need this for passing to post hooks */
name = pEvent->GetName();
bool broadcast = bDontBroadcast;
m_EventNames.push(name);
if (sm_trie_retrieve(m_EventHooks, name, reinterpret_cast<void **>(&pHook)))
/* The engine accepts NULL without crashing, so to prevent a crash in SM we ignore these */
if (!pEvent)
{
RETURN_META_VALUE(MRES_IGNORED, false);
}
name = pEvent->GetName();
if (m_EventHooks.retrieve(name, &pHook))
{
/* Push the event onto the event stack. The reference count is increased to make sure
* the structure is not garbage collected in between now and the post hook.
*/
pHook->refCount++;
m_EventStack.push(pHook);
pForward = pHook->pPreHook;
if (pForward)
{
EventInfo info = { pEvent, NULL };
EventInfo info(pEvent, NULL);
HandleSecurity sec(NULL, g_pCoreIdent);
Handle_t hndl = handlesys->CreateHandle(m_EventType, &info, NULL, g_pCoreIdent, NULL);
info.bDontBroadcast = bDontBroadcast;
EventForwardFilter filter(&info);
Handle_t hndl = g_HandleSys.CreateHandle(m_EventType, &info, NULL, g_pCoreIdent, NULL);
pForward->PushCell(hndl);
pForward->PushString(name);
pForward->PushCell(bDontBroadcast);
pForward->Execute(&res, NULL);
pForward->Execute(&res, &filter);
HandleSecurity sec(NULL, g_pCoreIdent);
g_HandleSys.FreeHandle(hndl, &sec);
broadcast = info.bDontBroadcast;
handlesys->FreeHandle(hndl, &sec);
}
if (pHook->postCopy)
{
pHook->pEventCopy = gameevents->DuplicateEvent(pEvent);
m_EventCopies.push(gameevents->DuplicateEvent(pEvent));
}
if (res)
if (res >= Pl_Handled)
{
gameevents->FreeEvent(pEvent);
RETURN_META_VALUE(MRES_SUPERCEDE, false);
}
}
else
{
m_EventStack.push(NULL);
}
if (broadcast != bDontBroadcast)
RETURN_META_VALUE_NEWPARAMS(MRES_IGNORED, true, &IGameEventManager2::FireEvent, (pEvent, broadcast));
RETURN_META_VALUE(MRES_IGNORED, true);
}
@@ -401,32 +453,38 @@ bool EventManager::OnFireEvent(IGameEvent *pEvent, bool bDontBroadcast)
/* IGameEventManager2::FireEvent post hook */
bool EventManager::OnFireEvent_Post(IGameEvent *pEvent, bool bDontBroadcast)
{
IGameEvent *pEventCopy = NULL;
EventHook *pHook;
EventInfo info;
IChangeableForward *pForward;
const char *name;
Handle_t hndl = 0;
name = m_EventNames.front();
/* The engine accepts NULL without crashing, so to prevent a crash in SM we ignore these */
if (!pEvent)
{
RETURN_META_VALUE(MRES_IGNORED, false);
}
if (sm_trie_retrieve(m_EventHooks, name, reinterpret_cast<void **>(&pHook)))
pHook = m_EventStack.front();
if (pHook != NULL)
{
pForward = pHook->pPostHook;
if (pForward)
{
EventInfo info = { pHook->pEventCopy, NULL };
if (pHook->postCopy)
{
hndl = g_HandleSys.CreateHandle(m_EventType, &info, NULL, g_pCoreIdent, NULL);
info.bDontBroadcast = bDontBroadcast;
info.pEvent = m_EventCopies.front();
info.pOwner = NULL;
hndl = handlesys->CreateHandle(m_EventType, &info, NULL, g_pCoreIdent, NULL);
pForward->PushCell(hndl);
} else {
pForward->PushCell(BAD_HANDLE);
}
pForward->PushString(name);
pForward->PushString(pHook->name.chars());
pForward->PushCell(bDontBroadcast);
pForward->Execute(NULL);
@@ -434,16 +492,25 @@ bool EventManager::OnFireEvent_Post(IGameEvent *pEvent, bool bDontBroadcast)
{
/* Free handle */
HandleSecurity sec(NULL, g_pCoreIdent);
g_HandleSys.FreeHandle(hndl, &sec);
handlesys->FreeHandle(hndl, &sec);
/* Free event structure */
gameevents->FreeEvent(pEventCopy);
pHook->pEventCopy = NULL;
gameevents->FreeEvent(info.pEvent);
m_EventCopies.pop();
}
}
/* Decrement reference count, check if a delayed delete is needed */
if (--pHook->refCount == 0)
{
assert(pHook->pPostHook == NULL);
assert(pHook->pPreHook == NULL);
m_EventHooks.remove(pHook->name.chars());
delete pHook;
}
}
m_EventNames.pop();
m_EventStack.pop();
RETURN_META_VALUE(MRES_IGNORED, true);
}
+29 -7
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -34,19 +34,28 @@
#include "sm_globals.h"
#include "sourcemm_api.h"
#include "sm_trie.h"
#include <sm_namehashset.h>
#include <sh_list.h>
#include <sh_stack.h>
#include <IHandleSys.h>
#include <IForwardSys.h>
#include <IPluginSys.h>
class IClient;
using namespace SourceHook;
struct EventInfo
{
EventInfo()
{
}
EventInfo(IGameEvent *ev, IdentityToken_t *owner) : pEvent(ev), pOwner(owner)
{
}
IGameEvent *pEvent;
IdentityToken_t *pOwner;
bool bDontBroadcast;
};
struct EventHook
@@ -56,14 +65,22 @@ struct EventHook
pPreHook = NULL;
pPostHook = NULL;
postCopy = false;
pEventCopy = NULL;
refCount = 0;
}
IChangeableForward *pPreHook;
IChangeableForward *pPostHook;
bool postCopy;
IGameEvent *pEventCopy;
unsigned int refCount;
ke::AString name;
static inline bool matches(const char *name, const EventHook *hook)
{
return strcmp(name, hook->name.chars()) == 0;
}
static inline uint32_t hash(const detail::CharsAndLength &key)
{
return key.hash();
}
};
enum EventHookMode
@@ -99,6 +116,9 @@ public: // IPluginsListener
void OnPluginUnloaded(IPlugin *plugin);
public: // IGameEventListener2
void FireGameEvent(IGameEvent *pEvent);
#if SOURCE_ENGINE >= SE_LEFT4DEAD
int GetEventDebugID();
#endif
public:
/**
* Get the 'GameEvent' handle type ID.
@@ -112,15 +132,17 @@ public:
EventHookError UnhookEvent(const char *name, IPluginFunction *pFunction, EventHookMode mode=EventHookMode_Post);
EventInfo *CreateEvent(IPluginContext *pContext, const char *name, bool force=false);
void FireEvent(EventInfo *pInfo, bool bDontBroadcast=false);
void FireEventToClient(EventInfo *pInfo, IClient *pClient);
void CancelCreatedEvent(EventInfo *pInfo);
private: // IGameEventManager2 hooks
bool OnFireEvent(IGameEvent *pEvent, bool bDontBroadcast);
bool OnFireEvent_Post(IGameEvent *pEvent, bool bDontBroadcast);
private:
HandleType_t m_EventType;
Trie *m_EventHooks;
NameHashSet<EventHook *> m_EventHooks;
CStack<EventInfo *> m_FreeEvents;
CStack<const char *> m_EventNames;
CStack<EventHook *> m_EventStack;
CStack<IGameEvent *> m_EventCopies;
};
extern EventManager g_EventManager;
+171
View File
@@ -0,0 +1,171 @@
// vim: set ts=4 sw=4 tw=99 noet :
// =============================================================================
// SourceMod
// Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#include "GameHooks.h"
#include "sourcemod.h"
#include "ConVarManager.h"
#include "command_args.h"
#include "provider.h"
#if SOURCE_ENGINE >= SE_ORANGEBOX
SH_DECL_HOOK3_void(ICvar, CallGlobalChangeCallbacks, SH_NOATTRIB, false, ConVar *, const char *, float);
#else
SH_DECL_HOOK2_void(ICvar, CallGlobalChangeCallback, SH_NOATTRIB, false, ConVar *, const char *);
#endif
#if SOURCE_ENGINE != SE_DARKMESSIAH
SH_DECL_HOOK5_void(IServerGameDLL, OnQueryCvarValueFinished, SH_NOATTRIB, 0, QueryCvarCookie_t, edict_t *, EQueryCvarValueStatus, const char *, const char *);
SH_DECL_HOOK5_void(IServerPluginCallbacks, OnQueryCvarValueFinished, SH_NOATTRIB, 0, QueryCvarCookie_t, edict_t *, EQueryCvarValueStatus, const char *, const char *);
#endif
#if SOURCE_ENGINE >= SE_ORANGEBOX
SH_DECL_HOOK1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
#else
SH_DECL_HOOK0_void(ConCommand, Dispatch, SH_NOATTRIB, false);
#endif
SH_DECL_HOOK1_void(IServerGameClients, SetCommandClient, SH_NOATTRIB, false, int);
GameHooks::GameHooks()
: client_cvar_query_mode_(ClientCvarQueryMode::Unavailable),
last_command_client_(-1)
{
}
void GameHooks::Start()
{
// Hook ICvar::CallGlobalChangeCallbacks.
#if SOURCE_ENGINE >= SE_ORANGEBOX
hooks_ += SH_ADD_HOOK(ICvar, CallGlobalChangeCallbacks, icvar, SH_STATIC(OnConVarChanged), false);
#else
hooks_ += SH_ADD_HOOK(ICvar, CallGlobalChangeCallback, icvar, SH_STATIC(OnConVarChanged), false);
#endif
// Episode 2 has this function by default, but the older versions do not.
#if SOURCE_ENGINE == SE_EPISODEONE
if (g_SMAPI->GetGameDLLVersion() >= 6) {
hooks_ += SH_ADD_HOOK(IServerGameDLL, OnQueryCvarValueFinished, gamedll, SH_MEMBER(this, &GameHooks::OnQueryCvarValueFinished), false);
client_cvar_query_mode_ = ClientCvarQueryMode::DLL;
}
#endif
hooks_ += SH_ADD_HOOK(IServerGameClients, SetCommandClient, serverClients, SH_MEMBER(this, &GameHooks::SetCommandClient), false);
}
void GameHooks::OnVSPReceived()
{
if (client_cvar_query_mode_ != ClientCvarQueryMode::Unavailable)
return;
if (g_SMAPI->GetSourceEngineBuild() == SOURCE_ENGINE_ORIGINAL || vsp_version < 2)
return;
#if SOURCE_ENGINE != SE_DARKMESSIAH
hooks_ += SH_ADD_HOOK(IServerPluginCallbacks, OnQueryCvarValueFinished, vsp_interface, SH_MEMBER(this, &GameHooks::OnQueryCvarValueFinished), false);
client_cvar_query_mode_ = ClientCvarQueryMode::VSP;
#endif
}
void GameHooks::Shutdown()
{
for (size_t i = 0; i < hooks_.length(); i++)
SH_REMOVE_HOOK_ID(hooks_[i]);
hooks_.clear();
client_cvar_query_mode_ = ClientCvarQueryMode::Unavailable;
}
#if SOURCE_ENGINE >= SE_ORANGEBOX
void GameHooks::OnConVarChanged(ConVar *pConVar, const char *oldValue, float flOldValue)
#else
void GameHooks::OnConVarChanged(ConVar *pConVar, const char *oldValue)
#endif
{
#if SOURCE_ENGINE < SE_ORANGEBOX
float flOldValue = atof(oldValue);
#endif
g_ConVarManager.OnConVarChanged(pConVar, oldValue, flOldValue);
}
#if SOURCE_ENGINE != SE_DARKMESSIAH
void GameHooks::OnQueryCvarValueFinished(QueryCvarCookie_t cookie, edict_t *pPlayer, EQueryCvarValueStatus result,
const char *cvarName, const char *cvarValue){
int client = IndexOfEdict(pPlayer);
# if SOURCE_ENGINE == SE_CSGO
if (g_Players.HandleConVarQuery(cookie, client, result, cvarName, cvarValue))
return;
# endif
g_ConVarManager.OnClientQueryFinished(cookie, client, result, cvarName, cvarValue);
}
#endif
ke::RefPtr<CommandHook>
GameHooks::AddCommandHook(ConCommand *cmd, const CommandHook::Callback &callback)
{
return new CommandHook(cmd, callback, false);
}
ke::RefPtr<CommandHook>
GameHooks::AddPostCommandHook(ConCommand *cmd, const CommandHook::Callback &callback)
{
return new CommandHook(cmd, callback, true);
}
void GameHooks::SetCommandClient(int client)
{
last_command_client_ = client + 1;
}
CommandHook::CommandHook(ConCommand *cmd, const Callback &callback, bool post)
: hook_id_(0),
callback_(callback)
{
hook_id_ = SH_ADD_HOOK(ConCommand, Dispatch, cmd, SH_MEMBER(this, &CommandHook::Dispatch), post);
}
CommandHook::~CommandHook()
{
if (hook_id_)
SH_REMOVE_HOOK_ID(hook_id_);
}
void CommandHook::Dispatch(DISPATCH_ARGS)
{
DISPATCH_PROLOGUE;
EngineArgs args(command);
AddRef();
bool rval = callback_(sCoreProviderImpl.CommandClient(), &args);
Release();
if (rval)
RETURN_META(MRES_SUPERCEDE);
}
void CommandHook::Zap()
{
hook_id_ = 0;
}
+133
View File
@@ -0,0 +1,133 @@
// vim: set ts=4 sw=4 tw=99 noet :
// =============================================================================
// SourceMod
// Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#ifndef _INCLUDE_SOURCEMOD_PROVIDER_GAME_HOOKS_H_
#define _INCLUDE_SOURCEMOD_PROVIDER_GAME_HOOKS_H_
// Needed for CEntityIndex, edict_t, etc.
#include <stdint.h>
#include <stddef.h>
#include <eiface.h>
#include <iserverplugin.h>
#include <amtl/am-refcounting.h>
#include <amtl/am-vector.h>
#include <amtl/am-function.h>
class ConVar;
class CCommand;
struct CCommandContext;
#if SOURCE_ENGINE >= SE_ORANGEBOX
# define DISPATCH_ARGS const CCommand &command
# define DISPATCH_PROLOGUE
#else
# define DISPATCH_ARGS
# define DISPATCH_PROLOGUE CCommand command
#endif
namespace SourceMod {
// Describes the mechanism in which client cvar queries are implemented.
enum class ClientCvarQueryMode {
Unavailable,
DLL,
VSP
};
class ICommandArgs;
class CommandHook : public ke::Refcounted<CommandHook>
{
public:
// return false to RETURN_META(MRES_IGNORED), or true to SUPERCEDE.
typedef ke::Lambda<bool(int, const ICommandArgs *)> Callback;
public:
CommandHook(ConCommand *cmd, const Callback &callback, bool post);
~CommandHook();
void Dispatch(DISPATCH_ARGS);
void Zap();
private:
int hook_id_;
Callback callback_;
};
class GameHooks
{
public:
GameHooks();
void Start();
void Shutdown();
void OnVSPReceived();
ClientCvarQueryMode GetClientCvarQueryMode() const {
return client_cvar_query_mode_;
}
public:
ke::RefPtr<CommandHook> AddCommandHook(ConCommand *cmd, const CommandHook::Callback &callback);
ke::RefPtr<CommandHook> AddPostCommandHook(ConCommand *cmd, const CommandHook::Callback &callback);
int CommandClient() const {
return last_command_client_;
}
private:
// Static callback that Valve's ConVar object executes when the convar's value changes.
#if SOURCE_ENGINE >= SE_ORANGEBOX
static void OnConVarChanged(ConVar *pConVar, const char *oldValue, float flOldValue);
#else
static void OnConVarChanged(ConVar *pConVar, const char *oldValue);
#endif
// Callback for when StartQueryCvarValue() has finished.
#if SOURCE_ENGINE != SE_DARKMESSIAH
void OnQueryCvarValueFinished(QueryCvarCookie_t cookie, edict_t *pPlayer, EQueryCvarValueStatus result,
const char *cvarName, const char *cvarValue);
#endif
void SetCommandClient(int client);
private:
class HookList : public ke::Vector<int>
{
public:
HookList &operator += (int hook_id) {
this->append(hook_id);
return *this;
}
};
HookList hooks_;
ClientCvarQueryMode client_cvar_query_mode_;
int last_command_client_;
};
} // namespace SourceMod
#endif // _INCLUDE_SOURCEMOD_PROVIDER_GAME_HOOKS_H_
+1050 -100
View File
File diff suppressed because it is too large Load Diff
+185 -20
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2016 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -35,14 +35,24 @@
#include <sh_list.h>
#include <sh_string.h>
#include <sh_tinyhash.h>
#include <sm_trie_tpl.h>
#include "sm_trie.h"
#include <am-utility.h>
#include <am-hashset.h>
#include <am-hashmap.h>
#include <sm_stringhashmap.h>
#include <sm_namehashset.h>
#include "sm_globals.h"
#include "sm_queue.h"
#include <IGameHelpers.h>
#include <KeyValues.h>
#include <server_class.h>
#include <datamap.h>
#include <ihandleentity.h>
#include <tier0/icommandline.h>
#include <string_t.h>
class CCommand;
namespace SourceMod {
class ICommandArgs;
} // namespace SourceMod
using namespace SourceHook;
using namespace SourceMod;
@@ -50,18 +60,79 @@ using namespace SourceMod;
#define HUD_PRINTTALK 3
#define HUD_PRINTCENTER 4
#if defined _WIN32
#define SOURCE_BIN_PREFIX ""
#define SOURCE_BIN_SUFFIX ""
#define SOURCE_BIN_EXT ".dll"
#elif defined __APPLE__
#define SOURCE_BIN_PREFIX ""
#define SOURCE_BIN_SUFFIX ""
#define SOURCE_BIN_EXT ".dylib"
#elif defined __linux__
#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 \
|| SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_LEFT4DEAD2 || SOURCE_ENGINE == SE_NUCLEARDAWN \
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_INSURGENCY || SOURCE_ENGINE == SE_DOI
#define SOURCE_BIN_PREFIX "lib"
#define SOURCE_BIN_SUFFIX "_srv"
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
#define SOURCE_BIN_PREFIX "lib"
#define SOURCE_BIN_SUFFIX ""
#else
#define SOURCE_BIN_PREFIX ""
#define SOURCE_BIN_SUFFIX "_i486"
#endif
#define SOURCE_BIN_EXT ".so"
#endif
#define FORMAT_SOURCE_BIN_NAME(basename) \
(SOURCE_BIN_PREFIX basename SOURCE_BIN_SUFFIX SOURCE_BIN_EXT)
struct DataTableInfo
{
struct SendPropPolicy
{
static inline bool matches(const char *name, const sm_sendprop_info_t &info)
{
return strcmp(name, info.prop->GetName()) == 0;
}
static inline uint32_t hash(const detail::CharsAndLength &key)
{
return key.hash();
}
};
static inline bool matches(const char *name, const DataTableInfo *info)
{
return strcmp(name, info->sc->GetName()) == 0;
}
static inline uint32_t hash(const detail::CharsAndLength &key)
{
return key.hash();
}
DataTableInfo(ServerClass *sc)
: sc(sc)
{
}
ServerClass *sc;
KTrie<sm_sendprop_info_t> lookup;
NameHashSet<sm_sendprop_info_t, SendPropPolicy> lookup;
};
struct DataMapTrie
struct DataMapCachePolicy
{
DataMapTrie() : trie(NULL) {}
Trie *trie;
static inline bool matches(const char *name, const sm_datatable_info_t &info)
{
return strcmp(name, info.prop->fieldName) == 0;
}
static inline uint32_t hash(const detail::CharsAndLength &key)
{
return key.hash();
}
};
typedef NameHashSet<sm_datatable_info_t, DataMapCachePolicy> DataMapCache;
struct DelayedFakeCliCmd
{
String cmd;
@@ -71,59 +142,153 @@ struct DelayedFakeCliCmd
struct CachedCommandInfo
{
const CCommand *args;
#if !defined ORANGEBOX_BUILD
const ICommandArgs *args;
#if SOURCE_ENGINE <= SE_DARKMESSIAH
char cmd[300];
#endif
};
struct DelayedKickInfo
{
int userid;
int client;
char buffer[384];
};
// copy from game/shared/entitylist_base.h
class CEntInfo
{
public:
IHandleEntity *m_pEntity;
int m_SerialNumber;
CEntInfo *m_pPrev;
CEntInfo *m_pNext;
#if SOURCE_ENGINE >= SE_PORTAL2
string_t m_iName;
string_t m_iClassName;
#endif
};
// Corresponds to TF2's eFindMapResult in eiface.h
// Not yet in other games, but eventually in others on same branch.
enum class SMFindMapResult : cell_t {
Found,
NotFound,
FuzzyMatch,
NonCanonical,
PossiblyAvailable
};
class CHalfLife2 :
public SMGlobalClass,
public IGameHelpers
{
friend class AutoEnterCommand;
public:
CHalfLife2();
~CHalfLife2();
public:
void OnSourceModStartup(bool late);
void OnSourceModAllInitialized();
void OnSourceModAllInitialized_Post();
/*void OnSourceModAllShutdown();*/
ConfigResult OnSourceModConfigChanged(const char *key, const char *value,
ConfigSource source, char *error, size_t maxlength) override;
public: //IGameHelpers
SendProp *FindInSendTable(const char *classname, const char *offset);
bool FindSendPropInfo(const char *classname, const char *offset, sm_sendprop_info_t *info);
datamap_t *GetDataMap(CBaseEntity *pEntity);
ServerClass *FindServerClass(const char *classname);
typedescription_t *FindInDataMap(datamap_t *pMap, const char *offset);
bool FindDataMapInfo(datamap_t *pMap, const char *offset, sm_datatable_info_t *pDataTable);
void SetEdictStateChanged(edict_t *pEdict, unsigned short offset);
bool TextMsg(int client, int dest, const char *msg);
bool HintTextMsg(int client, const char *msg);
bool HintTextMsg(cell_t *players, int count, const char *msg);
bool ShowVGUIMenu(int client, const char *name, KeyValues *data, bool show);
bool IsLANServer();
bool KVLoadFromFile(KeyValues *kv, IBaseFileSystem *filesystem, const char *resourceName, const char *pathID = NULL);
edict_t *EdictOfIndex(int index);
int IndexOfEdict(edict_t *pEnt);
edict_t *GetHandleEntity(CBaseHandle &hndl);
void SetHandleEntity(CBaseHandle &hndl, edict_t *pEnt);
const char *GetCurrentMap();
void ServerCommand(const char *buffer);
CBaseEntity *ReferenceToEntity(cell_t entRef);
cell_t EntityToReference(CBaseEntity *pEntity);
cell_t IndexToReference(int entIndex);
int ReferenceToIndex(cell_t entRef);
cell_t ReferenceToBCompatRef(cell_t entRef);
CEntInfo *LookupEntity(int entIndex);
cell_t EntityToBCompatRef(CBaseEntity *pEntity);
void *GetGlobalEntityList();
int GetSendPropOffset(SendProp *prop);
ICommandLine *GetValveCommandLine();
const char *GetEntityClassname(edict_t *pEdict);
const char *GetEntityClassname(CBaseEntity *pEntity);
bool IsMapValid(const char *map);
SMFindMapResult FindMap(char *pMapName, size_t nMapNameMax);
SMFindMapResult FindMap(const char *pMapName, char *pFoundMap = NULL, size_t nMapNameMax = 0);
bool GetMapDisplayName(const char *pMapName, char *pDisplayname, size_t nMapNameMax);
#if SOURCE_ENGINE >= SE_ORANGEBOX
string_t AllocPooledString(const char *pszValue);
#endif
bool GetServerSteam3Id(char *pszOut, size_t len) const override;
uint64_t GetServerSteamId64() const override;
public:
void AddToFakeCliCmdQueue(int client, int userid, const char *cmd);
void ProcessFakeCliCmdQueue();
public:
void PushCommandStack(const CCommand *cmd);
void PopCommandStack();
const CCommand *PeekCommandStack();
const ICommandArgs *PeekCommandStack();
const char *CurrentCommandName();
#if !defined METAMOD_PLAPI_VERSION
bool IsOriginalEngine();
#endif
void AddDelayedKick(int client, int userid, const char *msg);
void ProcessDelayedKicks();
private:
void PushCommandStack(const ICommandArgs *cmd);
void PopCommandStack();
DataTableInfo *_FindServerClass(const char *classname);
private:
Trie *m_pClasses;
List<DataTableInfo *> m_Tables;
THash<datamap_t *, DataMapTrie> m_Maps;
void InitLogicalEntData();
void InitCommandLine();
private:
typedef ke::HashMap<datamap_t *, DataMapCache *, ke::PointerPolicy<datamap_t> > DataTableMap;
NameHashSet<DataTableInfo *> m_Classes;
DataTableMap m_Maps;
int m_MsgTextMsg;
int m_HinTextMsg;
int m_SayTextMsg;
int m_VGUIMenu;
Queue<DelayedFakeCliCmd *> m_CmdQueue;
CStack<DelayedFakeCliCmd *> m_FreeCmds;
CStack<CachedCommandInfo> m_CommandStack;
Queue<DelayedKickInfo> m_DelayedKicks;
void *m_pGetCommandLine;
#if SOURCE_ENGINE == SE_CSGO
public:
bool CanSetCSGOEntProp(const char *pszPropName)
{
return !m_bFollowCSGOServerGuidelines || !m_CSGOBadList.has(pszPropName);
}
private:
ke::HashSet<ke::AString, detail::StringHashMapPolicy> m_CSGOBadList;
bool m_bFollowCSGOServerGuidelines = true;
#endif
};
extern CHalfLife2 g_HL2;
bool IndexToAThings(cell_t, CBaseEntity **pEntData, edict_t **pEdictData);
class AutoEnterCommand
{
public:
AutoEnterCommand(const ICommandArgs *args) {
g_HL2.PushCommandStack(args);
}
~AutoEnterCommand() {
g_HL2.PopCommandStack();
}
};
#endif //_INCLUDE_SOURCEMOD_CHALFLIFE2_H_
+29 -471
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -34,479 +34,37 @@
#include "sourcemm_api.h"
#include "sm_stringutil.h"
#include "Logger.h"
#include "systems/LibrarySys.h"
#include "TimerSys.h"
#include "sm_version.h"
Logger g_Logger;
/**
* :TODO: This should be creating the log folder if it doesn't exist
*/
ConfigResult Logger::OnSourceModConfigChanged(const char *key,
const char *value,
ConfigSource source,
char *error,
size_t maxlength)
{
if (strcasecmp(key, "Logging") == 0)
{
bool state;
if (strcasecmp(value, "on") == 0)
{
state = true;
} else if (strcasecmp(value, "off") == 0) {
state = false;
} else {
UTIL_Format(error, maxlength, "Invalid value: must be \"on\" or \"off\"");
return ConfigResult_Reject;
}
if (source == ConfigSource_Console)
{
state ? EnableLogging() : DisableLogging();
} else {
m_InitialState = state;
}
return ConfigResult_Accept;
} else if (strcasecmp(key, "LogMode") == 0) {
if (strcasecmp(value, "daily") == 0)
{
m_Mode = LoggingMode_Daily;
} else if (strcasecmp(value, "map") == 0) {
m_Mode = LoggingMode_PerMap;
} else if (strcasecmp(value, "game") == 0) {
m_Mode = LoggingMode_Game;
} else {
UTIL_Format(error, maxlength, "Invalid value: must be [daily|map|game]");
return ConfigResult_Reject;
}
return ConfigResult_Accept;
}
return ConfigResult_Ignore;
}
void Logger::OnSourceModStartup(bool late)
{
InitLogger(m_Mode);
}
void Logger::OnSourceModAllShutdown()
{
CloseLogger();
}
void Logger::OnSourceModLevelChange(const char *mapName)
{
MapChange(mapName);
}
void Logger::_NewMapFile()
{
if (!m_Active)
{
return;
}
/* Append "Log file closed" to previous log file */
_CloseFile();
char _filename[256];
int i = 0;
time_t t;
GetAdjustedTime(&t);
tm *curtime = localtime(&t);
while (true)
{
g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/L%02d%02d%03d.log", curtime->tm_mon + 1, curtime->tm_mday, i);
FILE *fp = fopen(_filename, "r");
if (!fp)
{
break;
}
fclose(fp);
i++;
}
m_NrmFileName.assign(_filename);
FILE *fp = fopen(m_NrmFileName.c_str(), "w");
if (!fp)
{
char error[255];
g_LibSys.GetPlatformError(error, sizeof(error));
LogFatal("[SM] Unexpected fatal logging error (file \"%s\")", m_NrmFileName.c_str());
LogFatal("[SM] Platform returned error: \"%s\"", error);
LogFatal("[SM] Logging has been disabled.");
m_Active = false;
return;
} else {
char date[32];
strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime);
fprintf(fp, "L %s: SourceMod log file started (file \"L%02d%02d%03d.log\") (Version \"%s\")\n", date, curtime->tm_mon + 1, curtime->tm_mday, i, SVN_FULL_VERSION);
fclose(fp);
}
}
void Logger::_CloseFile()
{
if (!m_Active)
{
return;
}
FILE *fp = NULL;
if (!m_NrmFileName.empty())
{
fp = fopen(m_NrmFileName.c_str(), "r+");
if (fp)
{
fseek(fp, 0, SEEK_END);
LogMessage("Log file closed.");
fclose(fp);
}
m_NrmFileName.clear();
}
if (!m_ErrMapStart)
{
return;
}
fp = fopen(m_ErrFileName.c_str(), "r+");
if (fp)
{
fseek(fp, 0, SEEK_END);
LogError("Error log file session closed.");
fclose(fp);
}
m_ErrFileName.clear();
}
void Logger::InitLogger(LoggingMode mode)
{
m_Mode = mode;
m_Active = m_InitialState;
time_t t;
GetAdjustedTime(&t);
tm *curtime = localtime(&t);
m_CurDay = curtime->tm_mday;
char _filename[256];
g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/errors_%04d%02d%02d.log", curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday);
m_ErrFileName.assign(_filename);
switch (m_Mode)
{
case LoggingMode_PerMap:
{
if (!m_Active)
{
m_DelayedStart = true;
}
break;
}
case LoggingMode_Daily:
{
g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/L%04d%02d%02d.log", curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday);
m_NrmFileName.assign(_filename);
m_DailyPrintHdr = true;
break;
}
default:
{
/* do nothing... */
break;
}
}
}
void Logger::CloseLogger()
{
_CloseFile();
}
void Logger::LogToOpenFile(FILE *fp, const char *msg, ...)
{
if (!m_Active)
{
return;
}
va_list ap;
va_start(ap, msg);
LogToOpenFileEx(fp, msg, ap);
va_end(ap);
}
void Logger::LogToOpenFileEx(FILE *fp, const char *msg, va_list ap)
{
if (!m_Active)
{
return;
}
char buffer[3072];
UTIL_FormatArgs(buffer, sizeof(buffer), msg, ap);
char date[32];
time_t t;
GetAdjustedTime(&t);
tm *curtime = localtime(&t);
strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime);
fprintf(fp, "L %s: %s\n", date, buffer);
g_SMAPI->ConPrintf("L %s: %s\n", date, buffer);
}
void Logger::LogMessage(const char *vafmt, ...)
{
if (!m_Active)
{
return;
}
if (m_Mode == LoggingMode_Game)
{
va_list ap;
va_start(ap, vafmt);
_PrintToGameLog(vafmt, ap);
va_end(ap);
return;
}
if (m_DelayedStart)
{
m_DelayedStart = false;
_NewMapFile();
}
time_t t;
GetAdjustedTime(&t);
tm *curtime = localtime(&t);
FILE *fp = NULL;
if (m_Mode == LoggingMode_PerMap)
{
fp = fopen(m_NrmFileName.c_str(), "a+");
if (!fp)
{
_NewMapFile();
fp = fopen(m_NrmFileName.c_str(), "a+");
if (!fp)
{
goto print_error;
}
}
} else {
if (m_CurDay != curtime->tm_mday)
{
char _filename[256];
g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/L%04d%02d%02d.log", curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday);
m_NrmFileName.assign(_filename);
m_CurDay = curtime->tm_mday;
m_DailyPrintHdr = true;
}
fp = fopen(m_NrmFileName.c_str(), "a+");
}
if (fp)
{
if (m_DailyPrintHdr)
{
char date[32];
m_DailyPrintHdr = false;
strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime);
fprintf(fp, "L %s: SourceMod log file session started (file \"L%04d%02d%02d.log\") (Version \"%s\")\n", date, curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday, SVN_FULL_VERSION);
}
va_list ap;
va_start(ap, vafmt);
LogToOpenFileEx(fp, vafmt, ap);
va_end(ap);
fclose(fp);
} else {
goto print_error;
}
return;
print_error:
char error[255];
g_LibSys.GetPlatformError(error, sizeof(error));
LogFatal("[SM] Unexpected fatal logging error (file \"%s\")", m_NrmFileName.c_str());
LogFatal("[SM] Platform returned error: \"%s\"", error);
LogFatal("[SM] Logging has been disabled.");
m_Active = false;
}
void Logger::LogError(const char *vafmt, ...)
{
if (!m_Active)
{
return;
}
time_t t;
GetAdjustedTime(&t);
tm *curtime = localtime(&t);
if (curtime->tm_mday != m_CurDay)
{
char _filename[256];
g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/errors_%04d%02d%02d.log", curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday);
m_ErrFileName.assign(_filename);
m_CurDay = curtime->tm_mday;
m_ErrMapStart = false;
}
FILE *fp = fopen(m_ErrFileName.c_str(), "a+");
if (fp)
{
if (!m_ErrMapStart)
{
char date[32];
strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime);
fprintf(fp, "L %s: SourceMod error session started\n", date);
fprintf(fp, "L %s: Info (map \"%s\") (file \"errors_%04d%02d%02d.log\")\n", date, m_CurMapName.c_str(), curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday);
m_ErrMapStart = true;
}
va_list ap;
va_start(ap, vafmt);
LogToOpenFileEx(fp, vafmt, ap);
va_end(ap);
fclose(fp);
}
else
{
char error[255];
g_LibSys.GetPlatformError(error, sizeof(error));
LogFatal("[SM] Unexpected fatal logging error (file \"%s\")", m_NrmFileName.c_str());
LogFatal("[SM] Platform returned error: \"%s\"", error);
LogFatal("[SM] Logging has been disabled.");
m_Active = false;
return;
}
}
void Logger::MapChange(const char *mapname)
{
m_CurMapName.assign(mapname);
switch (m_Mode)
{
case LoggingMode_Daily:
{
LogMessage("-------- Mapchange to %s --------", mapname);
break;
}
case LoggingMode_PerMap:
{
_NewMapFile();
break;
}
default:
{
/* Do nothing... */
break;
}
}
if (m_ErrMapStart)
{
LogError("Error log file session closed.");
}
m_ErrMapStart = false;
}
void Logger::_PrintToGameLog(const char *fmt, va_list ap)
{
char msg[3072];
size_t len;
len = vsnprintf(msg, sizeof(msg)-2, fmt, ap);
len = (len >= sizeof(msg)) ? (sizeof(msg) - 2) : len;
msg[len++] = '\n';
msg[len] = '\0';
Engine_LogPrintWrapper(msg);
}
const char *Logger::GetLogFileName(LogType type) const
{
switch (type)
{
case LogType_Normal:
{
return m_NrmFileName.c_str();
}
case LogType_Error:
{
return m_ErrFileName.c_str();
}
default:
{
return "";
}
}
}
LoggingMode Logger::GetLoggingMode() const
{
return m_Mode;
}
void Logger::EnableLogging()
{
if (m_Active)
{
return;
}
m_Active = true;
LogMessage("[SM] Logging enabled manually by user.");
}
void Logger::DisableLogging()
{
if (!m_Active)
{
return;
}
LogMessage("[SM] Logging disabled manually by user.");
m_Active = false;
}
void Logger::LogFatal(const char *msg, ...)
{
/* :TODO: make this print all pretty-like
* In fact, the pretty log printing function should be abstracted.
* It's already implemented twice which is bad.
*/
va_list ap;
char path[PLATFORM_MAX_PATH];
g_SourceMod.BuildPath(Path_Game, path, sizeof(path), "sourcemod_fatal.log");
FILE *fp = fopen(path, "at");
if (fp)
{
m_Active = true;
va_start(ap, msg);
LogToOpenFileEx(fp, msg, ap);
va_end(ap);
m_Active = false;
fclose(fp);
}
}
#include "logic_bridge.h"
#include <sourcemod_version.h>
#include <bridge/include/IProviderCallbacks.h>
bool g_in_game_log_hook = false;
static LoggerCore g_LoggerCore;
SH_DECL_HOOK1_void(IVEngineServer, LogPrint, SH_NOATTRIB, false, const char *);
static void HookLogPrint(const char *message)
{
g_in_game_log_hook = true;
bool stopped = logicore.callbacks->OnLogPrint(message);
g_in_game_log_hook = false;
if (stopped)
RETURN_META(MRES_SUPERCEDE);
}
void LoggerCore::OnSourceModStartup(bool late)
{
SH_ADD_HOOK(IVEngineServer, LogPrint, engine, SH_STATIC(HookLogPrint), false);
}
void LoggerCore::OnSourceModAllShutdown()
{
SH_REMOVE_HOOK(IVEngineServer, LogPrint, engine, SH_STATIC(HookLogPrint), false);
}
void Engine_LogPrintWrapper(const char *msg)
{
if (g_in_game_log_hook)
+2 -58
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -38,69 +38,13 @@
using namespace SourceHook;
enum LogType
class LoggerCore : public SMGlobalClass
{
LogType_Normal,
LogType_Error
};
enum LoggingMode
{
LoggingMode_Daily,
LoggingMode_PerMap,
LoggingMode_Game
};
class Logger : public SMGlobalClass
{
public:
Logger() : m_Mode(LoggingMode_Daily), m_ErrMapStart(false),
m_Active(false), m_DelayedStart(false), m_DailyPrintHdr(false),
m_InitialState(true)
{
}
public: //SMGlobalClass
ConfigResult OnSourceModConfigChanged(const char *key,
const char *value,
ConfigSource source,
char *error,
size_t maxlength);
void OnSourceModStartup(bool late);
void OnSourceModAllShutdown();
void OnSourceModLevelChange(const char *mapName);
public:
void InitLogger(LoggingMode mode);
void CloseLogger();
void EnableLogging();
void DisableLogging();
void LogMessage(const char *msg, ...);
void LogError(const char *msg, ...);
void LogFatal(const char *msg, ...);
void LogToOpenFile(FILE *fp, const char *msg, ...);
void LogToOpenFileEx(FILE *fp, const char *msg, va_list ap);
void MapChange(const char *mapname);
const char *GetLogFileName(LogType type) const;
LoggingMode GetLoggingMode() const;
private:
void _CloseFile();
void _NewMapFile();
void _PrintToGameLog(const char *fmt, va_list ap);
private:
String m_NrmFileName;
String m_ErrFileName;
String m_CurMapName;
LoggingMode m_Mode;
int m_CurDay;
bool m_ErrMapStart;
bool m_Active;
bool m_DelayedStart;
bool m_DailyPrintHdr;
bool m_InitialState;
};
void Engine_LogPrintWrapper(const char *msg);
extern bool g_in_game_log_hook;
extern Logger g_Logger;
#endif // _INCLUDE_SOURCEMOD_CLOGGER_H_
-133
View File
@@ -1,133 +0,0 @@
#(C)2004-2008 Metamod:Source Development Team
# Makefile written by David "BAILOPAN" Anderson
#Local paths
HL2SDK_ORIG = ../../hl2sdk
HL2SDK_OB = ../../hl2sdk-ob
SOURCEMM14 = ../../sourcemm-1.4
SOURCEMM16 = ../../sourcemm-1.6
SRCDS_BASE = ~/srcds
SMSDK = ..
#Project options
OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
GCC4_FLAGS = -fvisibility=hidden
GCC4_CPP_FLAGS = -fvisibility-inlines-hidden
DEBUG_FLAGS = -g -ggdb3
CPP = gcc-4.1
OBJECTS = AdminCache.cpp CDataPack.cpp ConCmdManager.cpp ConVarManager.cpp CoreConfig.cpp \
Database.cpp DebugReporter.cpp EventManager.cpp GameConfigs.cpp HalfLife2.cpp Logger.cpp \
MemoryUtils.cpp PlayerManager.cpp TextParsers.cpp TimerSys.cpp Translator.cpp UserMessages.cpp \
sm_autonatives.cpp sm_memtable.cpp sm_srvcmds.cpp sm_stringutil.cpp sm_trie.cpp \
sourcemm_api.cpp sourcemod.cpp MenuStyle_Base.cpp MenuStyle_Valve.cpp MenuManager.cpp \
MenuStyle_Radio.cpp ChatTriggers.cpp ADTFactory.cpp MenuVoting.cpp sm_crc32.cpp \
frame_hooks.cpp concmd_cleaner.cpp Profiler.cpp
OBJECTS += smn_admin.cpp smn_bitbuffer.cpp smn_console.cpp smn_core.cpp \
smn_datapacks.cpp smn_entities.cpp smn_events.cpp smn_fakenatives.cpp \
smn_filesystem.cpp smn_float.cpp smn_functions.cpp smn_gameconfigs.cpp smn_halflife.cpp \
smn_handles.cpp smn_keyvalues.cpp smn_banning.cpp smn_maplists.cpp \
smn_lang.cpp smn_player.cpp smn_string.cpp smn_sorting.cpp smn_textparse.cpp smn_timers.cpp \
smn_usermsgs.cpp smn_menus.cpp smn_database.cpp smn_vector.cpp smn_adt_array.cpp \
smn_adt_trie.cpp smn_hudtext.cpp
OBJECTS += systems/ExtensionSys.cpp systems/ForwardSys.cpp systems/HandleSys.cpp \
systems/LibrarySys.cpp systems/PluginInfoDatabase.cpp systems/PluginSys.cpp \
systems/ShareSys.cpp vm/sp_vm_basecontext.cpp vm/sp_vm_function.cpp
OBJECTS += thread/ThreadWorker.cpp thread/BaseWorker.cpp thread/PosixThreads.cpp ThreadSupport.cpp
OBJECTS_C = zlib/adler32.c zlib/compress.c zlib/crc32.c zlib/deflate.c zlib/gzio.c \
zlib/infback.c zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c \
zlib/uncompr.c zlib/zutil.c
OBJECTS_SM16 = vm/sp_vm_engine.cpp
ifeq "$(ENGINE)" "original"
HL2SDK = $(HL2SDK_ORIG)
HL2PUB = $(HL2SDK_ORIG)/public
HL2LIB = $(HL2SDK)/linux_sdk
METAMOD = $(SOURCEMM14)
INCLUDE += -I$(HL2PUB)/dlls
SRCDS = $(SRCDS_BASE)
BINARY = sourcemod.1.ep1.so
endif
ifeq "$(ENGINE)" "orangebox"
HL2SDK = $(HL2SDK_OB)
HL2PUB = $(HL2SDK_OB)/public
HL2LIB = $(HL2SDK)/linux_sdk
CFLAGS += -DORANGEBOX_BUILD
METAMOD = $(SOURCEMM16)
INCLUDE += -I$(HL2PUB)/game/server
SRCDS = $(SRCDS_BASE)/orangebox
BINARY = sourcemod.2.ep2.so
endif
ifeq "$(BINARY)" ""
echo "You must supply ENGINE=orangebox or ENGINE=original"
false
endif
LINK += $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a vstdlib_i486.so \
tier0_i486.so -lpthread -static-libgcc
INCLUDE_SMSDK = -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn -I$(SMSDK)/public/extensions
INCLUDE += -I. -I.. -I$(HL2PUB) -I$(HL2PUB)/dlls -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \
-I$(HL2PUB)/vstdlib -I$(HL2SDK)/tier1 -I$(METAMOD) -I$(METAMOD)/sourcehook -I$(METAMOD)/sourcemm \
-I$(HL2PUB)/mathlib -Isystems $(INCLUDE_SMSDK)
SM16_INCLUDE = -I. -I.. -I$(SOURCEMM16)/sourcehook $(INCLUDE_SMSDK)
ifeq "$(DEBUG)" "true"
BIN_DIR = Debug.$(ENGINE)
CFLAGS += $(DEBUG_FLAGS)
else
BIN_DIR = Release.$(ENGINE)
CFLAGS += $(OPT_FLAGS)
endif
GCC_VERSION := $(shell $(CPP) -dumpversion >&1 | cut -b1)
CFLAGS += -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp \
-Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca \
-Dstrcmpi=strcasecmp -Wall -Wno-uninitialized -Werror -mfpmath=sse -msse \
-DSOURCEMOD_BUILD -DSM_DEFAULT_THREADER -m32
CPPFLAGS = -Wno-non-virtual-dtor -fno-exceptions -fno-rtti
ifeq "$(GCC_VERSION)" "4"
CFLAGS += $(GCC4_FLAGS)
CPPFLAGS += $(GCC4_CPP_FLAGS)
endif
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.ox)
OBJ_LINUX_C := $(OBJECTS_C:%.c=$(BIN_DIR)/%.oc)
OBJ_LINUX_SM16 := $(OBJECTS_SM16:%.cpp=$(BIN_DIR)/%.ok)
$(BIN_DIR)/%.ox: %.cpp
$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
$(BIN_DIR)/%.oc: %.c
$(CPP) $(INCLUDE) $(CFLAGS) -o $@ -c $<
$(BIN_DIR)/%.ok: %.cpp
$(CPP) $(SM16_INCLUDE) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
all:
mkdir -p $(BIN_DIR)/systems
mkdir -p $(BIN_DIR)/vm
mkdir -p $(BIN_DIR)/zlib
mkdir -p $(BIN_DIR)/thread
ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so
ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so
$(MAKE) -f Makefile sourcemod
sourcemod: $(OBJ_LINUX) $(OBJ_LINUX_C) $(OBJ_LINUX_SM16)
$(CPP) $(OBJ_LINUX) $(OBJ_LINUX_C) $(OBJ_LINUX_SM16) $(LINK) -m32 -shared -ldl -lm -o$(BIN_DIR)/$(BINARY)
default: all
clean:
rm -rf $(BIN_DIR)/*.ox
rm -rf $(BIN_DIR)/systems/*.ox
rm -rf $(BIN_DIR)/zlib/*.oc
rm -rf $(BIN_DIR)/vm/*.ox
rm -rf $(BIN_DIR)/thread/*.ox
rm -rf $(BIN_DIR)/$(BINARY)
-220
View File
@@ -1,220 +0,0 @@
/**
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#include "MemoryUtils.h"
#include "ShareSys.h"
#ifdef PLATFORM_LINUX
#include <string.h>
#include <elf.h>
#endif
MemoryUtils g_MemUtils;
#if 0
MemoryUtils::MemoryUtils()
{
#ifdef PLATFORM_WINDOWS
SYSTEM_INFO info;
GetSystemInfo(&info);
m_PageSize = info.dwPageSize;
#elif defined PLATFORM_POSIX
m_PageSize = sysconf(_SC_PAGE_SIZE);
#endif
}
#endif
void MemoryUtils::OnSourceModAllInitialized()
{
g_ShareSys.AddInterface(NULL, this);
}
void *MemoryUtils::FindPattern(const void *libPtr, const char *pattern, size_t len)
{
DynLibInfo lib;
bool found;
char *ptr, *end;
memset(&lib, 0, sizeof(DynLibInfo));
if (!GetLibraryInfo(libPtr, lib))
{
return NULL;
}
ptr = reinterpret_cast<char *>(lib.baseAddress);
end = ptr + lib.memorySize;
while (ptr < end)
{
found = true;
for (register size_t i = 0; i < len; i++)
{
if (pattern[i] != '\x2A' && pattern[i] != ptr[i])
{
found = false;
break;
}
}
if (found)
return ptr;
ptr++;
}
return NULL;
}
bool MemoryUtils::GetLibraryInfo(const void *libPtr, DynLibInfo &lib)
{
unsigned long baseAddr;
if (libPtr == NULL)
{
return false;
}
#ifdef PLATFORM_WINDOWS
MEMORY_BASIC_INFORMATION info;
IMAGE_DOS_HEADER *dos;
IMAGE_NT_HEADERS *pe;
IMAGE_FILE_HEADER *file;
IMAGE_OPTIONAL_HEADER *opt;
if (!VirtualQuery(libPtr, &info, sizeof(MEMORY_BASIC_INFORMATION)))
{
return false;
}
baseAddr = reinterpret_cast<unsigned long>(info.AllocationBase);
/* All this is for our insane sanity checks :o */
dos = reinterpret_cast<IMAGE_DOS_HEADER *>(baseAddr);
pe = reinterpret_cast<IMAGE_NT_HEADERS *>(baseAddr + dos->e_lfanew);
file = &pe->FileHeader;
opt = &pe->OptionalHeader;
/* Check PE magic and signature */
if (dos->e_magic != IMAGE_DOS_SIGNATURE || pe->Signature != IMAGE_NT_SIGNATURE || opt->Magic != IMAGE_NT_OPTIONAL_HDR32_MAGIC)
{
return false;
}
/* Check architecture, which is 32-bit/x86 right now
* Should change this for 64-bit if Valve gets their act together
*/
if (file->Machine != IMAGE_FILE_MACHINE_I386)
{
return false;
}
/* For our purposes, this must be a dynamic library */
if ((file->Characteristics & IMAGE_FILE_DLL) == 0)
{
return false;
}
/* Finally, we can do this */
lib.memorySize = opt->SizeOfImage;
#elif defined PLATFORM_LINUX
Dl_info info;
Elf32_Ehdr *file;
Elf32_Phdr *phdr;
uint16_t phdrCount;
if (!dladdr(libPtr, &info))
{
return false;
}
if (!info.dli_fbase || !info.dli_fname)
{
return false;
}
/* This is for our insane sanity checks :o */
baseAddr = reinterpret_cast<unsigned long>(info.dli_fbase);
file = reinterpret_cast<Elf32_Ehdr *>(baseAddr);
/* Check ELF magic */
if (memcmp(ELFMAG, file->e_ident, SELFMAG) != 0)
{
return false;
}
/* Check ELF version */
if (file->e_ident[EI_VERSION] != EV_CURRENT)
{
return false;
}
/* Check ELF architecture, which is 32-bit/x86 right now
* Should change this for 64-bit if Valve gets their act together
*/
if (file->e_ident[EI_CLASS] != ELFCLASS32 || file->e_machine != EM_386 || file->e_ident[EI_DATA] != ELFDATA2LSB)
{
return false;
}
/* For our purposes, this must be a dynamic library/shared object */
if (file->e_type != ET_DYN)
{
return false;
}
phdrCount = file->e_phnum;
phdr = reinterpret_cast<Elf32_Phdr *>(baseAddr + file->e_phoff);
/* Add up the memory sizes of segments marked as PT_LOAD as those are the only ones that should be in memory */
for (uint16_t i = 0; i < phdrCount; i++)
{
Elf32_Phdr &hdr = phdr[i];
if (hdr.p_type == PT_LOAD)
{
lib.memorySize += hdr.p_memsz;
}
}
#endif
lib.baseAddress = reinterpret_cast<void *>(baseAddr);
return true;
}
+65 -18
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -38,9 +38,8 @@
#include "sourcemm_api.h"
#include "PlayerManager.h"
#include "MenuStyle_Valve.h"
#include "ShareSys.h"
#include "HandleSys.h"
#include "sourcemm_api.h"
#include "logic_bridge.h"
MenuManager g_Menus;
VoteMenuHandler s_VoteHandler;
@@ -55,24 +54,24 @@ MenuManager::MenuManager()
void MenuManager::OnSourceModAllInitialized()
{
g_ShareSys.AddInterface(NULL, this);
sharesys->AddInterface(NULL, this);
HandleAccess access;
g_HandleSys.InitAccessDefaults(NULL, &access);
handlesys->InitAccessDefaults(NULL, &access);
/* Deny cloning to menus */
access.access[HandleAccess_Clone] = HANDLE_RESTRICT_OWNER|HANDLE_RESTRICT_IDENTITY;
m_MenuType = g_HandleSys.CreateType("IBaseMenu", this, 0, NULL, &access, g_pCoreIdent, NULL);
m_MenuType = handlesys->CreateType("IBaseMenu", this, 0, NULL, &access, g_pCoreIdent, NULL);
/* Also deny deletion to styles */
access.access[HandleAccess_Delete] = HANDLE_RESTRICT_OWNER|HANDLE_RESTRICT_IDENTITY;
m_StyleType = g_HandleSys.CreateType("IMenuStyle", this, 0, NULL, &access, g_pCoreIdent, NULL);
m_StyleType = handlesys->CreateType("IMenuStyle", this, 0, NULL, &access, g_pCoreIdent, NULL);
}
void MenuManager::OnSourceModAllShutdown()
{
g_HandleSys.RemoveType(m_MenuType, g_pCoreIdent);
g_HandleSys.RemoveType(m_StyleType, g_pCoreIdent);
handlesys->RemoveType(m_MenuType, g_pCoreIdent);
handlesys->RemoveType(m_StyleType, g_pCoreIdent);
}
void MenuManager::OnHandleDestroy(HandleType_t type, void *object)
@@ -111,7 +110,7 @@ Handle_t MenuManager::CreateMenuHandle(IBaseMenu *menu, IdentityToken_t *pOwner)
return BAD_HANDLE;
}
return g_HandleSys.CreateHandle(m_MenuType, menu, pOwner, g_pCoreIdent, NULL);
return handlesys->CreateHandle(m_MenuType, menu, pOwner, g_pCoreIdent, NULL);
}
Handle_t MenuManager::CreateStyleHandle(IMenuStyle *style)
@@ -121,7 +120,7 @@ Handle_t MenuManager::CreateStyleHandle(IMenuStyle *style)
return BAD_HANDLE;
}
return g_HandleSys.CreateHandle(m_StyleType, style, g_pCoreIdent, g_pCoreIdent, NULL);
return handlesys->CreateHandle(m_StyleType, style, g_pCoreIdent, g_pCoreIdent, NULL);
}
HandleError MenuManager::ReadMenuHandle(Handle_t handle, IBaseMenu **menu)
@@ -131,7 +130,7 @@ HandleError MenuManager::ReadMenuHandle(Handle_t handle, IBaseMenu **menu)
sec.pIdentity = g_pCoreIdent;
sec.pOwner = NULL;
return g_HandleSys.ReadHandle(handle, m_MenuType, &sec, (void **)menu);
return handlesys->ReadHandle(handle, m_MenuType, &sec, (void **)menu);
}
HandleError MenuManager::ReadStyleHandle(Handle_t handle, IMenuStyle **style)
@@ -141,7 +140,7 @@ HandleError MenuManager::ReadStyleHandle(Handle_t handle, IMenuStyle **style)
sec.pIdentity = g_pCoreIdent;
sec.pOwner = g_pCoreIdent;
return g_HandleSys.ReadHandle(handle, m_StyleType, &sec, (void **)style);
return handlesys->ReadHandle(handle, m_StyleType, &sec, (void **)style);
}
bool MenuManager::SetDefaultStyle(IMenuStyle *style)
@@ -230,6 +229,7 @@ IMenuPanel *MenuManager::RenderMenu(int client, menu_states_t &md, ItemOrder ord
unsigned int pgn = menu->GetPagination();
unsigned int maxItems = style->GetMaxPageItems();
bool exitButton = (menu->GetMenuOptionFlags() & MENUFLAG_BUTTON_EXIT) == MENUFLAG_BUTTON_EXIT;
bool novoteButton = (menu->GetMenuOptionFlags() & MENUFLAG_BUTTON_NOVOTE) == MENUFLAG_BUTTON_NOVOTE;
if (pgn != MENU_NO_PAGINATION)
{
@@ -240,6 +240,11 @@ IMenuPanel *MenuManager::RenderMenu(int client, menu_states_t &md, ItemOrder ord
maxItems--;
}
if (novoteButton)
{
maxItems--;
}
/* This is very not allowed! */
if (maxItems < 2)
{
@@ -435,6 +440,20 @@ skip_search:
/* Draw the item according to the order */
menu_slots_t *slots = md.slots;
unsigned int position = 0; /* Keep track of the last position */
if (novoteButton)
{
char text[50];
if (!logicore.CoreTranslate(text, sizeof(text), "%T", 2, NULL, "No Vote", &client))
{
ke::SafeStrcpy(text, sizeof(text), "No Vote");
}
ItemDrawInfo dr(text, 0);
position = panel->DrawItem(dr);
slots[position].type = ItemSel_Exit;
position++;
}
if (order == ItemOrder_Ascending)
{
md.item_on_page = drawItems[0].position;
@@ -551,7 +570,7 @@ skip_search:
/* If there are no control options,
* Instead just pad with invisible slots.
*/
if (!displayPrev && !displayPrev)
if (!displayNext && !displayPrev)
{
padItem.style = ITEMDRAW_NOTEXT;
}
@@ -585,14 +604,20 @@ skip_search:
{
if (exitBackButton)
{
CorePlayerTranslate(client, text, sizeof(text), "Back", NULL);
if (!logicore.CoreTranslate(text, sizeof(text), "%T", 2, NULL, "Back", &client))
{
ke::SafeStrcpy(text, sizeof(text), "Back");
}
dr.style = ITEMDRAW_CONTROL;
position = panel->DrawItem(dr);
slots[position].type = ItemSel_ExitBack;
}
else
{
CorePlayerTranslate(client, text, sizeof(text), "Previous", NULL);
if (!logicore.CoreTranslate(text, sizeof(text), "%T", 2, NULL, "Previous", &client))
{
ke::SafeStrcpy(text, sizeof(text), "Previous");
}
dr.style = (displayPrev ? 0 : ITEMDRAW_DISABLED)|ITEMDRAW_CONTROL;
position = panel->DrawItem(dr);
slots[position].type = ItemSel_Back;
@@ -610,7 +635,10 @@ skip_search:
/* NEXT */
if (displayNext || canDrawDisabled)
{
CorePlayerTranslate(client, text, sizeof(text), "Next", NULL);
if (!logicore.CoreTranslate(text, sizeof(text), "%T", 2, NULL, "Next", &client))
{
ke::SafeStrcpy(text, sizeof(text), "Next");
}
dr.style = (displayNext ? 0 : ITEMDRAW_DISABLED)|ITEMDRAW_CONTROL;
position = panel->DrawItem(dr);
slots[position].type = ItemSel_Next;
@@ -638,7 +666,10 @@ skip_search:
/* EXIT */
if (exitButton)
{
CorePlayerTranslate(client, text, sizeof(text), "Exit", NULL);
if (!logicore.CoreTranslate(text, sizeof(text), "%T", 2, NULL, "Exit", &client))
{
ke::SafeStrcpy(text, sizeof(text), "Exit");
}
dr.style = ITEMDRAW_CONTROL;
position = panel->DrawItem(dr);
slots[position].type = ItemSel_Exit;
@@ -777,3 +808,19 @@ unsigned int MenuManager::GetRemainingVoteDelay()
{
return s_VoteHandler.GetRemainingVoteDelay();
}
bool MenuManager::IsClientInVotePool(int client)
{
return s_VoteHandler.IsClientInVotePool(client);
}
bool MenuManager::RedrawClientVoteMenu(int client)
{
return RedrawClientVoteMenu2(client, true);
}
bool MenuManager::RedrawClientVoteMenu2(int client, bool revote)
{
return s_VoteHandler.RedrawToClient(client, revote);
}
+4 -2
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -37,7 +37,6 @@
#include <sh_stack.h>
#include <sh_list.h>
#include <sh_string.h>
#include "sm_memtable.h"
#include "sm_globals.h"
using namespace SourceMod;
@@ -89,6 +88,9 @@ public:
bool IsVoteInProgress();
void CancelVoting();
unsigned int GetRemainingVoteDelay();
bool IsClientInVotePool(int client);
bool RedrawClientVoteMenu(int client);
bool RedrawClientVoteMenu2(int client, bool revote);
public: //IHandleTypeDispatch
void OnHandleDestroy(HandleType_t type, void *object);
bool GetHandleApproxSize(HandleType_t type, void *object, unsigned int *pSize);
+40 -48
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -34,11 +34,12 @@
#include "MenuStyle_Base.h"
#include "PlayerManager.h"
#include "MenuManager.h"
#include "HandleSys.h"
#include "CellRecipientFilter.h"
#if defined MENU_DEBUG
#include "Logger.h"
#endif
#include "logic_bridge.h"
#include "AutoHandleRooter.h"
BaseMenuStyle::BaseMenuStyle() : m_WatchList(256), m_hHandle(BAD_HANDLE)
{
@@ -314,7 +315,7 @@ void BaseMenuStyle::ClientPressedKey(int client, unsigned int key_press)
if (sound != NULL)
{
edict_t *pEdict = engine->PEntityOfEntIndex(client);
edict_t *pEdict = PEntityOfEntIndex(client);
if (pEdict)
{
ICollideable *pCollideable = pEdict->GetCollideable();
@@ -322,15 +323,25 @@ void BaseMenuStyle::ClientPressedKey(int client, unsigned int key_press)
if (pCollideable)
{
const Vector & pos = pCollideable->GetCollisionOrigin();
enginesound->EmitSound(filter,
client,
CHAN_AUTO,
#if SOURCE_ENGINE >= SE_PORTAL2
sound,
-1,
#endif
sound,
VOL_NORM,
ATTN_NORM,
#if SOURCE_ENGINE >= SE_PORTAL2
0,
#endif
0,
PITCH_NORM,
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS \
|| SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_TF2
0,
#endif
&pos);
}
}
@@ -377,6 +388,9 @@ void BaseMenuStyle::ClientPressedKey(int client, unsigned int key_press)
RemoveClientFromWatch(client);
}
Handle_t hndl = menu ? menu->GetHandle() : BAD_HANDLE;
AutoHandleRooter ahr(hndl);
if (cancel)
{
mh->OnMenuCancel(menu, client, reason);
@@ -591,7 +605,7 @@ bool BaseMenuStyle::RedoClientMenu(int client, ItemOrder order)
}
CBaseMenu::CBaseMenu(IMenuHandler *pHandler, IMenuStyle *pStyle, IdentityToken_t *pOwner) :
m_pStyle(pStyle), m_Strings(512), m_Pagination(7), m_bShouldDelete(false), m_bCancelling(false),
m_pStyle(pStyle), m_Pagination(7), m_bShouldDelete(false), m_bCancelling(false),
m_pOwner(pOwner ? pOwner : g_pCoreIdent), m_bDeleting(false), m_bWillFreeHandle(false),
m_hHandle(BAD_HANDLE), m_pHandler(pHandler), m_nFlags(MENUFLAG_BUTTON_EXIT)
{
@@ -614,94 +628,74 @@ Handle_t CBaseMenu::GetHandle()
bool CBaseMenu::AppendItem(const char *info, const ItemDrawInfo &draw)
{
if (m_Pagination == (unsigned)MENU_NO_PAGINATION
&& m_items.size() >= m_pStyle->GetMaxPageItems())
&& m_items.length() >= m_pStyle->GetMaxPageItems())
{
return false;
}
CItem item;
item.infoString = m_Strings.AddString(info);
item.info = info;
if (draw.display)
{
item.displayString = m_Strings.AddString(draw.display);
}
item.display = new ke::AString(draw.display);
item.style = draw.style;
m_items.push_back(item);
m_items.append(ke::Move(item));
return true;
}
bool CBaseMenu::InsertItem(unsigned int position, const char *info, const ItemDrawInfo &draw)
{
if (m_Pagination == (unsigned)MENU_NO_PAGINATION
&& m_items.size() >= m_pStyle->GetMaxPageItems())
if (m_Pagination == (unsigned)MENU_NO_PAGINATION &&
m_items.length() >= m_pStyle->GetMaxPageItems())
{
return false;
}
if (position >= m_items.size())
{
if (position >= m_items.length())
return false;
}
CItem item;
item.infoString = m_Strings.AddString(info);
item.info = info;
if (draw.display)
{
item.displayString = m_Strings.AddString(draw.display);
}
item.display = new ke::AString(draw.display);
item.style = draw.style;
CVector<CItem>::iterator iter = m_items.iterAt(position);
m_items.insert(iter, item);
m_items.insert(position, ke::Move(item));
return true;
}
bool CBaseMenu::RemoveItem(unsigned int position)
{
if (position >= m_items.size())
{
if (position >= m_items.length())
return false;
}
m_items.erase(m_items.iterAt(position));
if (m_items.size() == 0)
{
m_Strings.Reset();
}
m_items.remove(position);
return true;
}
void CBaseMenu::RemoveAllItems()
{
m_items.clear();
m_Strings.Reset();
}
const char *CBaseMenu::GetItemInfo(unsigned int position, ItemDrawInfo *draw/* =NULL */)
{
if (position >= m_items.size())
{
if (position >= m_items.length())
return NULL;
}
if (draw)
{
draw->display = m_Strings.GetString(m_items[position].displayString);
draw->display = m_items[position].display->chars();
draw->style = m_items[position].style;
}
return m_Strings.GetString(m_items[position].infoString);
return m_items[position].info.chars();
}
unsigned int CBaseMenu::GetItemCount()
{
return m_items.size();
return m_items.length();
}
bool CBaseMenu::SetPagination(unsigned int itemsPerPage)
@@ -734,12 +728,12 @@ IMenuStyle *CBaseMenu::GetDrawStyle()
void CBaseMenu::SetDefaultTitle(const char *message)
{
m_Title.assign(message);
m_Title = message;
}
const char *CBaseMenu::GetDefaultTitle()
{
return m_Title.c_str();
return m_Title.chars();
}
void CBaseMenu::Cancel()
@@ -806,7 +800,7 @@ void CBaseMenu::InternalDelete()
m_hHandle = BAD_HANDLE;
m_bDeleting = true;
g_HandleSys.FreeHandle(hndl, &sec);
handlesys->FreeHandle(hndl, &sec);
}
m_pHandler->OnMenuDestroy(this);
@@ -831,7 +825,5 @@ IMenuHandler *CBaseMenu::GetHandler()
unsigned int CBaseMenu::GetBaseMemUsage()
{
return m_Title.size()
+ m_Strings.GetMemTable()->GetMemUsage()
+ (m_items.size() * sizeof(CItem));
return m_Title.length() + (m_items.length() * sizeof(CItem));
}
+29 -13
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -34,29 +34,46 @@
#include <IMenuManager.h>
#include <IPlayerHelpers.h>
#include <sh_string.h>
#include <sh_vector.h>
#include "sm_memtable.h"
#include <am-autoptr.h>
#include <am-string.h>
#include <am-vector.h>
#include "sm_fastlink.h"
using namespace SourceMod;
using namespace SourceHook;
class CItem
{
public:
CItem()
{
infoString = -1;
displayString = -1;
style = 0;
access = 0;
}
CItem(CItem &&other)
: info(ke::Move(other.info)),
display(ke::Move(other.display))
{
style = other.style;
access = other.access;
}
CItem & operator =(CItem &&other)
{
info = ke::Move(other.info);
display = ke::Move(other.display);
style = other.style;
access = other.access;
return *this;
}
public:
int infoString;
int displayString;
ke::AString info;
ke::AutoPtr<ke::AString> display;
unsigned int style;
unsigned int access;
private:
CItem(const CItem &other) = delete;
CItem &operator =(const CItem &other) = delete;
};
class CBaseMenuPlayer
@@ -139,11 +156,10 @@ public:
private:
void InternalDelete();
protected:
String m_Title;
ke::AString m_Title;
IMenuStyle *m_pStyle;
BaseStringTable m_Strings;
unsigned int m_Pagination;
CVector<CItem> m_items;
ke::Vector<CItem> m_items;
bool m_bShouldDelete;
bool m_bCancelling;
IdentityToken_t *m_pOwner;
+77 -22
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -32,11 +32,20 @@
#include "MenuStyle_Radio.h"
#include "sm_stringutil.h"
#include "UserMessages.h"
#include "GameConfigs.h"
#include <IGameConfigs.h>
#include "PlayerManager.h"
#if defined MENU_DEBUG
#include "Logger.h"
#endif
#include "logic_bridge.h"
#ifdef USE_PROTOBUF_USERMESSAGES
#include <google/protobuf/descriptor.h>
#endif
#if SOURCE_ENGINE == SE_CSGO
#include <game/shared/csgo/protobuf/cstrike15_usermessages.pb.h>
#endif
extern const char *g_RadioNumTable[];
CRadioStyle g_RadioMenuStyle;
@@ -44,6 +53,14 @@ int g_ShowMenuId = -1;
bool g_bRadioInit = false;
unsigned int g_RadioMenuTimeout = 0;
// back, next, exit
#define MAX_PAGINATION_OPTIONS 3
#define MAX_MENUSLOT_KEYS 10
static unsigned int s_RadioMaxPageItems = MAX_MENUSLOT_KEYS;
CRadioStyle::CRadioStyle()
{
m_players = new CRadioMenuPlayer[256+1];
@@ -66,6 +83,10 @@ void CRadioStyle::OnSourceModLevelChange(const char *mapName)
}
g_bRadioInit = true;
// Always register the style. Use IsSupported() to check for validity before use.
g_Menus.AddStyle(this);
const char *msg = g_pGameConf->GetKeyValue("HudRadioMenuMsg");
if (!msg || msg[0] == '\0')
{
@@ -89,7 +110,18 @@ void CRadioStyle::OnSourceModLevelChange(const char *mapName)
g_RadioMenuTimeout = 0;
}
g_Menus.AddStyle(this);
const char *items = g_pGameConf->GetKeyValue("RadioMenuMaxPageItems");
if (items != NULL)
{
int value = atoi(items);
// Only override the mostly-safe default if it's a sane value
if (value > MAX_PAGINATION_OPTIONS && value <= MAX_MENUSLOT_KEYS)
{
s_RadioMaxPageItems = value;
}
}
g_Menus.SetDefaultStyle(this);
g_UserMsgs.HookUserMessage(g_ShowMenuId, this, false);
@@ -134,13 +166,22 @@ static unsigned int g_last_holdtime = 0;
static unsigned int g_last_client_count = 0;
static int g_last_clients[256];
#ifdef USE_PROTOBUF_USERMESSAGES
void CRadioStyle::OnUserMessage(int msg_id, protobuf::Message &msg, IRecipientFilter *pFilter)
#else
void CRadioStyle::OnUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter)
#endif
{
int count = pFilter->GetRecipientCount();
#if SOURCE_ENGINE == SE_CSGO
int c = ((CCSUsrMsg_ShowMenu &)msg).display_time();
#else
bf_read br(bf->GetBasePointer(), 3);
br.ReadWord();
int c = br.ReadChar();
#endif
g_last_holdtime = (c == -1) ? 0 : (unsigned)c;
@@ -188,7 +229,7 @@ IBaseMenu *CRadioStyle::CreateMenu(IMenuHandler *pHandler, IdentityToken_t *pOwn
unsigned int CRadioStyle::GetMaxPageItems()
{
return 10;
return s_RadioMaxPageItems;
}
const char *CRadioStyle::GetStyleName()
@@ -217,15 +258,6 @@ CRadioDisplay *CRadioStyle::MakeRadioDisplay(CRadioMenu *menu)
return display;
}
IMenuPanel *CRadioStyle::MakeRadioDisplay(const char *str, int keys)
{
CRadioDisplay *pPanel = MakeRadioDisplay(NULL);
pPanel->DirectSet(str, keys);
return pPanel;
}
void CRadioStyle::FreeRadioDisplay(CRadioDisplay *display)
{
m_FreeDisplays.push(display);
@@ -292,11 +324,12 @@ void CRadioDisplay::Reset()
keys = 0;
}
void CRadioDisplay::DirectSet(const char *str, int keymap)
bool CRadioDisplay::DirectSet(const char *str)
{
m_Title.clear();
m_BufferText.assign(str);
keys = keymap;
return true;
}
unsigned int CRadioDisplay::GetCurrentKey()
@@ -306,7 +339,7 @@ unsigned int CRadioDisplay::GetCurrentKey()
bool CRadioDisplay::SetCurrentKey(unsigned int key)
{
if (key < m_NextPos || m_NextPos > 10)
if (key < m_NextPos || m_NextPos > s_RadioMaxPageItems)
{
return false;
}
@@ -342,7 +375,7 @@ void CRadioDisplay::DrawTitle(const char *text, bool onlyIfEmpty/* =false */)
unsigned int CRadioDisplay::DrawItem(const ItemDrawInfo &item)
{
if (m_NextPos > 10 || !CanDrawItem(item.style))
if (m_NextPos > s_RadioMaxPageItems || !CanDrawItem(item.style))
{
return 0;
}
@@ -417,7 +450,7 @@ void CRadioMenuPlayer::Radio_Init(int keys, const char *title, const char *text)
{
if (title[0] != '\0')
{
display_len = UTIL_Format(display_pkt,
display_len = ke::SafeSprintf(display_pkt,
sizeof(display_pkt),
"%s\n%s",
title,
@@ -425,9 +458,8 @@ void CRadioMenuPlayer::Radio_Init(int keys, const char *title, const char *text)
}
else
{
display_len = UTIL_Format(display_pkt,
display_len = ke::SafeStrcpy(display_pkt,
sizeof(display_pkt),
"%s",
text);
}
display_keys = keys;
@@ -435,7 +467,7 @@ void CRadioMenuPlayer::Radio_Init(int keys, const char *title, const char *text)
void CRadioMenuPlayer::Radio_Refresh()
{
cell_t players[1] = {m_index};
cell_t players[1] = { (cell_t)m_index };
char *ptr = display_pkt;
char save = 0;
size_t len = display_len;
@@ -451,6 +483,14 @@ void CRadioMenuPlayer::Radio_Refresh()
time = menuHoldTime - (unsigned int)(gpGlobals->curtime - menuStartTime);
}
#if SOURCE_ENGINE == SE_CSGO
// TODO: find what happens past 240 on CS:GO
CCSUsrMsg_ShowMenu *msg = (CCSUsrMsg_ShowMenu *)g_UserMsgs.StartProtobufMessage(g_ShowMenuId, players, 1, USERMSG_BLOCKHOOKS);
msg->set_bits_valid_slots(display_keys);
msg->set_display_time(time);
msg->set_menu_string(ptr);
g_UserMsgs.EndMessage();
#else
while (true)
{
if (len > 240)
@@ -458,7 +498,8 @@ void CRadioMenuPlayer::Radio_Refresh()
save = ptr[240];
ptr[240] = '\0';
}
bf_write *buffer = g_UserMsgs.StartMessage(g_ShowMenuId, players, 1, USERMSG_BLOCKHOOKS);
bf_write *buffer = g_UserMsgs.StartBitBufMessage(g_ShowMenuId, players, 1, USERMSG_BLOCKHOOKS);
buffer->WriteWord(display_keys);
buffer->WriteChar(time ? time : -1);
buffer->WriteByte( (len > 240) ? 1 : 0 );
@@ -475,6 +516,7 @@ void CRadioMenuPlayer::Radio_Refresh()
break;
}
}
#endif
display_last_refresh = gpGlobals->curtime;
}
@@ -510,6 +552,7 @@ unsigned int CRadioDisplay::GetApproxMemUsage()
CRadioMenu::CRadioMenu(IMenuHandler *pHandler, IdentityToken_t *pOwner) :
CBaseMenu(pHandler, &g_RadioMenuStyle, pOwner)
{
m_Pagination = s_RadioMaxPageItems - MAX_PAGINATION_OPTIONS;
}
bool CRadioMenu::SetExtOption(MenuOption option, const void *valuePtr)
@@ -543,6 +586,7 @@ bool CRadioMenu::DisplayAtItem(int client,
return false;
}
AutoHandleRooter ahr(this->GetHandle());
return g_RadioMenuStyle.DoClientMenu(client,
this,
start_item,
@@ -550,6 +594,17 @@ bool CRadioMenu::DisplayAtItem(int client,
time);
}
bool CRadioMenu::SetPagination(unsigned int itemsPerPage)
{
const unsigned int maxPerPage = s_RadioMaxPageItems - MAX_PAGINATION_OPTIONS;
if (itemsPerPage > maxPerPage)
{
return false;
}
return CBaseMenu::SetPagination(itemsPerPage);
}
void CRadioMenu::Cancel_Finally()
{
g_RadioMenuStyle.CancelMenu(this);
+15 -6
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -37,10 +37,12 @@
#include "MenuStyle_Base.h"
#include "sourcemm_api.h"
#include <IPlayerHelpers.h>
#include <IUserMessages.h>
#include "UserMessages.h"
#include "sm_fastlink.h"
#include <sh_stack.h>
#include <compat_wrappers.h>
#include "logic/common_logic.h"
#include "AutoHandleRooter.h"
using namespace SourceMod;
@@ -65,7 +67,11 @@ private:
class CRadioStyle :
public BaseMenuStyle,
public SMGlobalClass,
public IUserMessageListener
#ifdef USE_PROTOBUF_USERMESSAGES
public IProtobufUserMessageListener
#else
public IBitBufUserMessageListener
#endif
{
public:
CRadioStyle();
@@ -84,7 +90,11 @@ public: //IMenuStyle
unsigned int GetMaxPageItems();
unsigned int GetApproxMemUsage();
public: //IUserMessageListener
#ifdef USE_PROTOBUF_USERMESSAGES
void OnUserMessage(int msg_id, protobuf::Message &msg, IRecipientFilter *pFilter);
#else
void OnUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter);
#endif
void OnUserMessageSent(int msg_id);
public:
bool IsSupported();
@@ -93,7 +103,6 @@ public:
CRadioDisplay *MakeRadioDisplay(CRadioMenu *menu=NULL);
void FreeRadioDisplay(CRadioDisplay *display);
CRadioMenuPlayer *GetRadioMenuPlayer(int client);
IMenuPanel *MakeRadioDisplay(const char *str, int keys);
private:
CRadioMenuPlayer *m_players;
CStack<CRadioDisplay *> m_FreeDisplays;
@@ -121,8 +130,7 @@ public: //IMenuPanel
bool SetCurrentKey(unsigned int key);
int GetAmountRemaining();
unsigned int GetApproxMemUsage();
public:
void DirectSet(const char *str, int keymap);
bool DirectSet(const char *str);
private:
String m_BufferText;
String m_Title;
@@ -142,6 +150,7 @@ public:
unsigned int time,
unsigned int start_item,
IMenuHandler *alt_handler/* =NULL */);
bool SetPagination(unsigned int itemsPerPage);
void Cancel_Finally();
unsigned int GetApproxMemUsage();
};
+9 -9
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -32,7 +32,6 @@
#include "sm_stringutil.h"
#include "PlayerManager.h"
#include "MenuStyle_Valve.h"
#include "Translator.h"
#include "PlayerManager.h"
#include "ConCmdManager.h"
@@ -67,14 +66,14 @@ bool ValveMenuStyle::OnClientCommand(int client, const char *cmdname, const CCom
void ValveMenuStyle::OnSourceModAllInitialized()
{
g_Players.AddClientListener(this);
SH_ADD_HOOK_MEMFUNC(IServerPluginHelpers, CreateMessage, serverpluginhelpers, this, &ValveMenuStyle::HookCreateMessage, false);
SH_ADD_HOOK(IServerPluginHelpers, CreateMessage, serverpluginhelpers, SH_MEMBER(this, &ValveMenuStyle::HookCreateMessage), false);
g_pSPHCC = SH_GET_CALLCLASS(serverpluginhelpers);
}
void ValveMenuStyle::OnSourceModShutdown()
{
SH_RELEASE_CALLCLASS(g_pSPHCC);
SH_REMOVE_HOOK_MEMFUNC(IServerPluginHelpers, CreateMessage, serverpluginhelpers, this, &ValveMenuStyle::HookCreateMessage, false);
SH_REMOVE_HOOK(IServerPluginHelpers, CreateMessage, serverpluginhelpers, SH_MEMBER(this, &ValveMenuStyle::HookCreateMessage), false);
g_Players.RemoveClientListener(this);
}
@@ -88,7 +87,7 @@ void ValveMenuStyle::HookCreateMessage(edict_t *pEdict,
return;
}
int client = engine->IndexOfEdict(pEdict);
int client = IndexOfEdict(pEdict);
if (client < 1 || client > 256)
{
return;
@@ -294,7 +293,7 @@ unsigned int CValveMenuDisplay::DrawItem(const ItemDrawInfo &item)
}
char buffer[255];
UTIL_Format(buffer, sizeof(buffer), "%d. %s", m_NextPos, item.display);
ke::SafeSprintf(buffer, sizeof(buffer), "%d. %s", m_NextPos, item.display);
KeyValues *ki = m_pKv->FindKey(g_OptionNumTable[m_NextPos], true);
ki->SetString("command", g_OptionCmdTable[m_NextPos]);
@@ -325,7 +324,7 @@ void CValveMenuDisplay::SendRawDisplay(int client, int priority, unsigned int ti
m_pKv->SetInt("time", time ? time : 200);
SH_CALL(g_pSPHCC, &IServerPluginHelpers::CreateMessage)(
engine->PEntityOfEntIndex(client),
PEntityOfEntIndex(client),
DIALOG_MENU,
m_pKv,
vsp_interface);
@@ -379,7 +378,7 @@ bool CValveMenu::SetExtOption(MenuOption option, const void *valuePtr)
{
if (option == MenuOption_IntroMessage)
{
strncopy(m_IntroMsg, (const char *)valuePtr, sizeof(m_IntroMsg));
ke::SafeStrcpy(m_IntroMsg, sizeof(m_IntroMsg), (const char *)valuePtr);
return true;
} else if (option == MenuOption_IntroColor) {
unsigned int *array = (unsigned int *)valuePtr;
@@ -405,6 +404,7 @@ bool CValveMenu::DisplayAtItem(int client,
return false;
}
AutoHandleRooter ahr(this->GetHandle());
return g_ValveMenuStyle.DoClientMenu(client, this, start_item, alt_handler ? alt_handler : m_pHandler, time);
}
+5 -1
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -39,6 +39,8 @@
#include "KeyValues.h"
#include "sm_fastlink.h"
#include <compat_wrappers.h>
#include "logic/common_logic.h"
#include "AutoHandleRooter.h"
using namespace SourceMod;
@@ -75,6 +77,7 @@ public: //IMenuStyle
IBaseMenu *CreateMenu(IMenuHandler *pHandler, IdentityToken_t *pOwner);
unsigned int GetMaxPageItems();
unsigned int GetApproxMemUsage();
bool IsSupported() { return true; }
private:
void HookCreateMessage(edict_t *pEdict, DIALOG_TYPE type, KeyValues *kv, IServerPluginCallbacks *plugin);
private:
@@ -105,6 +108,7 @@ public:
bool SetCurrentKey(unsigned int key);
int GetAmountRemaining();
unsigned int GetApproxMemUsage();
bool DirectSet(const char *str) { return false; }
private:
KeyValues *m_pKv;
unsigned int m_NextPos;
+305 -17
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -34,10 +34,57 @@
#include "MenuVoting.h"
#include "PlayerManager.h"
#include "sourcemm_api.h"
#include <sourcemod.h>
#include <Logger.h>
#include <HalfLife2.h>
#include <mathlib.h>
#include <const.h>
#include <ITranslator.h>
#include "logic_bridge.h"
float g_next_vote = 0.0f;
#if defined ORANGEBOX_BUILD
#define VOTE_NOT_VOTING -2
#define VOTE_PENDING -1
ConVar sm_vote_hintbox("sm_vote_progress_hintbox",
"0",
0,
"Show current vote progress in a hint box",
true,
0.0,
true,
1.0);
ConVar sm_vote_chat("sm_vote_progress_chat",
"0",
0,
"Show current vote progress as chat messages",
true,
0.0,
true,
1.0);
ConVar sm_vote_console("sm_vote_progress_console",
"0",
0,
"Show current vote progress as console messages",
true,
0.0,
true,
1.0);
ConVar sm_vote_client_console("sm_vote_progress_client_console",
"0",
0,
"Show current vote progress as console messages to clients",
true,
0.0,
true,
1.0);
#if SOURCE_ENGINE >= SE_ORANGEBOX
void OnVoteDelayChange(IConVar *cvar, const char *value, float flOldValue);
#else
void OnVoteDelayChange(ConVar *cvar, const char *value);
@@ -52,7 +99,7 @@ ConVar sm_vote_delay("sm_vote_delay",
0.0,
OnVoteDelayChange);
#if defined ORANGEBOX_BUILD
#if SOURCE_ENGINE >= SE_ORANGEBOX
void OnVoteDelayChange(IConVar *cvar, const char *value, float flOldValue)
#else
void OnVoteDelayChange(ConVar *cvar, const char *value)
@@ -113,14 +160,19 @@ void VoteMenuHandler::OnClientDisconnected(int client)
return;
}
/* Wipe out their vote if they had one */
/* Wipe out their vote if they had one. We have to make sure the the the
* newly connected client is not allowed to vote.
*/
int item;
if ((item = m_ClientVotes[client]) >= 0)
if ((item = m_ClientVotes[client]) >= VOTE_PENDING)
{
assert((unsigned)item < m_Items);
assert(m_Votes[item] > 0);
m_Votes[item]--;
m_ClientVotes[client] = -1;
if (item >= 0)
{
assert((unsigned)item < m_Items);
assert(m_Votes[item] > 0);
m_Votes[item]--;
}
m_ClientVotes[client] = VOTE_NOT_VOTING;
}
}
@@ -129,18 +181,28 @@ bool VoteMenuHandler::IsVoteInProgress()
return (m_pCurMenu != NULL);
}
bool VoteMenuHandler::StartVote(IBaseMenu *menu, unsigned int num_clients, int clients[], unsigned int max_time, unsigned int flags/* =0 */)
bool VoteMenuHandler::StartVote(IBaseMenu *menu,
unsigned int num_clients,
int clients[],
unsigned int max_time,
unsigned int flags/* =0 */)
{
if (!InitializeVoting(menu, menu->GetHandler(), max_time, flags))
{
return false;
}
/* Note: we can use game time and not universal time because
* if we're voting then players are in-game.
*/
float fVoteDelay = sm_vote_delay.GetFloat();
if (fVoteDelay < 1.0)
{
g_next_vote = 0.0;
} else {
}
else
{
/* This little trick breaks for infinite votes!
* However, we just ignore that since those 1) shouldn't exist and
* 2) people must be checking IsVoteInProgress() beforehand anyway.
@@ -148,8 +210,15 @@ bool VoteMenuHandler::StartVote(IBaseMenu *menu, unsigned int num_clients, int c
g_next_vote = gpGlobals->curtime + fVoteDelay + (float)max_time;
}
m_fStartTime = gpGlobals->curtime;
m_nMenuTime = max_time;
for (unsigned int i=0; i<num_clients; i++)
{
if (clients[i] < 1 || clients[i] > 256)
{
continue;
}
menu->Display(clients[i], max_time, this);
}
@@ -158,6 +227,72 @@ bool VoteMenuHandler::StartVote(IBaseMenu *menu, unsigned int num_clients, int c
return true;
}
bool VoteMenuHandler::IsClientInVotePool(int client)
{
if (client < 1
|| client > g_Players.MaxClients()
|| m_pCurMenu == NULL)
{
return false;
}
return (m_ClientVotes[client] > VOTE_NOT_VOTING);
}
bool VoteMenuHandler::GetClientVoteChoice(int client, unsigned int *pItem)
{
if (!IsClientInVotePool(client)
|| m_ClientVotes[client] == VOTE_PENDING)
{
return false;
}
*pItem = m_ClientVotes[client];
return true;
}
bool VoteMenuHandler::RedrawToClient(int client, bool revotes)
{
unsigned int time_limit;
if (!IsClientInVotePool(client))
{
return false;
}
if (m_ClientVotes[client] >= 0)
{
if ((m_VoteFlags & VOTEFLAG_NO_REVOTES) == VOTEFLAG_NO_REVOTES || !revotes)
{
return false;
}
assert((unsigned)m_ClientVotes[client] < m_Items);
assert(m_Votes[m_ClientVotes[client]] > 0);
m_Votes[m_ClientVotes[client]]--;
m_ClientVotes[client] = VOTE_PENDING;
m_Revoting[client] = true;
m_NumVotes--;
}
if (m_nMenuTime == MENU_TIME_FOREVER)
{
time_limit = m_nMenuTime;
}
else
{
time_limit = (int)((float)m_nMenuTime - (gpGlobals->curtime - m_fStartTime));
/* Make sure this doesn't round to zero */
if (time_limit == MENU_TIME_FOREVER)
{
time_limit = 1;
}
}
return m_pCurMenu->Display(client, time_limit, this);
}
bool VoteMenuHandler::InitializeVoting(IBaseMenu *menu,
IMenuHandler *handler,
unsigned int time,
@@ -173,7 +308,8 @@ bool VoteMenuHandler::InitializeVoting(IBaseMenu *menu,
/* Mark all clients as not voting */
for (int i=1; i<=gpGlobals->maxClients; i++)
{
m_ClientVotes[i] = -2;
m_ClientVotes[i] = VOTE_NOT_VOTING;
m_Revoting[i] = false;
}
m_Items = menu->GetItemCount();
@@ -187,7 +323,9 @@ bool VoteMenuHandler::InitializeVoting(IBaseMenu *menu,
m_Votes[i] = 0;
}
m_Votes.resize(m_Items, 0);
} else {
}
else
{
for (unsigned int i=0; i<m_Items; i++)
{
m_Votes[i] = 0;
@@ -215,6 +353,8 @@ void VoteMenuHandler::StartVoting()
m_pHandler->OnMenuVoteStart(m_pCurMenu);
m_displayTimer = g_Timers.CreateTimer(this, 1.0, NULL, TIMER_FLAG_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
/* By now we know how many clients were set.
* If there are none, we should end IMMEDIATELY.
*/
@@ -222,6 +362,8 @@ void VoteMenuHandler::StartVoting()
{
EndVoting();
}
m_TotalClients = m_Clients;
}
void VoteMenuHandler::DecrementPlayerCount()
@@ -252,10 +394,17 @@ void VoteMenuHandler::EndVoting()
if (fVoteDelay < 1.0)
{
g_next_vote = 0.0;
} else {
}
else
{
g_next_vote = gpGlobals->curtime + fVoteDelay;
}
if (m_displayTimer)
{
g_Timers.KillTimer(m_displayTimer);
}
if (m_bCancelled)
{
/* If we were cancelled, don't bother tabulating anything.
@@ -302,7 +451,7 @@ void VoteMenuHandler::EndVoting()
/* Build the client list */
for (int i=1; i<=gpGlobals->maxClients; i++)
{
if (m_ClientVotes[i] >= -1)
if (m_ClientVotes[i] >= VOTE_PENDING)
{
client_vote[vote.num_clients].client = i;
client_vote[vote.num_clients].item = m_ClientVotes[i];
@@ -346,7 +495,7 @@ void VoteMenuHandler::OnMenuCancel(IBaseMenu *menu, int client, MenuCancelReason
void VoteMenuHandler::OnMenuDisplay(IBaseMenu *menu, int client, IMenuPanel *display)
{
m_ClientVotes[client] = -1;
m_ClientVotes[client] = VOTE_PENDING;
m_pHandler->OnMenuDisplay(menu, client, display);
}
@@ -368,6 +517,58 @@ void VoteMenuHandler::OnMenuSelect(IBaseMenu *menu, int client, unsigned int ite
m_ClientVotes[client] = item;
m_Votes[item]++;
m_NumVotes++;
if (sm_vote_chat.GetBool() || sm_vote_console.GetBool() || sm_vote_client_console.GetBool())
{
static char buffer[1024];
ItemDrawInfo dr;
menu->GetItemInfo(item, &dr);
if (sm_vote_console.GetBool())
{
int target = SOURCEMOD_SERVER_LANGUAGE;
logicore.CoreTranslate(buffer, sizeof(buffer), "[SM] %T", 4, NULL, "Voted For",
&target, g_Players.GetPlayerByIndex(client)->GetName(), dr.display);
Engine_LogPrintWrapper(buffer);
}
if (sm_vote_chat.GetBool() || sm_vote_client_console.GetBool())
{
int maxclients = g_Players.GetMaxClients();
for (int i=1; i<=maxclients; i++)
{
CPlayer *pPlayer = g_Players.GetPlayerByIndex(i);
assert(pPlayer);
if (pPlayer->IsInGame() && !pPlayer->IsFakeClient())
{
if (m_Revoting[client])
{
logicore.CoreTranslate(buffer, sizeof(buffer), "[SM] %T", 4, NULL, "Changed Vote",
&i, g_Players.GetPlayerByIndex(client)->GetName(), dr.display);
}
else
{
logicore.CoreTranslate(buffer, sizeof(buffer), "[SM] %T", 4, NULL, "Voted For",
&i, g_Players.GetPlayerByIndex(client)->GetName(), dr.display);
}
if (sm_vote_chat.GetBool())
{
g_HL2.TextMsg(i, HUD_PRINTTALK, buffer);
}
if (sm_vote_client_console.GetBool())
{
ClientConsolePrint(pPlayer->GetEdict(), buffer);
}
}
}
}
}
BuildVoteLeaders();
DrawHintProgress();
}
m_pHandler->OnMenuSelect(menu, client, item);
@@ -390,6 +591,9 @@ void VoteMenuHandler::InternalReset()
m_NumVotes = 0;
m_bCancelled = false;
m_pHandler = NULL;
m_leaderList[0] = '\0';
m_displayTimer = NULL;
m_TotalClients = 0;
}
void VoteMenuHandler::CancelVoting()
@@ -411,3 +615,87 @@ bool VoteMenuHandler::IsCancelling()
{
return m_bCancelled;
}
void VoteMenuHandler::DrawHintProgress()
{
if (!sm_vote_hintbox.GetBool())
{
return;
}
static char buffer[1024];
float timeRemaining = (m_fStartTime + m_nMenuTime) - gpGlobals->curtime;
if (timeRemaining < 0)
{
timeRemaining = 0.0;
}
int iTimeRemaining = RoundFloatToInt(timeRemaining);
int maxclients = g_Players.GetMaxClients();
for (int i=1; i<=maxclients; i++)
{
if (g_Players.GetPlayerByIndex(i)->IsInGame())
{
logicore.CoreTranslate(buffer, sizeof(buffer), "%T%s", 6, NULL, "Vote Count",
&i, &m_NumVotes, &m_TotalClients, &iTimeRemaining, &m_leaderList);
g_HL2.HintTextMsg(i, buffer);
}
}
}
void VoteMenuHandler::BuildVoteLeaders()
{
if (m_NumVotes == 0 || !sm_vote_hintbox.GetBool())
{
return;
}
menu_vote_result_t vote;
menu_vote_result_t::menu_item_vote_t item_vote[256];
memset(&vote, 0, sizeof(vote));
/* Build the item list */
for (unsigned int i=0; i<m_Items; i++)
{
if (m_Votes[i] > 0)
{
item_vote[vote.num_items].count = m_Votes[i];
item_vote[vote.num_items].item = i;
vote.num_votes += m_Votes[i];
vote.num_items++;
}
}
vote.item_list = item_vote;
assert(vote.num_votes);
/* Sort the item list descending */
qsort(item_vote,
vote.num_items,
sizeof(menu_vote_result_t::menu_item_vote_t),
SortVoteItems);
/* Take the top 3 (if applicable) and draw them */
int len = 0;
for (unsigned int i=0; i<vote.num_items && i<3; i++)
{
int curItem = vote.item_list[i].item;
ItemDrawInfo dr;
m_pCurMenu->GetItemInfo(curItem, &dr);
len += g_SourceMod.Format(m_leaderList + len, sizeof(m_leaderList) - len, "\n%i. %s: (%i)", i+1, dr.display, vote.item_list[i].count);
}
}
SourceMod::ResultType VoteMenuHandler::OnTimer(ITimer *pTimer, void *pData)
{
DrawHintProgress();
return Pl_Continue;
}
void VoteMenuHandler::OnTimerEnd(ITimer *pTimer, void *pData)
{
m_displayTimer = NULL;
}
+19 -2
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -36,6 +36,7 @@
#include <IPlayerHelpers.h>
#include <sh_vector.h>
#include "sm_globals.h"
#include <TimerSys.h>
using namespace SourceHook;
using namespace SourceMod;
@@ -43,7 +44,8 @@ using namespace SourceMod;
class VoteMenuHandler :
public IMenuHandler,
public SMGlobalClass,
public IClientListener
public IClientListener,
public ITimedEvent
{
public: //SMGlobalClass
void OnSourceModAllInitialized();
@@ -61,6 +63,9 @@ public: //IMenuHandler
void OnMenuEnd(IBaseMenu *menu, MenuEndReason reason);
void OnMenuDrawItem(IBaseMenu *menu, int client, unsigned int item, unsigned int &style);
unsigned int OnMenuDisplayItem(IBaseMenu *menu, int client, IMenuPanel *panel, unsigned int item, const ItemDrawInfo &dr);
public: //ITimedEvent
ResultType OnTimer(ITimer *pTimer, void *pData);
void OnTimerEnd(ITimer *pTimer, void *pData);
public:
bool StartVote(IBaseMenu *menu,
unsigned int num_clients,
@@ -72,6 +77,9 @@ public:
IBaseMenu *GetCurrentMenu();
bool IsCancelling();
unsigned int GetRemainingVoteDelay();
bool IsClientInVotePool(int client);
bool GetClientVoteChoice(int client, unsigned int *pItem);
bool RedrawToClient(int client, bool revote);
private:
void Reset(IMenuHandler *mh);
void DecrementPlayerCount();
@@ -82,9 +90,12 @@ private:
unsigned int time,
unsigned int flags);
void StartVoting();
void DrawHintProgress();
void BuildVoteLeaders();
private:
IMenuHandler *m_pHandler;
unsigned int m_Clients;
unsigned int m_TotalClients;
unsigned int m_Items;
CVector<unsigned int> m_Votes;
IBaseMenu *m_pCurMenu;
@@ -93,7 +104,13 @@ private:
unsigned int m_NumVotes;
unsigned int m_VoteTime;
unsigned int m_VoteFlags;
float m_fStartTime;
unsigned int m_nMenuTime;
int m_ClientVotes[256+1];
bool m_Revoting[256+1];
char m_leaderList[1024];
ITimer *m_displayTimer;
};
#endif //_INCLUDE_SOURCEMOD_MENUVOTING_H_
+227
View File
@@ -0,0 +1,227 @@
/**
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#include "NextMap.h"
#include "Logger.h"
#include "HalfLife2.h"
#include "sourcemm_api.h"
#include "sm_stringutil.h"
#include "sourcehook.h"
#include "logic_bridge.h"
#include "compat_wrappers.h"
#include <time.h>
#include <bridge/include/ILogger.h>
NextMapManager g_NextMap;
#if SOURCE_ENGINE != SE_DARKMESSIAH
SH_DECL_HOOK2_void(IVEngineServer, ChangeLevel, SH_NOATTRIB, 0, const char *, const char *);
#else
SH_DECL_HOOK4_void(IVEngineServer, ChangeLevel, SH_NOATTRIB, 0, const char *, const char *, const char *, bool);
#endif
#if SOURCE_ENGINE >= SE_ORANGEBOX
SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
#else
SH_DECL_EXTERN0_void(ConCommand, Dispatch, SH_NOATTRIB, false);
#endif
ConCommand *changeLevelCmd = NULL;
ConVar sm_nextmap("sm_nextmap", "", FCVAR_NOTIFY);
ConVar sm_maphistory_size("sm_maphistory_size", "20");
bool g_forcedChange = false;
void NextMapManager::OnSourceModAllInitialized_Post()
{
#if SOURCE_ENGINE >= SE_ORANGEBOX
SH_ADD_HOOK(IVEngineServer, ChangeLevel, engine, SH_MEMBER(this, &NextMapManager::HookChangeLevel), false);
#else
SH_ADD_HOOK(IVEngineServer, ChangeLevel, engine, SH_MEMBER(this, &NextMapManager::HookChangeLevel), false);
#endif
ConCommand *pCmd = FindCommand("changelevel");
if (pCmd != NULL)
{
SH_ADD_HOOK(ConCommand, Dispatch, pCmd, SH_STATIC(CmdChangeLevelCallback), false);
changeLevelCmd = pCmd;
}
}
void NextMapManager::OnSourceModShutdown()
{
#if SOURCE_ENGINE >= SE_ORANGEBOX
SH_REMOVE_HOOK(IVEngineServer, ChangeLevel, engine, SH_MEMBER(this, &NextMapManager::HookChangeLevel), false);
#else
SH_REMOVE_HOOK(IVEngineServer, ChangeLevel, engine, SH_MEMBER(this, &NextMapManager::HookChangeLevel), false);
#endif
if (changeLevelCmd != NULL)
{
SH_REMOVE_HOOK(ConCommand, Dispatch, changeLevelCmd, SH_STATIC(CmdChangeLevelCallback), false);
}
SourceHook::List<MapChangeData *>::iterator iter;
iter = m_mapHistory.begin();
while (iter != m_mapHistory.end())
{
delete (MapChangeData *)*iter;
iter = m_mapHistory.erase(iter);
}
}
const char *NextMapManager::GetNextMap()
{
return sm_nextmap.GetString();
}
bool NextMapManager::SetNextMap(const char *map)
{
if (!g_HL2.IsMapValid(map))
{
return false;
}
sm_nextmap.SetValue(map);
return true;
}
#if SOURCE_ENGINE != SE_DARKMESSIAH
void NextMapManager::HookChangeLevel(const char *map, const char *unknown)
#else
void NextMapManager::HookChangeLevel(const char *map, const char *unknown, const char *video, bool bLongLoading)
#endif
{
if (g_forcedChange)
{
logger->LogMessage("[SM] Changed map to \"%s\"", map);
RETURN_META(MRES_IGNORED);
}
const char *newmap = sm_nextmap.GetString();
if (newmap[0] == 0 || !g_HL2.IsMapValid(newmap))
{
RETURN_META(MRES_IGNORED);
}
logger->LogMessage("[SM] Changed map to \"%s\"", newmap);
ke::SafeStrcpy(m_tempChangeInfo.m_mapName, sizeof(m_tempChangeInfo.m_mapName), newmap);
ke::SafeStrcpy(m_tempChangeInfo.m_changeReason, sizeof(m_tempChangeInfo.m_changeReason), "Normal level change");
#if SOURCE_ENGINE != SE_DARKMESSIAH
RETURN_META_NEWPARAMS(MRES_IGNORED, &IVEngineServer::ChangeLevel, (newmap, unknown));
#else
RETURN_META_NEWPARAMS(MRES_IGNORED, &IVEngineServer::ChangeLevel, (newmap, unknown, video, bLongLoading));
#endif
}
void NextMapManager::OnSourceModLevelChange( const char *mapName )
{
/* Skip the first 'mapchange' when the server starts up */
if (m_tempChangeInfo.startTime != 0)
{
if (strcmp(mapName, m_tempChangeInfo.m_mapName) == 0)
{
/* The map change was as we expected */
m_mapHistory.push_back(new MapChangeData(lastMap, m_tempChangeInfo.m_changeReason, m_tempChangeInfo.startTime));
}
else
{
/* Something intercepted the mapchange */
char newReason[255];
ke::SafeSprintf(newReason, sizeof(newReason), "%s (Map overridden)", m_tempChangeInfo.m_changeReason);
m_mapHistory.push_back(new MapChangeData(lastMap, newReason, m_tempChangeInfo.startTime));
}
int historydiff = sm_maphistory_size.GetInt();
if (historydiff > 0)
{
historydiff -= m_mapHistory.size();
} else if (historydiff < 0)
{
historydiff = (m_mapHistory.size() * -1);
}
for (SourceHook::List<MapChangeData *>::iterator iter = m_mapHistory.begin(); historydiff++ < 0; iter = m_mapHistory.erase(iter))
{
delete (MapChangeData *)*iter;
}
}
m_tempChangeInfo.m_mapName[0] ='\0';
m_tempChangeInfo.m_changeReason[0] = '\0';
m_tempChangeInfo.startTime = time(NULL);
ke::SafeStrcpy(lastMap, sizeof(lastMap), mapName);
}
void NextMapManager::ForceChangeLevel( const char *mapName, const char* changeReason )
{
/* Store the mapname and reason */
ke::SafeStrcpy(m_tempChangeInfo.m_mapName, sizeof(m_tempChangeInfo.m_mapName), mapName);
ke::SafeStrcpy(m_tempChangeInfo.m_changeReason, sizeof(m_tempChangeInfo.m_changeReason), changeReason);
/* Change level and skip our hook */
g_forcedChange = true;
engine->ChangeLevel(mapName, NULL);
g_forcedChange = false;
}
NextMapManager::NextMapManager()
{
m_tempChangeInfo = MapChangeData();
m_mapHistory = SourceHook::List<MapChangeData *>();
}
#if SOURCE_ENGINE >= SE_ORANGEBOX
void CmdChangeLevelCallback(const CCommand &command)
{
#else
void CmdChangeLevelCallback()
{
CCommand command;
#endif
if (command.ArgC() < 2)
{
return;
}
if (g_NextMap.m_tempChangeInfo.m_mapName[0] == '\0')
{
ke::SafeStrcpy(g_NextMap.m_tempChangeInfo.m_mapName, sizeof(g_NextMap.m_tempChangeInfo.m_mapName), command.Arg(1));
ke::SafeStrcpy(g_NextMap.m_tempChangeInfo.m_changeReason, sizeof(g_NextMap.m_tempChangeInfo.m_changeReason), "changelevel Command");
}
}
+104
View File
@@ -0,0 +1,104 @@
/**
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#ifndef _INCLUDE_SOURCEMOD_NEXTMAP_H_
#define _INCLUDE_SOURCEMOD_NEXTMAP_H_
#include "sm_globals.h"
#include <eiface.h>
#include "sh_list.h"
#include "sm_stringutil.h"
#include <amtl/am-string.h>
struct MapChangeData
{
MapChangeData(const char *mapName, const char *changeReason, time_t time)
{
ke::SafeStrcpy(m_mapName, sizeof(m_mapName), mapName);
ke::SafeStrcpy(m_changeReason, sizeof(m_changeReason), changeReason);
startTime = time;
}
MapChangeData()
{
m_mapName[0] = '\0';
m_changeReason[0] = '\0';
startTime = 0;
}
char m_mapName[PLATFORM_MAX_PATH];
char m_changeReason[100];
time_t startTime;
};
#if SOURCE_ENGINE >= SE_ORANGEBOX
void CmdChangeLevelCallback(const CCommand &command);
#else
void CmdChangeLevelCallback();
#endif
class NextMapManager : public SMGlobalClass
{
public:
NextMapManager();
#if SOURCE_ENGINE >= SE_ORANGEBOX
friend void CmdChangeLevelCallback(const CCommand &command);
#else
friend void CmdChangeLevelCallback();
#endif
void OnSourceModAllInitialized_Post();
void OnSourceModShutdown();
void OnSourceModLevelChange(const char *mapName);
const char *GetNextMap();
bool SetNextMap(const char *map);
void ForceChangeLevel(const char *mapName, const char* changeReason);
#if SOURCE_ENGINE != SE_DARKMESSIAH
void HookChangeLevel(const char *map, const char *unknown);
#else
void HookChangeLevel(const char *map, const char *unknown, const char *video, bool bLongLoading);
#endif
public:
SourceHook::List<MapChangeData *> m_mapHistory;
private:
MapChangeData m_tempChangeInfo;
char lastMap[32];
};
extern NextMapManager g_NextMap;
#endif //_INCLUDE_SOURCEMOD_NEXTMAP_H_
+1282 -237
View File
File diff suppressed because it is too large Load Diff
+108 -21
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -38,18 +38,35 @@
#include <IForwardSys.h>
#include <IPlayerHelpers.h>
#include <IAdminSystem.h>
#include <ITranslator.h>
#include <sh_string.h>
#include <sh_list.h>
#include <sh_vector.h>
#include <am-string.h>
#include "ConVarManager.h"
#include <steam/steamclientpublic.h>
using namespace SourceHook;
class IClient;
#define PLAYER_LIFE_UNKNOWN 0
#define PLAYER_LIFE_ALIVE 1
#define PLAYER_LIFE_DEAD 2
#define MIN_API_FOR_ADMINCALLS 7
union serial_t
{
uint32_t value;
struct
{
uint32_t index : 8;
uint32_t serial : 24;
} bits;
};
class CPlayer : public IGamePlayer
{
friend class PlayerManager;
@@ -58,53 +75,83 @@ public:
public:
const char *GetName();
const char *GetIPAddress();
const char *GetAuthString();
const char *GetAuthString(bool validated = true);
unsigned int GetSteamAccountID(bool validated = true);
const CSteamID &GetSteamId(bool validated = true);
uint64_t GetSteamId64(bool validated = true) { return GetSteamId(validated).ConvertToUint64(); }
const char *GetSteam2Id(bool validated = true);
const char *GetSteam3Id(bool validated = true);
edict_t *GetEdict();
bool IsInGame();
bool WasCountedAsInGame();
bool IsConnected();
bool IsAuthorized();
bool IsFakeClient();
bool IsSourceTV() const;
bool IsReplay() const;
void SetAdminId(AdminId id, bool temporary);
AdminId GetAdminId();
void Kick(const char *str);
bool IsInKickQueue();
IPlayerInfo *GetPlayerInfo();
unsigned int GetLanguageId();
void SetLanguageId(unsigned int id);
int GetUserId();
bool RunAdminCacheChecks();
void NotifyPostAdminChecks();
unsigned int GetSerial();
int GetIndex() const;
void PrintToConsole(const char *pMsg);
void ClearAdmin();
public:
void DoBasicAdminChecks();
bool IsInKickQueue();
void MarkAsBeingKicked();
int GetLifeState();
// This can be NULL for fakeclients due to limitations in our impl
IClient *GetIClient() const;
private:
void Initialize(const char *name, const char *ip, edict_t *pEntity);
void Connect();
void Disconnect();
void SetName(const char *name);
void DumpAdmin(bool deleting);
void Authorize(const char *auth);
void UpdateAuthIds();
void Authorize();
void Authorize_Post();
void DoPostConnectAuthorization();
bool IsAuthStringValidated();
bool SetEngineString();
bool SetCSteamID();
private:
bool m_IsConnected;
bool m_IsInGame;
bool m_IsAuthorized;
bool m_bIsInKickQueue;
bool m_IsConnected = false;
bool m_IsInGame = false;
bool m_IsAuthorized = false;
bool m_bIsInKickQueue = false;
String m_Name;
String m_Ip;
String m_IpNoPort;
String m_AuthID;
AdminId m_Admin;
bool m_TempAdmin;
edict_t *m_pEdict;
IPlayerInfo *m_Info;
ke::AString m_AuthID;
ke::AString m_Steam2Id;
ke::AString m_Steam3Id;
AdminId m_Admin = INVALID_ADMIN_ID;
bool m_TempAdmin = false;
edict_t *m_pEdict = nullptr;
IPlayerInfo *m_Info = nullptr;
IClient *m_pIClient = nullptr;
String m_LastPassword;
bool m_bAdminCheckSignalled;
bool m_bAdminCheckSignalled = false;
int m_iIndex;
unsigned int m_LangId;
int m_UserId;
unsigned int m_LangId = SOURCEMOD_LANGUAGE_ENGLISH;
int m_UserId = -1;
bool m_bFakeClient = false;
bool m_bIsSourceTV = false;
bool m_bIsReplay = false;
serial_t m_Serial;
CSteamID m_SteamId;
#if SOURCE_ENGINE == SE_CSGO
QueryCvarCookie_t m_LanguageCookie = InvalidQueryCvarCookie;
#endif
};
class PlayerManager :
@@ -116,28 +163,33 @@ public:
PlayerManager();
~PlayerManager();
public: //SMGlobalClass
void OnSourceModStartup(bool late) override;
void OnSourceModAllInitialized();
void OnSourceModShutdown();
void OnSourceModLevelEnd();
ConfigResult OnSourceModConfigChanged(const char *key, const char *value, ConfigSource source, char *error, size_t maxlength);
void OnSourceModMaxPlayersChanged(int newvalue);
public:
CPlayer *GetPlayerByIndex(int client) const;
void RunAuthChecks();
void ClearAdminId(AdminId id);
void ClearAllAdmins();
public:
bool OnClientConnect(edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen);
bool OnClientConnect_Post(edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen);
void OnClientPutInServer(edict_t *pEntity, char const *playername);
void OnClientDisconnect(edict_t *pEntity);
void OnClientDisconnect_Post(edict_t *pEntity);
#if defined ORANGEBOX_BUILD
#if SOURCE_ENGINE >= SE_ORANGEBOX
void OnClientCommand(edict_t *pEntity, const CCommand &args);
#if SOURCE_ENGINE >= SE_EYE
void OnClientCommandKeyValues(edict_t *pEntity, KeyValues *pCommand);
void OnClientCommandKeyValues_Post(edict_t *pEntity, KeyValues *pCommand);
#endif
#else
void OnClientCommand(edict_t *pEntity);
#endif
void OnClientSettingsChanged(edict_t *pEntity);
//void OnClientSettingsChanged_Pre(edict_t *pEntity);
void OnServerHibernationUpdate(bool bHibernating);
public: //IPlayerManager
void AddClientListener(IClientListener *listener);
void RemoveClientListener(IClientListener *listener);
@@ -152,6 +204,9 @@ public: //IPlayerManager
void RegisterCommandTargetProcessor(ICommandTargetProcessor *pHandler);
void UnregisterCommandTargetProcessor(ICommandTargetProcessor *pHandler);
void ProcessCommandTarget(cmd_target_info_t *info);
int GetClientFromSerial(unsigned int serial);
void ClearAdminId(AdminId id);
void RecheckAnyAdmins();
public:
inline int MaxClients()
{
@@ -161,21 +216,36 @@ public:
{
return m_PlayerCount;
}
inline int ListenClient()
{
return m_ListenClient;
}
bool CheckSetAdmin(int index, CPlayer *pPlayer, AdminId id);
bool CheckSetAdminName(int index, CPlayer *pPlayer, AdminId id);
const char *GetPassInfoVar();
void RecheckAnyAdmins();
unsigned int GetReplyTo();
unsigned int SetReplyTo(unsigned int reply);
void MaxPlayersChanged(int newvalue = -1);
inline bool InClientCommandKeyValuesHook()
{
return m_bInCCKVHook;
}
#if SOURCE_ENGINE == SE_CSGO
bool HandleConVarQuery(QueryCvarCookie_t cookie, int client, EQueryCvarValueStatus result, const char *cvarName, const char *cvarValue);
#endif
private:
void OnServerActivate(edict_t *pEdictList, int edictCount, int clientMax);
void InvalidatePlayer(CPlayer *pPlayer);
private:
List<IClientListener *> m_hooks;
IForward *m_clconnect;
IForward *m_clconnect_post;
IForward *m_cldisconnect;
IForward *m_cldisconnect_post;
IForward *m_clputinserver;
IForward *m_clcommand;
IForward *m_clcommandkv;
IForward *m_clcommandkv_post;
IForward *m_clinfochanged;
IForward *m_clauth;
IForward *m_onActivate;
@@ -184,12 +254,29 @@ private:
int *m_UserIdLookUp;
int m_maxClients;
int m_PlayerCount;
bool m_FirstPass;
int m_PlayersSinceActive;
bool m_bServerActivated;
unsigned int *m_AuthQueue;
String m_PassInfoVar;
bool m_QueryLang;
bool m_bAuthstringValidation; // are we validating admins with steam before authorizing?
bool m_bIsListenServer;
int m_ListenClient;
bool m_bIsSourceTVActive;
bool m_bIsReplayActive;
int m_SourceTVUserId;
int m_ReplayUserId;
bool m_bInCCKVHook;
};
#if SOURCE_ENGINE >= SE_ORANGEBOX
void CmdMaxplayersCallback(const CCommand &command);
#else
void CmdMaxplayersCallback();
#endif
extern void ClientConsolePrint(edict_t *e, const char *fmt, ...);
extern PlayerManager g_Players;
extern bool g_OnMapStarted;
extern const unsigned int *g_NumPlayersToAuth;
-487
View File
@@ -1,487 +0,0 @@
/**
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#include "Profiler.h"
#include "PluginSys.h"
#include "sm_stringutil.h"
#include "Logger.h"
#if defined PLATFORM_POSIX
#include <sys/time.h>
#include <time.h>
#endif
ProfileEngine g_Profiler;
IProfiler *sm_profiler = &g_Profiler;
#if defined PLATFORM_WINDOWS
double WINDOWS_PERFORMANCE_FREQUENCY;
#endif
class EmptyProfiler : public IProfiler
{
public:
void OnNativeBegin(IPluginContext *pContext, sp_native_t *native)
{
}
void OnNativeEnd()
{
}
void OnFunctionBegin(IPluginContext *pContext, const char *name)
{
}
void OnFunctionEnd()
{
}
int OnCallbackBegin(IPluginContext *pContext, sp_public_t *pubfunc)
{
return 0;
}
void OnCallbackEnd(int serial)
{
}
} s_EmptyProfiler;
inline void InitProfPoint(prof_point_t &pt)
{
#if defined PLATFORM_WINDOWS
QueryPerformanceCounter(&pt.value);
#elif defined PLATFORM_POSIX
gettimeofday(&pt.value, NULL);
#endif
pt.is_set = true;
}
ProfileEngine::ProfileEngine()
{
m_serial = 0;
#if defined PLATFORM_WINDOWS
LARGE_INTEGER pf;
if (QueryPerformanceFrequency(&pf))
{
WINDOWS_PERFORMANCE_FREQUENCY = 1.0 / (double)(pf.QuadPart);
}
else
{
WINDOWS_PERFORMANCE_FREQUENCY = -1.0;
}
#endif
if (IsEnabled())
{
InitProfPoint(m_ProfStart);
}
else
{
sm_profiler = &s_EmptyProfiler;
}
}
bool ProfileEngine::IsEnabled()
{
#if defined PLATFORM_WINDOWS
return (WINDOWS_PERFORMANCE_FREQUENCY > 0.0);
#elif defined PLATFORM_POSIX
return true;
#endif
}
inline double DiffProfPoints(const prof_point_t &start, const prof_point_t &end)
{
double seconds;
#if defined PLATFORM_WINDOWS
LONGLONG diff;
diff = end.value.QuadPart - start.value.QuadPart;
seconds = diff * WINDOWS_PERFORMANCE_FREQUENCY;
#elif defined PLATFORM_POSIX
seconds = (double)(end.value.tv_sec - start.value.tv_sec);
if (start.value.tv_usec > end.value.tv_usec)
{
seconds -= 1.0;
seconds += (double)(1000000 - (start.value.tv_usec - end.value.tv_usec)) / 1000000.0;
}
else
{
seconds += (double)(end.value.tv_usec - start.value.tv_usec) / 1000000.0;
}
#endif
return seconds;
}
inline double CalcAtomTime(const prof_atom_t &atom)
{
if (!atom.end.is_set)
{
return atom.base_time;
}
return atom.base_time + DiffProfPoints(atom.start, atom.end);
}
void ProfileEngine::OnNativeBegin(IPluginContext *pContext, sp_native_t *native)
{
PushProfileStack(pContext, SP_PROF_NATIVES, native->name);
}
void ProfileEngine::OnNativeEnd()
{
assert(!m_AtomStack.empty());
assert(m_AtomStack.front().atom_type == SP_PROF_NATIVES);
PopProfileStack(&m_Natives);
}
void ProfileEngine::OnFunctionBegin(IPluginContext *pContext, const char *name)
{
PushProfileStack(pContext, SP_PROF_FUNCTIONS, name);
}
void ProfileEngine::OnFunctionEnd()
{
assert(!m_AtomStack.empty());
assert(m_AtomStack.front().atom_type == SP_PROF_FUNCTIONS);
PopProfileStack(&m_Functions);
}
int ProfileEngine::OnCallbackBegin(IPluginContext *pContext, sp_public_t *pubfunc)
{
PushProfileStack(pContext, SP_PROF_CALLBACKS, pubfunc->name);
return m_serial;
}
void ProfileEngine::OnCallbackEnd(int serial)
{
assert(!m_AtomStack.empty());
/**
* Account for the situation where the JIT discards the
* stack because there was an RTE of sorts.
*/
if (m_AtomStack.front().atom_type != SP_PROF_CALLBACKS
&& m_AtomStack.front().atom_serial != serial)
{
prof_atom_t atom;
double total_time;
/* There was an error, and we need to discard things. */
total_time = 0.0;
while (!m_AtomStack.empty()
&& m_AtomStack.front().atom_type != SP_PROF_CALLBACKS
&& m_AtomStack.front().atom_serial != serial)
{
total_time += CalcAtomTime(m_AtomStack.front());
m_AtomStack.pop();
}
/**
* Now we can end and discard ourselves, without saving the data.
* Since this data is all erroneous anyway, we don't care if it's
* not totally accurate.
*/
assert(!m_AtomStack.empty());
atom = m_AtomStack.front();
m_AtomStack.pop();
/* Note: We don't need to resume ourselves because end is set by Pause(). */
total_time += CalcAtomTime(atom);
ResumeParent(total_time);
return;
}
PopProfileStack(&m_Callbacks);
}
void ProfileEngine::PushProfileStack(IPluginContext *ctx, int type, const char *name)
{
prof_atom_t atom;
PauseParent();
atom.atom_type = type;
atom.base_time = 0.0;
atom.ctx = ctx->GetContext();
atom.name = name;
atom.end.is_set = false;
if (type == SP_PROF_CALLBACKS)
{
atom.atom_serial = ++m_serial;
}
else
{
atom.atom_serial = 0;
}
m_AtomStack.push(atom);
/* Note: We do this after because the stack could grow and skew results */
InitProfPoint(m_AtomStack.front().start);
}
void ProfileEngine::PopProfileStack(ProfileReport *reporter)
{
double total_time;
prof_atom_t &atom = m_AtomStack.front();
/* We're okay to cache our used time. */
InitProfPoint(atom.end);
total_time = CalcAtomTime(atom);
/* Now it's time to save this! This may do a lot of computations which
* is why we've cached the time beforehand.
*/
reporter->SaveAtom(atom);
m_AtomStack.pop();
/* Finally, tell our parent how much time we used. */
ResumeParent(total_time);
}
void ProfileEngine::PauseParent()
{
if (m_AtomStack.empty())
{
return;
}
InitProfPoint(m_AtomStack.front().end);
}
void ProfileEngine::ResumeParent(double addTime)
{
if (m_AtomStack.empty())
{
return;
}
prof_atom_t &atom = m_AtomStack.front();
/* Move its "paused time" to its base (known) time,
* then reset the start/end. Note that since CalcAtomTime()
* reads the base time, we SHOULD NOT use += to add.
*/
atom.base_time = CalcAtomTime(atom);
atom.base_time += addTime;
InitProfPoint(atom.start);
atom.end.is_set = false;
}
void ProfileEngine::Clear()
{
m_Natives.Clear();
m_Callbacks.Clear();
m_Functions.Clear();
InitProfPoint(m_ProfStart);
}
void ProfileEngine::OnSourceModAllInitialized()
{
g_RootMenu.AddRootConsoleCommand("profiler", "Profiler commands", this);
}
void ProfileEngine::OnSourceModShutdown()
{
g_RootMenu.RemoveRootConsoleCommand("profiler", this);
}
void ProfileEngine::OnRootConsoleCommand(const char *cmdname, const CCommand &command)
{
if (command.ArgC() >= 3)
{
if (strcmp(command.Arg(2), "flush") == 0)
{
FILE *fp;
char path[256];
g_SourceMod.BuildPath(Path_SM, path, sizeof(path), "logs/profile_%d.xml", (int)time(NULL));
if ((fp = fopen(path, "wt")) == NULL)
{
g_RootMenu.ConsolePrint("Failed, could not open file for writing: %s", path);
return;
}
GenerateReport(fp);
fclose(fp);
g_RootMenu.ConsolePrint("Profiler report generated as: %s\n", path);
return;
}
}
g_RootMenu.ConsolePrint("Profiler commands:");
g_RootMenu.DrawGenericOption("flush", "Flushes statistics to disk and starts over");
}
bool ProfileEngine::GenerateReport(FILE *fp)
{
time_t t;
double total_time;
prof_point_t end_time;
InitProfPoint(end_time);
total_time = DiffProfPoints(m_ProfStart, end_time);
t = time(NULL);
fprintf(fp, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n");
fprintf(fp, "<profile time=\"%d\" uptime=\"%f\">\n", (int)t, total_time);
WriteReport(fp, &m_Natives, "natives");
WriteReport(fp, &m_Callbacks, "callbacks");
WriteReport(fp, &m_Functions, "functions");
fprintf(fp, "</profile>\n");
return true;
}
void ProfileEngine::WriteReport(FILE *fp, ProfileReport *report, const char *name)
{
size_t i, num;
prof_atom_report_t *ar;
char new_name[512];
fprintf(fp, " <report name=\"%s\">\n", name);
num = report->GetNumReports();
for (i = 0; i < num; i++)
{
ar = report->GetReport(i);
strncopy(new_name, ar->atom_name, sizeof(new_name));
UTIL_ReplaceAll(new_name, sizeof(new_name), "<", "&lt;");
UTIL_ReplaceAll(new_name, sizeof(new_name), ">", "&gt;");
fprintf(fp, " <item name=\"%s\" numcalls=\"%d\" mintime=\"%f\" maxtime=\"%f\" totaltime=\"%f\"/>\n",
new_name,
ar->num_calls,
ar->min_time,
ar->max_time,
ar->total_time);
}
fprintf(fp, " </report>\n");
}
ProfileReport::~ProfileReport()
{
for (size_t i = 0; i < m_Reports.size(); i++)
{
delete m_Reports[i];
}
}
void ProfileReport::Clear()
{
m_ReportLookup.clear();
for (size_t i = 0; i < m_Reports.size(); i++)
{
delete m_Reports[i];
}
m_Reports.clear();
}
size_t ProfileReport::GetNumReports()
{
return m_Reports.size();
}
prof_atom_report_t *ProfileReport::GetReport(size_t i)
{
return m_Reports[i];
}
void ProfileReport::SaveAtom(const prof_atom_t &atom)
{
double atom_time;
char full_name[256];
prof_atom_report_t **pReport, *report;
if (atom.atom_type == SP_PROF_NATIVES)
{
strncopy(full_name, atom.name, sizeof(full_name));
}
else
{
CPlugin *pl;
const char *file;
file = "unknown";
if ((pl = g_PluginSys.GetPluginByCtx(atom.ctx)) != NULL)
{
file = pl->GetFilename();
}
UTIL_Format(full_name, sizeof(full_name), "%s!%s", file, atom.name);
}
atom_time = CalcAtomTime(atom);
if ((pReport = m_ReportLookup.retrieve(full_name)) == NULL)
{
report = new prof_atom_report_t;
strncopy(report->atom_name, full_name, sizeof(report->atom_name));
report->max_time = atom_time;
report->min_time = atom_time;
report->num_calls = 1;
report->total_time = atom_time;
m_ReportLookup.insert(full_name, report);
m_Reports.push_back(report);
}
else
{
report = *pReport;
if (atom_time > report->max_time)
{
report->max_time = atom_time;
}
if (atom_time < report->min_time)
{
report->min_time = atom_time;
}
report->num_calls++;
report->total_time += atom_time;
}
}
-131
View File
@@ -1,131 +0,0 @@
/**
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#ifndef _INCLUDE_SOURCEMOD_PLUGIN_PROFILER_H_
#define _INCLUDE_SOURCEMOD_PLUGIN_PROFILER_H_
#include <sp_vm_api.h>
#include <sm_platform.h>
#include <sm_trie_tpl.h>
#include <sh_vector.h>
#include <sh_stack.h>
#include <stdio.h>
#include "sm_globals.h"
#include "sm_srvcmds.h"
using namespace SourcePawn;
using namespace SourceHook;
struct prof_point_t
{
#if defined PLATFORM_WINDOWS
LARGE_INTEGER value;
#elif defined PLATFORM_POSIX
struct timeval value;
#endif
bool is_set;
};
struct prof_atom_t
{
int atom_type; /* Type of object we're profiling */
int atom_serial; /* Serial number, if appropriate */
sp_context_t *ctx; /* Plugin context. */
const char *name; /* Name of the function */
prof_point_t start; /* Start time */
prof_point_t end; /* End time */
double base_time; /* Known time from children or pausing. */
};
struct prof_atom_report_t
{
char atom_name[256]; /* Full name to shove to logs */
double total_time; /* Total time spent executing, in s */
unsigned int num_calls; /* Number of invocations */
double min_time; /* Min time spent in one call, in s */
double max_time; /* Max time spent in one call, in s */
};
class ProfileReport
{
public:
~ProfileReport();
public:
void SaveAtom(const prof_atom_t &atom);
size_t GetNumReports();
prof_atom_report_t *GetReport(size_t i);
void Clear();
private:
KTrie<prof_atom_report_t *> m_ReportLookup;
CVector<prof_atom_report_t *> m_Reports;
};
class ProfileEngine :
public SMGlobalClass,
public IRootConsoleCommand,
public IProfiler
{
public:
ProfileEngine();
public:
bool IsEnabled();
bool GenerateReport(FILE *fp);
void Clear();
public: //SMGlobalClass
void OnSourceModAllInitialized();
void OnSourceModShutdown();
public: //IRootConsoleCommand
void OnRootConsoleCommand(const char *cmdname, const CCommand &command);
public: //IProfiler
void OnNativeBegin(IPluginContext *pContext, sp_native_t *native);
void OnNativeEnd() ;
void OnFunctionBegin(IPluginContext *pContext, const char *name);
void OnFunctionEnd();
int OnCallbackBegin(IPluginContext *pContext, sp_public_t *pubfunc);
void OnCallbackEnd(int serial);
private:
void PushProfileStack(IPluginContext *ctx, int type, const char *name);
void PopProfileStack(ProfileReport *reporter);
void PauseParent();
void ResumeParent(double addTime);
void WriteReport(FILE *fp, ProfileReport *report, const char *name);
private:
CStack<prof_atom_t> m_AtomStack;
ProfileReport m_Callbacks;
ProfileReport m_Functions;
ProfileReport m_Natives;
int m_serial;
prof_point_t m_ProfStart;
};
extern ProfileEngine g_Profiler;
#endif //_INCLUDE_SOURCEMOD_PLUGIN_PROFILER_H_
+7 -7
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -31,10 +31,10 @@
#include <time.h>
#include "TimerSys.h"
#include "ForwardSys.h"
#include "sourcemm_api.h"
#include "frame_hooks.h"
#include "ConVarManager.h"
#include "logic_bridge.h"
#define TIMER_MIN_ACCURACY 0.1
@@ -180,9 +180,9 @@ TimerSystem::~TimerSystem()
void TimerSystem::OnSourceModAllInitialized()
{
g_ShareSys.AddInterface(NULL, this);
m_pOnGameFrame = g_Forwards.CreateForward("OnGameFrame", ET_Ignore, 0, NULL);
m_pOnMapTimeLeftChanged = g_Forwards.CreateForward("OnMapTimeLeftChanged", ET_Ignore, 0, NULL);
sharesys->AddInterface(NULL, this);
m_pOnGameFrame = forwardsys->CreateForward("OnGameFrame", ET_Ignore, 0, NULL);
m_pOnMapTimeLeftChanged = forwardsys->CreateForward("OnMapTimeLeftChanged", ET_Ignore, 0, NULL);
}
void TimerSystem::OnSourceModGameInitialized()
@@ -198,8 +198,8 @@ void TimerSystem::OnSourceModGameInitialized()
void TimerSystem::OnSourceModShutdown()
{
SetMapTimer(NULL);
g_Forwards.ReleaseForward(m_pOnGameFrame);
g_Forwards.ReleaseForward(m_pOnMapTimeLeftChanged);
forwardsys->ReleaseForward(m_pOnGameFrame);
forwardsys->ReleaseForward(m_pOnMapTimeLeftChanged);
}
void TimerSystem::OnSourceModLevelEnd()
+3 -3
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -32,11 +32,11 @@
#ifndef _INCLUDE_SOURCEMOD_CTIMERSYS_H_
#define _INCLUDE_SOURCEMOD_CTIMERSYS_H_
#include "ShareSys.h"
#include <ITimerSystem.h>
#include <sh_stack.h>
#include <sh_list.h>
#include "sourcemm_api.h"
#include "sm_globals.h"
using namespace SourceHook;
using namespace SourceMod;
@@ -78,11 +78,11 @@ public: //ITimerSystem
float GetTickedTime();
void NotifyOfGameStart(float offset /* = 0.0f */);
bool GetMapTimeLeft(float *pTime);
IMapTimer *GetMapTimer();
public:
void RunFrame();
void RemoveMapChangeTimers();
void GameFrame(bool simulating);
IMapTimer *GetMapTimer();
private:
List<ITimer *> m_SingleTimers;
List<ITimer *> m_LoopTimers;
File diff suppressed because it is too large Load Diff
+399 -62
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -31,15 +31,34 @@
#include "UserMessages.h"
#include "sm_stringutil.h"
#include "logic_bridge.h"
#if SOURCE_ENGINE == SE_CSGO
#include <cstrike15_usermessage_helpers.h>
#endif
#include <amtl/am-string.h>
UserMessages g_UserMsgs;
#if SOURCE_ENGINE == SE_CSGO
SH_DECL_HOOK3_void(IVEngineServer, SendUserMessage, SH_NOATTRIB, 0, IRecipientFilter &, int, const protobuf::Message &);
#else
#if SOURCE_ENGINE >= SE_LEFT4DEAD
SH_DECL_HOOK3(IVEngineServer, UserMessageBegin, SH_NOATTRIB, 0, bf_write *, IRecipientFilter *, int, const char *);
#else
SH_DECL_HOOK2(IVEngineServer, UserMessageBegin, SH_NOATTRIB, 0, bf_write *, IRecipientFilter *, int);
#endif
SH_DECL_HOOK0_void(IVEngineServer, MessageEnd, SH_NOATTRIB, 0);
#endif // ==SE_CSGO
UserMessages::UserMessages() : m_InterceptBuffer(m_pBase, 2500)
UserMessages::UserMessages()
#ifndef USE_PROTOBUF_USERMESSAGES
: m_InterceptBuffer(m_pBase, 2500)
{
m_Names = sm_trie_create();
#else
: m_InterceptBuffer(NULL)
{
#endif
m_HookCount = 0;
m_InExec = false;
m_InHook = false;
@@ -49,8 +68,6 @@ UserMessages::UserMessages() : m_InterceptBuffer(m_pBase, 2500)
UserMessages::~UserMessages()
{
sm_trie_destroy(m_Names);
CStack<ListenerInfo *>::iterator iter;
for (iter=m_FreeListeners.begin(); iter!=m_FreeListeners.end(); iter++)
{
@@ -61,32 +78,43 @@ UserMessages::~UserMessages()
void UserMessages::OnSourceModStartup(bool late)
{
#ifndef USE_PROTOBUF_USERMESSAGES
/* -1 means SourceMM was unable to get the user message list */
m_FallbackSearch = (g_SMAPI->GetUserMessageCount() == -1);
#endif
}
void UserMessages::OnSourceModAllInitialized()
{
g_ShareSys.AddInterface(NULL, this);
sharesys->AddInterface(NULL, this);
}
void UserMessages::OnSourceModAllShutdown()
{
if (m_HookCount)
{
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Post, true);
#if SOURCE_ENGINE == SE_CSGO
SH_REMOVE_HOOK(IVEngineServer, SendUserMessage, engine, SH_MEMBER(this, &UserMessages::OnSendUserMessage_Pre), false);
SH_REMOVE_HOOK(IVEngineServer, SendUserMessage, engine, SH_MEMBER(this, &UserMessages::OnSendUserMessage_Post), true);
#else
SH_REMOVE_HOOK(IVEngineServer, UserMessageBegin, engine, SH_MEMBER(this, &UserMessages::OnStartMessage_Pre), false);
SH_REMOVE_HOOK(IVEngineServer, UserMessageBegin, engine, SH_MEMBER(this, &UserMessages::OnStartMessage_Post), true);
SH_REMOVE_HOOK(IVEngineServer, MessageEnd, engine, SH_MEMBER(this, &UserMessages::OnMessageEnd_Pre), false);
SH_REMOVE_HOOK(IVEngineServer, MessageEnd, engine, SH_MEMBER(this, &UserMessages::OnMessageEnd_Post), true);
#endif
}
m_HookCount = 0;
}
int UserMessages::GetMessageIndex(const char *msg)
{
int msgid;
#if SOURCE_ENGINE == SE_CSGO
// Can split this per engine and/or game later
return g_Cstrike15UsermessageHelpers.GetIndex(msg);
#else
if (!sm_trie_retrieve(m_Names, msg, reinterpret_cast<void **>(&msgid)))
int msgid;
if (!m_Names.retrieve(msg, &msgid))
{
if (m_FallbackSearch)
{
@@ -98,7 +126,7 @@ int UserMessages::GetMessageIndex(const char *msg)
{
if (strcmp(msgbuf, msg) == 0)
{
sm_trie_insert(m_Names, msg, reinterpret_cast<void *>(msgid));
m_Names.insert(msg, msgid);
return msgid;
}
msgid++;
@@ -108,16 +136,25 @@ int UserMessages::GetMessageIndex(const char *msg)
msgid = g_SMAPI->FindUserMessage(msg);
if (msgid != INVALID_MESSAGE_ID)
{
sm_trie_insert(m_Names, msg, reinterpret_cast<void *>(msgid));
}
m_Names.insert(msg, msgid);
}
return msgid;
#endif
}
bool UserMessages::GetMessageName(int msgid, char *buffer, size_t maxlength) const
{
#ifdef USE_PROTOBUF_USERMESSAGES
#if SOURCE_ENGINE == SE_CSGO
const char *pszName = g_Cstrike15UsermessageHelpers.GetName(msgid);
#endif
if (!pszName)
return false;
ke::SafeStrcpy(buffer, maxlength, pszName);
return true;
#else
if (m_FallbackSearch)
{
int size;
@@ -128,15 +165,19 @@ bool UserMessages::GetMessageName(int msgid, char *buffer, size_t maxlength) con
if (msg)
{
strncopy(buffer, msg, maxlength);
ke::SafeStrcpy(buffer, maxlength, msg);
return true;
}
return false;
#endif
}
bf_write *UserMessages::StartMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags)
bf_write *UserMessages::StartBitBufMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags)
{
#ifdef USE_PROTOBUF_USERMESSAGES
return NULL;
#else
bf_write *buffer;
if (m_InExec || m_InHook)
@@ -164,12 +205,89 @@ bf_write *UserMessages::StartMessage(int msg_id, const cell_t players[], unsigne
if (m_CurFlags & USERMSG_BLOCKHOOKS)
{
#if SOURCE_ENGINE >= SE_LEFT4DEAD
buffer = ENGINE_CALL(UserMessageBegin)(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id, g_SMAPI->GetUserMessage(msg_id));
#else
buffer = ENGINE_CALL(UserMessageBegin)(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id);
#endif
} else {
#if SOURCE_ENGINE >= SE_LEFT4DEAD
buffer = engine->UserMessageBegin(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id, g_SMAPI->GetUserMessage(msg_id));
#else
buffer = engine->UserMessageBegin(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id);
#endif
}
return buffer;
#endif // USE_PROTOBUF_USERMESSAGES
}
google::protobuf::Message *UserMessages::StartProtobufMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags)
{
#ifndef USE_PROTOBUF_USERMESSAGES
return NULL;
#else
protobuf::Message *buffer;
if (m_InExec || m_InHook)
{
return NULL;
}
if (msg_id < 0 || msg_id >= 255)
{
return NULL;
}
m_CurId = msg_id;
m_CellRecFilter.Initialize(players, playersNum);
m_CurFlags = flags;
if (m_CurFlags & USERMSG_INITMSG)
{
m_CellRecFilter.SetToInit(true);
}
if (m_CurFlags & USERMSG_RELIABLE)
{
m_CellRecFilter.SetToReliable(true);
}
m_InExec = true;
if (m_CurFlags & USERMSG_BLOCKHOOKS)
{
// direct message creation, return buffer "from engine". keep track
m_FakeEngineBuffer = GetMessagePrototype(msg_id)->New();
buffer = m_FakeEngineBuffer;
} else {
char messageName[32];
if (!GetMessageName(msg_id, messageName, sizeof(messageName)))
{
m_InExec = false;
return NULL;
}
protobuf::Message *msg = OnStartMessage_Pre(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id, messageName);
switch (m_FakeMetaRes)
{
case MRES_IGNORED:
case MRES_HANDLED:
m_FakeEngineBuffer = GetMessagePrototype(msg_id)->New();
buffer = m_FakeEngineBuffer;
break;
case MRES_OVERRIDE:
m_FakeEngineBuffer = GetMessagePrototype(msg_id)->New();
// fallthrough
case MRES_SUPERCEDE:
buffer = msg;
break;
}
OnStartMessage_Post(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id, messageName);
}
return buffer;
#endif // USE_PROTOBUF_USERMESSAGES
}
bool UserMessages::EndMessage()
@@ -179,12 +297,37 @@ bool UserMessages::EndMessage()
return false;
}
#if SOURCE_ENGINE == SE_CSGO
if (m_CurFlags & USERMSG_BLOCKHOOKS)
{
ENGINE_CALL(SendUserMessage)(static_cast<IRecipientFilter &>(m_CellRecFilter), m_CurId, *m_FakeEngineBuffer);
delete m_FakeEngineBuffer;
m_FakeEngineBuffer = NULL;
} else {
OnMessageEnd_Pre();
switch (m_FakeMetaRes)
{
case MRES_IGNORED:
case MRES_HANDLED:
case MRES_OVERRIDE:
engine->SendUserMessage(static_cast<IRecipientFilter &>(m_CellRecFilter), m_CurId, *m_FakeEngineBuffer);
delete m_FakeEngineBuffer;
m_FakeEngineBuffer = NULL;
break;
//case MRES_SUPERCEDE:
}
OnMessageEnd_Post();
}
#else
if (m_CurFlags & USERMSG_BLOCKHOOKS)
{
ENGINE_CALL(MessageEnd)();
} else {
engine->MessageEnd();
}
#endif // SE_CSGO
m_InExec = false;
m_CurFlags = 0;
@@ -193,7 +336,60 @@ bool UserMessages::EndMessage()
return true;
}
UserMessageType UserMessages::GetUserMessageType() const
{
#ifdef USE_PROTOBUF_USERMESSAGES
return UM_Protobuf;
#else
return UM_BitBuf;
#endif
}
bool UserMessages::HookUserMessage2(int msg_id,
IUserMessageListener *pListener,
bool intercept)
{
#ifdef USE_PROTOBUF_USERMESSAGES
return InternalHook(msg_id, (IProtobufUserMessageListener *)pListener, intercept, true);
#else
return InternalHook(msg_id, (IBitBufUserMessageListener *)pListener, intercept, true);
#endif
}
bool UserMessages::UnhookUserMessage2(int msg_id,
IUserMessageListener *pListener,
bool intercept)
{
#ifdef USE_PROTOBUF_USERMESSAGES
return InternalUnhook(msg_id, (IProtobufUserMessageListener *)pListener, intercept, true);
#else
return InternalUnhook(msg_id, (IBitBufUserMessageListener *)pListener, intercept, true);
#endif
}
bool UserMessages::HookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept)
{
#ifdef USE_PROTOBUF_USERMESSAGES
return InternalHook(msg_id, (IProtobufUserMessageListener *)pListener, intercept, false);
#else
return InternalHook(msg_id, (IBitBufUserMessageListener *)pListener, intercept, false);
#endif
}
bool UserMessages::UnhookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept)
{
#ifdef USE_PROTOBUF_USERMESSAGES
return InternalUnhook(msg_id, (IProtobufUserMessageListener *)pListener, intercept, false);
#else
return InternalUnhook(msg_id, (IBitBufUserMessageListener *)pListener, intercept, false);
#endif
}
#ifdef USE_PROTOBUF_USERMESSAGES
bool UserMessages::InternalHook(int msg_id, IProtobufUserMessageListener *pListener, bool intercept, bool isNew)
#else
bool UserMessages::InternalHook(int msg_id, IBitBufUserMessageListener *pListener, bool intercept, bool isNew)
#endif
{
if (msg_id < 0 || msg_id >= 255)
{
@@ -212,13 +408,19 @@ bool UserMessages::HookUserMessage(int msg_id, IUserMessageListener *pListener,
pInfo->Callback = pListener;
pInfo->IsHooked = false;
pInfo->KillMe = false;
pInfo->IsNew = isNew;
if (!m_HookCount++)
{
SH_ADD_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
SH_ADD_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
SH_ADD_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
SH_ADD_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Post, true);
#if SOURCE_ENGINE == SE_CSGO
SH_ADD_HOOK(IVEngineServer, SendUserMessage, engine, SH_MEMBER(this, &UserMessages::OnSendUserMessage_Pre), false);
SH_ADD_HOOK(IVEngineServer, SendUserMessage, engine, SH_MEMBER(this, &UserMessages::OnSendUserMessage_Post), true);
#else
SH_ADD_HOOK(IVEngineServer, UserMessageBegin, engine, SH_MEMBER(this, &UserMessages::OnStartMessage_Pre), false);
SH_ADD_HOOK(IVEngineServer, UserMessageBegin, engine, SH_MEMBER(this, &UserMessages::OnStartMessage_Post), true);
SH_ADD_HOOK(IVEngineServer, MessageEnd, engine, SH_MEMBER(this, &UserMessages::OnMessageEnd_Pre), false);
SH_ADD_HOOK(IVEngineServer, MessageEnd, engine, SH_MEMBER(this, &UserMessages::OnMessageEnd_Post), true);
#endif
}
if (intercept)
@@ -231,8 +433,21 @@ bool UserMessages::HookUserMessage(int msg_id, IUserMessageListener *pListener,
return true;
}
bool UserMessages::UnhookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept)
{
#ifdef USE_PROTOBUF_USERMESSAGES
const protobuf::Message *UserMessages::GetMessagePrototype(int msg_type)
{
#if SOURCE_ENGINE == SE_CSGO
return g_Cstrike15UsermessageHelpers.GetPrototype(msg_type);
#endif
}
#endif
#ifdef USE_PROTOBUF_USERMESSAGES
bool UserMessages::InternalUnhook(int msg_id, IProtobufUserMessageListener *pListener, bool intercept, bool isNew)
#else
bool UserMessages::InternalUnhook(int msg_id, IBitBufUserMessageListener *pListener, bool intercept, bool isNew)
#endif
{
MsgList *pList;
MsgIter iter;
ListenerInfo *pInfo;
@@ -247,7 +462,7 @@ bool UserMessages::UnhookUserMessage(int msg_id, IUserMessageListener *pListener
for (iter=pList->begin(); iter!=pList->end(); iter++)
{
pInfo = (*iter);
if (pInfo->Callback == pListener)
if (pInfo->Callback == pListener && pInfo->IsNew == isNew)
{
if (pInfo->IsHooked)
{
@@ -272,14 +487,77 @@ void UserMessages::_DecRefCounter()
{
if (--m_HookCount == 0)
{
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Post, true);
#if SOURCE_ENGINE == SE_CSGO
SH_REMOVE_HOOK(IVEngineServer, SendUserMessage, engine, SH_MEMBER(this, &UserMessages::OnSendUserMessage_Pre), false);
SH_REMOVE_HOOK(IVEngineServer, SendUserMessage, engine, SH_MEMBER(this, &UserMessages::OnSendUserMessage_Post), true);
#else
SH_REMOVE_HOOK(IVEngineServer, UserMessageBegin, engine, SH_MEMBER(this, &UserMessages::OnStartMessage_Pre), false);
SH_REMOVE_HOOK(IVEngineServer, UserMessageBegin, engine, SH_MEMBER(this, &UserMessages::OnStartMessage_Post), true);
SH_REMOVE_HOOK(IVEngineServer, MessageEnd, engine, SH_MEMBER(this, &UserMessages::OnMessageEnd_Pre), false);
SH_REMOVE_HOOK(IVEngineServer, MessageEnd, engine, SH_MEMBER(this, &UserMessages::OnMessageEnd_Post), true);
#endif
}
}
#if SOURCE_ENGINE == SE_CSGO
void UserMessages::OnSendUserMessage_Pre(IRecipientFilter &filter, int msg_type, const protobuf::Message &msg)
{
#if SOURCE_ENGINE == SE_CSGO
OnStartMessage_Pre(&filter, msg_type, g_Cstrike15UsermessageHelpers.GetName(msg_type));
#endif
if (m_FakeMetaRes == MRES_SUPERCEDE)
{
int size = msg.ByteSize();
uint8 *data = (uint8 *)stackalloc(size);
msg.SerializePartialToArray(data, size);
m_InterceptBuffer->ParsePartialFromArray(data, size);
}
else
{
m_FakeEngineBuffer = &const_cast<protobuf::Message &>(msg);
}
#if SOURCE_ENGINE == SE_CSGO
OnStartMessage_Post(&filter, msg_type, g_Cstrike15UsermessageHelpers.GetName(msg_type));
#endif
OnMessageEnd_Pre();
if (m_FakeMetaRes == MRES_SUPERCEDE)
RETURN_META(MRES_SUPERCEDE);
RETURN_META(MRES_IGNORED);
}
void UserMessages::OnSendUserMessage_Post(IRecipientFilter &filter, int msg_type, const protobuf::Message &msg)
{
OnMessageEnd_Post();
RETURN_META(MRES_IGNORED);
}
#endif
#ifdef USE_PROTOBUF_USERMESSAGES
#define UM_RETURN_META_VALUE(res, val) \
m_FakeMetaRes = res; \
return val;
#define UM_RETURN_META(res) \
m_FakeMetaRes = res; \
return;
#else
#define UM_RETURN_META_VALUE(res, val) \
RETURN_META_VALUE(res, val)
#define UM_RETURN_META(res) \
RETURN_META(res)
#endif
#if SOURCE_ENGINE == SE_CSGO
protobuf::Message *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name)
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name)
#else
bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_type)
#endif
{
bool is_intercept_empty = m_msgIntercepts[msg_type].empty();
bool is_hook_empty = m_msgHooks[msg_type].empty();
@@ -288,7 +566,7 @@ bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_typ
|| (m_InExec && (m_CurFlags & USERMSG_BLOCKHOOKS)))
{
m_InHook = false;
RETURN_META_VALUE(MRES_IGNORED, NULL);
UM_RETURN_META_VALUE(MRES_IGNORED, NULL);
}
m_CurId = msg_type;
@@ -298,42 +576,73 @@ bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_typ
if (!is_intercept_empty)
{
#ifdef USE_PROTOBUF_USERMESSAGES
if (m_InterceptBuffer)
delete m_InterceptBuffer;
m_InterceptBuffer = GetMessagePrototype(msg_type)->New();
UM_RETURN_META_VALUE(MRES_SUPERCEDE, m_InterceptBuffer);
#else
m_InterceptBuffer.Reset();
RETURN_META_VALUE(MRES_SUPERCEDE, &m_InterceptBuffer);
UM_RETURN_META_VALUE(MRES_SUPERCEDE, &m_InterceptBuffer);
#endif
}
RETURN_META_VALUE(MRES_IGNORED, NULL);
UM_RETURN_META_VALUE(MRES_IGNORED, NULL);
}
#if SOURCE_ENGINE == SE_CSGO
protobuf::Message *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name)
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
bf_write *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name)
#else
bf_write *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_type)
#endif
{
if (!m_InHook)
{
RETURN_META_VALUE(MRES_IGNORED, NULL);
UM_RETURN_META_VALUE(MRES_IGNORED, NULL);
}
#ifdef USE_PROTOBUF_USERMESSAGES
if (m_FakeMetaRes == MRES_SUPERCEDE)
m_OrigBuffer = m_InterceptBuffer;
else
m_OrigBuffer = m_FakeEngineBuffer;
#else
m_OrigBuffer = META_RESULT_ORIG_RET(bf_write *);
#endif
RETURN_META_VALUE(MRES_IGNORED, NULL);
UM_RETURN_META_VALUE(MRES_IGNORED, NULL);
}
void UserMessages::OnMessageEnd_Post()
{
if (!m_InHook || m_BlockEndPost)
if (!m_InHook)
{
RETURN_META(MRES_IGNORED);
UM_RETURN_META(MRES_IGNORED);
}
MsgList *pList;
MsgIter iter;
ListenerInfo *pInfo;
m_InHook = false;
pList = &m_msgIntercepts[m_CurId];
for (iter=pList->begin(); iter!=pList->end(); )
{
pInfo = (*iter);
if (m_BlockEndPost && !pInfo->IsNew)
{
continue;
}
pInfo->IsHooked = true;
pInfo->Callback->OnUserMessageSent(m_CurId);
if (pInfo->IsNew)
{
pInfo->Callback->OnPostUserMessage(m_CurId, !m_BlockEndPost);
}
if (pInfo->KillMe)
{
@@ -347,14 +656,20 @@ void UserMessages::OnMessageEnd_Post()
iter++;
}
m_InHook = false;
pList = &m_msgHooks[m_CurId];
for (iter=pList->begin(); iter!=pList->end(); )
{
pInfo = (*iter);
if (m_BlockEndPost && !pInfo->IsNew)
{
continue;
}
pInfo->IsHooked = true;
pInfo->Callback->OnUserMessageSent(m_CurId);
if (pInfo->IsNew)
{
pInfo->Callback->OnPostUserMessage(m_CurId, !m_BlockEndPost);
}
if (pInfo->KillMe)
{
@@ -373,7 +688,7 @@ void UserMessages::OnMessageEnd_Pre()
{
if (!m_InHook)
{
RETURN_META(MRES_IGNORED);
UM_RETURN_META(MRES_IGNORED);
}
MsgList *pList;
@@ -389,7 +704,11 @@ void UserMessages::OnMessageEnd_Pre()
{
pInfo = (*iter);
pInfo->IsHooked = true;
#ifdef USE_PROTOBUF_USERMESSAGES
res = pInfo->Callback->InterceptUserMessage(m_CurId, m_InterceptBuffer, m_CurRecFilter);
#else
res = pInfo->Callback->InterceptUserMessage(m_CurId, &m_InterceptBuffer, m_CurRecFilter);
#endif
intercepted = true;
@@ -435,43 +754,61 @@ void UserMessages::OnMessageEnd_Pre()
iter++;
}
if (handled)
{
goto supercede;
}
if (intercepted)
if (!handled && intercepted)
{
#if SOURCE_ENGINE == SE_CSGO
ENGINE_CALL(SendUserMessage)(static_cast<IRecipientFilter &>(*m_CurRecFilter), m_CurId, *m_InterceptBuffer);
#else
bf_write *engine_bfw;
#if SOURCE_ENGINE >= SE_LEFT4DEAD
engine_bfw = ENGINE_CALL(UserMessageBegin)(m_CurRecFilter, m_CurId, g_SMAPI->GetUserMessage(m_CurId));
#else
engine_bfw = ENGINE_CALL(UserMessageBegin)(m_CurRecFilter, m_CurId);
#endif
m_ReadBuffer.StartReading(m_InterceptBuffer.GetBasePointer(), m_InterceptBuffer.GetNumBytesWritten());
engine_bfw->WriteBitsFromBuffer(&m_ReadBuffer, m_InterceptBuffer.GetNumBitsWritten());
ENGINE_CALL(MessageEnd)();
#endif // SE_CSGO
}
pList = &m_msgHooks[m_CurId];
for (iter=pList->begin(); iter!=pList->end(); )
{
pInfo = (*iter);
pInfo->IsHooked = true;
pInfo->Callback->OnUserMessage(m_CurId, m_OrigBuffer, m_CurRecFilter);
#if SOURCE_ENGINE == SE_CSGO
int size = m_OrigBuffer->ByteSize();
uint8 *data = (uint8 *)stackalloc(size);
m_OrigBuffer->SerializePartialToArray(data, size);
if (pInfo->KillMe)
protobuf::Message *pTempMsg = GetMessagePrototype(m_CurId)->New();
pTempMsg->ParsePartialFromArray(data, size);
#else
bf_write *pTempMsg = m_OrigBuffer;
#endif
pList = &m_msgHooks[m_CurId];
for (iter=pList->begin(); iter!=pList->end(); )
{
iter = pList->erase(iter);
m_FreeListeners.push(pInfo);
_DecRefCounter();
continue;
pInfo = (*iter);
pInfo->IsHooked = true;
pInfo->Callback->OnUserMessage(m_CurId, pTempMsg, m_CurRecFilter);
if (pInfo->KillMe)
{
iter = pList->erase(iter);
m_FreeListeners.push(pInfo);
_DecRefCounter();
continue;
}
pInfo->IsHooked = false;
iter++;
}
pInfo->IsHooked = false;
iter++;
#if SOURCE_ENGINE == SE_CSGO
delete pTempMsg;
#endif
}
RETURN_META((intercepted) ? MRES_SUPERCEDE : MRES_IGNORED);
UM_RETURN_META((intercepted) ? MRES_SUPERCEDE : MRES_IGNORED);
supercede:
m_InHook = false;
m_BlockEndPost = true;
RETURN_META(MRES_SUPERCEDE);
UM_RETURN_META(MRES_SUPERCEDE);
}
+70 -8
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -32,22 +32,44 @@
#ifndef _INCLUDE_SOURCEMOD_CUSERMESSAGES_H_
#define _INCLUDE_SOURCEMOD_CUSERMESSAGES_H_
#include "ShareSys.h"
#include <IUserMessages.h>
#include "sourcemm_api.h"
#include "sm_trie.h"
#include <sm_stringhashmap.h>
#include "sm_stringutil.h"
#include "CellRecipientFilter.h"
#include "sm_globals.h"
#include <sh_list.h>
#include <sh_stack.h>
using namespace SourceHook;
using namespace SourceMod;
#if SOURCE_ENGINE == SE_CSGO
#define USE_PROTOBUF_USERMESSAGES
#endif
#ifdef USE_PROTOBUF_USERMESSAGES
#include <google/protobuf/message.h>
#include <google/protobuf/descriptor.h>
#include <netmessages.pb.h>
using namespace google;
#else
#include <bitbuf.h>
#endif
#define INVALID_MESSAGE_ID -1
struct ListenerInfo
{
IUserMessageListener *Callback;
#ifdef USE_PROTOBUF_USERMESSAGES
IProtobufUserMessageListener *Callback;
#else
IBitBufUserMessageListener *Callback;
#endif
bool IsHooked;
bool KillMe;
bool IsNew;
};
typedef List<ListenerInfo *> MsgList;
@@ -69,30 +91,70 @@ public: //IUserMessages
bool GetMessageName(int msgid, char *buffer, size_t maxlength) const;
bool HookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept=false);
bool UnhookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept=false);
bf_write *StartMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags);
bf_write *StartBitBufMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags);
google::protobuf::Message *StartProtobufMessage(int msg_id, const cell_t players[], unsigned int playersNum, int flags);
bool EndMessage();
bool HookUserMessage2(int msg_id,
IUserMessageListener *pListener,
bool intercept=false);
bool UnhookUserMessage2(int msg_id,
IUserMessageListener *pListener,
bool intercept=false);
UserMessageType GetUserMessageType() const;
public:
#if SOURCE_ENGINE == SE_CSGO
void OnSendUserMessage_Pre(IRecipientFilter &filter, int msg_type, const protobuf::Message &msg);
void OnSendUserMessage_Post(IRecipientFilter &filter, int msg_type, const protobuf::Message &msg);
#endif
#if SOURCE_ENGINE == SE_CSGO
protobuf::Message *OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name);
protobuf::Message *OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name);
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
bf_write *OnStartMessage_Pre(IRecipientFilter *filter, int msg_type, const char *msg_name);
bf_write *OnStartMessage_Post(IRecipientFilter *filter, int msg_type, const char *msg_name);
#else
bf_write *OnStartMessage_Pre(IRecipientFilter *filter, int msg_type);
bf_write *OnStartMessage_Post(IRecipientFilter *filter, int msg_type);
#endif
void OnMessageEnd_Pre();
void OnMessageEnd_Post();
private:
#ifdef USE_PROTOBUF_USERMESSAGES
const protobuf::Message *GetMessagePrototype(int msg_type);
bool InternalHook(int msg_id, IProtobufUserMessageListener *pListener, bool intercept, bool isNew);
bool InternalUnhook(int msg_id, IProtobufUserMessageListener *pListener, bool intercept, bool isNew);
#else
bool InternalHook(int msg_id, IBitBufUserMessageListener *pListener, bool intercept, bool isNew);
bool InternalUnhook(int msg_id, IBitBufUserMessageListener *pListener, bool intercept, bool isNew);
#endif
void _DecRefCounter();
private:
List<ListenerInfo *> m_msgHooks[255];
List<ListenerInfo *> m_msgIntercepts[255];
CStack<ListenerInfo *> m_FreeListeners;
unsigned char m_pBase[2500];
IRecipientFilter *m_CurRecFilter;
#ifndef USE_PROTOBUF_USERMESSAGES
unsigned char m_pBase[2500];
bf_write m_InterceptBuffer;
bf_write *m_OrigBuffer;
bf_read m_ReadBuffer;
#else
// The engine used to provide this. Now we track it.
protobuf::Message *m_OrigBuffer;
protobuf::Message *m_FakeEngineBuffer;
META_RES m_FakeMetaRes;
protobuf::Message *m_InterceptBuffer;
#endif
size_t m_HookCount;
bool m_InHook;
bool m_BlockEndPost;
#ifndef USE_PROTOBUF_USERMESSAGES
bool m_FallbackSearch;
Trie *m_Names;
StringHashMap<int> m_Names;
#endif
CellRecipientFilter m_CellRecFilter;
bool m_InExec;
int m_CurFlags;
+77
View File
@@ -0,0 +1,77 @@
// vim: set ts=4 sw=4 tw=99 noet :
// =============================================================================
// SourceMod
// Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#ifndef _INCLUDE_SOURCEMOD_CCOMMANDARGS_IMPL_H_
#define _INCLUDE_SOURCEMOD_CCOMMANDARGS_IMPL_H_
#include "sourcemm_api.h"
#include <IRootConsoleMenu.h>
#include <compat_wrappers.h>
#if SOURCE_ENGINE==SE_EPISODEONE || SOURCE_ENGINE==SE_DARKMESSIAH
class EngineArgs : public ICommandArgs
{
public:
EngineArgs(const CCommand& _cmd)
{
}
const char *Arg(int n) const
{
return engine->Cmd_Argv(n);
}
int ArgC() const
{
return engine->Cmd_Argc();
}
const char *ArgS() const
{
return engine->Cmd_Args();
}
};
#else
class EngineArgs : public ICommandArgs
{
const CCommand *cmd;
public:
EngineArgs(const CCommand& _cmd) : cmd(&_cmd)
{
}
const char *Arg(int n) const
{
return cmd->Arg(n);
}
int ArgC() const
{
return cmd->ArgC();
}
const char *ArgS() const
{
return cmd->ArgS();
}
};
#endif
#endif // _INCLUDE_SOURCEMOD_CCOMMANDARGS_IMPL_H_
+83 -85
View File
@@ -1,33 +1,29 @@
/**
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
// vim: set ts=4 sw=4 tw=99 et:
// =============================================================================
// SourceMod
// Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
// =============================================================================
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License, version 3.0, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, AlliedModders LLC gives you permission to link the
// code of this program (as well as its derivative works) to "Half-Life 2," the
// "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
// by the Valve Corporation. You must obey the GNU General Public License in
// all respects for all other code used. Additionally, AlliedModders LLC grants
// this exception to all derivative works. AlliedModders LLC defines further
// exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
// or <http://www.sourcemod.net/license.php>.
#include "sm_globals.h"
#include <sh_list.h>
@@ -35,9 +31,18 @@
#include "concmd_cleaner.h"
#include "sm_stringutil.h"
#include "sourcemm_api.h"
#include "compat_wrappers.h"
#include <amtl/am-string.h>
#if defined ORANGEBOX_BUILD
#if SOURCE_ENGINE >= SE_ORANGEBOX
SH_DECL_HOOK1_void(ICvar, UnregisterConCommand, SH_NOATTRIB, 0, ConCommandBase *);
#if SOURCE_ENGINE == SE_CSGO
SH_DECL_HOOK2_void(ICvar, RegisterConCommand, SH_NOATTRIB, 0, ConCommandBase *, bool);
#else
SH_DECL_HOOK1_void(ICvar, RegisterConCommand, SH_NOATTRIB, 0, ConCommandBase *);
#endif
#else
SH_DECL_HOOK1_void(ICvar, RegisterConCommandBase, SH_NOATTRIB, 0, ConCommandBase *);
#endif
using namespace SourceHook;
@@ -50,64 +55,73 @@ struct ConCommandInfo
};
List<ConCommandInfo *> tracked_bases;
IConCommandLinkListener *IConCommandLinkListener::head = NULL;
ConCommandBase *FindConCommandBase(const char *name);
class ConCommandCleaner : public SMGlobalClass
{
public:
#if defined ORANGEBOX_BUILD
void OnSourceModAllInitialized()
{
SH_ADD_HOOK_MEMFUNC(ICvar, UnregisterConCommand, icvar, this, &ConCommandCleaner::UnlinkConCommandBase, false);
#if SOURCE_ENGINE >= SE_ORANGEBOX
SH_ADD_HOOK(ICvar, UnregisterConCommand, icvar, SH_MEMBER(this, &ConCommandCleaner::UnlinkConCommandBase), false);
SH_ADD_HOOK(ICvar, RegisterConCommand, icvar, SH_MEMBER(this, &ConCommandCleaner::LinkConCommandBase), false);
#else
SH_ADD_HOOK(ICvar, RegisterConCommandBase, icvar, SH_MEMBER(this, &ConCommandCleaner::LinkConCommandBase), false);
#endif
}
void OnSourceModShutdown()
{
SH_REMOVE_HOOK_MEMFUNC(ICvar, UnregisterConCommand, icvar, this, &ConCommandCleaner::UnlinkConCommandBase, false);
}
#if SOURCE_ENGINE >= SE_ORANGEBOX
SH_REMOVE_HOOK(ICvar, UnregisterConCommand, icvar, SH_MEMBER(this, &ConCommandCleaner::UnlinkConCommandBase), false);
SH_REMOVE_HOOK(ICvar, RegisterConCommand, icvar, SH_MEMBER(this, &ConCommandCleaner::LinkConCommandBase), false);
#else
SH_REMOVE_HOOK(ICvar, RegisterConCommandBase, icvar, SH_MEMBER(this, &ConCommandCleaner::LinkConCommandBase), false);
#endif
}
#if SOURCE_ENGINE == SE_CSGO
void LinkConCommandBase(ConCommandBase *pBase, bool unknown)
#else
void LinkConCommandBase(ConCommandBase *pBase)
#endif
{
IConCommandLinkListener *listener = IConCommandLinkListener::head;
while (listener)
{
listener->OnLinkConCommand(pBase);
listener = listener->next;
}
}
void UnlinkConCommandBase(ConCommandBase *pBase)
{
ConCommandInfo *pInfo;
List<ConCommandInfo *>::iterator iter = tracked_bases.begin();
if (pBase)
IConCommandLinkListener *listener = IConCommandLinkListener::head;
while (listener)
{
while (iter != tracked_bases.end())
{
if ((*iter)->pBase == pBase)
{
pInfo = (*iter);
iter = tracked_bases.erase(iter);
pInfo->cls->OnUnlinkConCommandBase(pBase, pBase->GetName(), true);
delete pInfo;
}
else
{
iter++;
}
}
}
else
{
while (iter != tracked_bases.end())
{
/* This is just god-awful! */
if (FindConCommandBase((*iter)->name) != (*iter)->pBase)
{
pInfo = (*iter);
iter = tracked_bases.erase(iter);
pInfo->cls->OnUnlinkConCommandBase(pBase, pInfo->name, false);
delete pInfo;
}
else
{
iter++;
}
}
listener->OnUnlinkConCommand(pBase);
listener = listener->next;
}
while (iter != tracked_bases.end())
{
if ((*iter)->pBase == pBase)
{
pInfo = (*iter);
iter = tracked_bases.erase(iter);
pInfo->cls->OnUnlinkConCommandBase(pBase, pBase->GetName());
delete pInfo;
}
else
{
iter++;
}
}
}
void AddTarget(ConCommandBase *pBase, IConCommandTracker *cls)
@@ -116,7 +130,7 @@ public:
info->pBase = pBase;
info->cls = cls;
strncopy(info->name, pBase->GetName(), sizeof(info->name));
ke::SafeStrcpy(info->name, sizeof(info->name), pBase->GetName());
tracked_bases.push_back(info);
}
@@ -143,22 +157,6 @@ public:
}
} s_ConCmdTracker;
ConCommandBase *FindConCommandBase(const char *name)
{
const ConCommandBase *pBase = icvar->GetCommands();
while (pBase != NULL)
{
if (strcmp(pBase->GetName(), name) == 0)
{
return const_cast<ConCommandBase *>(pBase);
}
pBase = pBase->GetNext();
}
return NULL;
}
void TrackConCommandBase(ConCommandBase *pBase, IConCommandTracker *me)
{
s_ConCmdTracker.AddTarget(pBase, me);
+24 -3
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -35,12 +35,33 @@
class IConCommandTracker
{
public:
virtual void OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name, bool is_read_safe) = 0;
virtual void OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name) = 0;
};
ConCommandBase *FindConCommandBase(const char *name);
void TrackConCommandBase(ConCommandBase *pBase, IConCommandTracker *me);
void UntrackConCommandBase(ConCommandBase *pBase, IConCommandTracker *me);
void Global_OnUnlinkConCommandBase(ConCommandBase *pBase);
class IConCommandLinkListener
{
friend class ConCommandCleaner;
static IConCommandLinkListener *head;
IConCommandLinkListener *next;
public:
IConCommandLinkListener()
{
next = head;
head = this;
}
virtual void OnLinkConCommand(ConCommandBase *pBase)
{
}
virtual void OnUnlinkConCommand(ConCommandBase *pBase)
{
}
};
#endif //_INCLUDE_CONCMD_TRACKER_H_
-551
View File
@@ -1,551 +0,0 @@
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $Workfile: $
// $Date: 2006-08-13 06:34:30 -0500 (Sun, 13 Aug 2006) $
//
//-----------------------------------------------------------------------------
// $NoKeywords: $
//=============================================================================//
#ifndef CONVAR_H
#define CONVAR_H
#if _WIN32
#pragma once
#endif
#include "tier0/dbg.h"
#ifdef _WIN32
#define FORCEINLINE_CVAR FORCEINLINE
#elif _LINUX
#define FORCEINLINE_CVAR __inline__ FORCEINLINE
#else
#error "implement me"
#endif
// The default, no flags at all
#define FCVAR_NONE 0
// Command to ConVars and ConCommands
// ConVar Systems
#define FCVAR_UNREGISTERED (1<<0) // If this is set, don't add to linked list, etc.
#define FCVAR_LAUNCHER (1<<1) // defined by launcher
#define FCVAR_GAMEDLL (1<<2) // defined by the game DLL
#define FCVAR_CLIENTDLL (1<<3) // defined by the client DLL
#define FCVAR_MATERIAL_SYSTEM (1<<4) // Defined by the material system.
#define FCVAR_DATACACHE (1<<19) // Defined by the datacache system.
#define FCVAR_STUDIORENDER (1<<15) // Defined by the studiorender system.
#define FCVAR_FILESYSTEM (1<<21) // Defined by the file system.
#define FCVAR_PLUGIN (1<<18) // Defined by a 3rd party plugin.
#define FCVAR_TOOLSYSTEM (1<<20) // Defined by an IToolSystem library
#define FCVAR_SOUNDSYSTEM (1<<23) // Defined by the soundsystem library
#define FCVAR_INPUTSYSTEM (1<<25) // Defined by the inputsystem dll
#define FCVAR_NETWORKSYSTEM (1<<26) // Defined by the network system
// NOTE!! if you add a cvar system, add it here too!!!!
// the engine lacks a cvar flag, but needs it for xbox
// an engine cvar is thus a cvar not marked with any other system
#define FCVAR_NON_ENGINE ((FCVAR_LAUNCHER|FCVAR_GAMEDLL|FCVAR_CLIENTDLL|FCVAR_MATERIAL_SYSTEM|FCVAR_DATACACHE|FCVAR_STUDIORENDER|FCVAR_FILESYSTEM|FCVAR_PLUGIN|FCVAR_TOOLSYSTEM|FCVAR_SOUNDSYSTEM|FCVAR_INPUTSYSTEM|FCVAR_NETWORKSYSTEM))
// ConVar only
#define FCVAR_PROTECTED (1<<5) // It's a server cvar, but we don't send the data since it's a password, etc. Sends 1 if it's not bland/zero, 0 otherwise as value
#define FCVAR_SPONLY (1<<6) // This cvar cannot be changed by clients connected to a multiplayer server.
#define FCVAR_ARCHIVE (1<<7) // set to cause it to be saved to vars.rc
#define FCVAR_NOTIFY (1<<8) // notifies players when changed
#define FCVAR_USERINFO (1<<9) // changes the client's info string
#define FCVAR_CHEAT (1<<14) // Only useable in singleplayer / debug / multiplayer & sv_cheats
#define FCVAR_PRINTABLEONLY (1<<10) // This cvar's string cannot contain unprintable characters ( e.g., used for player name etc ).
#define FCVAR_UNLOGGED (1<<11) // If this is a FCVAR_SERVER, don't log changes to the log file / console if we are creating a log
#define FCVAR_NEVER_AS_STRING (1<<12) // never try to print that cvar
// It's a ConVar that's shared between the client and the server.
// At signon, the values of all such ConVars are sent from the server to the client (skipped for local
// client, of course )
// If a change is requested it must come from the console (i.e., no remote client changes)
// If a value is changed while a server is active, it's replicated to all connected clients
#define FCVAR_REPLICATED (1<<13) // server setting enforced on clients, TODO rename to FCAR_SERVER at some time
#define FCVAR_DEMO (1<<16) // record this cvar when starting a demo file
#define FCVAR_DONTRECORD (1<<17) // don't record these command in demofiles
#define FCVAR_NOT_CONNECTED (1<<22) // cvar cannot be changed by a client that is connected to a server
#define FCVAR_ARCHIVE_XBOX (1<<24) // cvar written to config.cfg on the Xbox
// #define FCVAR_AVAILABLE (1<<27)
// #define FCVAR_AVAILABLE (1<<28)
// #define FCVAR_AVAILABLE (1<<29)
// #define FCVAR_AVAILABLE (1<<30)
// #define FCVAR_AVAILABLE (1<<31)
class ConVar;
class ConCommand;
class ConCommandBase;
// Any executable that wants to use ConVars need to implement one of
// these to hook up access to console variables.
class IConCommandBaseAccessor
{
public:
// Flags is a combination of FCVAR flags in cvar.h.
// hOut is filled in with a handle to the variable.
virtual bool RegisterConCommandBase( ConCommandBase *pVar )=0;
};
// You don't have to instantiate one of these, just call its
// OneTimeInit function when your executable is initializing.
class ConCommandBaseMgr
{
public:
// Call this ONCE when the executable starts up.
static void OneTimeInit( IConCommandBaseAccessor *pAccessor );
#ifdef _XBOX
static bool Fixup( ConCommandBase* pConCommandBase );
#ifndef _RETAIL
static void PublishCommands( bool bForce );
#endif
#endif
};
// Called when a ConVar changes value
typedef void ( *FnChangeCallback )( ConVar *var, char const *pOldString );
// Called when a ConCommand needs to execute
typedef void ( *FnCommandCallback )( void );
#define COMMAND_COMPLETION_MAXITEMS 64
#define COMMAND_COMPLETION_ITEM_LENGTH 64
// Returns 0 to COMMAND_COMPLETION_MAXITEMS worth of completion strings
typedef int ( *FnCommandCompletionCallback )( char const *partial, char commands[ COMMAND_COMPLETION_MAXITEMS ][ COMMAND_COMPLETION_ITEM_LENGTH ] );
//-----------------------------------------------------------------------------
// Purpose: The base console invoked command/cvar interface
//-----------------------------------------------------------------------------
class ConCommandBase
{
friend class ConCommandBaseMgr;
friend class CCvar;
friend class ConVar;
friend class ConCommand;
public:
ConCommandBase( void );
ConCommandBase( char const *pName, char const *pHelpString = 0,
int flags = 0 );
virtual ~ConCommandBase( void );
virtual bool IsCommand( void ) const;
// Check flag
virtual bool IsBitSet( int flag ) const;
// Set flag
virtual void AddFlags( int flags );
// Return name of cvar
virtual char const *GetName( void ) const;
// Return help text for cvar
virtual char const *GetHelpText( void ) const;
// Deal with next pointer
const ConCommandBase *GetNext( void ) const;
void SetNext( ConCommandBase *next );
virtual bool IsRegistered( void ) const;
// Global methods
static ConCommandBase const *GetCommands( void );
static void AddToList( ConCommandBase *var );
static void RemoveFlaggedCommands( int flag );
static void RevertFlaggedCvars( int flag );
static ConCommandBase const *FindCommand( char const *name );
protected:
virtual void Create( char const *pName, char const *pHelpString = 0,
int flags = 0 );
// Used internally by OneTimeInit to initialize.
virtual void Init();
// Internal copy routine ( uses new operator from correct module )
char *CopyString( char const *from );
// Next ConVar in chain
ConCommandBase *m_pNext;
private:
// Has the cvar been added to the global list?
bool m_bRegistered;
// Static data
char const *m_pszName;
char const *m_pszHelpString;
// ConVar flags
int m_nFlags;
protected:
// ConVars add themselves to this list for the executable. Then ConVarMgr::Init() runs through
// all the console variables and registers them.
static ConCommandBase *s_pConCommandBases;
// ConVars in this executable use this 'global' to access values.
static IConCommandBaseAccessor *s_pAccessor;
public: // Hackalicous
inline int GetFlags() const
{
return m_nFlags;
}
inline void SetFlags(int flags)
{
m_nFlags = flags;
}
};
//-----------------------------------------------------------------------------
// Purpose: The console invoked command
//-----------------------------------------------------------------------------
class ConCommand : public ConCommandBase
{
friend class ConCommandBaseMgr;
friend class CCvar;
#ifdef _STATIC_LINKED
friend class G_ConCommand;
friend class C_ConCommand;
friend class M_ConCommand;
friend class S_ConCommand;
friend class D_ConCommand;
#endif
public:
typedef ConCommandBase BaseClass;
ConCommand( void );
ConCommand( char const *pName, FnCommandCallback callback,
char const *pHelpString = 0, int flags = 0, FnCommandCompletionCallback completionFunc = 0 );
virtual ~ConCommand( void );
virtual bool IsCommand( void ) const;
virtual int AutoCompleteSuggest( char const *partial, char commands[ COMMAND_COMPLETION_MAXITEMS ][ COMMAND_COMPLETION_ITEM_LENGTH ] );
virtual bool CanAutoComplete( void );
// Invoke the function
virtual void Dispatch( void );
private:
virtual void Create( char const *pName, FnCommandCallback callback,
char const *pHelpString = 0, int flags = 0, FnCommandCompletionCallback completionFunc = 0 );
// Call this function when executing the command
FnCommandCallback m_fnCommandCallback;
FnCommandCompletionCallback m_fnCompletionCallback;
bool m_bHasCompletionCallback;
public: // Hackalicous
inline FnCommandCallback GetCallback() const
{
return m_fnCommandCallback;
}
};
//-----------------------------------------------------------------------------
// Purpose: A console variable
//-----------------------------------------------------------------------------
class ConVar : public ConCommandBase
{
friend class ConCommandBaseMgr;
friend class CCvar;
friend class CDefaultCvar;
#ifdef _STATIC_LINKED
friend class G_ConVar;
friend class C_ConVar;
friend class M_ConVar;
friend class S_ConVar;
friend class D_ConVar;
#endif
public:
typedef ConCommandBase BaseClass;
ConVar( char const *pName, char const *pDefaultValue, int flags = 0);
ConVar( char const *pName, char const *pDefaultValue, int flags,
char const *pHelpString );
ConVar( char const *pName, char const *pDefaultValue, int flags,
char const *pHelpString, bool bMin, float fMin, bool bMax, float fMax );
ConVar( char const *pName, char const *pDefaultValue, int flags,
char const *pHelpString, FnChangeCallback callback );
ConVar( char const *pName, char const *pDefaultValue, int flags,
char const *pHelpString, bool bMin, float fMin, bool bMax, float fMax,
FnChangeCallback callback );
virtual ~ConVar( void );
virtual bool IsBitSet( int flag ) const;
virtual char const* GetHelpText( void ) const;
virtual bool IsRegistered( void ) const;
virtual char const *GetName( void ) const;
virtual void AddFlags( int flags );
virtual bool IsCommand( void ) const;
// Install a change callback (there shouldn't already be one....)
void InstallChangeCallback( FnChangeCallback callback );
// Retrieve value
FORCEINLINE_CVAR float GetFloat( void ) const;
FORCEINLINE_CVAR int GetInt( void ) const;
FORCEINLINE_CVAR bool GetBool() const { return !!GetInt(); }
FORCEINLINE_CVAR char const *GetString( void ) const;
// Any function that allocates/frees memory needs to be virtual or else you'll have crashes
// from alloc/free across dll/exe boundaries.
// These just call into the IConCommandBaseAccessor to check flags and set the var (which ends up calling InternalSetValue).
virtual void SetValue( char const *value );
virtual void SetValue( float value );
virtual void SetValue( int value );
// Reset to default value
void Revert( void );
// True if it has a min/max setting
bool GetMin( float& minVal ) const;
bool GetMax( float& maxVal ) const;
char const *GetDefault( void ) const;
static void RevertAll( void );
private:
// Called by CCvar when the value of a var is changing.
virtual void InternalSetValue(char const *value);
// For CVARs marked FCVAR_NEVER_AS_STRING
virtual void InternalSetFloatValue( float fNewValue );
virtual void InternalSetIntValue( int nValue );
virtual bool ClampValue( float& value );
virtual void ChangeStringValue( char const *tempVal );
virtual void Create( char const *pName, char const *pDefaultValue, int flags = 0,
char const *pHelpString = 0, bool bMin = false, float fMin = 0.0,
bool bMax = false, float fMax = false, FnChangeCallback callback = 0 );
// Used internally by OneTimeInit to initialize.
virtual void Init();
private:
// This either points to "this" or it points to the original declaration of a ConVar.
// This allows ConVars to exist in separate modules, and they all use the first one to be declared.
// m_pParent->m_pParent must equal m_pParent (ie: m_pParent must be the root, or original, ConVar).
ConVar *m_pParent;
// Static data
char const *m_pszDefaultValue;
// Value
// Dynamically allocated
char *m_pszString;
int m_StringLength;
// Values
float m_fValue;
int m_nValue;
// Min/Max values
bool m_bHasMin;
float m_fMinVal;
bool m_bHasMax;
float m_fMaxVal;
// Call this function when ConVar changes
FnChangeCallback m_fnChangeCallback;
public: // Hackalicous
inline FnChangeCallback GetCallback() const
{
return m_fnChangeCallback;
}
inline void SetMin(bool set, float min=0.0)
{
m_bHasMin = set;
m_fMinVal = min;
}
inline void SetMax(bool set, float max=0.0)
{
m_bHasMax = set;
m_fMaxVal = max;
}
};
//-----------------------------------------------------------------------------
// Purpose: Return ConVar value as a float
// Output : float
//-----------------------------------------------------------------------------
FORCEINLINE_CVAR float ConVar::GetFloat( void ) const
{
return m_pParent->m_fValue;
}
//-----------------------------------------------------------------------------
// Purpose: Return ConVar value as an int
// Output : int
//-----------------------------------------------------------------------------
FORCEINLINE_CVAR int ConVar::GetInt( void ) const
{
return m_pParent->m_nValue;
}
//-----------------------------------------------------------------------------
// Purpose: Return ConVar value as a string, return "" for bogus string pointer, etc.
// Output : char const *
//-----------------------------------------------------------------------------
FORCEINLINE_CVAR char const *ConVar::GetString( void ) const
{
if ( m_nFlags & FCVAR_NEVER_AS_STRING )
{
return "FCVAR_NEVER_AS_STRING";
}
return ( m_pParent->m_pszString ) ? m_pParent->m_pszString : "";
}
#ifdef _STATIC_LINKED
// identifies subsystem via piggybacking constructors with flags
class G_ConCommand : public ConCommand
{
public:
G_ConCommand(char const *pName, FnCommandCallback callback, char const *pHelpString = 0, int flags = 0, FnCommandCompletionCallback completionFunc = 0 ) : ConCommand(pName, callback, pHelpString, flags|FCVAR_GAMEDLL, completionFunc) {}
};
class C_ConCommand : public ConCommand
{
public:
C_ConCommand(char const *pName, FnCommandCallback callback, char const *pHelpString = 0, int flags = 0, FnCommandCompletionCallback completionFunc = 0 ) : ConCommand(pName, callback, pHelpString, flags|FCVAR_CLIENTDLL, completionFunc) {}
};
class M_ConCommand : public ConCommand
{
public:
M_ConCommand(char const *pName, FnCommandCallback callback, char const *pHelpString = 0, int flags = 0, FnCommandCompletionCallback completionFunc = 0 ) : ConCommand(pName, callback, pHelpString, flags|FCVAR_MATERIAL_SYSTEM, completionFunc) {}
};
class S_ConCommand : public ConCommand
{
public:
S_ConCommand(char const *pName, FnCommandCallback callback, char const *pHelpString = 0, int flags = 0, FnCommandCompletionCallback completionFunc = 0 ) : ConCommand(pName, callback, pHelpString, flags|FCVAR_STUDIORENDER, completionFunc) {}
};
class D_ConCommand : public ConCommand
{
public:
D_ConCommand(char const *pName, FnCommandCallback callback, char const *pHelpString = 0, int flags = 0, FnCommandCompletionCallback completionFunc = 0 ) : ConCommand(pName, callback, pHelpString, flags|FCVAR_DATACACHE, completionFunc) {}
};
typedef void ( *G_FnChangeCallback )( G_ConVar *var, char const *pOldString );
typedef void ( *C_FnChangeCallback )( C_ConVar *var, char const *pOldString );
typedef void ( *M_FnChangeCallback )( M_ConVar *var, char const *pOldString );
typedef void ( *S_FnChangeCallback )( S_ConVar *var, char const *pOldString );
typedef void ( *D_FnChangeCallback )( D_ConVar *var, char const *pOldString );
class G_ConVar : public ConVar
{
public:
G_ConVar( char const *pName, char const *pDefaultValue, int flags = 0) : ConVar(pName, pDefaultValue, flags|FCVAR_GAMEDLL) {}
G_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString ) : ConVar(pName, pDefaultValue, flags|FCVAR_GAMEDLL, pHelpString ) {}
G_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, bool bMin, float fMin, bool bMax, float fMax ) : ConVar(pName, pDefaultValue, flags|FCVAR_GAMEDLL, pHelpString, bMin, fMin, bMax, fMax) {}
G_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, G_FnChangeCallback callback ) : ConVar(pName, pDefaultValue, flags|FCVAR_GAMEDLL, pHelpString, (FnChangeCallback)callback ) {}
G_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, bool bMin, float fMin, bool bMax, float fMax, G_FnChangeCallback callback ) : ConVar(pName, pDefaultValue, flags|FCVAR_GAMEDLL, pHelpString, bMin, fMin, bMax, fMax, (FnChangeCallback)callback ) {}
};
class C_ConVar : public ConVar
{
public:
C_ConVar( char const *pName, char const *pDefaultValue, int flags = 0) : ConVar(pName, pDefaultValue, flags|FCVAR_CLIENTDLL) {}
C_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString ) : ConVar(pName, pDefaultValue, flags|FCVAR_CLIENTDLL, pHelpString ) {}
C_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, bool bMin, float fMin, bool bMax, float fMax ) : ConVar(pName, pDefaultValue, flags|FCVAR_CLIENTDLL, pHelpString, bMin, fMin, bMax, fMax) {}
C_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, C_FnChangeCallback callback ) : ConVar(pName, pDefaultValue, flags|FCVAR_CLIENTDLL, pHelpString, (FnChangeCallback)callback ) {}
C_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, bool bMin, float fMin, bool bMax, float fMax, C_FnChangeCallback callback ) : ConVar(pName, pDefaultValue, flags|FCVAR_CLIENTDLL, pHelpString, bMin, fMin, bMax, fMax, (FnChangeCallback)callback ) {}
};
class M_ConVar : public ConVar
{
public:
M_ConVar( char const *pName, char const *pDefaultValue, int flags = 0) : ConVar(pName, pDefaultValue, flags|FCVAR_MATERIAL_SYSTEM) {}
M_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString ) : ConVar(pName, pDefaultValue, flags|FCVAR_MATERIAL_SYSTEM, pHelpString ) {}
M_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, bool bMin, float fMin, bool bMax, float fMax ) : ConVar(pName, pDefaultValue, flags|FCVAR_MATERIAL_SYSTEM, pHelpString, bMin, fMin, bMax, fMax) {}
M_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, M_FnChangeCallback callback ) : ConVar(pName, pDefaultValue, flags|FCVAR_MATERIAL_SYSTEM, pHelpString, (FnChangeCallback)callback ) {}
M_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, bool bMin, float fMin, bool bMax, float fMax, M_FnChangeCallback callback ) : ConVar(pName, pDefaultValue, flags|FCVAR_MATERIAL_SYSTEM, pHelpString, bMin, fMin, bMax, fMax, (FnChangeCallback)callback ) {}
};
class S_ConVar : public ConVar
{
public:
S_ConVar( char const *pName, char const *pDefaultValue, int flags = 0) : ConVar(pName, pDefaultValue, flags|FCVAR_STUDIORENDER) {}
S_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString ) : ConVar(pName, pDefaultValue, flags|FCVAR_STUDIORENDER, pHelpString ) {}
S_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, bool bMin, float fMin, bool bMax, float fMax ) : ConVar(pName, pDefaultValue, flags|FCVAR_STUDIORENDER, pHelpString, bMin, fMin, bMax, fMax) {}
S_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, M_FnChangeCallback callback ) : ConVar(pName, pDefaultValue, flags|FCVAR_STUDIORENDER, pHelpString, (FnChangeCallback)callback ) {}
S_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, bool bMin, float fMin, bool bMax, float fMax, S_FnChangeCallback callback ) : ConVar(pName, pDefaultValue, flags|FCVAR_STUDIORENDER, pHelpString, bMin, fMin, bMax, fMax, (FnChangeCallback)callback ) {}
};
class D_ConVar : public ConVar
{
public:
D_ConVar( char const *pName, char const *pDefaultValue, int flags = 0) : ConVar(pName, pDefaultValue, flags|FCVAR_DATACACHE) {}
D_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString ) : ConVar(pName, pDefaultValue, flags|FCVAR_DATACACHE, pHelpString ) {}
D_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, bool bMin, float fMin, bool bMax, float fMax ) : ConVar(pName, pDefaultValue, flags|FCVAR_DATACACHE, pHelpString, bMin, fMin, bMax, fMax) {}
D_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, M_FnChangeCallback callback ) : ConVar(pName, pDefaultValue, flags|FCVAR_DATACACHE, pHelpString, (FnChangeCallback)callback ) {}
D_ConVar( char const *pName, char const *pDefaultValue, int flags, char const *pHelpString, bool bMin, float fMin, bool bMax, float fMax, D_FnChangeCallback callback ) : ConVar(pName, pDefaultValue, flags|FCVAR_DATACACHE, pHelpString, bMin, fMin, bMax, fMax, (FnChangeCallback)callback ) {}
};
// redirect these declarations to their specific subsystem
#ifdef GAME_DLL
#define ConCommand G_ConCommand
#define ConVar G_ConVar
#endif
#ifdef CLIENT_DLL
#define ConCommand C_ConCommand
#define ConVar C_ConVar
#endif
#ifdef MATERIALSYSTEM_DLL
#define ConCommand M_ConCommand
#define ConVar M_ConVar
#endif
#ifdef STUDIORENDER_DLL
#define ConCommand S_ConCommand
#define ConVar S_ConVar
#endif
#ifdef DATACACHE_DLL
#define ConCommand D_ConCommand
#define ConVar D_ConVar
#endif
#endif // _STATIC_LINKED
//-----------------------------------------------------------------------------
// Purpose: Utility to quicky generate a simple console command
//-----------------------------------------------------------------------------
#define CON_COMMAND( name, description ) \
static void name(); \
static ConCommand name##_command( #name, name, description ); \
static void name()
//-----------------------------------------------------------------------------
// Purpose: Utility to quicky generate a simple console command
//-----------------------------------------------------------------------------
#define CON_COMMAND_F( name, description, flags ) \
static void name(); \
static ConCommand name##_command( #name, name, description, flags ); \
static void name()
#endif // CONVAR_H
-709
View File
@@ -1,709 +0,0 @@
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $Workfile: $
// $Date: $
//
//-----------------------------------------------------------------------------
// $NoKeywords: $
//===========================================================================//
#ifndef CONVAR_H
#define CONVAR_H
#if _WIN32
#pragma once
#endif
#include "tier0/dbg.h"
#include "tier1/iconvar.h"
#include "tier1/utlvector.h"
#include "tier1/utlstring.h"
#include "icvar.h"
#ifdef _WIN32
#define FORCEINLINE_CVAR FORCEINLINE
#elif _LINUX
#define FORCEINLINE_CVAR inline
#else
#error "implement me"
#endif
//-----------------------------------------------------------------------------
// Forward declarations
//-----------------------------------------------------------------------------
class ConVar;
class CCommand;
class ConCommand;
class ConCommandBase;
struct characterset_t;
//-----------------------------------------------------------------------------
// Any executable that wants to use ConVars need to implement one of
// these to hook up access to console variables.
//-----------------------------------------------------------------------------
class IConCommandBaseAccessor
{
public:
// Flags is a combination of FCVAR flags in cvar.h.
// hOut is filled in with a handle to the variable.
virtual bool RegisterConCommandBase( ConCommandBase *pVar ) = 0;
};
//-----------------------------------------------------------------------------
// Helper method for console development
//-----------------------------------------------------------------------------
#if defined( _X360 ) && !defined( _RETAIL )
void ConVar_PublishToVXConsole();
#endif
//-----------------------------------------------------------------------------
// Called when a ConCommand needs to execute
//-----------------------------------------------------------------------------
typedef void ( *FnCommandCallbackV1_t )( void );
typedef void ( *FnCommandCallback_t )( const CCommand &command );
#define COMMAND_COMPLETION_MAXITEMS 64
#define COMMAND_COMPLETION_ITEM_LENGTH 64
//-----------------------------------------------------------------------------
// Returns 0 to COMMAND_COMPLETION_MAXITEMS worth of completion strings
//-----------------------------------------------------------------------------
typedef int ( *FnCommandCompletionCallback )( const char *partial, char commands[ COMMAND_COMPLETION_MAXITEMS ][ COMMAND_COMPLETION_ITEM_LENGTH ] );
//-----------------------------------------------------------------------------
// Interface version
//-----------------------------------------------------------------------------
class ICommandCallback
{
public:
virtual void CommandCallback( const CCommand &command ) = 0;
};
class ICommandCompletionCallback
{
public:
virtual int CommandCompletionCallback( const char *pPartial, CUtlVector< CUtlString > &commands ) = 0;
};
//-----------------------------------------------------------------------------
// Purpose: The base console invoked command/cvar interface
//-----------------------------------------------------------------------------
class ConCommandBase
{
friend class CCvar;
friend class ConVar;
friend class ConCommand;
friend void ConVar_Register( int nCVarFlag, IConCommandBaseAccessor *pAccessor );
friend void ConVar_PublishToVXConsole();
// FIXME: Remove when ConVar changes are done
friend class CDefaultCvar;
public:
ConCommandBase( void );
ConCommandBase( const char *pName, const char *pHelpString = 0,
int flags = 0 );
virtual ~ConCommandBase( void );
virtual bool IsCommand( void ) const;
// Check flag
virtual bool IsFlagSet( int flag ) const;
// Set flag
virtual void AddFlags( int flags );
// Return name of cvar
virtual const char *GetName( void ) const;
// Return help text for cvar
virtual const char *GetHelpText( void ) const;
// Deal with next pointer
const ConCommandBase *GetNext( void ) const;
ConCommandBase *GetNext( void );
void SetNext(ConCommandBase *pBase)
{
m_pNext = pBase;
}
virtual bool IsRegistered( void ) const;
// Returns the DLL identifier
virtual CVarDLLIdentifier_t GetDLLIdentifier() const;
protected:
virtual void Create( const char *pName, const char *pHelpString = 0,
int flags = 0 );
// Used internally by OneTimeInit to initialize/shutdown
virtual void Init();
void Shutdown();
// Internal copy routine ( uses new operator from correct module )
char *CopyString( const char *from );
private:
// Next ConVar in chain
// Prior to register, it points to the next convar in the DLL.
// Once registered, though, m_pNext is reset to point to the next
// convar in the global list
ConCommandBase *m_pNext;
// Has the cvar been added to the global list?
bool m_bRegistered;
// Static data
const char *m_pszName;
const char *m_pszHelpString;
// ConVar flags
int m_nFlags;
protected:
// ConVars add themselves to this list for the executable.
// Then ConVar_Register runs through all the console variables
// and registers them into a global list stored in vstdlib.dll
static ConCommandBase *s_pConCommandBases;
// ConVars in this executable use this 'global' to access values.
static IConCommandBaseAccessor *s_pAccessor;
public: // Hackalicous
inline int GetFlags() const
{
return m_nFlags;
}
inline void SetFlags(int flags)
{
m_nFlags = flags;
}
};
//-----------------------------------------------------------------------------
// Command tokenizer
//-----------------------------------------------------------------------------
class CCommand
{
public:
CCommand();
CCommand( int nArgC, const char **ppArgV );
bool Tokenize( const char *pCommand, characterset_t *pBreakSet = NULL );
void Reset();
int ArgC() const;
const char **ArgV() const;
const char *ArgS() const; // All args that occur after the 0th arg, in string form
const char *GetCommandString() const; // The entire command in string form, including the 0th arg
const char *operator[]( int nIndex ) const; // Gets at arguments
const char *Arg( int nIndex ) const; // Gets at arguments
// Helper functions to parse arguments to commands.
const char* FindArg( const char *pName ) const;
int FindArgInt( const char *pName, int nDefaultVal ) const;
static int MaxCommandLength();
static characterset_t* DefaultBreakSet();
private:
enum
{
COMMAND_MAX_ARGC = 64,
COMMAND_MAX_LENGTH = 512,
};
int m_nArgc;
int m_nArgv0Size;
char m_pArgSBuffer[ COMMAND_MAX_LENGTH ];
char m_pArgvBuffer[ COMMAND_MAX_LENGTH ];
const char* m_ppArgv[ COMMAND_MAX_ARGC ];
};
inline int CCommand::MaxCommandLength()
{
return COMMAND_MAX_LENGTH - 1;
}
inline int CCommand::ArgC() const
{
return m_nArgc;
}
inline const char **CCommand::ArgV() const
{
return m_nArgc ? (const char**)m_ppArgv : NULL;
}
inline const char *CCommand::ArgS() const
{
return m_nArgv0Size ? &m_pArgSBuffer[m_nArgv0Size] : "";
}
inline const char *CCommand::GetCommandString() const
{
return m_nArgc ? m_pArgSBuffer : "";
}
inline const char *CCommand::Arg( int nIndex ) const
{
// FIXME: Many command handlers appear to not be particularly careful
// about checking for valid argc range. For now, we're going to
// do the extra check and return an empty string if it's out of range
if ( nIndex < 0 || nIndex >= m_nArgc )
return "";
return m_ppArgv[nIndex];
}
inline const char *CCommand::operator[]( int nIndex ) const
{
return Arg( nIndex );
}
//-----------------------------------------------------------------------------
// Purpose: The console invoked command
//-----------------------------------------------------------------------------
class ConCommand : public ConCommandBase
{
friend class CCvar;
public:
typedef ConCommandBase BaseClass;
ConCommand( const char *pName, FnCommandCallbackV1_t callback,
const char *pHelpString = 0, int flags = 0, FnCommandCompletionCallback completionFunc = 0 );
ConCommand( const char *pName, FnCommandCallback_t callback,
const char *pHelpString = 0, int flags = 0, FnCommandCompletionCallback completionFunc = 0 );
ConCommand( const char *pName, ICommandCallback *pCallback,
const char *pHelpString = 0, int flags = 0, ICommandCompletionCallback *pCommandCompletionCallback = 0 );
virtual ~ConCommand( void );
virtual bool IsCommand( void ) const;
virtual int AutoCompleteSuggest( const char *partial, CUtlVector< CUtlString > &commands );
virtual bool CanAutoComplete( void );
// Invoke the function
virtual void Dispatch( const CCommand &command );
private:
// NOTE: To maintain backward compat, we have to be very careful:
// All public virtual methods must appear in the same order always
// since engine code will be calling into this code, which *does not match*
// in the mod code; it's using slightly different, but compatible versions
// of this class. Also: Be very careful about adding new fields to this class.
// Those fields will not exist in the version of this class that is instanced
// in mod code.
// Call this function when executing the command
union
{
FnCommandCallbackV1_t m_fnCommandCallbackV1;
FnCommandCallback_t m_fnCommandCallback;
ICommandCallback *m_pCommandCallback;
};
union
{
FnCommandCompletionCallback m_fnCompletionCallback;
ICommandCompletionCallback *m_pCommandCompletionCallback;
};
bool m_bHasCompletionCallback : 1;
bool m_bUsingNewCommandCallback : 1;
bool m_bUsingCommandCallbackInterface : 1;
public: // Hackalicous
inline FnCommandCallback_t GetCallback() const
{
return m_fnCommandCallback;
}
};
//-----------------------------------------------------------------------------
// Purpose: A console variable
//-----------------------------------------------------------------------------
class ConVar : public ConCommandBase, public IConVar
{
friend class CCvar;
friend class ConVarRef;
public:
typedef ConCommandBase BaseClass;
ConVar( const char *pName, const char *pDefaultValue, int flags = 0);
ConVar( const char *pName, const char *pDefaultValue, int flags,
const char *pHelpString );
ConVar( const char *pName, const char *pDefaultValue, int flags,
const char *pHelpString, bool bMin, float fMin, bool bMax, float fMax );
ConVar( const char *pName, const char *pDefaultValue, int flags,
const char *pHelpString, FnChangeCallback_t callback );
ConVar( const char *pName, const char *pDefaultValue, int flags,
const char *pHelpString, bool bMin, float fMin, bool bMax, float fMax,
FnChangeCallback_t callback );
virtual ~ConVar( void );
virtual bool IsFlagSet( int flag ) const;
virtual const char* GetHelpText( void ) const;
virtual bool IsRegistered( void ) const;
virtual const char *GetName( void ) const;
virtual void AddFlags( int flags );
virtual bool IsCommand( void ) const;
// Install a change callback (there shouldn't already be one....)
void InstallChangeCallback( FnChangeCallback_t callback );
// Retrieve value
FORCEINLINE_CVAR float GetFloat( void ) const;
FORCEINLINE_CVAR int GetInt( void ) const;
FORCEINLINE_CVAR bool GetBool() const { return !!GetInt(); }
FORCEINLINE_CVAR char const *GetString( void ) const;
// Any function that allocates/frees memory needs to be virtual or else you'll have crashes
// from alloc/free across dll/exe boundaries.
// These just call into the IConCommandBaseAccessor to check flags and set the var (which ends up calling InternalSetValue).
virtual void SetValue( const char *value );
virtual void SetValue( float value );
virtual void SetValue( int value );
// Reset to default value
void Revert( void );
// True if it has a min/max setting
bool GetMin( float& minVal ) const;
bool GetMax( float& maxVal ) const;
const char *GetDefault( void ) const;
private:
// Called by CCvar when the value of a var is changing.
virtual void InternalSetValue(const char *value);
// For CVARs marked FCVAR_NEVER_AS_STRING
virtual void InternalSetFloatValue( float fNewValue );
virtual void InternalSetIntValue( int nValue );
virtual bool ClampValue( float& value );
virtual void ChangeStringValue( const char *tempVal, float flOldValue );
virtual void Create( const char *pName, const char *pDefaultValue, int flags = 0,
const char *pHelpString = 0, bool bMin = false, float fMin = 0.0,
bool bMax = false, float fMax = false, FnChangeCallback_t callback = 0 );
// Used internally by OneTimeInit to initialize.
virtual void Init();
private:
// This either points to "this" or it points to the original declaration of a ConVar.
// This allows ConVars to exist in separate modules, and they all use the first one to be declared.
// m_pParent->m_pParent must equal m_pParent (ie: m_pParent must be the root, or original, ConVar).
ConVar *m_pParent;
// Static data
const char *m_pszDefaultValue;
// Value
// Dynamically allocated
char *m_pszString;
int m_StringLength;
// Values
float m_fValue;
int m_nValue;
// Min/Max values
bool m_bHasMin;
float m_fMinVal;
bool m_bHasMax;
float m_fMaxVal;
// Call this function when ConVar changes
FnChangeCallback_t m_fnChangeCallback;
public: // Hackalicous
inline FnChangeCallback_t GetCallback() const
{
return m_fnChangeCallback;
}
inline void SetMin(bool set, float min=0.0)
{
m_bHasMin = set;
m_fMinVal = min;
}
inline void SetMax(bool set, float max=0.0)
{
m_bHasMax = set;
m_fMaxVal = max;
}
};
//-----------------------------------------------------------------------------
// Purpose: Return ConVar value as a float
// Output : float
//-----------------------------------------------------------------------------
FORCEINLINE_CVAR float ConVar::GetFloat( void ) const
{
return m_pParent->m_fValue;
}
//-----------------------------------------------------------------------------
// Purpose: Return ConVar value as an int
// Output : int
//-----------------------------------------------------------------------------
FORCEINLINE_CVAR int ConVar::GetInt( void ) const
{
return m_pParent->m_nValue;
}
//-----------------------------------------------------------------------------
// Purpose: Return ConVar value as a string, return "" for bogus string pointer, etc.
// Output : const char *
//-----------------------------------------------------------------------------
FORCEINLINE_CVAR const char *ConVar::GetString( void ) const
{
if ( m_nFlags & FCVAR_NEVER_AS_STRING )
return "FCVAR_NEVER_AS_STRING";
return ( m_pParent->m_pszString ) ? m_pParent->m_pszString : "";
}
//-----------------------------------------------------------------------------
// Used to read/write convars that already exist (replaces the FindVar method)
//-----------------------------------------------------------------------------
class ConVarRef
{
public:
ConVarRef( const char *pName );
ConVarRef( const char *pName, bool bIgnoreMissing );
ConVarRef( IConVar *pConVar );
void Init( const char *pName, bool bIgnoreMissing );
bool IsValid() const;
bool IsFlagSet( int nFlags ) const;
IConVar *GetLinkedConVar();
// Get/Set value
float GetFloat( void ) const;
int GetInt( void ) const;
bool GetBool() const { return !!GetInt(); }
const char *GetString( void ) const;
void SetValue( const char *pValue );
void SetValue( float flValue );
void SetValue( int nValue );
void SetValue( bool bValue );
const char *GetName() const;
const char *GetDefault() const;
private:
// High-speed method to read convar data
IConVar *m_pConVar;
ConVar *m_pConVarState;
};
//-----------------------------------------------------------------------------
// Did we find an existing convar of that name?
//-----------------------------------------------------------------------------
FORCEINLINE_CVAR bool ConVarRef::IsFlagSet( int nFlags ) const
{
return ( m_pConVar->IsFlagSet( nFlags ) != 0 );
}
FORCEINLINE_CVAR IConVar *ConVarRef::GetLinkedConVar()
{
return m_pConVar;
}
FORCEINLINE_CVAR const char *ConVarRef::GetName() const
{
return m_pConVar->GetName();
}
//-----------------------------------------------------------------------------
// Purpose: Return ConVar value as a float
//-----------------------------------------------------------------------------
FORCEINLINE_CVAR float ConVarRef::GetFloat( void ) const
{
return m_pConVarState->m_fValue;
}
//-----------------------------------------------------------------------------
// Purpose: Return ConVar value as an int
//-----------------------------------------------------------------------------
FORCEINLINE_CVAR int ConVarRef::GetInt( void ) const
{
return m_pConVarState->m_nValue;
}
//-----------------------------------------------------------------------------
// Purpose: Return ConVar value as a string, return "" for bogus string pointer, etc.
//-----------------------------------------------------------------------------
FORCEINLINE_CVAR const char *ConVarRef::GetString( void ) const
{
Assert( !IsFlagSet( FCVAR_NEVER_AS_STRING ) );
return m_pConVarState->m_pszString;
}
FORCEINLINE_CVAR void ConVarRef::SetValue( const char *pValue )
{
m_pConVar->SetValue( pValue );
}
FORCEINLINE_CVAR void ConVarRef::SetValue( float flValue )
{
m_pConVar->SetValue( flValue );
}
FORCEINLINE_CVAR void ConVarRef::SetValue( int nValue )
{
m_pConVar->SetValue( nValue );
}
FORCEINLINE_CVAR void ConVarRef::SetValue( bool bValue )
{
m_pConVar->SetValue( bValue ? 1 : 0 );
}
FORCEINLINE_CVAR const char *ConVarRef::GetDefault() const
{
return m_pConVarState->m_pszDefaultValue;
}
//-----------------------------------------------------------------------------
// Called by the framework to register ConCommands with the ICVar
//-----------------------------------------------------------------------------
void ConVar_Register( int nCVarFlag = 0, IConCommandBaseAccessor *pAccessor = NULL );
void ConVar_Unregister( );
//-----------------------------------------------------------------------------
// Utility methods
//-----------------------------------------------------------------------------
void ConVar_PrintFlags( const ConCommandBase *var );
void ConVar_PrintDescription( const ConCommandBase *pVar );
//-----------------------------------------------------------------------------
// Purpose: Utility class to quickly allow ConCommands to call member methods
//-----------------------------------------------------------------------------
#if defined _MSC_VER
#pragma warning (disable : 4355 )
#endif
template< class T >
class CConCommandMemberAccessor : public ConCommand, public ICommandCallback, public ICommandCompletionCallback
{
typedef ConCommand BaseClass;
typedef void ( T::*FnMemberCommandCallback_t )( const CCommand &command );
typedef int ( T::*FnMemberCommandCompletionCallback_t )( const char *pPartial, CUtlVector< CUtlString > &commands );
public:
CConCommandMemberAccessor( T* pOwner, const char *pName, FnMemberCommandCallback_t callback, const char *pHelpString = 0,
int flags = 0, FnMemberCommandCompletionCallback_t completionFunc = 0 ) :
BaseClass( pName, this, pHelpString, flags, ( completionFunc != 0 ) ? this : NULL )
{
m_pOwner = pOwner;
m_Func = callback;
m_CompletionFunc = completionFunc;
}
~CConCommandMemberAccessor()
{
Shutdown();
}
void SetOwner( T* pOwner )
{
m_pOwner = pOwner;
}
virtual void CommandCallback( const CCommand &command )
{
Assert( m_pOwner && m_Func );
(m_pOwner->*m_Func)( command );
}
virtual int CommandCompletionCallback( const char *pPartial, CUtlVector< CUtlString > &commands )
{
Assert( m_pOwner && m_CompletionFunc );
return (m_pOwner->*m_CompletionFunc)( pPartial, commands );
}
private:
T* m_pOwner;
FnMemberCommandCallback_t m_Func;
FnMemberCommandCompletionCallback_t m_CompletionFunc;
};
#if defined _MSC_VER
#pragma warning ( default : 4355 )
#endif
//-----------------------------------------------------------------------------
// Purpose: Utility macros to quicky generate a simple console command
//-----------------------------------------------------------------------------
#define CON_COMMAND( name, description ) \
static void name( const CCommand &args ); \
static ConCommand name##_command( #name, name, description ); \
static void name( const CCommand &args )
#define CON_COMMAND_F( name, description, flags ) \
static void name( const CCommand &args ); \
static ConCommand name##_command( #name, name, description, flags ); \
static void name( const CCommand &args )
#define CON_COMMAND_F_COMPLETION( name, description, flags, completion ) \
static void name( const CCommand &args ); \
static ConCommand name##_command( #name, name, description, flags, completion ); \
static void name( const CCommand &args )
#define CON_COMMAND_EXTERN( name, _funcname, description ) \
void _funcname( const CCommand &args ); \
static ConCommand name##_command( #name, _funcname, description ); \
void _funcname( const CCommand &args )
#define CON_COMMAND_EXTERN_F( name, _funcname, description, flags ) \
void _funcname( const CCommand &args ); \
static ConCommand name##_command( #name, _funcname, description, flags ); \
void _funcname( const CCommand &args )
#define CON_COMMAND_MEMBER_F( _thisclass, name, _funcname, description, flags ) \
void _funcname( const CCommand &args ); \
friend class CCommandMemberInitializer_##_funcname; \
class CCommandMemberInitializer_##_funcname \
{ \
public: \
CCommandMemberInitializer_##_funcname() : m_ConCommandAccessor( NULL, name, &_thisclass::_funcname, description, flags ) \
{ \
m_ConCommandAccessor.SetOwner( GET_OUTER( _thisclass, m_##_funcname##_register ) ); \
} \
private: \
CConCommandMemberAccessor< _thisclass > m_ConCommandAccessor; \
}; \
\
CCommandMemberInitializer_##_funcname m_##_funcname##_register; \
#endif // CONVAR_H
+64 -5
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -30,20 +30,79 @@
*/
#include "frame_hooks.h"
#include "TimerSys.h"
#include "Database.h"
#include "HalfLife2.h"
#include "MenuStyle_Valve.h"
#include "MenuStyle_Radio.h"
#include "PlayerManager.h"
#include "CoreConfig.h"
#include <sm_queue.h>
#include <IThreader.h>
#include "sourcemod.h"
float g_LastMenuTime = 0.0f;
float g_LastAuthCheck = 0.0f;
static IMutex *frame_mutex;
static Queue<FrameAction> *frame_queue;
static Queue<FrameAction> *frame_actions;
static float g_LastMenuTime = 0.0f;
static float g_LastAuthCheck = 0.0f;
bool g_PendingInternalPush = false;
class FrameActionInit : public SMGlobalClass
{
public:
void OnSourceModAllInitialized()
{
frame_queue = new Queue<FrameAction>();
frame_actions = new Queue<FrameAction>();
frame_mutex = g_pThreader->MakeMutex();
}
void OnSourceModShutdown()
{
delete frame_queue;
delete frame_actions;
frame_mutex->DestroyThis();
}
} s_FrameActionInit;
void AddFrameAction(const FrameAction & action)
{
frame_mutex->Lock();
frame_queue->push(action);
frame_mutex->Unlock();
}
void RunFrameHooks(bool simulating)
{
/* It's okay if this check races. */
if (frame_queue->size())
{
Queue<FrameAction> *temp;
/* Very quick lock to move queue/actions back and forth */
frame_mutex->Lock();
temp = frame_queue;
frame_queue = frame_actions;
frame_actions = temp;
frame_mutex->Unlock();
/* The server will now be adding to the other queue, so we can process events. */
while (!frame_actions->empty())
{
FrameAction &item = frame_actions->first();
frame_actions->pop();
item.action(item.data);
}
}
/* Frame based hooks */
g_DBMan.RunFrame();
g_HL2.ProcessFakeCliCmdQueue();
g_HL2.ProcessDelayedKicks();
if (g_PendingInternalPush)
{
SM_InternalCmdTrigger();
}
g_SourceMod.ProcessGameFrameHooks(simulating);
float curtime = *g_pUniversalTime;
+17 -1
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -32,6 +32,22 @@
#ifndef _INCLUDE_SOURCEMOD_FRAME_HOOKS_H_
#define _INCLUDE_SOURCEMOD_FRAME_HOOKS_H_
#include <ISourceMod.h>
using namespace SourceMod;
struct FrameAction
{
FrameAction(FRAMEACTION a, void *d) : data(d), action(a)
{
}
void *data;
FRAMEACTION action;
};
extern bool g_PendingInternalPush;
void AddFrameAction(const FrameAction & action);
void RunFrameHooks(bool simulating);
#endif //_INCLUDE_SOURCEMOD_FRAME_HOOKS_H_
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -30,7 +30,6 @@
*/
#include "ADTFactory.h"
#include "sm_globals.h"
#include "ShareSys.h"
ADTFactory g_AdtFactory;
@@ -57,32 +56,30 @@ IBasicTrie *ADTFactory::CreateBasicTrie()
BaseTrie::BaseTrie()
{
m_pTrie = sm_trie_create();
}
BaseTrie::~BaseTrie()
{
sm_trie_destroy(m_pTrie);
}
bool BaseTrie::Insert(const char *key, void *value)
{
return sm_trie_insert(m_pTrie, key, value);
return map_.insert(key, value);
}
bool BaseTrie::Retrieve(const char *key, void **value)
{
return sm_trie_retrieve(m_pTrie, key, value);
return map_.retrieve(key, value);
}
bool BaseTrie::Delete(const char *key)
{
return sm_trie_delete(m_pTrie, key);
return map_.remove(key);
}
void BaseTrie::Clear()
{
sm_trie_clear(m_pTrie);
map_.clear();
}
void BaseTrie::Destroy()
@@ -92,5 +89,5 @@ void BaseTrie::Destroy()
bool BaseTrie::Replace(const char *key, void *value)
{
return sm_trie_replace(m_pTrie, key, value);
return map_.replace(key, value);
}
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -33,8 +33,8 @@
#define _INCLUDE_SOURCEMOD_ADTFACTORY_H_
#include <IADTFactory.h>
#include "sm_globals.h"
#include "sm_trie.h"
#include "common_logic.h"
#include <sm_stringhashmap.h>
using namespace SourceMod;
@@ -50,7 +50,7 @@ public:
virtual void Clear();
virtual void Destroy();
private:
Trie *m_pTrie;
StringHashMap<void *> map_;
};
class ADTFactory :
+98
View File
@@ -0,0 +1,98 @@
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
import os
for arch in SM.archs:
binary = SM.Library(builder, 'sourcemod.logic', arch)
binary.compiler.cxxincludes += [
builder.sourcePath,
os.path.join(builder.sourcePath, 'core', 'logic'),
os.path.join(builder.sourcePath, 'public'),
os.path.join(builder.sourcePath, 'sourcepawn', 'include'),
os.path.join(builder.sourcePath, 'public', 'amtl', 'amtl'),
os.path.join(builder.sourcePath, 'public', 'amtl'),
os.path.join(SM.mms_root, 'core', 'sourcehook')
]
binary.compiler.defines += [
'SM_DEFAULT_THREADER',
'SM_LOGIC'
]
if builder.target.platform == 'linux':
binary.compiler.postlink += ['-lpthread', '-lrt']
elif builder.target.platform == 'mac':
binary.compiler.cflags += ['-Wno-deprecated-declarations']
binary.compiler.postlink += ['-framework', 'CoreServices']
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
binary.compiler.cxxflags += ['-fno-rtti']
elif binary.compiler.family == 'msvc':
binary.compiler.cxxflags += ['/GR-']
binary.sources += [
'common_logic.cpp',
'smn_adt_array.cpp',
'smn_sorting.cpp',
'smn_maplists.cpp',
'ADTFactory.cpp',
'smn_adt_stack.cpp',
'thread/ThreadWorker.cpp',
'thread/BaseWorker.cpp',
'ThreadSupport.cpp',
'smn_float.cpp',
'TextParsers.cpp',
'smn_textparse.cpp',
'smn_adt_trie.cpp',
'smn_functions.cpp',
'smn_timers.cpp',
'smn_players.cpp',
'MemoryUtils.cpp',
'smn_admin.cpp',
'smn_banning.cpp',
'smn_filesystem.cpp',
'stringutil.cpp',
'Translator.cpp',
'PhraseCollection.cpp',
'smn_lang.cpp',
'smn_string.cpp',
'smn_handles.cpp',
'smn_datapacks.cpp',
'smn_gameconfigs.cpp',
'smn_fakenatives.cpp',
'GameConfigs.cpp',
'sm_crc32.cpp',
'smn_profiler.cpp',
'ShareSys.cpp',
'PluginSys.cpp',
'HandleSys.cpp',
'NativeOwner.cpp',
'ExtensionSys.cpp',
'DebugReporter.cpp',
'Database.cpp',
'smn_database.cpp',
'ForwardSys.cpp',
'AdminCache.cpp',
'sm_trie.cpp',
'smn_console.cpp',
'ProfileTools.cpp',
'Logger.cpp',
'smn_core.cpp',
'smn_menus.cpp',
'sprintf.cpp',
'LibrarySys.cpp',
'RootConsoleMenu.cpp',
'CDataPack.cpp',
'frame_tasks.cpp',
'smn_halflife.cpp',
'FrameIterator.cpp',
'DatabaseConfBuilder.cpp',
]
if arch == 'x64':
binary.sources += ['PseudoAddrManager.cpp']
if builder.target.platform == 'windows':
binary.sources += ['thread/WinThreads.cpp']
else:
binary.sources += ['thread/PosixThreads.cpp']
SM.binaries += [builder.Add(binary)]
File diff suppressed because it is too large Load Diff
+231 -201
View File
@@ -1,201 +1,231 @@
/**
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#ifndef _INCLUDE_SOURCEMOD_ADMINCACHE_H_
#define _INCLUDE_SOURCEMOD_ADMINCACHE_H_
#include "sm_memtable.h"
#include <sm_trie.h>
#include <sh_list.h>
#include <sh_string.h>
#include <IAdminSystem.h>
#include "sm_globals.h"
#include <IForwardSys.h>
using namespace SourceHook;
#define GRP_MAGIC_SET 0xDEADFADE
#define GRP_MAGIC_UNSET 0xFACEFACE
#define USR_MAGIC_SET 0xDEADFACE
#define USR_MAGIC_UNSET 0xFADEDEAD
struct AdminGroup
{
uint32_t magic; /* Magic flag, for memory validation (ugh) */
unsigned int immunity_level; /* Immunity level */
/* Immune from target table (-1 = nonexistent)
* [0] = number of entries
* [1...N] = immune targets
*/
int immune_table;
Trie *pCmdTable; /* Command override table (can be NULL) */
Trie *pCmdGrpTable; /* Command group override table (can be NULL) */
int next_grp; /* Next group in the chain */
int prev_grp; /* Previous group in the chain */
int nameidx; /* Name */
FlagBits addflags; /* Additive flags */
};
struct AuthMethod
{
String name;
Trie *table;
};
struct UserAuth
{
unsigned int index; /* Index into auth table */
int identidx; /* Index into the string table */
};
struct AdminUser
{
uint32_t magic; /* Magic flag, for memory validation */
FlagBits flags; /* Flags */
FlagBits eflags; /* Effective flags */
int nameidx; /* Name index */
int password; /* Password index */
unsigned int grp_count; /* Number of groups */
unsigned int grp_size; /* Size of groups table */
int grp_table; /* Group table itself */
int next_user; /* Next user in the list */
int prev_user; /* Previous user in the list */
UserAuth auth; /* Auth method for this user */
unsigned int immunity_level; /* Immunity level */
unsigned int serialchange; /* Serial # for changes */
};
class AdminCache :
public IAdminSystem,
public SMGlobalClass
{
public:
AdminCache();
~AdminCache();
public: //SMGlobalClass
void OnSourceModStartup(bool late);
void OnSourceModAllInitialized();
void OnSourceModLevelChange(const char *mapName);
void OnSourceModShutdown();
void OnSourceModPluginsLoaded();
public: //IAdminSystem
/** Command cache stuff */
void AddCommandOverride(const char *cmd, OverrideType type, FlagBits flags);
bool GetCommandOverride(const char *cmd, OverrideType type, FlagBits *flags);
void UnsetCommandOverride(const char *cmd, OverrideType type);
/** Group cache stuff */
GroupId AddGroup(const char *group_name);
GroupId FindGroupByName(const char *group_name);
void SetGroupAddFlag(GroupId id, AdminFlag flag, bool enabled);
bool GetGroupAddFlag(GroupId id, AdminFlag flag);
FlagBits GetGroupAddFlags(GroupId id);
void SetGroupGenericImmunity(GroupId id, ImmunityType type, bool enabled);
bool GetGroupGenericImmunity(GroupId id, ImmunityType type);
void InvalidateGroup(GroupId id);
void AddGroupImmunity(GroupId id, GroupId other_id);
unsigned int GetGroupImmunityCount(GroupId id);
GroupId GetGroupImmunity(GroupId id, unsigned int number);
void AddGroupCommandOverride(GroupId id, const char *name, OverrideType type, OverrideRule rule);
bool GetGroupCommandOverride(GroupId id, const char *name, OverrideType type, OverrideRule *pRule);
void DumpAdminCache(AdminCachePart part, bool rebuild);
void AddAdminListener(IAdminListener *pListener);
void RemoveAdminListener(IAdminListener *pListener);
/** User stuff */
void RegisterAuthIdentType(const char *name);
AdminId CreateAdmin(const char *name);
const char *GetAdminName(AdminId id);
bool BindAdminIdentity(AdminId id, const char *auth, const char *ident);
virtual void SetAdminFlag(AdminId id, AdminFlag flag, bool enabled);
bool GetAdminFlag(AdminId id, AdminFlag flag, AccessMode mode);
FlagBits GetAdminFlags(AdminId id, AccessMode mode);
bool AdminInheritGroup(AdminId id, GroupId gid);
unsigned int GetAdminGroupCount(AdminId id);
GroupId GetAdminGroup(AdminId id, unsigned int index, const char **name);
void SetAdminPassword(AdminId id, const char *password);
const char *GetAdminPassword(AdminId id);
AdminId FindAdminByIdentity(const char *auth, const char *identity);
bool InvalidateAdmin(AdminId id);
unsigned int FlagBitsToBitArray(FlagBits bits, bool array[], unsigned int maxSize);
FlagBits FlagBitArrayToBits(const bool array[], unsigned int maxSize);
FlagBits FlagArrayToBits(const AdminFlag array[], unsigned int numFlags);
unsigned int FlagBitsToArray(FlagBits bits, AdminFlag array[], unsigned int maxSize);
bool CheckAdminFlags(AdminId id, FlagBits bits);
bool CanAdminTarget(AdminId id, AdminId target);
void SetAdminFlags(AdminId id, AccessMode mode, FlagBits bits);
bool FindFlag(const char *str, AdminFlag *pFlag);
bool FindFlag(char c, AdminFlag *pAdmFlag);
FlagBits ReadFlagString(const char *flags, const char **end);
unsigned int GetAdminSerialChange(AdminId id);
bool CanAdminUseCommand(int client, const char *cmd);
const char *GetGroupName(GroupId gid);
unsigned int SetGroupImmunityLevel(GroupId gid, unsigned int level);
unsigned int GetGroupImmunityLevel(GroupId gid);
unsigned int SetAdminImmunityLevel(AdminId id, unsigned int level);
unsigned int GetAdminImmunityLevel(AdminId id);
bool CheckAccess(int client,
const char *cmd,
FlagBits flags,
bool override_only);
public:
bool IsValidAdmin(AdminId id);
private:
void _UnsetCommandOverride(const char *cmd);
void _UnsetCommandGroupOverride(const char *group);
void InvalidateGroupCache();
void InvalidateAdminCache(bool unlink_admins);
void DumpCommandOverrideCache(OverrideType type);
Trie *GetMethodByIndex(unsigned int index);
bool GetMethodIndex(const char *name, unsigned int *_index);
void NameFlag(const char *str, AdminFlag flag);
public:
BaseStringTable *m_pStrings;
BaseMemTable *m_pMemory;
Trie *m_pCmdOverrides;
Trie *m_pCmdGrpOverrides;
int m_FirstGroup;
int m_LastGroup;
int m_FreeGroupList;
Trie *m_pGroups;
List<IAdminListener *> m_hooks;
List<AuthMethod> m_AuthMethods;
Trie *m_pAuthTables;
IForward *m_pCacheFwd;
int m_FirstUser;
int m_LastUser;
int m_FreeUserList;
bool m_InvalidatingAdmins;
bool m_destroying;
Trie *m_pLevelNames;
};
extern AdminCache g_Admins;
#endif //_INCLUDE_SOURCEMOD_ADMINCACHE_H_
/**
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#ifndef _INCLUDE_SOURCEMOD_ADMINCACHE_H_
#define _INCLUDE_SOURCEMOD_ADMINCACHE_H_
#include "common_logic.h"
#include <IAdminSystem.h>
#include "sm_memtable.h"
#include <sm_trie.h>
#include <sh_list.h>
#include <sh_string.h>
#include <IForwardSys.h>
#include <sm_stringhashmap.h>
#include <sm_namehashset.h>
using namespace SourceHook;
#define GRP_MAGIC_SET 0xDEADFADE
#define GRP_MAGIC_UNSET 0xFACEFACE
#define USR_MAGIC_SET 0xDEADFACE
#define USR_MAGIC_UNSET 0xFADEDEAD
typedef StringHashMap<OverrideRule> OverrideMap;
struct AdminGroup
{
uint32_t magic; /* Magic flag, for memory validation (ugh) */
unsigned int immunity_level; /* Immunity level */
/* Immune from target table (-1 = nonexistent)
* [0] = number of entries
* [1...N] = immune targets
*/
int immune_table;
OverrideMap *pCmdTable; /* Command override table (can be NULL) */
OverrideMap *pCmdGrpTable; /* Command group override table (can be NULL) */
int next_grp; /* Next group in the chain */
int prev_grp; /* Previous group in the chain */
int nameidx; /* Name */
FlagBits addflags; /* Additive flags */
};
struct AuthMethod
{
String name;
StringHashMap<AdminId> identities;
AuthMethod(const char *name)
: name(name)
{
}
static inline bool matches(const char *name, const AuthMethod *method)
{
return strcmp(name, method->name.c_str()) == 0;
}
static inline uint32_t hash(const detail::CharsAndLength &key)
{
return key.hash();
}
};
struct UserAuth
{
unsigned int index; /* Index into auth table */
int identidx; /* Index into the string table */
};
struct AdminUser
{
uint32_t magic; /* Magic flag, for memory validation */
FlagBits flags; /* Flags */
FlagBits eflags; /* Effective flags */
int nameidx; /* Name index */
int password; /* Password index */
unsigned int grp_count; /* Number of groups */
unsigned int grp_size; /* Size of groups table */
int grp_table; /* Group table itself */
int next_user; /* Next user in the list */
int prev_user; /* Previous user in the list */
UserAuth auth; /* Auth method for this user */
unsigned int immunity_level; /* Immunity level */
unsigned int serialchange; /* Serial # for changes */
};
class AdminCache :
public IAdminSystem,
public SMGlobalClass
{
public:
AdminCache();
~AdminCache();
public: //SMGlobalClass
void OnSourceModStartup(bool late);
void OnSourceModAllInitialized();
void OnSourceModLevelChange(const char *mapName);
void OnSourceModShutdown();
void OnSourceModPluginsLoaded();
public: //IAdminSystem
/** Command cache stuff */
void AddCommandOverride(const char *cmd, OverrideType type, FlagBits flags);
bool GetCommandOverride(const char *cmd, OverrideType type, FlagBits *flags);
void UnsetCommandOverride(const char *cmd, OverrideType type);
/** Group cache stuff */
GroupId AddGroup(const char *group_name);
GroupId FindGroupByName(const char *group_name);
void SetGroupAddFlag(GroupId id, AdminFlag flag, bool enabled);
bool GetGroupAddFlag(GroupId id, AdminFlag flag);
FlagBits GetGroupAddFlags(GroupId id);
void SetGroupGenericImmunity(GroupId id, ImmunityType type, bool enabled);
bool GetGroupGenericImmunity(GroupId id, ImmunityType type);
void InvalidateGroup(GroupId id);
void AddGroupImmunity(GroupId id, GroupId other_id);
unsigned int GetGroupImmunityCount(GroupId id);
GroupId GetGroupImmunity(GroupId id, unsigned int number);
void AddGroupCommandOverride(GroupId id, const char *name, OverrideType type, OverrideRule rule);
bool GetGroupCommandOverride(GroupId id, const char *name, OverrideType type, OverrideRule *pRule);
void DumpAdminCache(AdminCachePart part, bool rebuild);
void AddAdminListener(IAdminListener *pListener);
void RemoveAdminListener(IAdminListener *pListener);
/** User stuff */
void RegisterAuthIdentType(const char *name);
AdminId CreateAdmin(const char *name);
const char *GetAdminName(AdminId id);
bool BindAdminIdentity(AdminId id, const char *auth, const char *ident);
virtual void SetAdminFlag(AdminId id, AdminFlag flag, bool enabled);
bool GetAdminFlag(AdminId id, AdminFlag flag, AccessMode mode);
FlagBits GetAdminFlags(AdminId id, AccessMode mode);
bool AdminInheritGroup(AdminId id, GroupId gid);
unsigned int GetAdminGroupCount(AdminId id);
GroupId GetAdminGroup(AdminId id, unsigned int index, const char **name);
void SetAdminPassword(AdminId id, const char *password);
const char *GetAdminPassword(AdminId id);
AdminId FindAdminByIdentity(const char *auth, const char *identity);
bool InvalidateAdmin(AdminId id);
unsigned int FlagBitsToBitArray(FlagBits bits, bool array[], unsigned int maxSize);
FlagBits FlagBitArrayToBits(const bool array[], unsigned int maxSize);
FlagBits FlagArrayToBits(const AdminFlag array[], unsigned int numFlags);
unsigned int FlagBitsToArray(FlagBits bits, AdminFlag array[], unsigned int maxSize);
bool CheckAdminFlags(AdminId id, FlagBits bits);
bool CanAdminTarget(AdminId id, AdminId target);
void SetAdminFlags(AdminId id, AccessMode mode, FlagBits bits);
bool FindFlag(const char *str, AdminFlag *pFlag);
bool FindFlag(char c, AdminFlag *pAdmFlag);
FlagBits ReadFlagString(const char *flags, const char **end);
size_t FillFlagString(FlagBits bits, char *buffer, size_t maxlen);
unsigned int GetAdminSerialChange(AdminId id);
bool CanAdminUseCommand(int client, const char *cmd);
const char *GetGroupName(GroupId gid);
unsigned int SetGroupImmunityLevel(GroupId gid, unsigned int level);
unsigned int GetGroupImmunityLevel(GroupId gid);
unsigned int SetAdminImmunityLevel(AdminId id, unsigned int level);
unsigned int GetAdminImmunityLevel(AdminId id);
bool CheckAccess(int client,
const char *cmd,
FlagBits flags,
bool override_only);
bool FindFlagChar(AdminFlag flag, char *c);
bool IsValidAdmin(AdminId id);
bool CheckClientCommandAccess(int client, const char *cmd, FlagBits cmdflags);
public:
bool DumpCache(const char *filename);
AdminGroup *GetGroup(GroupId gid);
AdminUser *GetUser(AdminId id);
const char *GetString(int idx);
bool CheckAdminCommandAccess(AdminId adm, const char *cmd, FlagBits flags);
private:
void _UnsetCommandOverride(const char *cmd);
void _UnsetCommandGroupOverride(const char *group);
void InvalidateGroupCache();
void InvalidateAdminCache(bool unlink_admins);
void DumpCommandOverrideCache(OverrideType type);
AuthMethod *GetMethodByIndex(unsigned int index);
bool GetMethodIndex(const char *name, unsigned int *_index);
const char *GetMethodName(unsigned int index);
void NameFlag(const char *str, AdminFlag flag);
bool GetUnifiedSteamIdentity(const char *ident, char *out, size_t maxlen);
public:
typedef StringHashMap<FlagBits> FlagMap;
BaseStringTable *m_pStrings;
BaseMemTable *m_pMemory;
FlagMap m_CmdOverrides;
FlagMap m_CmdGrpOverrides;
int m_FirstGroup;
int m_LastGroup;
int m_FreeGroupList;
StringHashMap<GroupId> m_Groups;
List<IAdminListener *> m_hooks;
List<AuthMethod *> m_AuthMethods;
NameHashSet<AuthMethod *> m_AuthTables;
IForward *m_pCacheFwd;
int m_FirstUser;
int m_LastUser;
int m_FreeUserList;
bool m_InvalidatingAdmins;
bool m_destroying;
StringHashMap<AdminFlag> m_LevelNames;
};
extern AdminCache g_Admins;
#endif //_INCLUDE_SOURCEMOD_ADMINCACHE_H_
+244
View File
@@ -0,0 +1,244 @@
/**
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#include <stdlib.h>
#include <string.h>
#include "CDataPack.h"
#include <amtl/am-autoptr.h>
CDataPack::CDataPack()
{
Initialize();
}
CDataPack::~CDataPack()
{
Initialize();
}
static ke::Vector<ke::AutoPtr<CDataPack>> sDataPackCache;
CDataPack *CDataPack::New()
{
if (sDataPackCache.empty())
return new CDataPack();
CDataPack *pack = sDataPackCache.back().take();
sDataPackCache.pop();
pack->Initialize();
return pack;
}
void
CDataPack::Free(CDataPack *pack)
{
sDataPackCache.append(static_cast<CDataPack *>(pack));
}
void CDataPack::Initialize()
{
do
{
} while (this->RemoveItem());
elements.clear();
position = 0;
}
void CDataPack::ResetSize()
{
Initialize();
}
size_t CDataPack::CreateMemory(size_t size, void **addr)
{
InternalPack val;
val.type = CDataPackType::Raw;
val.pData.vval = new uint8_t[size + sizeof(size)];
reinterpret_cast<size_t *>(val.pData.vval)[0] = size;
elements.insert(position, val);
return position++;
}
void CDataPack::PackCell(cell_t cell)
{
InternalPack val;
val.type = CDataPackType::Cell;
val.pData.cval = cell;
elements.insert(position++, val);
}
void CDataPack::PackFunction(cell_t function)
{
InternalPack val;
val.type = CDataPackType::Function;
val.pData.cval = function;
elements.insert(position++, val);
}
void CDataPack::PackFloat(float floatval)
{
InternalPack val;
val.type = CDataPackType::Float;
val.pData.fval = floatval;
elements.insert(position++, val);
}
void CDataPack::PackString(const char *string)
{
InternalPack val;
val.type = CDataPackType::String;
ke::AString *sval = new ke::AString(string);
val.pData.sval = sval;
elements.insert(position++, val);
}
void CDataPack::Reset() const
{
position = 0;
}
size_t CDataPack::GetPosition() const
{
return position;
}
bool CDataPack::SetPosition(size_t pos) const
{
if (pos > elements.length())
return false;
position = pos;
return true;
}
cell_t CDataPack::ReadCell() const
{
if (!IsReadable() || elements[position].type != CDataPackType::Cell)
return 0;
return elements[position++].pData.cval;
}
cell_t CDataPack::ReadFunction() const
{
if (!IsReadable() || elements[position].type != CDataPackType::Function)
return 0;
return elements[position++].pData.cval;
}
float CDataPack::ReadFloat() const
{
if (!IsReadable() || elements[position].type != CDataPackType::Float)
return 0;
return elements[position++].pData.fval;
}
bool CDataPack::IsReadable(size_t bytes) const
{
return (position < elements.length());
}
const char *CDataPack::ReadString(size_t *len) const
{
if (!IsReadable() || elements[position].type != CDataPackType::String)
{
if (len)
*len = 0;
return nullptr;
}
const ke::AString &val = *elements[position++].pData.sval;
if (len)
*len = val.length();
return val.chars();
}
void *CDataPack::ReadMemory(size_t *size) const
{
void *ptr = nullptr;
if (!IsReadable() || elements[position].type != CDataPackType::Raw)
return ptr;
size_t *val = reinterpret_cast<size_t *>(elements[position].pData.vval);
ptr = &(val[1]);
++position;
if (size)
*size = val[0]; /* Egor!!!! */
return ptr;
}
bool CDataPack::RemoveItem(size_t pos)
{
if (!elements.length())
{
return false;
}
if (pos == static_cast<size_t>(-1))
{
pos = position;
}
if (pos >= elements.length())
{
return false;
}
if (pos < position) // we're deleting under us, step back
{
--position;
}
switch (elements[pos].type)
{
case CDataPackType::Raw:
{
delete elements[pos].pData.vval;
break;
}
case CDataPackType::String:
{
delete elements[pos].pData.sval;
break;
}
}
elements.remove(pos);
return true;
}
+196
View File
@@ -0,0 +1,196 @@
/**
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#ifndef _INCLUDE_SOURCEMOD_CDATAPACK_H_
#define _INCLUDE_SOURCEMOD_CDATAPACK_H_
#include <ISourceMod.h>
#include <amtl/am-vector.h>
#include <amtl/am-string.h>
using namespace SourceMod;
enum CDataPackType {
Raw,
Cell,
Float,
String,
Function
};
class CDataPack
{
public:
CDataPack();
~CDataPack();
static CDataPack *New();
static void Free(CDataPack *pack);
public: // Originally IDataReader
/**
* @brief Resets the position in the data stream to the beginning.
*/
void Reset() const;
/**
* @brief Retrieves the current stream position.
*
* @return Index into the stream.
*/
size_t GetPosition() const;
/**
* @brief Sets the current stream position.
*
* @param pos Index to set the stream at.
* @return True if succeeded, false if out of bounds.
*/
bool SetPosition(size_t pos) const;
/**
* @brief Reads one cell from the data stream.
*
* @return A cell read from the current position.
*/
cell_t ReadCell() const;
/**
* @brief Reads one float from the data stream.
*
* @return A float read from the current position.
*/
float ReadFloat() const;
/**
* @brief Returns whether or not a specified number of bytes from the current stream
* position to the end can be read.
*
* @param bytes Number of bytes to simulate reading.
* @return True if can be read, false otherwise.
*/
bool IsReadable(size_t bytes = 0) const;
/**
* @brief Reads a string from the data stream.
*
* @param len Optional pointer to store the string length.
* @return Pointer to the string, or NULL if out of bounds.
*/
const char *ReadString(size_t *len) const;
/**
* @brief Reads the current position as a generic data type.
*
* @param size Optional pointer to store the size of the data type.
* @return Pointer to the data, or NULL if out of bounds.
*/
void *ReadMemory(size_t *size) const;
/**
* @brief Reads a function pointer from the data stream.
*
* @return A function pointer read from the current position.
*/
cell_t ReadFunction() const;
public: // Originally IDataPack
/**
* @brief Resets the used size of the stream back to zero.
*/
void ResetSize();
/**
* @brief Packs one cell into the data stream.
*
* @param cell Cell value to write.
*/
void PackCell(cell_t cell);
/**
* @brief Packs one float into the data stream.
*
* @param val Float value to write.
*/
void PackFloat(float val);
/**
* @brief Packs one string into the data stream.
* The length is recorded as well for buffer overrun protection.
*
* @param string String to write.
*/
void PackString(const char *string);
/**
* @brief Creates a generic block of memory in the stream.
*
* Note that the pointer it returns can be invalidated on further
* writing, since the stream size may grow. You may need to double back
* and fetch the pointer again.
*
* @param size Size of the memory to create in the stream.
* @param addr Optional pointer to store the relocated memory address.
* @return Current position of the stream beforehand.
*/
size_t CreateMemory(size_t size, void **addr);
/**
* @brief Packs one function pointer into the data stream.
*
* @param function The function pointer to write.
*/
void PackFunction(cell_t function);
public:
void Initialize();
inline size_t GetCapacity() const { return this->elements.length(); };
inline CDataPackType GetCurrentType(void) const { return this->elements[this->position].type; };
bool RemoveItem(size_t pos = -1);
private:
typedef union {
cell_t cval;
float fval;
uint8_t *vval;
ke::AString *sval;
} InternalPackValue;
typedef struct {
InternalPackValue pData;
CDataPackType type;
} InternalPack;
ke::Vector<InternalPack> elements;
mutable size_t position;
};
#endif //_INCLUDE_SOURCEMOD_CDATAPACK_H_
+62 -8
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -29,25 +29,57 @@
* Version: $Id$
*/
#include <malloc.h>
#ifndef _INCLUDE_SOURCEMOD_CELLARRAY_H_
#define _INCLUDE_SOURCEMOD_CELLARRAY_H_
#include <stdlib.h>
#include <string.h>
#include <ICellArray.h>
extern HandleType_t htCellArray;
class CellArray
class CellArray : public ICellArray
{
public:
CellArray(size_t blocksize) : m_Data(NULL), m_BlockSize(blocksize), m_AllocSize(0), m_Size(0)
{
}
~CellArray()
{
free(m_Data);
}
/**
* @brief Creates a cell array object.
*
* @param blocksize The number of cells each member of the array can
* hold. For example, 32 cells is equivalent to:
* new Array[X][32]
* @return A new ICellArray object.
*/
static ICellArray *New(size_t blocksize)
{
return new CellArray(blocksize);
}
/**
* @brief Releases a cell array's resources.
*
* @param pack An ICellArray object to release.
*/
static void Free(ICellArray *arr)
{
delete arr;
}
// ICellArray
public:
size_t size() const
{
return m_Size;
}
cell_t *push()
{
if (!GrowIfNeeded(1))
@@ -58,18 +90,22 @@ public:
m_Size++;
return arr;
}
cell_t *at(size_t b) const
{
return &m_Data[b * m_BlockSize];
}
size_t blocksize() const
{
return m_BlockSize;
}
void clear()
{
m_Size = 0;
}
bool swap(size_t item1, size_t item2)
{
/* Make sure there is extra space available */
@@ -90,6 +126,7 @@ public:
return true;
}
void remove(size_t index)
{
/* If we're at the end, take the easy way out */
@@ -107,6 +144,7 @@ public:
m_Size--;
}
cell_t *insert_at(size_t index)
{
/* Make sure it'll fit */
@@ -124,6 +162,7 @@ public:
return src;
}
bool resize(size_t count)
{
if (count <= m_Size)
@@ -132,7 +171,7 @@ public:
return true;
}
if(!GrowIfNeeded(count - m_Size))
if (!GrowIfNeeded(count - m_Size))
{
return false;
}
@@ -141,12 +180,18 @@ public:
return true;
}
CellArray *clone()
ICellArray *clone()
{
CellArray *array = new CellArray(m_BlockSize);
array->m_AllocSize = m_AllocSize;
array->m_Size = m_Size;
array->m_Data = (cell_t *)malloc(sizeof(cell_t) * m_BlockSize * m_AllocSize);
if (!array->m_Data)
{
delete array;
return NULL;
}
memcpy(array->m_Data, m_Data, sizeof(cell_t) * m_BlockSize * m_Size);
return array;
}
@@ -182,11 +227,17 @@ private:
/* finally, allocate the new block */
if (m_Data)
{
m_Data = (cell_t *)realloc(m_Data, sizeof(cell_t) * m_BlockSize * m_AllocSize);
cell_t *data = static_cast<cell_t*>(realloc(m_Data, sizeof(cell_t) * m_BlockSize * m_AllocSize));
if (!data) // allocation failure
{
return false;
}
m_Data = data;
} else {
m_Data = (cell_t *)malloc(sizeof(cell_t) * m_BlockSize * m_AllocSize);
m_Data = static_cast<cell_t*>(malloc(sizeof(cell_t) * m_BlockSize * m_AllocSize));
}
return (m_Data != NULL);
return (m_Data != nullptr);
}
private:
cell_t *m_Data;
@@ -194,3 +245,6 @@ private:
size_t m_AllocSize;
size_t m_Size;
};
#endif /* _INCLUDE_SOURCEMOD_CELLARRAY_H_ */
+149 -265
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -30,14 +30,14 @@
*/
#include "Database.h"
#include "ISourceMod.h"
#include "HandleSys.h"
#include "ShareSys.h"
#include "sourcemod.h"
#include "sm_stringutil.h"
#include "Logger.h"
#include "ExtensionSys.h"
#include "PluginSys.h"
#include <stdlib.h>
#include "ThreadSupport.h"
#include <IThreader.h>
#include <bridge/include/ILogger.h>
#include <bridge/include/CoreProvider.h>
#define DBPARSE_LEVEL_NONE 0
#define DBPARSE_LEVEL_MAIN 1
@@ -47,10 +47,16 @@ DBManager g_DBMan;
static bool s_OneTimeThreaderErrorMsg = false;
DBManager::DBManager()
: m_StrTab(512), m_ParseLevel(0), m_ParseState(0), m_pDefault(NULL)
: m_Terminate(false),
m_pDefault(NULL)
{
}
static void FrameHook(bool simulating)
{
g_DBMan.RunFrame();
}
void DBManager::OnSourceModAllInitialized()
{
HandleAccess sec;
@@ -58,50 +64,36 @@ void DBManager::OnSourceModAllInitialized()
g_HandleSys.InitAccessDefaults(NULL, &sec);
sec.access[HandleAccess_Delete] |= HANDLE_RESTRICT_IDENTITY;
sec.access[HandleAccess_Clone] |= HANDLE_RESTRICT_IDENTITY;
m_DriverType = g_HandleSys.CreateType("IDriver", this, 0, NULL, &sec, g_pCoreIdent, NULL);
m_DatabaseType = g_HandleSys.CreateType("IDatabase", this, 0, NULL, NULL, g_pCoreIdent, NULL);
g_ShareSys.AddInterface(NULL, this);
g_SourceMod.BuildPath(Path_SM, m_Filename, sizeof(m_Filename), "configs/databases.cfg");
m_pConfigLock = g_pThreader->MakeMutex();
m_pThinkLock = g_pThreader->MakeMutex();
m_pQueueLock = g_pThreader->MakeMutex();
g_pSM->BuildPath(Path_SM, m_Filename, sizeof(m_Filename), "configs/databases.cfg");
m_Builder.SetPath(m_Filename);
g_PluginSys.AddPluginsListener(this);
g_pSM->AddGameFrameHook(&FrameHook);
auto sm_reload_databases = [this] (int client, const ICommandArgs *args) -> bool {
m_Builder.StartParse();
return true;
};
bridge->DefineCommand("sm_reload_databases", "Reparse database configurations file", sm_reload_databases);
}
void DBManager::OnSourceModLevelChange(const char *mapName)
{
SMCError err;
SMCStates states = {0, 0};
/* We lock and don't give up the lock until we're done.
* This way the thread's search won't be searching through a
* potentially empty/corrupt list, which would be very bad.
*/
m_pConfigLock->Lock();
if ((err = textparsers->ParseFile_SMC(m_Filename, this, &states)) != SMCError_Okay)
{
g_Logger.LogError("[SM] Detected parse error(s) in file \"%s\"", m_Filename);
if (err != SMCError_Custom)
{
const char *txt = textparsers->GetSMCErrorString(err);
g_Logger.LogError("[SM] Line %d: %s", states.line, txt);
}
}
m_pConfigLock->Unlock();
m_Builder.StartParse();
}
void DBManager::OnSourceModShutdown()
{
g_pSM->RemoveGameFrameHook(&FrameHook);
KillWorkerThread();
g_PluginSys.RemovePluginsListener(this);
m_pConfigLock->DestroyThis();
m_pThinkLock->DestroyThis();
m_pQueueLock->DestroyThis();
g_HandleSys.RemoveType(m_DatabaseType, g_pCoreIdent);
g_HandleSys.RemoveType(m_DriverType, g_pCoreIdent);
}
@@ -131,128 +123,10 @@ void DBManager::OnHandleDestroy(HandleType_t type, void *object)
}
}
void DBManager::ReadSMC_ParseStart()
{
m_confs.clear();
m_ParseLevel = 0;
m_ParseState = DBPARSE_LEVEL_NONE;
m_StrTab.Reset();
m_DefDriver.clear();
}
ConfDbInfo s_CurInfo;
SMCResult DBManager::ReadSMC_NewSection(const SMCStates *states, const char *name)
{
if (m_ParseLevel)
{
m_ParseLevel++;
return SMCResult_Continue;
}
if (m_ParseState == DBPARSE_LEVEL_NONE)
{
if (strcmp(name, "Databases") == 0)
{
m_ParseState = DBPARSE_LEVEL_MAIN;
} else {
m_ParseLevel++;
}
} else if (m_ParseState == DBPARSE_LEVEL_MAIN) {
s_CurInfo = ConfDbInfo();
s_CurInfo.name = m_StrTab.AddString(name);
m_ParseState = DBPARSE_LEVEL_DATABASE;
} else if (m_ParseState == DBPARSE_LEVEL_DATABASE) {
m_ParseLevel++;
}
return SMCResult_Continue;
}
SMCResult DBManager::ReadSMC_KeyValue(const SMCStates *states, const char *key, const char *value)
{
if (m_ParseLevel)
{
return SMCResult_Continue;
}
if (m_ParseState == DBPARSE_LEVEL_MAIN)
{
if (strcmp(key, "driver_default") == 0)
{
m_DefDriver.assign(value);
}
} else if (m_ParseState == DBPARSE_LEVEL_DATABASE) {
if (strcmp(key, "driver") == 0)
{
if (strcmp(value, "default") != 0)
{
s_CurInfo.driver = m_StrTab.AddString(value);
}
} else if (strcmp(key, "database") == 0) {
s_CurInfo.database = m_StrTab.AddString(value);
} else if (strcmp(key, "host") == 0) {
s_CurInfo.host = m_StrTab.AddString(value);
} else if (strcmp(key, "user") == 0) {
s_CurInfo.user = m_StrTab.AddString(value);
} else if (strcmp(key, "pass") == 0) {
s_CurInfo.pass = m_StrTab.AddString(value);
} else if (strcmp(key, "timeout") == 0) {
s_CurInfo.info.maxTimeout = atoi(value);
} else if (strcmp(key, "port") == 0) {
s_CurInfo.info.port = atoi(value);
}
}
return SMCResult_Continue;
}
#define ASSIGN_VAR(var) \
if (s_CurInfo.var == -1) { \
s_CurInfo.info.var = ""; \
} else { \
s_CurInfo.info.var = m_StrTab.GetString(s_CurInfo.var); \
}
SMCResult DBManager::ReadSMC_LeavingSection(const SMCStates *states)
{
if (m_ParseLevel)
{
m_ParseLevel--;
return SMCResult_Continue;
}
if (m_ParseState == DBPARSE_LEVEL_DATABASE)
{
/* Set all of the info members to either a blank string
* or the string pointer from the string table.
*/
ASSIGN_VAR(driver);
ASSIGN_VAR(database);
ASSIGN_VAR(host);
ASSIGN_VAR(user);
ASSIGN_VAR(pass);
/* Save it.. */
m_confs.push_back(s_CurInfo);
/* Go up one level */
m_ParseState = DBPARSE_LEVEL_MAIN;
} else if (m_ParseState == DBPARSE_LEVEL_MAIN) {
m_ParseState = DBPARSE_LEVEL_NONE;
return SMCResult_Halt;
}
return SMCResult_Continue;
}
#undef ASSIGN_VAR
void DBManager::ReadSMC_ParseEnd(bool halted, bool failed)
{
}
bool DBManager::Connect(const char *name, IDBDriver **pdr, IDatabase **pdb, bool persistent, char *error, size_t maxlength)
{
ConfDbInfo *pInfo = GetDatabaseConf(name);
ConfDbInfoList *list = m_Builder.GetConfigList();
ke::RefPtr<ConfDbInfo> pInfo = list->GetDatabaseConf(name);
if (!pInfo)
{
@@ -261,7 +135,7 @@ bool DBManager::Connect(const char *name, IDBDriver **pdr, IDatabase **pdb, bool
*pdr = NULL;
}
*pdb = NULL;
UTIL_Format(error, maxlength, "Configuration \"%s\" not found", name);
g_pSM->Format(error, maxlength, "Configuration \"%s\" not found", name);
return false;
}
@@ -271,11 +145,12 @@ bool DBManager::Connect(const char *name, IDBDriver **pdr, IDatabase **pdb, bool
/* Try to assign a real driver pointer */
if (pInfo->info.driver[0] == '\0')
{
if (!m_pDefault && m_DefDriver.size() > 0)
ke::AString defaultDriver = list->GetDefaultDriver();
if (!m_pDefault && defaultDriver.length() > 0)
{
m_pDefault = FindOrLoadDriver(m_DefDriver.c_str());
m_pDefault = FindOrLoadDriver(defaultDriver.chars());
}
dname = m_DefDriver.size() ? m_DefDriver.c_str() : "default";
dname = defaultDriver.length() ? defaultDriver.chars() : "default";
pInfo->realDriver = m_pDefault;
} else {
pInfo->realDriver = FindOrLoadDriver(pInfo->info.driver);
@@ -298,8 +173,7 @@ bool DBManager::Connect(const char *name, IDBDriver **pdr, IDatabase **pdb, bool
}
*pdb = NULL;
UTIL_Format(error, maxlength, "Driver \"%s\" not found", dname);
g_pSM->Format(error, maxlength, "Driver \"%s\" not found", dname);
return false;
}
@@ -312,7 +186,7 @@ void DBManager::AddDriver(IDBDriver *pDriver)
*/
KillWorkerThread();
m_drivers.push_back(pDriver);
m_drivers.push_back(pDriver);
}
void DBManager::RemoveDriver(IDBDriver *pDriver)
@@ -332,17 +206,23 @@ void DBManager::RemoveDriver(IDBDriver *pDriver)
}
}
/* Make sure NOTHING references this! */
List<ConfDbInfo>::iterator iter;
for (iter=m_confs.begin(); iter!=m_confs.end(); iter++)
ConfDbInfoList *list = m_Builder.GetConfigList();
for (size_t i = 0; i < list->length(); i++)
{
ConfDbInfo &db = (*iter);
if (db.realDriver == pDriver)
ke::RefPtr<ConfDbInfo> current = list->at(i);
if (current->realDriver == pDriver)
{
db.realDriver = NULL;
current->realDriver = NULL;
}
}
/* Someone unloaded the default driver? Silly.. */
if (pDriver == m_pDefault)
{
m_pDefault = NULL;
}
/* Now that the driver is gone, we have to test the think queue.
* Whatever happens therein is up to the db op!
*/
@@ -372,9 +252,11 @@ void DBManager::RemoveDriver(IDBDriver *pDriver)
IDBDriver *DBManager::GetDefaultDriver()
{
if (!m_pDefault && m_DefDriver.size() > 0)
ConfDbInfoList *list = m_Builder.GetConfigList();
ke::AString defaultDriver = list->GetDefaultDriver();
if (!m_pDefault && defaultDriver.length() > 0)
{
m_pDefault = FindOrLoadDriver(m_DefDriver.c_str());
m_pDefault = FindOrLoadDriver(defaultDriver.chars());
}
return m_pDefault;
@@ -437,10 +319,16 @@ IDBDriver *DBManager::GetDriver(unsigned int index)
const DatabaseInfo *DBManager::FindDatabaseConf(const char *name)
{
ConfDbInfo *info = GetDatabaseConf(name);
ConfDbInfoList *list = m_Builder.GetConfigList();
ke::RefPtr<ConfDbInfo> info = list->GetDatabaseConf(name);
if (!info)
{
return NULL;
// couldn't find requested conf, return default if exists
info = list->GetDefaultConfiguration();
if (!info)
{
return NULL;
}
}
return &info->info;
@@ -448,18 +336,9 @@ const DatabaseInfo *DBManager::FindDatabaseConf(const char *name)
ConfDbInfo *DBManager::GetDatabaseConf(const char *name)
{
List<ConfDbInfo>::iterator iter;
for (iter=m_confs.begin(); iter!=m_confs.end(); iter++)
{
ConfDbInfo &conf = (*iter);
if (strcmp(m_StrTab.GetString(conf.name), name) == 0)
{
return &conf;
}
}
return NULL;
ConfDbInfoList *list = m_Builder.GetConfigList();
ke::RefPtr<ConfDbInfo> info(list->GetDatabaseConf(name));
return info;
}
IDBDriver *DBManager::FindOrLoadDriver(const char *name)
@@ -474,7 +353,7 @@ IDBDriver *DBManager::FindOrLoadDriver(const char *name)
}
char filename[PLATFORM_MAX_PATH];
UTIL_Format(filename, sizeof(filename), "dbi.%s.ext", name);
g_pSM->Format(filename, sizeof(filename), "dbi.%s.ext", name);
IExtension *pExt = g_Extensions.LoadAutoExtension(filename);
if (!pExt || !pExt->IsLoaded() || m_drivers.size() <= last_size)
@@ -495,12 +374,17 @@ IDBDriver *DBManager::FindOrLoadDriver(const char *name)
void DBManager::KillWorkerThread()
{
if (m_pWorker)
if (m_Worker)
{
m_pWorker->Stop(false);
g_pThreader->DestroyWorker(m_pWorker);
m_pWorker = NULL;
{
ke::AutoLock lock(&m_QueueEvent);
m_Terminate = true;
m_QueueEvent.Notify();
}
m_Worker->Join();
m_Worker = nullptr;
s_OneTimeThreaderErrorMsg = false;
m_Terminate = false;
}
}
@@ -513,99 +397,108 @@ bool DBManager::AddToThreadQueue(IDBThreadOperation *op, PrioQueueLevel prio)
return false;
}
if (!m_pWorker)
if (!m_Worker)
{
m_pWorker = g_pThreader->MakeWorker(this, true);
if (!m_pWorker)
m_Worker = new ke::Thread([this]() -> void {
Run();
}, "SM SQL Worker");
if (!m_Worker->Succeeded())
{
if (!s_OneTimeThreaderErrorMsg)
{
g_Logger.LogError("[SM] Unable to create db threader (error unknown)");
logger->LogError("[SM] Unable to create db threader (error unknown)");
s_OneTimeThreaderErrorMsg = true;
}
return false;
}
if (!m_pWorker->Start())
{
if (!s_OneTimeThreaderErrorMsg)
{
g_Logger.LogError("[SM] Unable to start db threader (error unknown)");
s_OneTimeThreaderErrorMsg = true;
}
g_pThreader->DestroyWorker(m_pWorker);
m_pWorker = NULL;
m_Worker = nullptr;
return false;
}
}
/* Add to the queue */
{
m_pQueueLock->Lock();
ke::AutoLock lock(&m_QueueEvent);
Queue<IDBThreadOperation *> &queue = m_OpQueue.GetQueue(prio);
queue.push(op);
m_pQueueLock->Unlock();
m_QueueEvent.Notify();
}
/* Make the thread */
m_pWorker->MakeThread(this);
return true;
}
void DBManager::OnWorkerStart(IThreadWorker *pWorker)
void DBManager::Run()
{
m_drSafety.clear();
for (size_t i=0; i<m_drivers.size(); i++)
// Initialize DB threadsafety.
for (size_t i=0; i < m_drivers.size(); i++)
{
if (m_drivers[i]->IsThreadSafe())
{
m_drSafety.push_back(m_drivers[i]->InitializeThreadSafety());
} else {
else
m_drSafety.push_back(false);
}
}
}
void DBManager::OnWorkerStop(IThreadWorker *pWorker)
{
// Run actual worker thread logic.
ThreadMain();
// Shutdown DB threadsafety.
for (size_t i=0; i<m_drivers.size(); i++)
{
if (m_drSafety[i])
{
m_drivers[i]->ShutdownThreadSafety();
}
}
m_drSafety.clear();
}
void DBManager::RunThread(IThreadHandle *pThread)
void DBManager::ThreadMain()
{
IDBThreadOperation *op = NULL;
ke::AutoLock lock(&m_QueueEvent);
/* Get something from the queue */
{
m_pQueueLock->Lock();
Queue<IDBThreadOperation *> &queue = m_OpQueue.GetLikelyQueue();
if (!queue.empty())
while (true) {
// The lock has been acquired. Grab everything we can out of the
// queue. Since we want to flush the queue even if we're terminated,
// we process all operations we can before checking to terminate.
// There's no risk of starvation since the main thread blocks on us
// terminating.
while (true)
{
op = queue.first();
Queue<IDBThreadOperation *> &queue = m_OpQueue.GetLikelyQueue();
if (queue.empty())
break;
IDBThreadOperation *op = queue.first();
queue.pop();
// Unlock the queue when we run the query, so the main thread can
// keep pumping events. We re-acquire the lock to check for more
// items. It's okay if we terminate while unlocked; the main
// thread would be blocked and we'd need to flush the queue
// anyway, so after we've depleted the queue here, we'll just
// reach the terminate at the top of the loop.
{
ke::AutoUnlock unlock(&m_QueueEvent);
op->RunThreadPart();
ke::AutoLock lock(&m_ThinkLock);
m_ThinkQueue.push(op);
}
if (!m_Terminate)
{
ke::AutoUnlock unlock(&m_QueueEvent);
#ifdef _WIN32
Sleep(20);
#else
usleep(20000);
#endif
}
}
m_pQueueLock->Unlock();
if (m_Terminate)
return;
// Release the lock and wait for a signal.
m_QueueEvent.Wait();
}
/* whoa. hi. did we get something? we should have. */
if (!op)
{
/* wtf? */
return;
}
op->RunThreadPart();
m_pThinkLock->Lock();
m_ThinkQueue.push(op);
m_pThinkLock->Unlock();
}
void DBManager::RunFrame()
@@ -617,19 +510,16 @@ void DBManager::RunFrame()
}
/* Dump one thing per-frame so the server stays sane. */
m_pThinkLock->Lock();
IDBThreadOperation *op = m_ThinkQueue.first();
m_ThinkQueue.pop();
m_pThinkLock->Unlock();
IDBThreadOperation *op;
{
ke::AutoLock lock(&m_ThinkLock);
op = m_ThinkQueue.first();
m_ThinkQueue.pop();
}
op->RunThinkPart();
op->Destroy();
}
void DBManager::OnTerminate(IThreadHandle *pThread, bool cancel)
{
/* Do nothing */
}
void DBManager::OnSourceModIdentityDropped(IdentityToken_t *pToken)
{
s_pAddBlock = pToken;
@@ -667,7 +557,7 @@ void DBManager::OnSourceModIdentityDropped(IdentityToken_t *pToken)
s_pAddBlock = NULL;
}
void DBManager::OnPluginUnloaded(IPlugin *plugin)
void DBManager::OnPluginWillUnload(IPlugin *plugin)
{
/* Kill the thread so we can flush everything into the think queue... */
KillWorkerThread();
@@ -693,9 +583,7 @@ void DBManager::OnPluginUnloaded(IPlugin *plugin)
}
}
for (iter = templist.begin();
iter != templist.end();
iter++)
for (iter = templist.begin(); iter != templist.end(); iter++)
{
IDBThreadOperation *op = (*iter);
op->RunThinkPart();
@@ -703,17 +591,13 @@ void DBManager::OnPluginUnloaded(IPlugin *plugin)
}
}
void DBManager::LockConfig()
ke::AString DBManager::GetDefaultDriverName()
{
m_pConfigLock->Lock();
ConfDbInfoList *list = m_Builder.GetConfigList();
return list->GetDefaultDriver();
}
void DBManager::UnlockConfig()
void DBManager::AddDependency(IExtension *myself, IDBDriver *driver)
{
m_pConfigLock->Unlock();
}
const char *DBManager::GetDefaultDriverName()
{
return m_DefDriver.c_str();
g_Extensions.AddRawDependency(myself, driver->GetIdentity(), driver);
}
+21 -52
View File
@@ -1,8 +1,8 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -32,42 +32,24 @@
#ifndef _INCLUDE_DATABASE_MANAGER_H_
#define _INCLUDE_DATABASE_MANAGER_H_
#include <IDBDriver.h>
#include "sm_globals.h"
#include "common_logic.h"
#include <sh_vector.h>
#include <sh_string.h>
#include <am-string.h>
#include <sh_list.h>
#include <ITextParsers.h>
#include "sm_memtable.h"
#include <IThreader.h>
#include <IPluginSys.h>
#include <am-thread-utils.h>
#include "sm_simple_prioqueue.h"
#include "PluginSys.h"
#include <am-refcounting.h>
#include "DatabaseConfBuilder.h"
using namespace SourceHook;
struct ConfDbInfo
{
ConfDbInfo() : name(-1), driver(-1), host(-1), user(-1), pass(-1),
database(-1), realDriver(NULL)
{
}
int name;
int driver;
int host;
int user;
int pass;
int database;
IDBDriver *realDriver;
DatabaseInfo info;
};
class DBManager :
public IDBManager,
public SMGlobalClass,
public IHandleTypeDispatch,
public ITextListener_SMC,
public IThread,
public IThreadWorkerCallbacks,
public IPluginsListener
{
public:
@@ -86,40 +68,31 @@ public: //IDBManager
void AddDriver(IDBDriver *pDrivera);
void RemoveDriver(IDBDriver *pDriver);
const DatabaseInfo *FindDatabaseConf(const char *name);
ConfDbInfo *GetDatabaseConf(const char *name);
bool Connect(const char *name, IDBDriver **pdr, IDatabase **pdb, bool persistent, char *error, size_t maxlength);
unsigned int GetDriverCount();
IDBDriver *GetDriver(unsigned int index);
Handle_t CreateHandle(DBHandleType type, void *ptr, IdentityToken_t *pToken);
HandleError ReadHandle(Handle_t hndl, DBHandleType type, void **ptr);
HandleError ReleaseHandle(Handle_t hndl, DBHandleType type, IdentityToken_t *token);
public: //ITextListener_SMC
void ReadSMC_ParseStart();
SMCResult ReadSMC_NewSection(const SMCStates *states, const char *name);
SMCResult ReadSMC_KeyValue(const SMCStates *states, const char *key, const char *value);
SMCResult ReadSMC_LeavingSection(const SMCStates *states);
void ReadSMC_ParseEnd(bool halted, bool failed);
public: //IThread
void RunThread(IThreadHandle *pThread);
void OnTerminate(IThreadHandle *pThread, bool cancel);
public: //IThreadWorkerCallbacks
void OnWorkerStart(IThreadWorker *pWorker);
void OnWorkerStop(IThreadWorker *pWorker);
void AddDependency(IExtension *myself, IDBDriver *driver);
public: //ke::IRunnable
void Run();
void ThreadMain();
public: //IPluginsListener
void OnPluginUnloaded(IPlugin *plugin);
void OnPluginWillUnload(IPlugin *plugin);
public:
ConfDbInfo *GetDatabaseConf(const char *name);
IDBDriver *FindOrLoadDriver(const char *name);
IDBDriver *GetDefaultDriver();
const char *GetDefaultDriverName();
ke::AString GetDefaultDriverName();
bool AddToThreadQueue(IDBThreadOperation *op, PrioQueueLevel prio);
void LockConfig();
void UnlockConfig();
void RunFrame();
inline HandleType_t GetDatabaseType()
{
return m_DatabaseType;
}
private:
void ClearConfigs();
void KillWorkerThread();
private:
CVector<IDBDriver *> m_drivers;
@@ -128,19 +101,15 @@ private:
PrioQueue<IDBThreadOperation *> m_OpQueue;
Queue<IDBThreadOperation *> m_ThinkQueue;
CVector<bool> m_drSafety; /* which drivers are safe? */
IThreadWorker *m_pWorker; /* Worker thread object */
IMutex *m_pConfigLock; /* Configuration lock */
IMutex *m_pQueueLock; /* Queue safety lock */
IMutex *m_pThinkLock; /* Think-queue lock */
ke::AutoPtr<ke::Thread> m_Worker;
ke::ConditionVariable m_QueueEvent;
ke::Mutex m_ThinkLock;
bool m_Terminate;
List<ConfDbInfo> m_confs;
DatabaseConfBuilder m_Builder;
HandleType_t m_DriverType;
HandleType_t m_DatabaseType;
String m_DefDriver;
BaseStringTable m_StrTab;
char m_Filename[PLATFORM_MAX_PATH];
unsigned int m_ParseLevel;
unsigned int m_ParseState;
IDBDriver *m_pDefault;
};

Some files were not shown because too many files have changed in this diff Show More