summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/p_ceilng.c12
-rw-r--r--src/p_doors.c39
-rw-r--r--src/p_floor.c6
-rw-r--r--src/p_plats.c23
-rw-r--r--src/p_spec.c2
-rw-r--r--src/p_spec.h2
-rw-r--r--src/p_switch.c2
7 files changed, 33 insertions, 53 deletions
diff --git a/src/p_ceilng.c b/src/p_ceilng.c
index 115d6389..58b9eb06 100644
--- a/src/p_ceilng.c
+++ b/src/p_ceilng.c
@@ -73,8 +73,7 @@ void T_MoveCeiling (ceiling_t* ceiling)
case silentCrushAndRaise:
break;
default:
- S_StartSound((mobj_t *)&ceiling->sector->soundorg,
- sfx_stnmov);
+ S_StartSound(&ceiling->sector->soundorg, sfx_stnmov);
// ?
break;
}
@@ -89,8 +88,7 @@ void T_MoveCeiling (ceiling_t* ceiling)
break;
case silentCrushAndRaise:
- S_StartSound((mobj_t *)&ceiling->sector->soundorg,
- sfx_pstop);
+ S_StartSound(&ceiling->sector->soundorg, sfx_pstop);
case fastCrushAndRaise:
case crushAndRaise:
ceiling->direction = -1;
@@ -116,8 +114,7 @@ void T_MoveCeiling (ceiling_t* ceiling)
{
case silentCrushAndRaise: break;
default:
- S_StartSound((mobj_t *)&ceiling->sector->soundorg,
- sfx_stnmov);
+ S_StartSound(&ceiling->sector->soundorg, sfx_stnmov);
}
}
@@ -126,8 +123,7 @@ void T_MoveCeiling (ceiling_t* ceiling)
switch(ceiling->type)
{
case silentCrushAndRaise:
- S_StartSound((mobj_t *)&ceiling->sector->soundorg,
- sfx_pstop);
+ S_StartSound(&ceiling->sector->soundorg, sfx_pstop);
case crushAndRaise:
ceiling->speed = CEILSPEED;
case fastCrushAndRaise:
diff --git a/src/p_doors.c b/src/p_doors.c
index ed0bf039..10ad600b 100644
--- a/src/p_doors.c
+++ b/src/p_doors.c
@@ -76,20 +76,17 @@ void T_VerticalDoor (vldoor_t* door)
{
case blazeRaise:
door->direction = -1; // time to go back down
- S_StartSound((mobj_t *)&door->sector->soundorg,
- sfx_bdcls);
+ S_StartSound(&door->sector->soundorg, sfx_bdcls);
break;
case normal:
door->direction = -1; // time to go back down
- S_StartSound((mobj_t *)&door->sector->soundorg,
- sfx_dorcls);
+ S_StartSound(&door->sector->soundorg, sfx_dorcls);
break;
case close30ThenOpen:
door->direction = 1;
- S_StartSound((mobj_t *)&door->sector->soundorg,
- sfx_doropn);
+ S_StartSound(&door->sector->soundorg, sfx_doropn);
break;
default:
@@ -107,8 +104,7 @@ void T_VerticalDoor (vldoor_t* door)
case raiseIn5Mins:
door->direction = 1;
door->type = normal;
- S_StartSound((mobj_t *)&door->sector->soundorg,
- sfx_doropn);
+ S_StartSound(&door->sector->soundorg, sfx_doropn);
break;
default:
@@ -131,8 +127,7 @@ void T_VerticalDoor (vldoor_t* door)
case blazeClose:
door->sector->specialdata = NULL;
P_RemoveThinker (&door->thinker); // unlink and free
- S_StartSound((mobj_t *)&door->sector->soundorg,
- sfx_bdcls);
+ S_StartSound(&door->sector->soundorg, sfx_bdcls);
break;
case normal:
@@ -160,8 +155,7 @@ void T_VerticalDoor (vldoor_t* door)
default:
door->direction = 1;
- S_StartSound((mobj_t *)&door->sector->soundorg,
- sfx_doropn);
+ S_StartSound(&door->sector->soundorg, sfx_doropn);
break;
}
}
@@ -300,23 +294,20 @@ EV_DoDoor
door->topheight -= 4*FRACUNIT;
door->direction = -1;
door->speed = VDOORSPEED * 4;
- S_StartSound((mobj_t *)&door->sector->soundorg,
- sfx_bdcls);
+ S_StartSound(&door->sector->soundorg, sfx_bdcls);
break;
case close:
door->topheight = P_FindLowestCeilingSurrounding(sec);
door->topheight -= 4*FRACUNIT;
door->direction = -1;
- S_StartSound((mobj_t *)&door->sector->soundorg,
- sfx_dorcls);
+ S_StartSound(&door->sector->soundorg, sfx_dorcls);
break;
case close30ThenOpen:
door->topheight = sec->ceilingheight;
door->direction = -1;
- S_StartSound((mobj_t *)&door->sector->soundorg,
- sfx_dorcls);
+ S_StartSound(&door->sector->soundorg, sfx_dorcls);
break;
case blazeRaise:
@@ -326,8 +317,7 @@ EV_DoDoor
door->topheight -= 4*FRACUNIT;
door->speed = VDOORSPEED * 4;
if (door->topheight != sec->ceilingheight)
- S_StartSound((mobj_t *)&door->sector->soundorg,
- sfx_bdopn);
+ S_StartSound(&door->sector->soundorg, sfx_bdopn);
break;
case normal:
@@ -336,8 +326,7 @@ EV_DoDoor
door->topheight = P_FindLowestCeilingSurrounding(sec);
door->topheight -= 4*FRACUNIT;
if (door->topheight != sec->ceilingheight)
- S_StartSound((mobj_t *)&door->sector->soundorg,
- sfx_doropn);
+ S_StartSound(&door->sector->soundorg, sfx_doropn);
break;
default:
@@ -443,16 +432,16 @@ EV_VerticalDoor
{
case 117: // BLAZING DOOR RAISE
case 118: // BLAZING DOOR OPEN
- S_StartSound((mobj_t *)&sec->soundorg,sfx_bdopn);
+ S_StartSound(&sec->soundorg,sfx_bdopn);
break;
case 1: // NORMAL DOOR SOUND
case 31:
- S_StartSound((mobj_t *)&sec->soundorg,sfx_doropn);
+ S_StartSound(&sec->soundorg,sfx_doropn);
break;
default: // LOCKED DOOR SOUND
- S_StartSound((mobj_t *)&sec->soundorg,sfx_doropn);
+ S_StartSound(&sec->soundorg,sfx_doropn);
break;
}
diff --git a/src/p_floor.c b/src/p_floor.c
index 6c4f7401..edeb44a1 100644
--- a/src/p_floor.c
+++ b/src/p_floor.c
@@ -217,8 +217,7 @@ void T_MoveFloor(floormove_t* floor)
floor->crush,0,floor->direction);
if (!(leveltime&7))
- S_StartSound((mobj_t *)&floor->sector->soundorg,
- sfx_stnmov);
+ S_StartSound(&floor->sector->soundorg, sfx_stnmov);
if (res == pastdest)
{
@@ -248,8 +247,7 @@ void T_MoveFloor(floormove_t* floor)
}
P_RemoveThinker(&floor->thinker);
- S_StartSound((mobj_t *)&floor->sector->soundorg,
- sfx_pstop);
+ S_StartSound(&floor->sector->soundorg, sfx_pstop);
}
}
diff --git a/src/p_plats.c b/src/p_plats.c
index ea58c48b..d0919a0c 100644
--- a/src/p_plats.c
+++ b/src/p_plats.c
@@ -66,8 +66,7 @@ void T_PlatRaise(plat_t* plat)
|| plat->type == raiseToNearestAndChange)
{
if (!(leveltime&7))
- S_StartSound((mobj_t *)&plat->sector->soundorg,
- sfx_stnmov);
+ S_StartSound(&plat->sector->soundorg, sfx_stnmov);
}
@@ -75,8 +74,7 @@ void T_PlatRaise(plat_t* plat)
{
plat->count = plat->wait;
plat->status = down;
- S_StartSound((mobj_t *)&plat->sector->soundorg,
- sfx_pstart);
+ S_StartSound(&plat->sector->soundorg, sfx_pstart);
}
else
{
@@ -84,8 +82,7 @@ void T_PlatRaise(plat_t* plat)
{
plat->count = plat->wait;
plat->status = waiting;
- S_StartSound((mobj_t *)&plat->sector->soundorg,
- sfx_pstop);
+ S_StartSound(&plat->sector->soundorg, sfx_pstop);
switch(plat->type)
{
@@ -113,7 +110,7 @@ void T_PlatRaise(plat_t* plat)
{
plat->count = plat->wait;
plat->status = waiting;
- S_StartSound((mobj_t *)&plat->sector->soundorg,sfx_pstop);
+ S_StartSound(&plat->sector->soundorg,sfx_pstop);
}
break;
@@ -124,7 +121,7 @@ void T_PlatRaise(plat_t* plat)
plat->status = up;
else
plat->status = down;
- S_StartSound((mobj_t *)&plat->sector->soundorg,sfx_pstart);
+ S_StartSound(&plat->sector->soundorg,sfx_pstart);
}
case in_stasis:
break;
@@ -192,7 +189,7 @@ EV_DoPlat
// NO MORE DAMAGE, IF APPLICABLE
sec->special = 0;
- S_StartSound((mobj_t *)&sec->soundorg,sfx_stnmov);
+ S_StartSound(&sec->soundorg,sfx_stnmov);
break;
case raiseAndChange:
@@ -202,7 +199,7 @@ EV_DoPlat
plat->wait = 0;
plat->status = up;
- S_StartSound((mobj_t *)&sec->soundorg,sfx_stnmov);
+ S_StartSound(&sec->soundorg,sfx_stnmov);
break;
case downWaitUpStay:
@@ -215,7 +212,7 @@ EV_DoPlat
plat->high = sec->floorheight;
plat->wait = 35*PLATWAIT;
plat->status = down;
- S_StartSound((mobj_t *)&sec->soundorg,sfx_pstart);
+ S_StartSound(&sec->soundorg,sfx_pstart);
break;
case blazeDWUS:
@@ -228,7 +225,7 @@ EV_DoPlat
plat->high = sec->floorheight;
plat->wait = 35*PLATWAIT;
plat->status = down;
- S_StartSound((mobj_t *)&sec->soundorg,sfx_pstart);
+ S_StartSound(&sec->soundorg,sfx_pstart);
break;
case perpetualRaise:
@@ -246,7 +243,7 @@ EV_DoPlat
plat->wait = 35*PLATWAIT;
plat->status = P_Random()&1;
- S_StartSound((mobj_t *)&sec->soundorg,sfx_pstart);
+ S_StartSound(&sec->soundorg,sfx_pstart);
break;
}
P_AddActivePlat(plat);
diff --git a/src/p_spec.c b/src/p_spec.c
index 01b612a1..67f32194 100644
--- a/src/p_spec.c
+++ b/src/p_spec.c
@@ -1165,7 +1165,7 @@ void P_UpdateSpecials (void)
buttonlist[i].btexture;
break;
}
- S_StartSound((mobj_t *)&buttonlist[i].soundorg,sfx_swtchn);
+ S_StartSound(&buttonlist[i].soundorg,sfx_swtchn);
memset(&buttonlist[i],0,sizeof(button_t));
}
}
diff --git a/src/p_spec.h b/src/p_spec.h
index 8312cb3e..f5b57032 100644
--- a/src/p_spec.h
+++ b/src/p_spec.h
@@ -235,7 +235,7 @@ typedef struct
bwhere_e where;
int btexture;
int btimer;
- mobj_t* soundorg;
+ degenmobj_t *soundorg;
} button_t;
diff --git a/src/p_switch.c b/src/p_switch.c
index d9b55202..28b59fae 100644
--- a/src/p_switch.c
+++ b/src/p_switch.c
@@ -183,7 +183,7 @@ P_StartButton
buttonlist[i].where = w;
buttonlist[i].btexture = texture;
buttonlist[i].btimer = time;
- buttonlist[i].soundorg = (mobj_t *)&line->frontsector->soundorg;
+ buttonlist[i].soundorg = &line->frontsector->soundorg;
return;
}
}