mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
call S_StopLoop() whenever moving plats reach pastdest state (#830)
This commit is contained in:
parent
735a99b0a2
commit
7df1465e64
@ -92,6 +92,7 @@ void T_MoveCeiling (ceiling_t* ceiling)
|
||||
// handle reaching destination height
|
||||
if (res == pastdest)
|
||||
{
|
||||
S_StopLoop((mobj_t *)&ceiling->sector->soundorg);
|
||||
switch(ceiling->type)
|
||||
{
|
||||
// plain movers are just removed
|
||||
@ -155,6 +156,7 @@ void T_MoveCeiling (ceiling_t* ceiling)
|
||||
// handle reaching destination height
|
||||
if (res == pastdest)
|
||||
{
|
||||
S_StopLoop((mobj_t *)&ceiling->sector->soundorg);
|
||||
switch(ceiling->type)
|
||||
{
|
||||
// 02/09/98 jff change slow crushers' speed back to normal
|
||||
|
@ -258,6 +258,7 @@ void T_MoveFloor(floormove_t* floor)
|
||||
|
||||
if (res == pastdest) // if destination height is reached
|
||||
{
|
||||
S_StopLoop((mobj_t *)&floor->sector->soundorg);
|
||||
if (floor->direction == 1) // going up
|
||||
{
|
||||
switch(floor->type) // handle texture/type changes
|
||||
@ -405,6 +406,7 @@ void T_MoveElevator(elevator_t* elevator)
|
||||
|
||||
if (res == pastdest) // if destination height acheived
|
||||
{
|
||||
S_StopLoop((mobj_t *)&elevator->sector->soundorg);
|
||||
elevator->sector->floordata = NULL; //jff 2/22/98
|
||||
elevator->sector->ceilingdata = NULL; //jff 2/22/98
|
||||
P_RemoveThinker(&elevator->thinker); // remove elevator from actives
|
||||
|
@ -76,6 +76,7 @@ void T_PlatRaise(plat_t* plat)
|
||||
{
|
||||
if (res == pastdest) // end of stroke
|
||||
{
|
||||
S_StopLoop((mobj_t *)&plat->sector->soundorg);
|
||||
// if not an instant toggle type, wait, make plat stop sound
|
||||
if (plat->type!=toggleUpDn)
|
||||
{
|
||||
@ -112,6 +113,7 @@ void T_PlatRaise(plat_t* plat)
|
||||
// handle reaching end of down stroke
|
||||
if (res == pastdest)
|
||||
{
|
||||
S_StopLoop((mobj_t *)&plat->sector->soundorg);
|
||||
// if not an instant toggle, start waiting, make plat stop sound
|
||||
if (plat->type!=toggleUpDn) //jff 3/14/98 toggle up down
|
||||
{ // is silent, instant, no waiting
|
||||
@ -407,6 +409,7 @@ void P_AddActivePlat(plat_t* plat)
|
||||
void P_RemoveActivePlat(plat_t* plat)
|
||||
{
|
||||
platlist_t *list = plat->list;
|
||||
S_StopLoop((mobj_t *)&plat->sector->soundorg);
|
||||
plat->sector->floordata = NULL; //jff 2/23/98 multiple thinkers
|
||||
P_RemoveThinker(&plat->thinker);
|
||||
if ((*list->prev = list->next))
|
||||
|
Loading…
x
Reference in New Issue
Block a user