Bug 3390 - In HL1, satchels cannot be fired anymore after using give_item function
In HL1, satchels cannot be fired anymore after using give_item function
Status: RESOLVED INCOMPLETE
Product: AMX Mod X
Classification: Unclassified
Component: Core
trunk
PC Windows
: P3 normal
Assigned To: amxmodx-bugs@alliedmods.net
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-02 13:46 PST by silencer191
Modified: 2013-06-17 05:15 PDT (History)
3 users (show)

See Also:


Attachments

Description silencer191 2008-11-02 13:46:44 PST
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.
Comment 1 silencer191 2008-11-02 14:27:03 PST
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");
		}
	}
}
Comment 2 David Anderson [:dvander] 2008-11-04 15:06:03 PST
This doesn't sound related to AMX Mod X -- it's mod-specific functionality.  AMX Mod X just exposes internal functions.
Comment 3 silencer191 2008-11-05 08:03:27 PST
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.

Note You need to log in before you can comment on or make changes to this bug.