mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
- movefountain and moveflammable.
# Conflicts: # source/games/duke/src/actors.cpp
This commit is contained in:
parent
544078c9ba
commit
38e0ac1e3f
4 changed files with 23 additions and 21 deletions
|
@ -837,26 +837,29 @@ void movecrane(DDukeActor *actor, int crane)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void movefountain(int i, int fountain)
|
||||
void movefountain(DDukeActor *actor, int fountain)
|
||||
{
|
||||
auto t = &hittype[i].temp_data[0];
|
||||
auto &pn = sprite[i].picnum;
|
||||
int* t = &actor->temp_data[0];
|
||||
int x;
|
||||
if (t[0] > 0)
|
||||
{
|
||||
if (t[0] < 20)
|
||||
{
|
||||
t[0]++;
|
||||
if (++pn == fountain + 3) pn = fountain + 1;
|
||||
|
||||
actor->s.picnum++;
|
||||
|
||||
if (actor->s.picnum == fountain + 3)
|
||||
actor->s.picnum = fountain + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
findplayer(&sprite[i], &x);
|
||||
findplayer(actor, &x);
|
||||
|
||||
if (x > 512)
|
||||
{
|
||||
t[0] = 0;
|
||||
pn = fountain;
|
||||
actor->s.picnum = fountain;
|
||||
}
|
||||
else t[0] = 1;
|
||||
}
|
||||
|
@ -868,10 +871,9 @@ void movefountain(int i, int fountain)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void moveflammable(int i, int tire, int box, int pool)
|
||||
void moveflammable(DDukeActor* actor, int tire, int box, int pool)
|
||||
{
|
||||
auto spri = &sprite[i];
|
||||
auto actor = &hittype[i];
|
||||
auto spri = &actor->s;
|
||||
int j;
|
||||
if (actor->temp_data[0] == 1)
|
||||
{
|
||||
|
@ -881,15 +883,15 @@ void moveflammable(int i, int tire, int box, int pool)
|
|||
if (!isRR() && spri->picnum == tire && actor->temp_data[1] == 32)
|
||||
{
|
||||
spri->cstat = 0;
|
||||
j = fi.spawn(i, pool);
|
||||
sprite[j].shade = 127;
|
||||
auto spawned = spawn(actor, pool);
|
||||
spawned->s.shade = 127;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (spri->shade < 64) spri->shade++;
|
||||
else
|
||||
{
|
||||
deletesprite(i);
|
||||
deletesprite(actor);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -897,7 +899,7 @@ void moveflammable(int i, int tire, int box, int pool)
|
|||
j = spri->xrepeat - (krand() & 7);
|
||||
if (j < 10)
|
||||
{
|
||||
deletesprite(i);
|
||||
deletesprite(actor);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -906,14 +908,14 @@ void moveflammable(int i, int tire, int box, int pool)
|
|||
j = spri->yrepeat - (krand() & 7);
|
||||
if (j < 4)
|
||||
{
|
||||
deletesprite(i);
|
||||
deletesprite(actor);
|
||||
return;
|
||||
}
|
||||
spri->yrepeat = j;
|
||||
}
|
||||
if (box >= 0 && spri->picnum == box)
|
||||
{
|
||||
makeitfall(i);
|
||||
makeitfall(actor);
|
||||
actor->ceilingz = sector[spri->sectnum].ceilingz;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1507,12 +1507,12 @@ void movestandables_d(void)
|
|||
|
||||
else if (picnum >= WATERFOUNTAIN && picnum <= WATERFOUNTAIN + 3)
|
||||
{
|
||||
movefountain(i, WATERFOUNTAIN);
|
||||
movefountain(&hittype[i], WATERFOUNTAIN);
|
||||
}
|
||||
|
||||
else if (AFLAMABLE(picnum))
|
||||
{
|
||||
moveflammable(i, TIRE, BOX, BLOODPOOL);
|
||||
moveflammable(&hittype[i], TIRE, BOX, BLOODPOOL);
|
||||
}
|
||||
|
||||
else if (picnum == TRIPBOMB)
|
||||
|
|
|
@ -1064,12 +1064,12 @@ void movestandables_r(void)
|
|||
|
||||
else if (picnum >= WATERFOUNTAIN && picnum <= WATERFOUNTAIN + 3)
|
||||
{
|
||||
movefountain(i, WATERFOUNTAIN);
|
||||
movefountain(&hittype[i], WATERFOUNTAIN);
|
||||
}
|
||||
|
||||
else if (AFLAMABLE(picnum))
|
||||
{
|
||||
moveflammable(i, TIRE, BOX, BLOODPOOL);
|
||||
moveflammable(&hittype[i], TIRE, BOX, BLOODPOOL);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ void moveclouds(double smoothratio);
|
|||
void RANDOMSCRAP(DDukeActor* i);
|
||||
void ms(DDukeActor* i);
|
||||
void movecrane(DDukeActor* i, int crane);
|
||||
void movefountain(int i, int fountain);
|
||||
void moveflammable(int i, int tire, int box, int pool);
|
||||
void movefountain(DDukeActor* i, int fountain);
|
||||
void moveflammable(DDukeActor* i, int tire, int box, int pool);
|
||||
void detonate(int i, int explosion);
|
||||
void movemasterswitch(int i, int spectype1, int spectype2);
|
||||
void movetrash(int i);
|
||||
|
|
Loading…
Reference in a new issue