Bugzilla – Bug 3390
In HL1, satchels cannot be fired anymore after using give_item function
Last modified: 2013-06-17 05:15:08 PDT
Circumstances: Collected a tripmine and a satchel. Placed tripmines. Threw satchel charges. Attempt to detonate them failed. While this one is really strange, it is really ancient, too. First saw it three years ago. It appear to always fail when a tripmine has been placed before throwing the satchel charge(s). Tested: I have seen this a few times and thought it was some buggy plugin running serverside, but now I saw it happen on my listenserver, although only Metamod and AMXX with a minimal set of default plugins were running. I disabled metamod entirely, and the bug did not occur. I enabled metamod but turned off AMXX and the bug did not occur. I enabled metamod and AMXX, all plugins turned off entirely, and the bug occurs. The bug also occurs in other mods which still use the satchel charge as a weapon, such as Sven Co-op. My OS: WinXP 64 Bit. I hope this can be fixed. Don't bother asking me for more details.
Ah I made a mistake. When testing this I once turned off plugins in another mod's AMXX-Setup's plugins.ini. I now tested this with some more concetration and it turns out that the problem is caused when using the give_item function. All I did there was to give the player a tripmine if he had less than 5. If I comment the following part in my plugin the problem does not occur anymore at all. public tmr_prethink(id) { if(is_user_connected(id)&&is_user_alive(id)) { new clip,ammo; get_user_ammo(id,13,clip,ammo); //13 is tripmine's Weapon ID if(ammo<5) { give_item(id,"weapon_tripmine"); } } }
This doesn't sound related to AMX Mod X -- it's mod-specific functionality. AMX Mod X just exposes internal functions.
I see... Made some further investigation, though, and it appears that the bug only occurs as long as the with the give_item function given tripmines are actually placed. If they explode or are unplaced because of bad spot (e.g. moving player, moving func_train, etc.) the bug won't occur anymore. This applies for satchels thrown before and after the tripmine(s) has/have been placed. I already asked a friend of mine to check HL's code and see if he can find a reason for this weird bug. Now waiting for him to have time to do so. Will report back in later then. Untill then, just leave this open.