Skip to content

Conversation

@StevenKal
Copy link
Owner

@StevenKal StevenKal commented Nov 1, 2021

o Added new CVar "mp_plant_c4_delay" to control the "waiting delay" before planting the C4 (works for both normal & plant anywhere modes).
o Renamed CCSPlayer's API member "m_bPlantC4Anywhere" into "m_iCanPlantC4Anywhere" & extend its behaviour by allowing a specific client to do not have the "plant C4 anywhere" active while the CVar "mp_plant_c4_anywhere" can be.
o Added new CCSPlayer's API member "m_flPlantC4Delay" which works the same way as above, and also for both normal & plant anywhere modes.
o Added related code to the feature including a new function in the gamerules with custom enum, a new custom signal for detecting delay change, then an information message to the client trying to plant when the delay is not over.
o Fixed C4 icon unblinked on situations where it should not (like if you receive one via "GiveNamedItemEx" and when you are on site, icon unblinked on the past).
o Fixed C4 planting capabilities gone once a player has planted the C4 and if he still have some C4 in BP ammo.
Note: This fix does not allow the game to handle properly "multiple C4 support", other parts in the code (like in "CBasePlayer::DropPlayerItem", CHLMP's "m_bBombDropped", etc.) might need a deeper rework for this, I might do that later, but this is more to handle extra plugins which can give more than 1 C4, not a standard game behaviour which is, only 1 C4!

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