mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Particle randomisation added to bustable blocks.
This commit is contained in:
parent
7c7a8413c9
commit
b688f5763b
1 changed files with 7 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include "doomdef.h"
|
||||
#include "doomstat.h"
|
||||
#include "m_random.h"
|
||||
#include "p_local.h"
|
||||
#include "r_state.h"
|
||||
#include "s_sound.h"
|
||||
|
@ -2944,6 +2945,12 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover)
|
|||
for (c = topz; c > *rover->bottomheight; c -= spacing)
|
||||
{
|
||||
spawned = P_SpawnMobj(a, b, c, type);
|
||||
|
||||
if (spawned->frame & FF_ANIMATE)
|
||||
spawned->frame += P_RandomKey(spawned->state->var2);
|
||||
|
||||
spawned->angle += P_RandomKey(36)*ANG1; // irrelevant for default objects but might make sense for some custom ones
|
||||
|
||||
if (flags & ML_EFFECT1)
|
||||
{
|
||||
P_InstaThrust(spawned, R_PointToAngle2(sec->soundorg.x, sec->soundorg.y, a, b), FixedDiv(P_AproxDistance(a - sec->soundorg.x, b - sec->soundorg.y), widthfactor));
|
||||
|
|
Loading…
Reference in a new issue