-
Notifications
You must be signed in to change notification settings - Fork 11
Support for medic and ammo resupplier abilities on Combine soldiers #233
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
Support for medic and ammo resupplier abilities on Combine soldiers #233
Conversation
This comment was marked as spam.
This comment was marked as spam.
| int iAmmoType = GetAmmoDef()->Index( STRING(m_iszAmmoSupply) ); | ||
| if ( iAmmoType == -1 ) | ||
| { | ||
| DevMsg("ERROR: Citizen attempting to give unknown ammo type (%s)\n", STRING(m_iszAmmoSupply) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably say "Combine", "Combine soldier", or "soldier". Maybe even insert the classname
|
I feel very conflicted about how heavily this code copies from existing code in the citizen class. Citizens, vortigaunts, and now Combine soldiers need to heal. Maybe some day Metrocops will need to as well. I feel like there should be some way to share this feature between different NPCs, like perhaps making it part of the PlayerCompanion class or separating it into its own behavior. However, I also think that those approaches would risk changing the original functionality, which would not be desired. I think for that reason this is probably the best way to do it even if it is a little copy and paste heavy. It just makes me wish NPCs were more modular. I also want to state that Combine soldiers not healing in EZ2 was a design choice and I think that was good for the overall narrative of the game. For those watching this PR, just for complete clarity, this functionality is for use in custom maps or future content. It's not something that will be seen in the main game. |
|
As far as the questions go:
|
|
How's going about this? Haven't seen any activities in the months |
|
@Blixibon Do we need this PR to be merged for testing in the near future? It looks like it's still in draft status with unaddressed comments. No pressure if we don't need it, I just want to make sure it's not forgotten. |
0a420c4 to
b7d18c2
Compare
|
I've addressed the concern regarding the spawnflags and force-pushed this branch to the latest version of |
| else | ||
| { | ||
| if ( HasCondition( COND_COMBINE_PLAYERHEALREQUEST ) ) | ||
| DevMsg( "Would say: sorry, need to recharge\n" ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, but this should have the debug name of the NPC
| //----------------------------------------------------------------------------- | ||
| void CNPC_Combine::InputForceHealthKitToss( inputdata_t &inputdata ) | ||
| { | ||
| TossHealthKit( UTIL_GetLocalPlayer(), Vector(48.0f, 0.0f, 0.0f) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be cool if we could use the input to specify another entity by targetname, but I digress
|
This PR is ancient but I'm thinking of merging it before the next release. Maybe another smaller release before 2.0 |
| ConVar sk_combine_heal_player_min_forced( "sk_combine_heal_player_min_forced", "10.0" ); | ||
| ConVar sk_combine_heal_ally( "sk_combine_heal_ally", "30" ); | ||
| ConVar sk_combine_heal_ally_delay( "sk_combine_heal_ally_delay", "20" ); | ||
| ConVar sk_combine_heal_ally_min_pct( "sk_combine_heal_ally_min_pct", "0.90" ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this and the following ConVars are unused
Allows specific Combine soldiers to act as medics or ammo resuppliers when specified by the mapper. This behavior was ported from citizens and functions identically to them.
This is in draft status due to two questions about the implementation:
@1upD I'm curious to hear if you have any input on these points