halflife icon indicating copy to clipboard operation
halflife copied to clipboard

Half-Life: Unable to use satchels

Open paul-vg opened this issue 12 years ago • 9 comments

This happens in a bunch of places, but right now I'm in the factory of the chapter "interloper". When you reach the upper level and get through a corridor with controllers, grunts and vortigaunts, there's a bunch of satchels on the floor which are presumably meant for taking out grunts eggs in the next area.

Here's what:

  1. Pick up satchels
  2. Select it from the inventory
  3. Satchels don't appear in your hand (as if no weapon is selected) and they can't be thrown
  4. Select another weapon
  5. Satchels have now been removed from the inventory

Here's my savegame: http://www.sendspace.com/file/5of9p8

There are other weapon issues as well, like not being able to fire after loading a saved game. This can be worked around by selecting another weapon, unless that also doesn't work (had that a bunch of times but all I did was wait for a bit).

Assuming hard mode isn't hard mode because it enables bugs ;)

paul-vg avatar Mar 17 '13 08:03 paul-vg

I've located the exact spot where the bug is triggered: it's a munitions closet in the lab where you get the longjump module (chapter lambda core). All other satchels picked up earlier were fine.

I've made a new savegame for testing: http://www.sendspace.com/file/0my8s6

paul-vg avatar Apr 06 '13 14:04 paul-vg

I have this exact same problem running on Mac.

dustyleary avatar Apr 21 '13 22:04 dustyleary

Did the bug manifest itself in the same place (lambda core hideout/lab)? Are you playing hard mode? Does the Linux savegame work on a Mac? Can you share yours (to compare against mine)?

paul-vg avatar Apr 23 '13 07:04 paul-vg

I was playing hard mode.

I noticed the problem at the same place as your original description (in "interloper"). I didn't go back and look at the munitions closet by the longjmp module.

I did not try your savegame. I don't know if I have my own savegame anymore, I usually used quicksaves.

When I get home tonight I can see if I have my savegame, and if your savegame works for me.

dustyleary avatar Apr 23 '13 19:04 dustyleary

Gee, thanks. Just to clarify though, it's impossible to go back to xen and lambda core from interloper because of the one-way portals. I saved at lots of location and did a binaryish search for the last good savegame. From there I resumed playing until I found the bugged set of satchels. If you didn't pick those up, then at least we know it's not triggered in the ammo lab. I suppose your savegames from before lamda core (if you have them) are fine too, since you first noticed the bug during interloper as well.

Now here's to hoping Valve manages to crowbar this bug so we can complete the last part of the game. It's been a great game thus far!

paul-vg avatar Apr 25 '13 05:04 paul-vg

Valve's probably never going to fix their old games. Guess I'll just take my money elsewhere and they'll be happy for it. They could've released the engine under the terms of the GNU GPL so I could at least attempt to fix it myself (and package it into a .deb), but they aren't doing that either.

paul-vg avatar Jul 03 '13 19:07 paul-vg

Yeah, cause we would never port our games to new platforms years after the original release and add new features and fixes. Oh wait...

alfred-valve avatar Jul 03 '13 19:07 alfred-valve

So you do exist, wonderful. Please don't be mad at me for being cynical, I had lost all hopes of ever finishing the final chapter. I want to move on to HL2 and its episodes, but can't. Is there anything I can do to make the debugging process easier?

paul-vg avatar Jul 04 '13 04:07 paul-vg

Issue is caused by CSatchel's AddToPlayer method https://github.com/ValveSoftware/halflife/blob/b1b5cf5892918535619b2937bb927e46cb097ba1/dlls/satchel.cpp#L220-L232

Unlike every other weapon, it seems to copy a portion of CBasePlayerWeapon::AddToPlayer But doesn't include the following lines

if ( !m_iPrimaryAmmoType )
	{
		m_iPrimaryAmmoType = pPlayer->GetAmmoIndex( pszAmmo1() );
		m_iSecondaryAmmoType = pPlayer->GetAmmoIndex( pszAmmo2() );
	}

A working fix could be adding these lines in, or replacing the call to CBasePlayerItem::AddToPlayer with a call to CBasePlayerWeapon::AddToPlayer in a similar fashion to other weapons.

Reason why this usually isn't an issue is because ExtractAmmo happens to set the m_iPrimaryAmmoType, except in the case when the player already has maximum ammo, such as when picking up a weaponbox which refills the ammo without giving the actual weapon. Picking up a weapon after this gives you a weapon without a set m_iPrimaryAmmoType.

StereoBucket avatar Nov 08 '25 23:11 StereoBucket