mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Battle: base Overtime Laser height on camera position instead of player object position
This commit is contained in:
parent
ecb20e8f64
commit
1aab476b00
1 changed files with 5 additions and 4 deletions
|
|
@ -609,6 +609,7 @@ static void K_SpawnOvertimeLaser(fixed_t x, fixed_t y, fixed_t scale)
|
|||
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
{
|
||||
camera_t *cam = &camera[i];
|
||||
player_t *player = &players[displayplayers[i]];
|
||||
fixed_t zpos;
|
||||
SINT8 flip;
|
||||
|
|
@ -620,13 +621,13 @@ static void K_SpawnOvertimeLaser(fixed_t x, fixed_t y, fixed_t scale)
|
|||
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
{
|
||||
zpos = player->mo->z + player->mo->height;
|
||||
zpos = min(zpos + heightPadding, player->mo->ceilingz);
|
||||
zpos = cam->z + player->mo->height;
|
||||
zpos = min(zpos + heightPadding, cam->ceilingz);
|
||||
}
|
||||
else
|
||||
{
|
||||
zpos = player->mo->z;
|
||||
zpos = max(zpos - heightPadding, player->mo->floorz);
|
||||
zpos = cam->z;
|
||||
zpos = max(zpos - heightPadding, cam->floorz);
|
||||
}
|
||||
|
||||
flip = P_MobjFlip(player->mo);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue