mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-16 04:30:38 +00:00
- shared SE25 code.
This commit is contained in:
parent
00f5a08390
commit
21fb3fb7bb
4 changed files with 43 additions and 50 deletions
|
@ -4613,6 +4613,44 @@ void handle_se24(DDukeActor *actor, int16_t *list1, int16_t *list2, int TRIPBOMB
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void handle_se25(DDukeActor* actor, int t_index, int snd1, int snd2)
|
||||
{
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sec = §or[actor->s.sectnum];
|
||||
|
||||
if (sec->floorz <= sec->ceilingz)
|
||||
actor->s.shade = 0;
|
||||
else if (sec->ceilingz <= t[t_index])
|
||||
actor->s.shade = 1;
|
||||
|
||||
if (actor->s.shade)
|
||||
{
|
||||
sec->ceilingz += actor->s.yvel << 4;
|
||||
if (sec->ceilingz > sec->floorz)
|
||||
{
|
||||
sec->ceilingz = sec->floorz;
|
||||
if (pistonsound && snd1 >= 0)
|
||||
S_PlayActorSound(snd1, actor);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sec->ceilingz -= actor->s.yvel << 4;
|
||||
if (sec->ceilingz < t[t_index])
|
||||
{
|
||||
sec->ceilingz = t[t_index];
|
||||
if (pistonsound && snd2 >= 0)
|
||||
S_PlayActorSound(snd2, actor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void handle_se32(DDukeActor *actor)
|
||||
{
|
||||
auto s = &actor->s;
|
||||
|
|
|
@ -3685,27 +3685,8 @@ void moveeffectors_d(void) //STATNUM 3
|
|||
break;
|
||||
|
||||
case 25: //PISTONS
|
||||
|
||||
if (t[4] == 0) break;
|
||||
|
||||
if (sc->floorz <= sc->ceilingz)
|
||||
s->shade = 0;
|
||||
else if (sc->ceilingz <= t[3])
|
||||
s->shade = 1;
|
||||
|
||||
if (s->shade)
|
||||
{
|
||||
sc->ceilingz += sprite[i].yvel << 4;
|
||||
if (sc->ceilingz > sc->floorz)
|
||||
sc->ceilingz = sc->floorz;
|
||||
}
|
||||
else
|
||||
{
|
||||
sc->ceilingz -= sprite[i].yvel << 4;
|
||||
if (sc->ceilingz < t[3])
|
||||
sc->ceilingz = t[3];
|
||||
}
|
||||
|
||||
if (hittype[i].temp_data[4] == 0) break;
|
||||
handle_se25(&hittype[i], 3, -1, -1);
|
||||
break;
|
||||
|
||||
case 26:
|
||||
|
|
|
@ -3421,7 +3421,7 @@ void moveexplosions_r(void) // STATNUM 5
|
|||
void moveeffectors_r(void) //STATNUM 3
|
||||
{
|
||||
int l, x, st, j, * t;
|
||||
int p, sh, ns, pn;
|
||||
int sh, ns, pn;
|
||||
short k;
|
||||
spritetype* s;
|
||||
sectortype* sc;
|
||||
|
@ -3659,35 +3659,8 @@ void moveeffectors_r(void) //STATNUM 3
|
|||
break;
|
||||
|
||||
case 25: //PISTONS
|
||||
|
||||
if (t[4] == 0) break;
|
||||
|
||||
if (sc->floorz <= sc->ceilingz)
|
||||
s->shade = 0;
|
||||
else if (sc->ceilingz <= t[4])
|
||||
s->shade = 1;
|
||||
|
||||
if (s->shade)
|
||||
{
|
||||
sc->ceilingz += sprite[i].yvel << 4;
|
||||
if (sc->ceilingz > sc->floorz)
|
||||
{
|
||||
sc->ceilingz = sc->floorz;
|
||||
if (isRRRA() && pistonsound)
|
||||
S_PlayActorSound(371, i);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sc->ceilingz -= sprite[i].yvel << 4;
|
||||
if (sc->ceilingz < t[4])
|
||||
{
|
||||
sc->ceilingz = t[4];
|
||||
if (isRRRA() && pistonsound)
|
||||
S_PlayActorSound(167, i);
|
||||
}
|
||||
}
|
||||
|
||||
handle_se25(&hittype[i], 4, isRRRA() ? 371 : -1, isRRRA() ? 167 : -1);
|
||||
break;
|
||||
|
||||
case 26:
|
||||
|
|
|
@ -85,6 +85,7 @@ void handle_se20(DDukeActor* i);
|
|||
void handle_se21(DDukeActor* i);
|
||||
void handle_se22(DDukeActor* i);
|
||||
void handle_se24(DDukeActor* actor, int16_t* list1, int16_t* list2, int TRIPBOMB, int LASERLINE, int CRANE, int shift);
|
||||
void handle_se25(DDukeActor* a, int t_index, int snd1, int snd2);
|
||||
void handle_se26(DDukeActor* i);
|
||||
void handle_se27(DDukeActor* i);
|
||||
void handle_se32(DDukeActor* i);
|
||||
|
|
Loading…
Reference in a new issue