From 2aec324a2586dff7956cc6835e4141c769119012 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 23 Aug 2022 22:32:45 +0200 Subject: [PATCH] - EGS with hitpos --- source/games/duke/src/player_d.cpp | 8 ++++---- source/games/duke/src/player_r.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 8d22f48aa..5d4a274e0 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -254,7 +254,7 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa) { if (hit.hitWall || hit.actor()) { - auto knee = EGS(hit.hitSector, hit.int_hitpos().X, hit.int_hitpos().Y, hit.int_hitpos().Z, KNEE, -15, 0, 0, sa, 32, 0, actor, 4); + auto knee = CreateActor(hit.hitSector, hit.hitpos, KNEE, -15, 0, 0, sa, 32, 0, actor, 4); if (knee) { knee->spr.extra += (krand() & 7); @@ -408,7 +408,7 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa DDukeActor* spark; if (p >= 0) { - spark = EGS(hit.hitSector, hit.int_hitpos().X, hit.int_hitpos().Y, hit.int_hitpos().Z, SHOTSPARK1, -15, 10, 10, sa, 0, 0, actor, 4); + spark = CreateActor(hit.hitSector, hit.hitpos, SHOTSPARK1, -15, 10, 10, sa, 0, 0, actor, 4); if (!spark) return; spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress]; @@ -530,7 +530,7 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa } else { - spark = EGS(hit.hitSector, hit.int_hitpos().X, hit.int_hitpos().Y, hit.int_hitpos().Z, SHOTSPARK1, -15, 24, 24, sa, 0, 0, actor, 4); + spark = CreateActor(hit.hitSector, hit.hitpos, SHOTSPARK1, -15, 24, 24, sa, 0, 0, actor, 4); if (spark) { spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress]; @@ -863,7 +863,7 @@ static void shootlaser(DDukeActor* actor, int p, int sx, int sy, int sz, int sa) if (j == 1) { - auto bomb = EGS(hit.hitSector, hit.int_hitpos().X, hit.int_hitpos().Y, hit.int_hitpos().Z, TRIPBOMB, -16, 4, 5, sa, 0, 0, actor, STAT_STANDABLE); + auto bomb = CreateActor(hit.hitSector, hit.hitpos, TRIPBOMB, -16, 4, 5, sa, 0, 0, actor, STAT_STANDABLE); if (!bomb) return; if (isWW2GI()) { diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index 08f40ffae..bee3c9264 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -140,13 +140,13 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa, DDukeActor* wpn; if (isRRRA() && atwith == SLINGBLADE) { - wpn = EGS(hit.hitSector, hit.int_hitpos().X, hit.int_hitpos().Y, hit.int_hitpos().Z, SLINGBLADE, -15, 0, 0, sa, 32, 0, actor, 4); + wpn = CreateActor(hit.hitSector, hit.hitpos, SLINGBLADE, -15, 0, 0, sa, 32, 0, actor, 4); if (!wpn) return; wpn->spr.extra += 50; } else { - wpn = EGS(hit.hitSector, hit.int_hitpos().X, hit.int_hitpos().Y, hit.int_hitpos().Z, KNEE, -15, 0, 0, sa, 32, 0, actor, 4); + wpn = CreateActor(hit.hitSector, hit.hitpos, KNEE, -15, 0, 0, sa, 32, 0, actor, 4); if (!wpn) return; wpn->spr.extra += (krand() & 7); }