mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- use randomAngle
This commit is contained in:
parent
b164426dd2
commit
c066f1754c
4 changed files with 16 additions and 16 deletions
|
@ -1168,7 +1168,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
|||
lotsofglass(targ, nullptr, 40);
|
||||
|
||||
S_PlayActorSound(GLASS_BREAKING, targ);
|
||||
targ->set_int_ang(krand() & 2047);
|
||||
targ->spr.angle = randomAngle();
|
||||
lotsofglass(targ, nullptr, 8);
|
||||
deletesprite(targ);
|
||||
break;
|
||||
|
@ -1294,21 +1294,21 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
|||
{
|
||||
targ->spr.extra -= proj->spr.extra;
|
||||
if (targ->spr.extra > 0) break;
|
||||
targ->set_int_ang(krand() & 2047);
|
||||
targ->spr.angle = randomAngle();
|
||||
fi.shoot(targ, BLOODSPLAT1);
|
||||
targ->set_int_ang(krand() & 2047);
|
||||
targ->spr.angle = randomAngle();
|
||||
fi.shoot(targ, BLOODSPLAT2);
|
||||
targ->set_int_ang(krand() & 2047);
|
||||
targ->spr.angle = randomAngle();
|
||||
fi.shoot(targ, BLOODSPLAT3);
|
||||
targ->set_int_ang(krand() & 2047);
|
||||
targ->spr.angle = randomAngle();
|
||||
fi.shoot(targ, BLOODSPLAT4);
|
||||
targ->set_int_ang(krand() & 2047);
|
||||
targ->spr.angle = randomAngle();
|
||||
fi.shoot(targ, BLOODSPLAT1);
|
||||
targ->set_int_ang(krand() & 2047);
|
||||
targ->spr.angle = randomAngle();
|
||||
fi.shoot(targ, BLOODSPLAT2);
|
||||
targ->set_int_ang(krand() & 2047);
|
||||
targ->spr.angle = randomAngle();
|
||||
fi.shoot(targ, BLOODSPLAT3);
|
||||
targ->set_int_ang(krand() & 2047);
|
||||
targ->spr.angle = randomAngle();
|
||||
fi.shoot(targ, BLOODSPLAT4);
|
||||
fi.guts(targ, JIBS1, 1, myconnectindex);
|
||||
fi.guts(targ, JIBS2, 2, myconnectindex);
|
||||
|
|
|
@ -2204,7 +2204,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
|
|||
lotsofglass(targ, nullptr, 40);
|
||||
|
||||
S_PlayActorSound(GLASS_BREAKING, targ);
|
||||
targ->set_int_ang(krand() & 2047);
|
||||
targ->spr.angle = randomAngle();
|
||||
lotsofglass(targ, nullptr, 8);
|
||||
deletesprite(targ);
|
||||
break;
|
||||
|
|
|
@ -559,7 +559,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
act->temp_data[0] = krand() & 2047;
|
||||
act->spr.cstat = randomFlip();
|
||||
act->spr.xrepeat = act->spr.yrepeat = 8;
|
||||
act->set_int_ang(krand() & 2047);
|
||||
act->spr.angle = randomAngle();
|
||||
}
|
||||
ChangeActorStat(act, STAT_MISC);
|
||||
break;
|
||||
|
@ -700,7 +700,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case TRASH:
|
||||
|
||||
if (act->spr.picnum != WATERDRIP)
|
||||
act->set_int_ang(krand() & 2047);
|
||||
act->spr.angle = randomAngle();
|
||||
[[fallthrough]];
|
||||
|
||||
case WATERDRIPSPLASH:
|
||||
|
@ -875,7 +875,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
|
||||
if (act->spr.picnum == RAT)
|
||||
{
|
||||
act->set_int_ang(krand() & 2047);
|
||||
act->spr.angle = randomAngle();
|
||||
act->spr.xrepeat = act->spr.yrepeat = 48;
|
||||
act->spr.cstat = 0;
|
||||
}
|
||||
|
|
|
@ -583,7 +583,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
act->temp_data[0] = krand() & 2047;
|
||||
act->spr.cstat = randomFlip();
|
||||
act->spr.xrepeat = act->spr.yrepeat = 8;
|
||||
act->set_int_ang(krand() & 2047);
|
||||
act->spr.angle = randomAngle();
|
||||
}
|
||||
ChangeActorStat(act, STAT_MISC);
|
||||
break;
|
||||
|
@ -703,7 +703,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
break;
|
||||
case TRASH:
|
||||
|
||||
if (act->spr.picnum != WATERDRIP) act->set_int_ang(krand() & 2047);
|
||||
if (act->spr.picnum != WATERDRIP) act->spr.angle = randomAngle();
|
||||
|
||||
act->spr.xrepeat = 24;
|
||||
act->spr.yrepeat = 24;
|
||||
|
@ -1034,7 +1034,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
|
||||
if (act->spr.picnum == RAT)
|
||||
{
|
||||
act->set_int_ang(krand() & 2047);
|
||||
act->spr.angle = randomAngle();
|
||||
act->spr.xrepeat = act->spr.yrepeat = 48;
|
||||
act->spr.cstat = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue