[Fixed] Pistol bug

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Pistol bug

Postby The Ultimate DooMer » Sat Aug 16, 2003 5:41 pm

When you use TakeInventory to get rid of the pistol, you can still fire it by picking up a clip, bullet box, chaingun or backpack - even though the status bar shows no pistol, and the GiveInventory pistol special hasn't been run yet.

Could you fix it, as it will mess up some parts of my mod. (and other people's too - which is why I'm reporting this bug, even though I won't be able to take advantage of the fix myself)

/me goes off to devise a way round it with scripting.
User avatar
The Ultimate DooMer
Will you start the fans please!
 
Joined: 15 Jul 2003
Location: Industrial Zone

Postby Hirogen2 » Sun Aug 17, 2003 4:27 am

UltiDoomer: do it witch SwitchWeapon()..., so then you cannot switch back to the pistol.
User avatar
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

Postby The Ultimate DooMer » Sun Aug 17, 2003 5:45 am

Although I'm not familiar with weaponswitch, I'd imagine it forces a player to use one weapon only - which in this case is no good, as it's possible to pick up other weapons before the pistol (which I have as a decorate item).
User avatar
The Ultimate DooMer
Will you start the fans please!
 
Joined: 15 Jul 2003
Location: Industrial Zone

Postby Enjay » Sun Aug 17, 2003 5:52 am

No, it just switches the weapon you are carrying to another weapon, provided you have it. It does not restrict weapon switching. At least that is my experience with "SetWeapon". I think that is probably the correct syntax of what Hirogen2 is suggesting. I'm not familiar with "SwitchWeapon".

As to whether it will solve your problem or not - I'm not sure. I haven't tried it for that.

SetWeapon ("Fist");
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Postby The Ultimate DooMer » Sun Aug 17, 2003 7:18 am

Ok, I have a scripted workaround - replacing all bullet-giving ammo (including backpacks) with mapspots that spawn fake versions (decorate items) on startup, and when the pistol is picked up, the fake ones get replaced with real ones. It means I have to supply a pistol with every chaingun in the relevant maps, but at least it works.

I'll try the setweapon thing soon.

Edit: the setweapon thing works, as it only flicks to the pistol when you have no bullets and pick up a clip, you can't actually change to the pistol after that. A little bit of setthingspecial scripting and it's fine.

(the bug still needs fixing though)
User avatar
The Ultimate DooMer
Will you start the fans please!
 
Joined: 15 Jul 2003
Location: Industrial Zone

Postby randi » Fri Oct 10, 2003 2:57 pm

Looks like I fixed it at the same time I fixed clearinventory.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests