mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 18:52:43 +00:00
- Duke: Move new blood spat code into function for use in RR code as well.
This commit is contained in:
parent
f149410750
commit
65acafc2bd
4 changed files with 22 additions and 13 deletions
|
@ -1965,6 +1965,25 @@ void camera(DDukeActor *actor)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void bloodsplats(DDukeActor *actor)
|
||||
{
|
||||
if (actor->temp_data[0] < 7 * 26)
|
||||
{
|
||||
auto offset = krandf(1);
|
||||
auto zadj = (1. / 16.);
|
||||
auto sadj = (1. / 12.) * REPEAT_SCALE;
|
||||
actor->spr.pos.Z += zadj + offset * zadj;
|
||||
actor->spr.scale.Y += sadj + offset * sadj;
|
||||
actor->temp_data[0]++;
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// taken out of moveexplosion
|
||||
|
|
|
@ -3002,15 +3002,7 @@ void moveexplosions_d(void) // STATNUM 5
|
|||
case BLOODSPLAT3:
|
||||
case BLOODSPLAT4:
|
||||
|
||||
if (act->temp_data[0] < 7 * 26)
|
||||
{
|
||||
auto offset = krandf(1);
|
||||
auto zadj = (1. / 16.);
|
||||
auto sadj = (1. / 12.) * REPEAT_SCALE;
|
||||
act->spr.pos.Z += zadj + offset * zadj;
|
||||
act->spr.scale.Y += sadj + offset * sadj;
|
||||
act->temp_data[0]++;
|
||||
}
|
||||
bloodsplats(act);
|
||||
continue;
|
||||
|
||||
case NUKEBUTTON:
|
||||
|
|
|
@ -2904,10 +2904,7 @@ void moveexplosions_r(void) // STATNUM 5
|
|||
case BLOODSPLAT3:
|
||||
case BLOODSPLAT4:
|
||||
|
||||
if (act->temp_data[0] == 7 * 26) continue;
|
||||
act->spr.pos.Z += 1 / 16. + krandf(1 / 16.);
|
||||
act->temp_data[0]++;
|
||||
if ((act->temp_data[0] % 9) == 0) act->spr.scale.Y += (REPEAT_SCALE);
|
||||
bloodsplats(act);
|
||||
continue;
|
||||
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ void recon(DDukeActor* i, int explosion, int firelaser, int attacksnd, int pains
|
|||
void ooz(DDukeActor* i);
|
||||
void reactor(DDukeActor* i, int REACTOR, int REACTOR2, int REACTORBURNT, int REACTOR2BURNT, int REACTORSPARK, int REACTOR2SPARK);
|
||||
void camera(DDukeActor* i);
|
||||
void bloodsplats(DDukeActor* actor);
|
||||
void forcesphereexplode(DDukeActor* i);
|
||||
void watersplash2(DDukeActor* i);
|
||||
void frameeffect1(DDukeActor* i);
|
||||
|
|
Loading…
Reference in a new issue