From fec3011e98e6bbce041d258a4d14af761950348c Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Wed, 21 Jul 2021 19:24:32 +1000 Subject: [PATCH] Move q3compat powerup spawnfuncs to quake3.qc and update map entity comments --- qcsrc/common/mutators/mutator/buffs/all.inc | 18 ++++---- .../mutator/powerups/powerup/invisibility.qh | 2 - .../mutator/powerups/powerup/speed.qh | 2 - qcsrc/server/compat/quake.qc | 2 +- qcsrc/server/compat/quake3.qc | 44 +++++++++---------- qcsrc/server/items/spawning.qc | 2 - 6 files changed, 32 insertions(+), 38 deletions(-) diff --git a/qcsrc/common/mutators/mutator/buffs/all.inc b/qcsrc/common/mutators/mutator/buffs/all.inc index 3a4031ef8..1572a75e5 100644 --- a/qcsrc/common/mutators/mutator/buffs/all.inc +++ b/qcsrc/common/mutators/mutator/buffs/all.inc @@ -2,15 +2,15 @@ string Buff_UndeprecateName(string buffname) { switch(buffname) { - case "ammoregen": return "ammo"; // Q3TA ammoregen - case "doubler": return "inferno"; // Q3TA doubler - case "scout": return "bash"; // Q3TA scout - case "guard": return "resistance"; // Q3TA guard - case "revival": case "regen": return "medic"; // WOP revival, Q3A regen - case "jumper": return "jump"; // WOP jumper - case "invulnerability": return "vampire"; // Q3TA invulnerability - case "kamikaze": return "vengeance"; // Q3TA kamikaze - case "teleporter": return "swapper"; // Q3A personal teleporter + case "ammoregen": return "ammo"; // Q3TA ammoregen + case "doubler": return "inferno"; // Q3TA doubler + case "scout": return "bash"; // Q3TA scout + case "guard": return "resistance"; // Q3TA guard + case "revival": case "regen": return "medic"; // WOP revival, Q3A regen + case "jumper": return "jump"; // WOP jumper + case "invulnerability": return "vampire"; // Q3TA invulnerability + case "kamikaze": return "vengeance"; // Q3TA kamikaze + case "teleporter": return "swapper"; // Q3A personal teleporter default: return buffname; } } diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh b/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh index 85ac8bd30..f4e59b58c 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh +++ b/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh @@ -48,8 +48,6 @@ REGISTER_ITEM(Invisibility, Powerup) { } SPAWNFUNC_ITEM(item_invisibility, ITEM_Invisibility) -// compat -SPAWNFUNC_ITEM(item_invis, ITEM_Invisibility) CLASS(Invisibility, Powerups) ATTRIB(Invisibility, netname, string, "invisibility"); diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/speed.qh b/qcsrc/common/mutators/mutator/powerups/powerup/speed.qh index 938fb66ae..fff1fd9b8 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/speed.qh +++ b/qcsrc/common/mutators/mutator/powerups/powerup/speed.qh @@ -49,8 +49,6 @@ REGISTER_ITEM(Speed, Powerup) { } SPAWNFUNC_ITEM(item_speed, ITEM_Speed) -// compat -SPAWNFUNC_ITEM(item_haste, ITEM_Speed) CLASS(Speed, Powerups) ATTRIB(Speed, netname, string, "speed"); diff --git a/qcsrc/server/compat/quake.qc b/qcsrc/server/compat/quake.qc index 279b3155d..cd5f78b74 100644 --- a/qcsrc/server/compat/quake.qc +++ b/qcsrc/server/compat/quake.qc @@ -8,7 +8,7 @@ * QUAKE 1 ENTITIES - So people can play quake1 maps with the xonotic weapons *********************** weapon_nailgun handled in quake3.qc - item_armor1 handled in items.qc + item_armor1 handled in items/spawning.qc */ SPAWNFUNC_WEAPON(weapon_supernailgun, WEP_HAGAR) diff --git a/qcsrc/server/compat/quake3.qc b/qcsrc/server/compat/quake3.qc index 32c42d354..36fb99508 100644 --- a/qcsrc/server/compat/quake3.qc +++ b/qcsrc/server/compat/quake3.qc @@ -23,27 +23,24 @@ *********************** * Map entities NOT handled in this file: - holdable_invulnerability Q3TA buffs mutator - holdable_kamikaze Q3TA buffs mutator - holdable_teleporter Q3A buffs mutator - item_ammoregen Q3TA buffs mutator - item_doubler Q3TA buffs mutator - item_guard Q3TA buffs mutator - item_scout Q3TA buffs mutator - item_armor_jacket CPMA quake2.qc - item_flight Q3A buffs mutator - item_haste Q3A buffs mutator - item_health Q3A quake.qc - item_health_large Q3A items.qc - item_health_small Q3A health.qh - item_health_mega Q3A health.qh - item_invis Q3A buffs mutator - item_quad Q3A items.qc - item_regen Q3A buffs mutator - weapon_machinegun Q3A machinegun.qh - weapon_grenadelauncher Q3A mortar.qh - weapon_rocketlauncher Q3A devastator.qh - CTF spawnfuncs handled in sv_ctf.qc + holdable_invulnerability Q3TA buffs/all.inc + holdable_kamikaze Q3TA buffs/all.inc + holdable_teleporter Q3A buffs/all.inc + item_ammoregen Q3TA buffs/all.inc + item_doubler Q3TA buffs/all.inc + item_guard Q3TA buffs/all.inc + item_scout Q3TA buffs/all.inc + item_armor_jacket CPMA quake2.qc + item_flight Q3A buffs/all.inc + item_health Q3A quake.qc + item_health_large Q3A items/spawning.qc + item_health_small Q3A health.qh + item_health_mega Q3A health.qh + item_regen Q3A buffs/all.inc + weapon_machinegun Q3A machinegun.qh + weapon_grenadelauncher Q3A mortar.qh + weapon_rocketlauncher Q3A devastator.qh + * CTF spawnfuncs in sv_ctf.qc NOTE: for best experience, you need to swap MGs with SGs in the map or it won't have a MG */ @@ -99,8 +96,11 @@ SPAWNFUNC_ITEM(item_armor_combat, ITEM_ArmorBig) SPAWNFUNC_ITEM(item_armor_shard, ITEM_ArmorSmall) SPAWNFUNC_ITEM(item_armor_green, ITEM_ArmorMedium) // CCTF -// Battle Suit +// Powerups +SPAWNFUNC_ITEM(item_quad, ITEM_Strength) SPAWNFUNC_ITEM(item_enviro, ITEM_Shield) +SPAWNFUNC_ITEM(item_haste, ITEM_Speed) +SPAWNFUNC_ITEM(item_invis, ITEM_Invisibility) // medkit -> armor (we have no holdables) SPAWNFUNC_ITEM(holdable_medkit, ITEM_ArmorBig) diff --git a/qcsrc/server/items/spawning.qc b/qcsrc/server/items/spawning.qc index ef4a838d3..4c5b9d17a 100644 --- a/qcsrc/server/items/spawning.qc +++ b/qcsrc/server/items/spawning.qc @@ -145,5 +145,3 @@ SPAWNFUNC_ITEM(item_health25, ITEM_HealthMedium) SPAWNFUNC_ITEM(item_health_large, ITEM_HealthBig) SPAWNFUNC_ITEM(item_health100, ITEM_HealthMega) - -SPAWNFUNC_ITEM(item_quad, ITEM_Strength) -- 2.39.2