]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Spawn medium (25) armor for item_armor1 when map format != Q3BSP
authorbones_was_here <bones_was_here@yahoo.com.au>
Tue, 14 Jul 2020 11:17:43 +0000 (21:17 +1000)
committerbones_was_here <bones_was_here@yahoo.com.au>
Tue, 14 Jul 2020 11:17:43 +0000 (21:17 +1000)
qcsrc/server/compat/quake.qc
qcsrc/server/items.qc

index 93d935e020cdb6deca58134e1f0d791dc0f39f0d..e8f1fdea2a033cf94875dfbe41837f8f50d7f2f8 100644 (file)
@@ -4,15 +4,17 @@
 #include <server/miscfunctions.qh>
 #include <common/weapons/_all.qh>
 
-//***********************
-//QUAKE 1 ENTITIES - So people can play quake1 maps with the xonotic weapons
-//***********************
-// see: quake3.qc for weapon_nailgun
+/***********************
+ * 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
+*/
+
 SPAWNFUNC_WEAPON(weapon_supernailgun, WEP_HAGAR)
 SPAWNFUNC_WEAPON(weapon_supershotgun, WEP_MACHINEGUN)
 
 SPAWNFUNC_ITEM(item_spikes, ITEM_Bullets)
-//spawnfunc(item_armor1) {spawnfunc_item_armor_medium(this);}  // FIXME: in Quake this is green armor, in Xonotic maps it is an armor shard
 SPAWNFUNC_ITEM(item_armor2, ITEM_ArmorMega)
 SPAWNFUNC_ITEM(item_armorInv, ITEM_ArmorMega) // TODO: make sure we actually want this
 SPAWNFUNC_ITEM_COND(item_health, (this.spawnflags & 2), ITEM_HealthMega, ITEM_HealthMedium)
index ab53a10fc3770f421d8779ecf163f3742652a900..9814db93be59c76320a9d258e297b0501766bcce 100644 (file)
@@ -130,8 +130,7 @@ void Item_SetExpiring(entity item, bool expiring)
 
 // Compatibility spawn functions
 
-// FIXME: in Quake this is green armor, in Xonotic maps it is an armor shard
-SPAWNFUNC_ITEM(item_armor1, ITEM_ArmorSmall)
+SPAWNFUNC_ITEM_COND(item_armor1, cvar_string("sv_mapformat_is_quake3"), ITEM_ArmorSmall, ITEM_ArmorMedium)
 
 SPAWNFUNC_ITEM(item_armor25, ITEM_ArmorMega)