Skip to content

Improved gentity struct.#172

Merged
Rackover merged 3 commits intoiw4x:developfrom
Caball009:struct_update
Dec 23, 2024
Merged

Improved gentity struct.#172
Rackover merged 3 commits intoiw4x:developfrom
Caball009:struct_update

Conversation

@Caball009
Copy link
Contributor

What does this PR do?

This improves the layout of the gentity_s struct.

How does this PR change IW4x's behaviour?

None of the existing code should be affected. I cannot find any references to gentity fields below gentity_s::count, so there shouldn't be any offset problems.

Anything else we should know?

This is based on iw4 xbox360 debug information. Some of the type and field names are my own as I couldn't find their actual names. The struct change should be helpful for the antilag pr: #169 (review)

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits


struct spawner_ent_t
{
int team;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

team_t here too I suppose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked IW4, IW5 and T5 and none of them have this field as a team_t enum, but I still think it's quite likely to be a team_t.

Copy link
Member

@wroyca wroyca Dec 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm, spawner_ent_t doesn't use team_t on T5; perhaps it's best to leave it as is (int) for now and see how the code references it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK; feel free to open another PR if this turns out to be team_t. Even if that's not exactly what's in the symbols, if that's what the game does internally that it makes sense to have it be a team_t

@Rackover Rackover merged commit 1fa50d6 into iw4x:develop Dec 23, 2024
@Caball009 Caball009 deleted the struct_update branch March 1, 2025 19:48
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