sourcemod icon indicating copy to clipboard operation
sourcemod copied to clipboard

Add Collision group enum

Open dragokas opened this issue 4 years ago • 9 comments

I think, it could be good idea to include this enum: https://developer.valvesoftware.com/wiki/Collision_groups in sdktools.inc as "int" type. What do you think?

dragokas avatar Oct 27 '21 17:10 dragokas

These are engine-specific, so it wouldn't be as simple as just dropping them in the inc.

psychonic avatar Oct 27 '21 17:10 psychonic

I think these should be included in game specific incs, e.g. tf2.inc, cstrike.inc, etc

sapphonie avatar Nov 05 '21 22:11 sapphonie

I don’t think an extra 20 inc files is the answer.

Sent from my iPhone

On Nov 5, 2021, at 6:29 PM, &> @.***> wrote:

 I think these should be included in game specific incs, e.g. tf2.inc, cstrike.inc, etc

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

psychonic avatar Nov 05 '21 23:11 psychonic

No, I mean for the games that have an existing inc, include the proper enum in there, for the games that do not, do not include a collision group enum.

sapphonie avatar Nov 06 '21 03:11 sapphonie

If you open the door for that, it won't prevent people from opening PRs.

SM is all or nothing regarding "generic engine feature". Furthermore the cstrike is used for both for CSS and CSGO and the collision enum is def not the same for the two games, so that idea doesn't work anyways.

Kenzzer avatar Nov 06 '21 12:11 Kenzzer

They can be consts in a shared inc, but the values need to be assigned at runtime (similar to MaxClients or the TFHoliday values).

psychonic avatar Nov 06 '21 14:11 psychonic

Would that be something that could be potentially added ? I thought the same regarding superseding sdkhooks, with pre configured hooks handle in consts, with the potential merge of #1629 . That aside, considering I'm adding collision natives to sdktools lately, I'm up for making a PR regarding the addition of collision group consts.

Kenzzer avatar Nov 06 '21 14:11 Kenzzer

Do some games have additional or less collision groups than others or are they always the same, just defined with different values? Having constants in the include that don't apply for your game seems confusing.

peace-maker avatar Nov 06 '21 18:11 peace-maker

Do some games have additional or less collision groups than others or are they always the same, just defined with different values? Having constants in the include that don't apply for your game seems confusing.

I believe it's both. I wouldn't worry about ones that only exist in a single game. I like that to damage types in sdkhooks.inc that most games don't use half of.

psychonic avatar Nov 07 '21 02:11 psychonic