Dual wielding mutator
MirceaKitsune created issue #125 (closed) on 2010-06-21T02:16:44Z:
Taken from http://dev.alientrap.org/issues/234 Partial implementation of a dual wielding mutator (holding two weapons at a time and shooting twice faster).
The latest patch is likely downdated and needs to be fixed so it won’t conflict the latest GIT. It’s also a SVN patch, so it needs to be adapted for GIT and placed on a branch. Once it will work again in master, there are two main issues that need to be fixed (quoted from the old tracker):
Thank you everyone for keeping this patch updated and compatible with the latest code.
I would be grateful if someone could look for solutions to the last remaining issues, so the patch can be committed and work properly. Funny I didn't mention them here... there are currently two problems I couldn't fix back when I did this.
First one is weapon entities persisting when you go to spectator mode and back. If you press F3 to go spectator while dual-wielding then spawn back into the game, you get overlapping attachments of multiple guns. That's because the area of code which spawns and removes the second gun isn't called while the player is spectating, so there's nothing to remove the 2nd gun. Afaik there was no better place to put the gun code in (one that's always executed even when the player is spectating but also notices when you switch weapons etc).
Second, which was discussed a lot, is the second weapon entity not having a hand of its own. It is attached to the same bone as the normal weapon and just offset to the left side (if you sit still and watch the weapon idly move, you notice the left weapon just floats and is virtually attached to the right one). Correctly giving it a real hand probably goes to deeper stuff in the code... I could never find a fix to this either.
Both issues address the 1st person view gun only. If someone can try to fix them I'm sure someone can commit this patch.
To fix the left hand weapon entity, there will likely be engine changes needed, since that’s where the 1st person entity is coded. Would be a nice mutator to release 1.0 with :)