AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   News (https://forums.alliedmods.net/forumdisplay.php?f=59)
-   -   CS:GO and moving forward (Plugin developer input) (https://forums.alliedmods.net/showthread.php?t=300697)

Dr!fter 08-26-2017 11:48

CS:GO and moving forward (Plugin developer input)
 
Hello,

So as you may have noticed in the last CS:GO update it took us much longer to fix SourceMod than normal so I'll give a brief view of what happened. CS:GO code on launch had much of the same code as CS:S making it really easy to port the cstrike extension over to CS:GO and make plugins for one work for both for the most part but this has changed heavily over the years as they strip old code out. What happened in the last update is they moved away from weaponids and removed item script files and merged everything into items.games. In doing so they removed functions SM used or are no longer used in the same way (or inlined on windows). This caused our update time to take much longer due to having to find ways to replicate the previous functions/forwards.

When the extension was finally finished we considered it a temporary fix since it isn't very maintainable. Looking forward we want to phase out/remove WeaponID's for CS:GO and switch to item definition indexes. However, doing this will cause some minor breakage/change in behavior for old plugins.

So here is the approach currently being discussed. The id's for the weapons that are currently in the enum will be mapped to itemdefs so internally we will use itemdefs but plugins will see it as the old id's. Anything currently not in the weapon ids enum will use the itemdef index. This will require us to update the include with new itemdef indexes when they are added thus plugin recompiling if they want to use the new values.

This change will break certain weapons as well, currently the extension does some assumptions for weapons that aren't default (cz75a, usp-s, m4a1-s, revolver). Currently it passes the weaponid for the item that it replaces. However, in the case of the cz75a this has been broken forever due to them having different default items on CT/T. So those weapons will be added to the enum separately.

So this thread is for plugin developers to provide input on the solution (perhaps a better one) and also suggestion for new natives that they may want WITHIN REASON. The natives for the most part should be ones that interact with the new CCSWeaponData class or CEconItem(View/Definition). I have final say if they are added or not.

micapat 08-30-2017 11:51

Re: CS:GO and moving forward (Plugin developer input)
 
Hello,

What are your thoughts about a split between CS:S and CS:GO?
==> Common stuff stay in #include <cstrike>, while the differences go in #include <css> / #include <csgo>.

-) It will break some CS plugins (New includes to add, new weapon/item enumerations to use...). These plugins will certainly become CS:S / CS:GO only.
+) You will be able to do whatever you want in the future (=> Remove completely WeaponID for CS:GO ; Create specific natives for CS:S / CS:GO...).

Valve will certainly continue to update CS:GO and add/modify/remove stuff. Issues like you explained above could happen more and more...

------
About adding new natives, could you please provide the vtable of the classes CCSWeaponData / CEconItem (Remark: these natives will certainly be CS:GO only, right?)

Dr!fter 08-31-2017 17:30

Re: CS:GO and moving forward (Plugin developer input)
 
Quote:

Originally Posted by micapat (Post 2545312)
Hello,

What are your thoughts about a split between CS:S and CS:GO?
==> Common stuff stay in #include <cstrike>, while the differences go in #include <css> / #include <csgo>.

-) It will break some CS plugins (New includes to add, new weapon/item enumerations to use...). These plugins will certainly become CS:S / CS:GO only.
+) You will be able to do whatever you want in the future (=> Remove completely WeaponID for CS:GO ; Create specific natives for CS:S / CS:GO...).

Valve will certainly continue to update CS:GO and add/modify/remove stuff. Issues like you explained above could happen more and more...

------
About adding new natives, could you please provide the vtable of the classes CCSWeaponData / CEconItem (Remark: these natives will certainly be CS:GO only, right?)

I want to not break compatibility with old plugins.

There isn't much reason to split the two as we already currently have natives that only exist for cs:go in the same extension. There will be a native to get the actual itemdefinition index.

Not sure how me giving you the vtable of those classes is adding a native... Yes natives for CS:GO

Dabosman 10-22-2017 18:49

Re: CS:GO and moving forward (Plugin developer input)
 
Thank you for the detailed explanation. We sincerely appreciate the hard work. Does a donation here help you guys out the most I'm sure? If so, will donate. Thank you again.


All times are GMT -4. The time now is 10:01.

Powered by vBulletin®
Copyright ©2000 - 2017, vBulletin Solutions, Inc.