diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 210096b0c..11ae03351 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -5075,7 +5075,7 @@ int furthestangle(DDukeActor *actor, int angs) auto s = actor->s; int j, furthest_angle = 0, angincs; int d, greatestd; - HitInfo hit; + HitInfo hit{}; greatestd = -(1 << 30); angincs = 2048 / angs; @@ -5109,7 +5109,7 @@ int furthestcanseepoint(DDukeActor *actor, DDukeActor* tosee, int* dax, int* day auto s = actor->s; int j, angincs; int d, da;//, d, cd, ca,tempx,tempy,cx,cy; - HitInfo hit; + HitInfo hit{}; if ((actor->temp_data[0] & 63)) return -1; diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index d3f6d6f80..b7eb14bd8 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -2452,7 +2452,7 @@ int ParseState::parse(void) insptr++; if( g_sp->sector()->lotag == 0 ) { - HitInfo hit; + HitInfo hit{}; neartag({ g_sp->x, g_sp->y, g_sp->z - (32 << 8) }, g_sp->sector(), g_sp->ang, hit, 768, 1); auto sectp = hit.hitSector; if (sectp) diff --git a/source/games/duke/src/player.cpp b/source/games/duke/src/player.cpp index 15de23a08..32f03cfc9 100644 --- a/source/games/duke/src/player.cpp +++ b/source/games/duke/src/player.cpp @@ -170,7 +170,7 @@ int hits(DDukeActor* actor) { auto sp = actor->s; int zoff; - HitInfo hit; + HitInfo hit{}; if (sp->picnum == TILE_APLAYER) zoff = isRR() ? PHEIGHT_RR : PHEIGHT_DUKE; else zoff = 0; @@ -189,7 +189,7 @@ int hitasprite(DDukeActor* actor, DDukeActor** hitsp) { auto sp = actor->s; int zoff; - HitInfo hit; + HitInfo hit{}; if (badguy(actor)) zoff = (42 << 8); @@ -213,7 +213,7 @@ int hitasprite(DDukeActor* actor, DDukeActor** hitsp) int hitawall(struct player_struct* p, walltype** hitw) { - HitInfo hit; + HitInfo hit{}; hitscan(p->pos, p->cursector, { p->angle.ang.bcos(), p->angle.ang.bsin(), 0 }, hit, CLIPMASK0); if (hitw) *hitw = hit.hitWall; @@ -993,7 +993,7 @@ void shootbloodsplat(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i spritetype* const s = actor->s; auto sectp = s->sector(); int zvel; - HitInfo hit; + HitInfo hit{}; if (p >= 0) sa += 64 - (krand() & 127); diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index f8ea4eb7b..20c0d8f2a 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -236,7 +236,7 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa) auto s = actor->s; auto sectp = s->sector(); int zvel; - HitInfo hit; + HitInfo hit{}; if (p >= 0) { @@ -323,7 +323,7 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa auto s = actor->s; auto sectp = s->sector(); int zvel = 0; - HitInfo hit; + HitInfo hit{}; if (s->extra >= 0) s->shade = -96; @@ -854,7 +854,7 @@ static void shootlaser(DDukeActor* actor, int p, int sx, int sy, int sz, int sa) auto sectp = s->sector(); int zvel; int j; - HitInfo hit; + HitInfo hit{}; if (p >= 0) zvel = -ps[p].horizon.sum().asq16() >> 11; @@ -925,7 +925,7 @@ static void shootgrowspark(DDukeActor* actor, int p, int sx, int sy, int sz, int auto sect = s->sector(); int zvel; int k; - HitInfo hit; + HitInfo hit{}; if (p >= 0) { @@ -2024,7 +2024,7 @@ static void underwater(int snum, ESyncBits actions, int fz, int cz) int operateTripbomb(int snum) { auto p = &ps[snum]; - HitInfo hit; + HitInfo hit{}; hitscan(p->pos, p->cursector, { p->angle.ang.bcos(), p->angle.ang.bsin(), -p->horizon.sum().asq16() >> 11 }, hit, CLIPMASK1); diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index e1e7f0781..94b1de067 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -88,7 +88,7 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa, spritetype* const s = actor->s; auto sectp = s->sector(); int zvel; - HitInfo hit; + HitInfo hit{}; if (p >= 0) { @@ -208,7 +208,7 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa auto s = actor->s; auto sectp = s->sector(); int zvel = 0; - HitInfo hit; + HitInfo hit{}; if (s->extra >= 0) s->shade = -96; diff --git a/source/games/exhumed/src/bullet.cpp b/source/games/exhumed/src/bullet.cpp index 778d1e3a8..0fa270dd2 100644 --- a/source/games/exhumed/src/bullet.cpp +++ b/source/games/exhumed/src/bullet.cpp @@ -444,7 +444,7 @@ MOVEEND: else { vec3_t startPos = { x, y, z }; - HitInfo hit; + HitInfo hit{}; int dz; if (bVanilla) dz = -bsin(pBullet->nPitch, 3); diff --git a/source/games/exhumed/src/gun.cpp b/source/games/exhumed/src/gun.cpp index cb589ce86..37d50d208 100644 --- a/source/games/exhumed/src/gun.cpp +++ b/source/games/exhumed/src/gun.cpp @@ -249,7 +249,7 @@ Collision CheckCloseRange(int nPlayer, int *x, int *y, int *z, sectortype* *ppSe int xVect = bcos(ang); int yVect = bsin(ang); - HitInfo hit; + HitInfo hit{}; hitscan({ *x, *y, *z }, *ppSector, { xVect, yVect, 0 }, hit, CLIPMASK1); int ecx = bsin(150, -3); diff --git a/source/games/exhumed/src/lion.cpp b/source/games/exhumed/src/lion.cpp index 33eb80c6b..71502108b 100644 --- a/source/games/exhumed/src/lion.cpp +++ b/source/games/exhumed/src/lion.cpp @@ -400,7 +400,7 @@ void AILion::Tick(RunListEvent* ev) for (int i = 0; i < 5; i++) { - HitInfo hit; + HitInfo hit{}; hitscan({ x, y, z }, pSprite->sector(), { bcos(nScanAngle), bsin(nScanAngle), 0 }, hit, CLIPMASK1); diff --git a/source/games/exhumed/src/snake.cpp b/source/games/exhumed/src/snake.cpp index 8b26cd835..aaeb2dd62 100644 --- a/source/games/exhumed/src/snake.cpp +++ b/source/games/exhumed/src/snake.cpp @@ -130,7 +130,7 @@ void BuildSnake(int nPlayer, int zVal) int z = (pPlayerSprite->z + zVal) - 2560; int nAngle = pPlayerSprite->ang; - HitInfo hit; + HitInfo hit{}; hitscan({ x, y, z }, pPlayerSprite->sector(), { bcos(nAngle), bsin(nAngle), 0 }, hit, CLIPMASK1); uint32_t yDiff = abs(hit.hitpos.y - y); diff --git a/source/games/sw/src/ai.cpp b/source/games/sw/src/ai.cpp index 2700f895a..b11e37431 100644 --- a/source/games/sw/src/ai.cpp +++ b/source/games/sw/src/ai.cpp @@ -242,7 +242,7 @@ int CanHitPlayer(DSWActor* actor) { USERp u = actor->u(); SPRITEp sp = &actor->s(); - HitInfo hit; + HitInfo hit{}; int xvect,yvect,zvect; int ang; // if actor can still see the player diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index e83d2793f..1aa5de9d3 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -904,7 +904,7 @@ void CircleCamera(int *nx, int *ny, int *nz, sectortype** vsect, binangle *nang, fixed_t q16horiz) { SPRITEp sp; - HitInfo hit; + HitInfo hit{}; int i, vx, vy, vz, hx, hy; int bakcstat, daang; PLAYERp pp = &Player[screenpeek]; diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 40006785a..e808b6a6d 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -2655,7 +2655,7 @@ void DoPlayerMoveVehicle(PLAYERp pp) if (RectClip) { - HitInfo hit; + HitInfo hit{}; int vel; int ret; @@ -3418,7 +3418,7 @@ void DoPlayerClimb(PLAYERp pp) int DoPlayerWadeSuperJump(PLAYERp pp) { - HitInfo hit; + HitInfo hit{}; unsigned i; //short angs[3]; static short angs[3] = {0, 0, 0}; diff --git a/source/games/sw/src/ripper.cpp b/source/games/sw/src/ripper.cpp index be4f053bc..6fc5a6ef7 100644 --- a/source/games/sw/src/ripper.cpp +++ b/source/games/sw/src/ripper.cpp @@ -935,7 +935,7 @@ int InitRipperHang(DSWActor* actor) SPRITEp sp = &actor->s(); int dist; - HitInfo hit; + HitInfo hit{}; bool Found = false; short dang, tang; diff --git a/source/games/sw/src/ripper2.cpp b/source/games/sw/src/ripper2.cpp index 85a976127..f720b1d7d 100644 --- a/source/games/sw/src/ripper2.cpp +++ b/source/games/sw/src/ripper2.cpp @@ -938,7 +938,7 @@ int InitRipper2Hang(DSWActor* actor) SPRITEp sp = &actor->s(); int dist; - HitInfo hit; + HitInfo hit{}; bool Found = false; short dang, tang; diff --git a/source/games/sw/src/rooms.cpp b/source/games/sw/src/rooms.cpp index 880bd3ed5..d6c0de89c 100644 --- a/source/games/sw/src/rooms.cpp +++ b/source/games/sw/src/rooms.cpp @@ -282,7 +282,7 @@ bool FAFcansee(int32_t xs, int32_t ys, int32_t zs, sectortype* sects, else zvect = 0; - HitInfo hit; + HitInfo hit{}; hitscan(s, sects, { xvect, yvect, zvect }, hit, CLIPMASK_MISSILE); if (hit.hitSector == nullptr) diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index d5f499323..1da463ff6 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -2053,7 +2053,7 @@ bool NearThings(PLAYERp pp) } // This only gets called if nothing else worked, check for nearness to a wall { - HitInfo hit; + HitInfo hit{}; short dang = pp->angle.ang.asbuild(); FAFhitscan(pp->posx, pp->posy, pp->posz - Z(30), pp->cursector, // Start position diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index f222dde06..f854b57ef 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -1935,7 +1935,7 @@ void SpriteSetup(void) case SECT_WALL_PAN_SPEED: { vec3_t hit_pos = { sp->x, sp->y, sp->z - Z(8) }; - HitInfo hit; + HitInfo hit{}; hitscan(hit_pos, sp->sector(), // Start position { bcos(sp->ang), bsin(sp->ang), 0 }, hit, CLIPMASK_MISSILE); @@ -1964,7 +1964,7 @@ void SpriteSetup(void) case WALL_DONT_STICK: { vec3_t hit_pos = { sp->x, sp->y, sp->z - Z(8) }; - HitInfo hit; + HitInfo hit{}; hitscan(hit_pos, sp->sector(), // Start position { bcos(sp->ang), bsin(sp->ang), 0 }, hit, CLIPMASK_MISSILE); diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index 15d7a0915..06fbda666 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -3109,7 +3109,7 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor) if (u->ActorActionSet->Jump) { int zdiff; - HitInfo hit; + HitInfo hit{}; sp->ang = tpoint->ang; diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 7ea1e0e3d..77979405e 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -4478,7 +4478,7 @@ bool WeaponMoveHit(DSWActor* actor) // clipmove does not correctly return the sprite for WALL sprites // on walls, so look with hitscan - HitInfo hit; + HitInfo hit{}; hitscan(sp->pos, sp->sector(), { bcos(sp->ang), bsin(sp->ang), sp->zvel }, hit, CLIPMASK_MISSILE); if (!hit.hitSector) @@ -12526,7 +12526,7 @@ int InitSwordAttack(PLAYERp pp) // all this is to break glass { - HitInfo hit; + HitInfo hit{}; short daang; int daz; @@ -12716,7 +12716,7 @@ int InitFistAttack(PLAYERp pp) // all this is to break glass { - HitInfo hit; + HitInfo hit{}; short daang; int daz; @@ -13492,7 +13492,7 @@ void InitHeartAttack(PLAYERp pp) int ContinueHitscan(PLAYERp pp, sectortype* sect, int x, int y, int z, short ang, int xvect, int yvect, int zvect) { - HitInfo hit; + HitInfo hit{}; USERp u = pp->Actor()->u(); FAFhitscan(x, y, z, sect, @@ -13575,7 +13575,7 @@ int InitShotgun(PLAYERp pp) USERp u = pp->Actor()->u(); auto sp = &pp->Actor()->s(); short daang,ndaang, i; - HitInfo hit; + HitInfo hit{}; int daz, ndaz; int nx,ny,nz; int xvect,yvect,zvect; @@ -16129,7 +16129,7 @@ int InitUzi(PLAYERp pp) SPRITEp wp, hsp; USERp wu; short daang; - HitInfo hit; + HitInfo hit{}; int daz, nz; int xvect,yvect,zvect; short cstat = 0; @@ -16699,7 +16699,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYERp pp) USERp u = actor->u(); SPRITEp sp = &actor->s(); short daang; - HitInfo hit; + HitInfo hit{}; int daz; int nx,ny,nz; short cstat = 0; @@ -17067,7 +17067,7 @@ int InitTurretMgun(SECTOR_OBJECTp sop) { SPRITEp hsp; short daang, i; - HitInfo hit; + HitInfo hit{}; int daz; int nx,ny,nz; short cstat = 0; @@ -17233,7 +17233,7 @@ int InitEnemyUzi(DSWActor* actor) SPRITEp sp = &actor->s(), wp; USERp wu; short daang; - HitInfo hit; + HitInfo hit{}; int daz; int zh; void InitUziShell(PLAYERp); @@ -18874,7 +18874,7 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang) SPRITEp sp; short rndnum; int daz; - HitInfo hit; + HitInfo hit{}; USERp u = actor->u();