Bugfixes (by Flugente)

- added a flag that drastically lowers the time needed for drug evaluations
- FIX: fixed a but that could lead to iron sights be used although they were forbidden
- FIX: scopes/sights are also selectable if they do not have a magnification factor (1.0 is used)
- FIX: sector cooldown to zero didn't work as intended

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5372 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-07-09 08:50:26 +00:00
parent 66a2a41f7d
commit 5c3115d743
7 changed files with 82 additions and 18 deletions
+19 -14
View File
@@ -3835,6 +3835,8 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
// HEADROCK HAM 4: Advanced Icons
if (guiItemInfoAdvancedIcon == 0)
{
// added by Flugente
// HEADROCK HAM 4: Advanced Icons
VOBJECT_DESC VObjectDesc;
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
strcpy( VObjectDesc.ImageFile, "INTERFACE\\ItemInfoAdvancedIcons.STI" );
@@ -5896,17 +5898,15 @@ void ItemDescAttachmentsCallback( MOUSE_REGION * pRegion, INT32 iReason )
{
// ignite explosions manually - this item is not in the WorldBombs-structure, so we can't add it to the queue
IgniteExplosion( (*gpItemDescObject)[0]->data.misc.ubBombOwner - 2, gpItemPointerSoldier->sX, gpItemPointerSoldier->sY, (INT16) (gpWorldLevelData[gpItemPointerSoldier->sGridNo].sHeight), gpItemPointerSoldier->sGridNo, gpItemDescObject->usItem, gpItemPointerSoldier->pathing.bLevel, gpItemPointerSoldier->ubDirection );
DeleteObj( gpItemDescObject );
}
else if ( (guiCurrentScreen == MAP_SCREEN) || (guiCurrentScreen == MSG_BOX_SCREEN) )
{
// no explosions in map screen - instead we simply damage the inventory and harm our health
gpItemPointerSoldier->InventoryExplosion();
DeleteObj( gpItemDescObject );
}
DeleteObj( gpItemDescObject );
return;
}
@@ -5928,7 +5928,7 @@ void ItemDescAttachmentsCallback( MOUSE_REGION * pRegion, INT32 iReason )
fMapInventoryItem=TRUE;
fTeamPanelDirty=TRUE;
}
//if we are currently in the shopkeeper interface
else if( guiTacticalInterfaceFlags & INTERFACE_SHOPKEEP_INTERFACE )
{
@@ -5936,6 +5936,15 @@ void ItemDescAttachmentsCallback( MOUSE_REGION * pRegion, INT32 iReason )
BeginSkiItemPointer( PLAYERS_INVENTORY, -1, FALSE );
}
// Flugente: if we altered a gun's attachments, re-evaluate the scope mode and sight
if ( gGameExternalOptions.fScopeModes && gpItemPointerSoldier && Item[gpItemDescObject->usItem].usItemClass == IC_GUN )
{
ChangeScopeMode( gpItemPointerSoldier );
// reevaluate sight
ManLooksForOtherTeams( gpItemPointerSoldier );
}
//Dirty interface
fInterfacePanelDirty = DIRTYLEVEL2;
@@ -12607,17 +12616,15 @@ void BombInventoryMessageBoxCallBack( UINT8 ubExitValue )
{
// ignite explosions manually - this item is not in the WorldBombs-structure, so we can't add it to the queue
IgniteExplosion( (*gpItemDescObject)[0]->data.misc.ubBombOwner - 2, gpItemDescSoldier->sX, gpItemDescSoldier->sY, (INT16) (gpWorldLevelData[gpItemDescSoldier->sGridNo].sHeight), gpItemDescSoldier->sGridNo, gpItemDescObject->usItem, gpItemDescSoldier->pathing.bLevel, gpItemDescSoldier->ubDirection );
DeleteObj( gpItemDescObject );
}
else if ( (screen == MAP_SCREEN) || (screen == MSG_BOX_SCREEN) )
{
// no explosions in map screen - instead we simply damage the inventory and harm our health
gpItemDescSoldier->InventoryExplosion();
DeleteObj( gpItemDescObject );
}
DeleteObj( gpItemDescObject );
return;
}
}
@@ -12775,17 +12782,15 @@ void BombInventoryDisArmMessageBoxCallBack( UINT8 ubExitValue )
{
// ignite explosions manually - this item is not in the WorldBombs-structure, so we can't add it to the queue
IgniteExplosion( (*gpItemDescObject)[0]->data.misc.ubBombOwner - 2, gpItemDescSoldier->sX, gpItemDescSoldier->sY, (INT16) (gpWorldLevelData[gpItemDescSoldier->sGridNo].sHeight), gpItemDescSoldier->sGridNo, gpItemDescObject->usItem, gpItemDescSoldier->pathing.bLevel, gpItemDescSoldier->ubDirection );
DeleteObj( gpItemDescObject );
}
else if ( (screen == MAP_SCREEN) || (screen == MSG_BOX_SCREEN) )
{
// no explosions in map screen - instead we simply damage the inventory and harm our health
gpItemDescSoldier->InventoryExplosion();
DeleteObj( gpItemDescObject );
}
DeleteObj( gpItemDescObject );
#ifdef JA2TESTVERSION
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Arming failed, explosion here" );
#endif
@@ -13158,4 +13163,4 @@ void ConfirmTransformationMessageBoxCallBack( UINT8 bExitValue )
guiCurrentScreen = iTempScreen;
guiTransformInProgressPrevScreen = 0;
}
}
}