s1lentq / ReGameDLL_CS

:hammer: Reverse-engineered gamedll (CS 1.6 / CZero)
GNU General Public License v3.0
573 stars 196 forks source link

Weapongs/Grenades placed on some Maps do not disappear after Pickup #784

Open fred0r opened 1 year ago

fred0r commented 1 year ago

Saw on a few Maps that Weapons which have been placed by the Mapper are still available, after being picked up by Players. Recently saw it while playing and . de_silentoperation - https://gamebanana.com/mods/86288 -> infinite Grenades fy_iceworld - https://gamebanana.com/mods/85016 -> infinite Weapons Beside these two Maps it also happend on others, but currently cant remember their Names.

Running on Linux with latest Rehlds/Regamedll_CS/Metamod-r.

StevenKal commented 1 year ago

The "first reason" that could be is that some of those armouries have the CArmoury's "m_iCount" member >= 2, so either this is intentional by map author (but I doubt for the old-school "fy_iceworld"), either you run a plugin allowing you to customize this, or, this is a silent feature inside one you missed! Or, badly explained by plugin author! Or, either the GameRules's "m_bMapHasEscapeZone" member is true for some reasons & some checks inside boosted "m_iCount". Besides the code is "basic", & reduces "m_iCount" (till "Hide" it), no matter if the player was able to receive the weapon (in case of you blocked functions "CBasePlayer::GiveNamedItem[Ex]"). In other terms, if GiveNamedItem was called, "m_iCount" was reduced, so the armoury should be hidden if this member was set to "1". Or, maybe you have a plugin restoring flag "NO_DRAW" to armouries. Or, try without that Metamod-R thing.