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

Minor npc_zombie improvements #312

Merged
merged 6 commits into from
Jan 9, 2025

Conversation

Wikot235
Copy link

@Wikot235 Wikot235 commented Jul 28, 2024

-Added a keyvalue that changes zombie melee attack range
-Added a spawnflag that disables spawning a headcrab when a zombie dies


PR Checklist

  • My PR follows all guidelines in the CONTRIBUTING.md file
  • My PR targets a develop branch OR targets another branch with a specific goal in mind

@Wikot235 Wikot235 requested a review from Blixibon January 5, 2025 15:41
Copy link
Member

@Blixibon Blixibon left a comment

Choose a reason for hiding this comment

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

I don't understand why the original #define definitions are being removed when the numbers from them are still being used to initialize the custom values. It seems unnecessary to delete them and it may add more risk for regressions or conflicts if other mods make changes to or around them, and it also removes the reference for where these numbers came from.

I would advise leaving them in and just doing this when initializing the custom values in the constructor:

#ifdef MAPBASE
	m_iMeleeReach = ZOMBIE_MELEE_REACH;
	m_iMaxPlayerDistToSwat = ZOMBIE_PLAYER_MAX_SWAT_DIST;
	m_iMaxObjWeightToSwat = ZOMBIE_MAX_PHYSOBJ_MASS;
#endif

I would use GitHub's suggestions feature to make it easier to address this, although I don't know how that works with re-adding lines and I don't trust myself to make those suggestions accurately 🥴

This is less important, but I also think MaxObjWeightToSwat should be renamed to MaxObjMassToSwat since 'mass' is more accurate and weight isn't a commonly used metric in Source.

@Wikot235 Wikot235 requested a review from Blixibon January 8, 2025 20:50
@Blixibon Blixibon merged commit 8ef090c into mapbase-source:develop Jan 9, 2025
4 checks passed
@Wikot235 Wikot235 deleted the Zombie_improved branch January 9, 2025 19:54
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.

2 participants