- moveflammable renaming.

This commit is contained in:
Christoph Oelckers 2020-10-24 22:18:05 +02:00
parent c93b8f3e54
commit 544078c9ba

View file

@ -840,27 +840,23 @@ void movecrane(DDukeActor *actor, int crane)
void movefountain(int i, int fountain) void movefountain(int i, int fountain)
{ {
auto t = &hittype[i].temp_data[0]; auto t = &hittype[i].temp_data[0];
auto s = &sprite[i]; auto &pn = sprite[i].picnum;
int x; int x;
if (t[0] > 0) if (t[0] > 0)
{ {
if (t[0] < 20) if (t[0] < 20)
{ {
t[0]++; t[0]++;
if (++pn == fountain + 3) pn = fountain + 1;
s->picnum++;
if (s->picnum == fountain + 3)
s->picnum = fountain + 1;
} }
else else
{ {
findplayer(s, &x); findplayer(&sprite[i], &x);
if (x > 512) if (x > 512)
{ {
t[0] = 0; t[0] = 0;
s->picnum = fountain; pn = fountain;
} }
else t[0] = 1; else t[0] = 1;
} }
@ -874,23 +870,23 @@ void movefountain(int i, int fountain)
void moveflammable(int i, int tire, int box, int pool) void moveflammable(int i, int tire, int box, int pool)
{ {
auto s = &sprite[i]; auto spri = &sprite[i];
auto ht = &hittype[i]; auto actor = &hittype[i];
int j; int j;
if (ht->temp_data[0] == 1) if (actor->temp_data[0] == 1)
{ {
ht->temp_data[1]++; actor->temp_data[1]++;
if ((ht->temp_data[1] & 3) > 0) return; if ((actor->temp_data[1] & 3) > 0) return;
if (!isRR() && s->picnum == tire && ht->temp_data[1] == 32) if (!isRR() && spri->picnum == tire && actor->temp_data[1] == 32)
{ {
s->cstat = 0; spri->cstat = 0;
j = fi.spawn(i, pool); j = fi.spawn(i, pool);
sprite[j].shade = 127; sprite[j].shade = 127;
} }
else else
{ {
if (s->shade < 64) s->shade++; if (spri->shade < 64) spri->shade++;
else else
{ {
deletesprite(i); deletesprite(i);
@ -898,27 +894,27 @@ void moveflammable(int i, int tire, int box, int pool)
} }
} }
j = s->xrepeat - (krand() & 7); j = spri->xrepeat - (krand() & 7);
if (j < 10) if (j < 10)
{ {
deletesprite(i); deletesprite(i);
return; return;
} }
s->xrepeat = j; spri->xrepeat = j;
j = s->yrepeat - (krand() & 7); j = spri->yrepeat - (krand() & 7);
if (j < 4) if (j < 4)
{ {
deletesprite(i); deletesprite(i);
return; return;
} }
s->yrepeat = j; spri->yrepeat = j;
} }
if (box >= 0 && s->picnum == box) if (box >= 0 && spri->picnum == box)
{ {
makeitfall(i); makeitfall(i);
ht->ceilingz = sector[s->sectnum].ceilingz; actor->ceilingz = sector[spri->sectnum].ceilingz;
} }
} }