From 045914d984c893545c36b76be595faca1246075b Mon Sep 17 00:00:00 2001 From: cypress Date: Fri, 1 Dec 2023 10:36:45 -0500 Subject: [PATCH] SERVER: Add path redirection for Pack-A-Punch --- source/server/entities/pack_a_punch.qc | 10 +++++++--- source/server/main.qc | 9 +++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/source/server/entities/pack_a_punch.qc b/source/server/entities/pack_a_punch.qc index b590941..9858fca 100644 --- a/source/server/entities/pack_a_punch.qc +++ b/source/server/entities/pack_a_punch.qc @@ -358,7 +358,7 @@ void() perk_pap = // // Model - if (!self.model || self.model == "models/machines/hl_scale/pap.mdl") { + if (!self.model || self.model == "models/machines/pap/pap.mdl") { self.model = "models/machines/quake_scale/pap.mdl"; } @@ -374,7 +374,7 @@ void() perk_pap = // Roller Model if (!self.weapon2model) { - self.weapon2model = "models/machines/hl_scale/packapunch/p_roller.mdl"; + self.weapon2model = "models/machines/hl_scale/pap/p_roller.mdl"; } // Roller Offset @@ -384,7 +384,7 @@ void() perk_pap = // Flag Model if (!self.door_model_name) { - self.door_model_name = "models/machines/hl_scale/packapunch/p_flag.mdl"; + self.door_model_name = "models/machines/hl_scale/pap/p_flag.mdl"; } // Flag Offset @@ -407,6 +407,10 @@ void() perk_pap = self.oldmodel = "sounds/machines/packapunch/upgrade.wav"; } + self.model = convert_old_asset_path(self.model); + self.weapon2model = convert_old_asset_path(self.weapon2model); + self.door_model_name = convert_old_asset_path(self.door_model_name); + // Precaches // FIXME: Don't hardcode weapon precaches here. precache_extra(W_BIATCH); diff --git a/source/server/main.qc b/source/server/main.qc index fee6b4b..832f9ad 100644 --- a/source/server/main.qc +++ b/source/server/main.qc @@ -761,6 +761,15 @@ string(string asset) convert_old_asset_path = case "models/machines/power_switch.mdl": ret = "models/machines/quake_scale/power_switch.mdl"; break; + case "models/machines/hl_scale/packapunch/p_machine.mdl": + ret = "models/machines/hl_scale/pap/p_machine.mdl"; + break; + case "models/machines/hl_scale/packapunch/p_roller.mdl": + ret = "models/machines/hl_scale/pap/p_roller.mdl"; + break; + case "models/machines/hl_scale/packapunch/p_flag.mdl": + ret = "models/machines/hl_scale/pap/p_flag.mdl"; + break; default: ret = asset; break;