mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
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:
@@ -2632,6 +2632,16 @@ UINT8 GetActionModeCursor( SOLDIERTYPE *pSoldier )
|
||||
|
||||
if ( pSoldier->bWeaponMode == WM_ATTACHED_GL )
|
||||
{
|
||||
// Flugente: if using a rifle grenade, only allow firing if there is a bullet in the gun's magazine (required for firing)
|
||||
if ( HasAttachmentOfClass( &(pSoldier->inv[HANDPOS]), AC_RIFLEGRENADE) )
|
||||
{
|
||||
OBJECTTYPE* pObj = &(pSoldier->inv[HANDPOS]);
|
||||
if ( (*pObj)[0]->data.gun.ubGunShotsLeft> 0 )
|
||||
return( TRAJECTORYCURS );
|
||||
else
|
||||
return( INVALIDCURS );
|
||||
}
|
||||
|
||||
return( TRAJECTORYCURS );
|
||||
}
|
||||
if ( pSoldier->bWeaponMode == WM_ATTACHED_GL_BURST || ( pSoldier->bWeaponMode == WM_BURST && Item[pSoldier->inv[HANDPOS].usItem].grenadelauncher ) )
|
||||
|
||||
Reference in New Issue
Block a user