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)) {