Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix named constants usages #656

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

WPMGPRoSToTeMa
Copy link
Contributor

No description provided.

@WPMGPRoSToTeMa WPMGPRoSToTeMa force-pushed the fix-named-constants branch 2 times, most recently from 3c44720 to 5d8aa17 Compare September 24, 2018 03:59
@LevShisterov
Copy link
Collaborator

LevShisterov commented Sep 27, 2018 via email

@WPMGPRoSToTeMa
Copy link
Contributor Author

WPMGPRoSToTeMa commented Sep 27, 2018

@LevShisterov currently I'm thinking about the names for constants of different hull numeration. I have several ideas for it:

  1. PMOVE_HULL_* because it is related to playermove code.
  2. PLAYER_HULL_* because it is related to player_mins and player_maxs variables.
  3. MOD_HULL_*/DLL_HULL_*/GAME_HULL_*/something else because sizes for these hulls are controlled by gamedll via GetHullBounds callback.

Also I'm using player_mins and player_maxs in SV_HullForBsp:https://github.com/dreamstalker/rehlds/blob/65c6ce593b5eabf13e92b03352e4b429d0d797b0/rehlds/engine/world.cpp#L198-L208 So, now it is not only for players and looks like we should prefer the 3rd option. What do you think?

And btw, where it should be located? If we put it in model.h too and, for example, ReGameDLL_CS will include it with util.h together for GetHullBounds, then there will an error about *_hull redefinition.

@WPMGPRoSToTeMa
Copy link
Contributor Author

@LevShisterov ping.

@LevShisterov
Copy link
Collaborator

About hull enumeration.
Mod_LoadClipnodes makes the things crazy, it doesn't match player_mins/player_maxs. I mean that if you want to make enum for model.hulls all references to that field should be processed. And it is hard to determine exact namings for constants. Naming them HULL_1, HULL_2, etc doesn't makes a lot of sense. At least I wasn't able to figure out namings for these fast. Probably you have some suggestions.
In SV_GetPlayerHulls looks like MAX_MAP_HULLS should be used.

StevenKal referenced this pull request Oct 22, 2021
* Update pr_edict.h

* Update pr_edict.cpp

* Update rehlds_api_impl.cpp

* Update rehlds_api_impl.h

* Update rehlds_api.h

* Update pr_edict.h

* Update pr_edict.cpp

* Update rehlds_api_impl.cpp

* Update rehlds_api_impl.h

* Update rehlds_api.h

* Update pr_edict.cpp
@s1lentq s1lentq force-pushed the master branch 2 times, most recently from 43df0ba to de3679f Compare September 20, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants