Some fixes for Multiple muzzle flashes feature #824 and #909, #910.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8095 4a71c877-e1ca-e34f-864e-861f7616d084
master
i-nod 2009-09-10 10:22:09 +00:00 committed by Git SVN Gateway
parent b494e2f276
commit 9db615407d
4 changed files with 6 additions and 6 deletions

View File

@ -1080,7 +1080,7 @@ void displayCompObj(BASE_OBJECT *psObj, BOOL bButton)
if (psShape->nconnectors)
{
// which barrel is firing? (in case if model have multiple muzzle connectors)
DWORD connector_num = (psDroid->asWeaps[i].shotsFired) % (psShape->nconnectors);
UDWORD connector_num = (psDroid->asWeaps[i].shotsFired) % (psShape->nconnectors);
/* Now we need to move to the end of the firing barrel (there maybe multiple barrels) */
pie_TRANSLATE( psShape->connectors[connector_num].x,

View File

@ -2343,7 +2343,7 @@ void renderStructure(STRUCTURE *psStructure)
&& psStructure->pStructureType->type != REF_REPAIR_FACILITY)
{
// which barrel is firing? (in case if model has multiple muzzle connectors)
DWORD connector_num = (psStructure->asWeaps[i].shotsFired) % (weaponImd[i]->nconnectors);
UDWORD connector_num = (psStructure->asWeaps[i].shotsFired) % (weaponImd[i]->nconnectors);
/* Now we need to move to the end of the firing barrel (there maybe multiple barrels) */
pie_TRANSLATE(weaponImd[i]->connectors[connector_num].x,

View File

@ -784,7 +784,7 @@ static void proj_InFlightDirectFunc(PROJECTILE *psProj)
/* Buildings cannot be penetrated and we need a penetrating weapon */
if (psTempObj->type == OBJ_DROID && psStats->penetrate)
{
WEAPON asWeap = {psStats - asWeaponStats, 0, 0, 0, 0, 0};
WEAPON asWeap = {psStats - asWeaponStats, 0, 0, 0, 0, 0, 0};
// Determine position to fire a missile at
// (must be at least 0 because we don't use signed integers
// this shouldn't be larger than the height and width of the map either)
@ -1007,7 +1007,7 @@ static void proj_InFlightIndirectFunc(PROJECTILE *psProj)
/* Buildings cannot be penetrated and we need a penetrating weapon */
if (psTempObj->type == OBJ_DROID && psStats->penetrate)
{
WEAPON asWeap = {psStats - asWeaponStats, 0, 0, 0, 0, 0};
WEAPON asWeap = {psStats - asWeaponStats, 0, 0, 0, 0, 0, 0};
// Determine position to fire a missile at
// (must be at least 0 because we don't use signed integers
// this shouldn't be larger than the height and width of the map either)

View File

@ -6411,7 +6411,7 @@ BOOL scrFireWeaponAtObj(void)
{
Vector3i target;
BASE_OBJECT *psTarget;
WEAPON sWeapon = {0, 0, 0, 0, 0, 0};
WEAPON sWeapon = {0, 0, 0, 0, 0, 0, 0};
if (!stackPopParams(2, ST_WEAPON, &sWeapon.nStat, ST_BASEOBJECT, &psTarget))
{
@ -6437,7 +6437,7 @@ BOOL scrFireWeaponAtObj(void)
BOOL scrFireWeaponAtLoc(void)
{
Vector3i target;
WEAPON sWeapon = {0, 0, 0, 0, 0, 0};
WEAPON sWeapon = {0, 0, 0, 0, 0, 0, 0};
if (!stackPopParams(3, ST_WEAPON, &sWeapon.nStat, VAL_INT, &target.x, VAL_INT, &target.y))
{