New Attachment: the rifle grenade device (<AttachmentClass>33554432</AttachmentClass>) acts as a GL on the barrel slot, but blocks all other firing modes, and uses up one bullet.

It is strongly advised not to use this in combination with other underbarrel GLs.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5537 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2012-08-26 18:59:37 +00:00
parent 3dbdd4b2ad
commit 2ebe96ca59
5 changed files with 162 additions and 31 deletions
+10
View File
@@ -12995,6 +12995,16 @@ void SOLDIERTYPE::ReLoadSoldierAnimationDueToHandItemChange( UINT16 usOldItem, U
this->bWeaponMode = WM_AUTOFIRE;
this->bDoAutofire = 1;
}
// Flugente: if using a rifle grenade device, and a grenade i equipped, only grenade launching is allowed
if ( HasAttachmentOfClass( &(this->inv[HANDPOS]), AC_RIFLEGRENADE) )
{
OBJECTTYPE* pRifleGrenadeDeviceObj = FindAttachment_GrenadeLauncher( &(this->inv[HANDPOS]) );
if ( pRifleGrenadeDeviceObj && FindLaunchableAttachment( &(this->inv[HANDPOS]), pRifleGrenadeDeviceObj->usItem) )
this->bWeaponMode = WM_ATTACHED_GL;
}
if ( Item[ usNewItem ].twohanded && Weapon[ usNewItem ].HeavyGun && gGameExternalOptions.ubAllowAlternativeWeaponHolding == 3 )
this->bScopeMode = USE_ALT_WEAPON_HOLD;
else