From 9db615407d4a6cc41226ba9c6b12bf10414996b6 Mon Sep 17 00:00:00 2001 From: i-nod Date: Thu, 10 Sep 2009 10:22:09 +0000 Subject: [PATCH] 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 --- src/component.c | 2 +- src/display3d.c | 2 +- src/projectile.c | 4 ++-- src/scriptfuncs.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/component.c b/src/component.c index 91978e92d..31b4dc856 100644 --- a/src/component.c +++ b/src/component.c @@ -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, diff --git a/src/display3d.c b/src/display3d.c index f637d5ebe..2a34e95bf 100644 --- a/src/display3d.c +++ b/src/display3d.c @@ -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, diff --git a/src/projectile.c b/src/projectile.c index 2c231221c..c8515f01e 100644 --- a/src/projectile.c +++ b/src/projectile.c @@ -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) diff --git a/src/scriptfuncs.c b/src/scriptfuncs.c index 474dd9eb7..862497d5e 100644 --- a/src/scriptfuncs.c +++ b/src/scriptfuncs.c @@ -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)) {