Home » MODDING HQ 1.13 » v1.13 General Development Talk » Patch to add a new shortcut to Swap Blade
Patch to add a new shortcut to Swap Blade[message #304658] Mon, 14 May 2012 08:23

Registered:December 2008
Location: Europe

attached there's a patch for the logic to swap gun to gunsling and then Knife to hand. And vice-versa. i slightly modified the logic for gunsling swap (shift-k). case_U - swap Knife

I hope that's Turn Based Input.cpp is the right file Embarrassed

i'm just a web developer so i have no VS.net to compile it. i would be greatly appreciative if anyone could review and commit it.

there's some notes that i'm not sure (they're on the patch too)

* does SwapObjs work for empty hands/objects?

* are there any two hand blades? i've added a test anyway

* while swaping hand-to-sling and then knife-to-hand can the in-between animation be skipped?

//HandleTacticalEffectsOfEquipmentChange(pSoldier, HANDPOS, pSoldier->inv[GUNSLINGPOCKPOS].usItem, pSoldier->inv[HANDPOS].usItem);

if not, the (final) animation should be:

HandleTacticalEffectsOfEquipmentChange(pSoldier, HANDPOS, pSoldier->inv[KNIFEPOCKPOS].usItem, pSoldier->inv[HANDPOS].usItem)

Also, it has to be applied to the vice-versa case too.

THANKS! Very Happy
Previous Topic: Questions about adding new mercs which have not been answered by the other 'new mercs' threads.
Next Topic: A bug appeared after 4870 version.
Goto Forum:

Current Time: Sat Aug 18 15:46:55 EEST 2018

Total time taken to generate the page: 0.00736 seconds