From d4ee8a1c489c2a1cba954d3a367eead3ee0def04 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 22 Oct 2020 21:45:54 +0200 Subject: [PATCH] - removed a few redundant GetIndex calls. --- source/games/duke/src/actors.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index c37b841ed..60911b4f0 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -4305,7 +4305,7 @@ void handle_se20(DDukeActor* actor) s->x -= x; s->y -= l; t[0] = 0; - callsound(s->sectnum, actor->GetIndex()); + callsound(s->sectnum, actor); return; } @@ -4668,7 +4668,7 @@ void handle_se32(DDukeActor *actor) if (abs(sc->ceilingz - s->z) < (s->yvel << 1)) { sc->ceilingz = s->z; - callsound(s->sectnum, actor->GetIndex()); + callsound(s->sectnum, actor); t[2] = 0; t[0] = 0; } @@ -4679,7 +4679,7 @@ void handle_se32(DDukeActor *actor) if (abs(sc->ceilingz - t[1]) < (s->yvel << 1)) { sc->ceilingz = t[1]; - callsound(s->sectnum, actor->GetIndex()); + callsound(s->sectnum, actor); t[2] = 0; t[0] = 0; } @@ -4694,7 +4694,7 @@ void handle_se32(DDukeActor *actor) { t[0] = 0; t[2] = !t[2]; - callsound(s->sectnum, actor->GetIndex()); + callsound(s->sectnum, actor); sc->ceilingz = s->z; } else sc->ceilingz += sgn(s->z - sc->ceilingz) * s->yvel; @@ -4705,7 +4705,7 @@ void handle_se32(DDukeActor *actor) { t[0] = 0; t[2] = !t[2]; - callsound(s->sectnum, actor->GetIndex()); + callsound(s->sectnum, actor); } else sc->ceilingz -= sgn(s->z - t[1]) * s->yvel; } @@ -4859,7 +4859,7 @@ void handle_se31(DDukeActor* actor, bool choosedir) t[2] = 0; t[0] = 0; if (choosedir) t[3] = s->hitag; - callsound(s->sectnum, actor->GetIndex()); + callsound(s->sectnum, actor); } else { @@ -4885,7 +4885,7 @@ void handle_se31(DDukeActor* actor, bool choosedir) if (abs(sec->floorz - t[1]) < s->yvel) { sec->floorz = t[1]; - callsound(s->sectnum, actor->GetIndex()); + callsound(s->sectnum, actor); t[2] = 0; t[0] = 0; if (choosedir) t[3] = s->hitag; @@ -4916,7 +4916,7 @@ void handle_se31(DDukeActor* actor, bool choosedir) { if (abs(s->z - sec->floorz) < s->yvel) { - callsound(s->sectnum, actor->GetIndex()); + callsound(s->sectnum, actor); t[0] = 0; t[2] = 1; if (choosedir) t[3] = s->hitag; @@ -4945,7 +4945,7 @@ void handle_se31(DDukeActor* actor, bool choosedir) if (abs(sec->floorz - t[1]) < s->yvel) { t[0] = 0; - callsound(s->sectnum, actor->GetIndex()); + callsound(s->sectnum, actor); t[2] = 1; t[3] = s->hitag; }