Resolve conflicts 2: Merge branch 'master' into bones_was_here/q3compat
authorbones_was_here <bones_was_here@xa.org.au>
Sun, 18 Jul 2021 00:48:31 +0000 (10:48 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Sun, 18 Jul 2021 00:48:31 +0000 (10:48 +1000)
15 files changed:
1  2 
qcsrc/common/items/item.qh
qcsrc/common/mutators/mutator/buffs/all.inc
qcsrc/common/mutators/mutator/buffs/buffs.qh
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/mutators/mutator/buffs/sv_buffs.qh
qcsrc/common/physics/player.qc
qcsrc/common/stats.qh
qcsrc/lib/spawnfunc.qh
qcsrc/lib/warpzone/common.qc
qcsrc/server/client.qc
qcsrc/server/compat/quake3.qc
qcsrc/server/items/items.qc
qcsrc/server/items/items.qh
qcsrc/server/world.qc
xonotic-server.cfg

Simple merge
index 3d540eebfdf3c715472f63f792a5e3205a131482,72f54dcd28cb658a9a99c9ad842c5300e16c2218..3a4031ef8e052e8e9b27674a6961040c9f197361
@@@ -2,165 -2,162 +2,171 @@@ string Buff_UndeprecateName(string buff
  {
      switch(buffname)
      {
 -        case "ammoregen": return "ammo";
 -        case "guard": return "resistance";
 -        case "revival": case "regen": return "medic";
 -        case "jumper": return "jump";
 +        case "ammoregen": return "ammo";              // Q3TA ammoregen
-         case "haste": return "speed";                 // Q3A haste
 +        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 "invis": return "invisible";             // Q3A invis
 +        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;
      }
  }
  
- REGISTER_BUFF(AMMO) {
-     this.m_name = _("Ammo");
-     this.netname = "ammo";
-     this.m_icon = "buff_ammo";
-     this.m_skin = 3;
-     this.m_color = '0.76 1 0.1';
- }
+ CLASS(AmmoBuff, Buff)
+     ATTRIB(AmmoBuff, m_name, string, _("Ammo"));
+     ATTRIB(AmmoBuff, netname, string, "ammo");
+     ATTRIB(AmmoBuff, m_icon, string, "buff_ammo");
+     ATTRIB(AmmoBuff, m_skin, int, 3);
+     ATTRIB(AmmoBuff, m_color, vector, '0.76 1 0.1');
+ ENDCLASS(AmmoBuff)
+ REGISTER_BUFF(AMMO, NEW(AmmoBuff));
  BUFF_SPAWNFUNCS(ammo, BUFF_AMMO)
 -BUFF_SPAWNFUNC_Q3TA_COMPAT(ammoregen, BUFF_AMMO)
 +BUFF_SPAWNFUNC_Q3COMPAT(item_ammoregen, BUFF_AMMO)
  
- REGISTER_BUFF(RESISTANCE) {
-     this.m_name = _("Resistance");
-     this.netname = "resistance";
-     this.m_icon = "buff_resistance";
-     this.m_skin = 0;
-     this.m_color = '0.36 1 0.07';
- }
+ CLASS(ResistanceBuff, Buff)
+     ATTRIB(ResistanceBuff, m_name, string, _("Resistance"));
+     ATTRIB(ResistanceBuff, netname, string, "resistance");
+     ATTRIB(ResistanceBuff, m_icon, string, "buff_resistance");
+     ATTRIB(ResistanceBuff, m_skin, int, 0);
+     ATTRIB(ResistanceBuff, m_color, vector, '0.36 1 0.07');
+ ENDCLASS(ResistanceBuff)
+ REGISTER_BUFF(RESISTANCE, NEW(ResistanceBuff));
  BUFF_SPAWNFUNCS(resistance, BUFF_RESISTANCE)
 -BUFF_SPAWNFUNC_Q3TA_COMPAT(guard, BUFF_RESISTANCE)
 +BUFF_SPAWNFUNC_Q3COMPAT(item_guard, BUFF_RESISTANCE)
  
- REGISTER_BUFF(SPEED) {
-     this.m_name = _("Speed");
-     this.netname = "speed";
-     this.m_icon = "buff_speed";
-     this.m_skin = 9;
-     this.m_color = '0.1 1 0.84';
- }
- BUFF_SPAWNFUNCS(speed, BUFF_SPEED)
- BUFF_SPAWNFUNC_Q3COMPAT(item_haste, BUFF_SPEED)
- REGISTER_BUFF(MEDIC) {
-     this.m_name = _("Medic");
-     this.netname = "medic";
-     this.m_icon = "buff_medic";
-     this.m_skin = 1;
-     this.m_color = '1 0.12 0';
- }
+ CLASS(MedicBuff, Buff)
+     ATTRIB(MedicBuff, m_name, string, _("Medic"));
+     ATTRIB(MedicBuff, netname, string, "medic");
+     ATTRIB(MedicBuff, m_icon, string, "buff_medic");
+     ATTRIB(MedicBuff, m_skin, int, 1);
+     ATTRIB(MedicBuff, m_color, vector, '1 0.12 0');
+ ENDCLASS(MedicBuff)
+ REGISTER_BUFF(MEDIC, NEW(MedicBuff));
  BUFF_SPAWNFUNCS(medic, BUFF_MEDIC)
 -BUFF_SPAWNFUNC_Q3TA_COMPAT(regen, BUFF_MEDIC)
 -BUFF_SPAWNFUNC_Q3TA_COMPAT(revival, BUFF_MEDIC)
 +BUFF_SPAWNFUNC_Q3COMPAT(item_regen, BUFF_MEDIC)
 +BUFF_SPAWNFUNC_Q3COMPAT(item_revival, BUFF_MEDIC)
  
- REGISTER_BUFF(BASH) {
-     this.m_name = _("Bash");
-     this.netname = "bash";
-     this.m_icon = "buff_bash";
-     this.m_skin = 5;
-     this.m_color = '1 0.39 0';
- }
+ CLASS(BashBuff, Buff)
+     ATTRIB(BashBuff, m_name, string, _("Bash"));
+     ATTRIB(BashBuff, netname, string, "bash");
+     ATTRIB(BashBuff, m_icon, string, "buff_bash");
+     ATTRIB(BashBuff, m_skin, int, 5);
+     ATTRIB(BashBuff, m_color, vector, '1 0.39 0');
+ ENDCLASS(BashBuff)
+ REGISTER_BUFF(BASH, NEW(BashBuff));
  BUFF_SPAWNFUNCS(bash, BUFF_BASH)
 -BUFF_SPAWNFUNC_Q3TA_COMPAT(doubler, BUFF_BASH)
 +BUFF_SPAWNFUNC_Q3COMPAT(item_scout, BUFF_BASH)
  
- REGISTER_BUFF(VAMPIRE) {
-     this.m_name = _("Vampire");
-     this.netname = "vampire";
-     this.m_icon = "buff_vampire";
-     this.m_skin = 2;
-     this.m_color = '1 0 0.24';
- }
+ CLASS(VampireBuff, Buff)
+     ATTRIB(VampireBuff, m_name, string, _("Vampire"));
+     ATTRIB(VampireBuff, netname, string, "vampire");
+     ATTRIB(VampireBuff, m_icon, string, "buff_vampire");
+     ATTRIB(VampireBuff, m_skin, int, 2);
+     ATTRIB(VampireBuff, m_color, vector, '1 0 0.24');
+ ENDCLASS(VampireBuff)
+ REGISTER_BUFF(VAMPIRE, NEW(VampireBuff));
  BUFF_SPAWNFUNCS(vampire, BUFF_VAMPIRE)
 +BUFF_SPAWNFUNC_Q3COMPAT(holdable_invulnerability, BUFF_VAMPIRE)
  
- REGISTER_BUFF(DISABILITY) {
-     this.m_name = _("Disability");
-     this.netname = "disability";
-     this.m_icon = "buff_disability";
-     this.m_skin = 7;
-     this.m_color = '0.94 0.3 1';
- }
+ CLASS(DisabilityBuff, Buff)
+     ATTRIB(DisabilityBuff, m_name, string, _("Disability"));
+     ATTRIB(DisabilityBuff, netname, string, "disability");
+     ATTRIB(DisabilityBuff, m_icon, string, "buff_disability");
+     ATTRIB(DisabilityBuff, m_skin, int, 7);
+     ATTRIB(DisabilityBuff, m_color, vector, '0.94 0.3 1');
+ ENDCLASS(DisabilityBuff)
+ REGISTER_BUFF(DISABILITY, NEW(DisabilityBuff));
  BUFF_SPAWNFUNCS(disability, BUFF_DISABILITY)
+ // status effect applied to targets by the disability buff
+ CLASS(Disabled, StatusEffects)
+     ATTRIB(Disabled, netname, string, "disabled");
+ #if 0
+     // NOTE: status effect name and icon disabled as they are not displayed
+     // re-enable if status effects are given a visual element
+     ATTRIB(Disabled, m_name, string, _("Disabled"));
+     ATTRIB(Disabled, m_icon, string, "buff_disability");
+ #endif
+     ATTRIB(Disabled, m_color, vector, '0.94 0.3 1');
+     ATTRIB(Disabled, m_hidden, bool, true);
+     ATTRIB(Disabled, m_lifetime, float, 10);
+     ATTRIB(Disabled, disabled_effect_time, float, 0); // TODO: handle this effect client side like EF_FLAME!
+ ENDCLASS(Disabled)
+ REGISTER_STATUSEFFECT(Disabled, NEW(Disabled));
  
- REGISTER_BUFF(VENGEANCE) {
-     this.m_name = _("Vengeance");
-     this.netname = "vengeance";
-     this.m_icon = "buff_vengeance";
-     this.m_skin = 15;
-     this.m_color = '1 0.23 0.61';
- }
+ CLASS(VengeanceBuff, Buff)
+     ATTRIB(VengeanceBuff, m_name, string, _("Vengeance"));
+     ATTRIB(VengeanceBuff, netname, string, "vengeance");
+     ATTRIB(VengeanceBuff, m_icon, string, "buff_vengeance");
+     ATTRIB(VengeanceBuff, m_skin, int, 15);
+     ATTRIB(VengeanceBuff, m_color, vector, '1 0.23 0.61');
+ ENDCLASS(VengeanceBuff)
+ REGISTER_BUFF(VENGEANCE, NEW(VengeanceBuff));
  BUFF_SPAWNFUNCS(vengeance, BUFF_VENGEANCE)
 +BUFF_SPAWNFUNC_Q3COMPAT(holdable_kamikaze, BUFF_VENGEANCE)
  
- REGISTER_BUFF(JUMP) {
-     this.m_name = _("Jump");
-     this.netname = "jump";
-     this.m_icon = "buff_jump";
-     this.m_skin = 10;
-     this.m_color = '0.24 0.78 1';
- }
+ CLASS(JumpBuff, Buff)
+     ATTRIB(JumpBuff, m_name, string, _("Jump"));
+     ATTRIB(JumpBuff, netname, string, "jump");
+     ATTRIB(JumpBuff, m_icon, string, "buff_jump");
+     ATTRIB(JumpBuff, m_skin, int, 10);
+     ATTRIB(JumpBuff, m_color, vector, '0.24 0.78 1');
+ ENDCLASS(JumpBuff)
+ REGISTER_BUFF(JUMP, NEW(JumpBuff));
  BUFF_SPAWNFUNCS(jump, BUFF_JUMP)
 -BUFF_SPAWNFUNC_Q3TA_COMPAT(jumper, BUFF_JUMP)
 +BUFF_SPAWNFUNC_Q3COMPAT(item_jumper, BUFF_JUMP)
  
- REGISTER_BUFF(INVISIBLE) {
-     this.m_name = _("Invisible");
-     this.netname = "invisible";
-     this.m_icon = "buff_invisible";
-     this.m_skin = 12;
-     this.m_color = '0.5 0.5 1';
- }
- BUFF_SPAWNFUNCS(invisible, BUFF_INVISIBLE)
- BUFF_SPAWNFUNC_Q3COMPAT(item_invis, BUFF_INVISIBLE)
- REGISTER_BUFF(INFERNO) {
-     this.m_name = _("Inferno");
-     this.netname = "inferno";
-     this.m_icon = "buff_inferno";
-     this.m_skin = 16;
-     this.m_color = '1 0.62 0';
- }
+ CLASS(InfernoBuff, Buff)
+     ATTRIB(InfernoBuff, m_name, string, _("Inferno"));
+     ATTRIB(InfernoBuff, netname, string, "inferno");
+     ATTRIB(InfernoBuff, m_icon, string, "buff_inferno");
+     ATTRIB(InfernoBuff, m_skin, int, 16);
+     ATTRIB(InfernoBuff, m_color, vector, '1 0.62 0');
+ ENDCLASS(InfernoBuff)
+ REGISTER_BUFF(INFERNO, NEW(InfernoBuff));
  BUFF_SPAWNFUNCS(inferno, BUFF_INFERNO)
 +BUFF_SPAWNFUNC_Q3COMPAT(item_doubler, BUFF_INFERNO)
  
- REGISTER_BUFF(SWAPPER) {
-     this.m_name = _("Swapper");
-     this.netname = "swapper";
-     this.m_icon = "buff_swapper";
-     this.m_skin = 17;
-     this.m_color = '0.63 0.36 1';
- }
+ CLASS(SwapperBuff, Buff)
+     ATTRIB(SwapperBuff, m_name, string, _("Swapper"));
+     ATTRIB(SwapperBuff, netname, string, "swapper");
+     ATTRIB(SwapperBuff, m_icon, string, "buff_swapper");
+     ATTRIB(SwapperBuff, m_skin, int, 17);
+     ATTRIB(SwapperBuff, m_color, vector, '0.63 0.36 1');
+ ENDCLASS(SwapperBuff)
+ REGISTER_BUFF(SWAPPER, NEW(SwapperBuff));
  BUFF_SPAWNFUNCS(swapper, BUFF_SWAPPER)
 +BUFF_SPAWNFUNC_Q3COMPAT(holdable_teleporter, BUFF_SWAPPER)
  
- REGISTER_BUFF(MAGNET) {
-     this.m_name = _("Magnet");
-     this.netname = "magnet";
-     this.m_icon = "buff_magnet";
-     this.m_skin = 18;
-     this.m_color = '1 0.95 0.18';
- }
+ CLASS(MagnetBuff, Buff)
+     ATTRIB(MagnetBuff, m_name, string, _("Magnet"));
+     ATTRIB(MagnetBuff, netname, string, "magnet");
+     ATTRIB(MagnetBuff, m_icon, string, "buff_magnet");
+     ATTRIB(MagnetBuff, m_skin, int, 18);
+     ATTRIB(MagnetBuff, m_color, vector, '1 0.95 0.18');
+ ENDCLASS(MagnetBuff)
+ REGISTER_BUFF(MAGNET, NEW(MagnetBuff));
  BUFF_SPAWNFUNCS(magnet, BUFF_MAGNET)
  
- REGISTER_BUFF(LUCK) {
-     this.m_name = _("Luck");
-     this.netname = "luck";
-     this.m_icon = "buff_luck";
-     this.m_skin = 19;
-     this.m_color = '1 0.23 0.44';
- }
+ CLASS(LuckBuff, Buff)
+     ATTRIB(LuckBuff, m_name, string, _("Luck"));
+     ATTRIB(LuckBuff, netname, string, "luck");
+     ATTRIB(LuckBuff, m_icon, string, "buff_luck");
+     ATTRIB(LuckBuff, m_skin, int, 19);
+     ATTRIB(LuckBuff, m_color, vector, '1 0.23 0.44');
+ ENDCLASS(LuckBuff)
+ REGISTER_BUFF(LUCK, NEW(LuckBuff));
  BUFF_SPAWNFUNCS(luck, BUFF_LUCK)
  
- REGISTER_BUFF(FLIGHT) {
-     this.m_name = _("Flight");
-     this.netname = "flight";
-     this.m_icon = "buff_flight";
-     this.m_skin = 11;
-     this.m_color = '0.23 0.44 1';
- }
+ CLASS(FlightBuff, Buff)
+     ATTRIB(FlightBuff, m_name, string, _("Flight"));
+     ATTRIB(FlightBuff, netname, string, "flight");
+     ATTRIB(FlightBuff, m_icon, string, "buff_flight");
+     ATTRIB(FlightBuff, m_skin, int, 11);
+     ATTRIB(FlightBuff, m_color, vector, '0.23 0.44 1');
+ ENDCLASS(FlightBuff)
+ REGISTER_BUFF(FLIGHT, NEW(FlightBuff));
  BUFF_SPAWNFUNCS(flight, BUFF_FLIGHT)
 -BUFF_SPAWNFUNC_Q3TA_COMPAT(flight, BUFF_FLIGHT)
 +BUFF_SPAWNFUNC_Q3COMPAT(item_flight, BUFF_FLIGHT)
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge