Skip to content

Commit

Permalink
Merge pull request #227 from roblabla/fix-names-of-vars-player-calcki…
Browse files Browse the repository at this point in the history
…llbox

Fix bombProjectile* var names in CalcKillBoxCollision
  • Loading branch information
roblabla committed Sep 1, 2024
2 parents c9145b9 + 89c7e93 commit cc31f13
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -881,9 +881,9 @@ FireBulletResult Player::FireBulletMarisaB(Player *player, PlayerBullet *bullet,
return player->FireSingleBullet(player, bullet, bulletIdx, framesSinceLastBullet, g_CharacterPowerDataMarisaB);
}

#pragma var_order(padding1, bombProjectileBottom, bombProjectileRight, curBombIdx, padding2, bulletBottom, \
bulletRight, padding3, bulletTop, bulletLeft, curBombProjectile, padding4, bombProjectileTop, \
bombProjectileLeft)
#pragma var_order(padding1, bombProjectileTop, bombProjectileLeft, curBombIdx, padding2, bulletBottom, bulletRight, \
padding3, bulletTop, bulletLeft, curBombProjectile, padding4, bombProjectileBottom, \
bombProjectileRight)
i32 Player::CalcKillBoxCollision(D3DXVECTOR3 *bulletCenter, D3DXVECTOR3 *bulletSize)
{
PlayerRect *curBombProjectile;
Expand All @@ -903,12 +903,12 @@ i32 Player::CalcKillBoxCollision(D3DXVECTOR3 *bulletCenter, D3DXVECTOR3 *bulletS
{
continue;
}
bombProjectileRight = curBombProjectile->pos.x - curBombProjectile->size.x / 2.0f;
bombProjectileBottom = curBombProjectile->pos.y - curBombProjectile->size.y / 2.0f;
bombProjectileLeft = curBombProjectile->pos.x + curBombProjectile->size.x / 2.0f;
bombProjectileTop = curBombProjectile->pos.y + curBombProjectile->size.y / 2.0f;
if (!(bombProjectileRight > bulletRight || bombProjectileLeft < bulletLeft ||
bombProjectileBottom > bulletBottom || bombProjectileTop < bulletTop))
bombProjectileLeft = curBombProjectile->pos.x - curBombProjectile->size.x / 2.0f;
bombProjectileTop = curBombProjectile->pos.y - curBombProjectile->size.y / 2.0f;
bombProjectileRight = curBombProjectile->pos.x + curBombProjectile->size.x / 2.0f;
bombProjectileBottom = curBombProjectile->pos.y + curBombProjectile->size.y / 2.0f;
if (!(bombProjectileLeft > bulletRight || bombProjectileRight < bulletLeft ||
bombProjectileTop > bulletBottom || bombProjectileBottom < bulletTop))
{
return 2;
}
Expand Down

0 comments on commit cc31f13

Please sign in to comment.