]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/wepent_experimental
authorMario <mario@smbclan.net>
Fri, 16 Dec 2016 03:43:58 +0000 (13:43 +1000)
committerMario <mario@smbclan.net>
Fri, 16 Dec 2016 03:43:58 +0000 (13:43 +1000)
18 files changed:
qcsrc/client/hud/panel/infomessages.qc
qcsrc/client/mutators/events.qh
qcsrc/common/items/all.qc
qcsrc/common/items/item/armor.qh
qcsrc/common/items/item/health.qh
qcsrc/common/items/item/powerup.qh
qcsrc/common/mutators/mutator/instagib/items.qh
qcsrc/common/mutators/mutator/waypoints/all.inc
qcsrc/common/sounds/all.inc
qcsrc/server/command/vote.qc
qcsrc/server/mutators/events.qh
qcsrc/server/mutators/mutator/gamemode_assault.qc
qcsrc/server/mutators/mutator/gamemode_ctf.qc
qcsrc/server/mutators/mutator/gamemode_ctf.qh
qcsrc/server/race.qc
qcsrc/server/t_quake.qc
qcsrc/server/t_quake3.qc
qcsrc/server/weapons/selection.qc

index db102e60e8b6fb7fb17d6223a8268fbb20025fc5..2d6c952fc0f3764cfced6e99448be1a14628dd47 100644 (file)
@@ -114,6 +114,8 @@ void HUD_InfoMessages()
                                InfoMessage(s);
                        }
 
+                       MUTATOR_CALLHOOK(DrawInfoMessages, pos, mySize);
+
                        if(!warmup_stage && gametype == MAPINFO_TYPE_LMS)
                        {
                                entity sk;
index 74090e14d6992749c8b747c04894a20279c8d7bf..edd178199d5c17b0d3eafb191748afc890cb600f 100644 (file)
@@ -157,3 +157,10 @@ MUTATOR_HOOKABLE(DrawCrosshair, EV_NO_ARGS);
 
 /** Return true to not draw scoreboard */
 MUTATOR_HOOKABLE(DrawScoreboard, EV_NO_ARGS);
+
+/** Called when drawing info messages, allows adding new info messages */
+#define EV_DrawInfoMessages(i, o) \
+       /** pos */                          i(vector, MUTATOR_ARGV_0_vector) \
+       /** mySize */                   i(vector, MUTATOR_ARGV_1_vector) \
+       /**/
+MUTATOR_HOOKABLE(DrawInfoMessages, EV_DrawInfoMessages);
index 7782cda0d6d1518c47de858484a6123974dcde45..0a26a75b5a7fd33aeee0f0b35a3dfd4b8ec92b8b 100644 (file)
@@ -14,3 +14,14 @@ string Item_Model(string item_mdl)
 #endif
     return output;
 }
+
+string Item_Sound(string it_snd)
+{
+       string output = strcat("misc/", it_snd);
+#ifdef SVQC
+               MUTATOR_CALLHOOK(ItemSound, it_snd, output);
+               return M_ARGV(1, string);
+#else
+               return output;
+#endif
+}
index 93e76bf88481c186d9a99952bd7aa15577e427a4..b222ca62894465b23364409bb9d369fe478d53c3 100644 (file)
@@ -15,7 +15,7 @@ ENDCLASS(Armor)
 
 #ifdef GAMEQC
 MODEL(ArmorSmall_ITEM, Item_Model("item_armor_small.md3"));
-SOUND(ArmorSmall, "misc/armor1");
+SOUND(ArmorSmall, Item_Sound("armor1"));
 #endif
 
 REGISTER_ITEM(ArmorSmall, Armor) {
@@ -35,7 +35,7 @@ REGISTER_ITEM(ArmorSmall, Armor) {
 
 #ifdef GAMEQC
 MODEL(ArmorMedium_ITEM, Item_Model("item_armor_medium.md3"));
-SOUND(ArmorMedium, "misc/armor10");
+SOUND(ArmorMedium, Item_Sound("armor10"));
 #endif
 
 REGISTER_ITEM(ArmorMedium, Armor) {
@@ -55,7 +55,7 @@ REGISTER_ITEM(ArmorMedium, Armor) {
 
 #ifdef GAMEQC
 MODEL(ArmorBig_ITEM, Item_Model("item_armor_big.md3"));
-SOUND(ArmorBig, "misc/armor17_5");
+SOUND(ArmorBig, Item_Sound("armor17_5"));
 #endif
 
 REGISTER_ITEM(ArmorBig, Armor) {
@@ -77,7 +77,7 @@ REGISTER_ITEM(ArmorBig, Armor) {
 
 #ifdef GAMEQC
 MODEL(ArmorMega_ITEM, Item_Model("item_armor_large.md3"));
-SOUND(ArmorMega, "misc/armor25");
+SOUND(ArmorMega, Item_Sound("armor25"));
 #endif
 
 REGISTER_ITEM(ArmorMega, Armor) {
index bd2f61f15c3ceea03a4cec622be66a61b0adb3f6..f7915987e3b01a55fcc864ce3517e7590372acfa 100644 (file)
@@ -15,7 +15,7 @@ ENDCLASS(Health)
 
 #ifdef GAMEQC
 MODEL(HealthSmall_ITEM, Item_Model("g_h1.md3"));
-SOUND(HealthSmall, "misc/minihealth");
+SOUND(HealthSmall, Item_Sound("minihealth"));
 #endif
 
 REGISTER_ITEM(HealthSmall, Health) {
@@ -35,7 +35,7 @@ REGISTER_ITEM(HealthSmall, Health) {
 
 #ifdef GAMEQC
 MODEL(HealthMedium_ITEM, Item_Model("g_h25.md3"));
-SOUND(HealthMedium, "misc/mediumhealth");
+SOUND(HealthMedium, Item_Sound("mediumhealth"));
 #endif
 
 REGISTER_ITEM(HealthMedium, Health) {
@@ -55,7 +55,7 @@ REGISTER_ITEM(HealthMedium, Health) {
 
 #ifdef GAMEQC
 MODEL(HealthBig_ITEM, Item_Model("g_h50.md3"));
-SOUND(HealthBig, "misc/mediumhealth");
+SOUND(HealthBig, Item_Sound("mediumhealth"));
 #endif
 
 REGISTER_ITEM(HealthBig, Health) {
@@ -77,7 +77,7 @@ REGISTER_ITEM(HealthBig, Health) {
 
 #ifdef GAMEQC
 MODEL(HealthMega_ITEM, Item_Model("g_h100.md3"));
-SOUND(HealthMega, "misc/megahealth");
+SOUND(HealthMega, Item_Sound("megahealth"));
 #endif
 
 REGISTER_ITEM(HealthMega, Health) {
index df9315e2c838e72d7153fbcc9e81450c16d8bd91..80b1e6affc0a12747c9d2fd0b14c4ef25659da32 100644 (file)
@@ -19,7 +19,7 @@ ENDCLASS(Powerup)
 
 #ifdef GAMEQC
 MODEL(Strength_ITEM, Item_Model("g_strength.md3"));
-SOUND(Strength, "misc/powerup");
+SOUND(Strength, Item_Sound("powerup"));
 #endif
 
 REGISTER_ITEM(Strength, Powerup) {
@@ -39,7 +39,7 @@ REGISTER_ITEM(Strength, Powerup) {
 
 #ifdef GAMEQC
 MODEL(Shield_ITEM, Item_Model("g_invincible.md3"));
-SOUND(Shield, "misc/powerup_shield");
+SOUND(Shield, Item_Sound("powerup_shield"));
 #endif
 
 REGISTER_ITEM(Shield, Powerup) {
index 7736fa7b30a1dea2d07f6305a5f55db19ef90b88..1efa4cbdc1d221d0a19adc9c33cb6f048706bb7e 100644 (file)
@@ -11,7 +11,7 @@ GETTER(float, instagib_respawntimejitter_ammo)
 
 #ifdef GAMEQC
 MODEL(VaporizerCells_ITEM, Item_Model("a_cells.md3"));
-SOUND(VaporizerCells, "misc/itempickup");
+SOUND(VaporizerCells, Item_Sound("itempickup"));
 #endif
 
 REGISTER_ITEM(VaporizerCells, Ammo) {
@@ -31,7 +31,7 @@ REGISTER_ITEM(VaporizerCells, Ammo) {
 
 #ifdef GAMEQC
 MODEL(ExtraLife_ITEM, Item_Model("g_h100.md3"));
-SOUND(ExtraLife, "misc/megahealth");
+SOUND(ExtraLife, Item_Sound("megahealth"));
 #endif
 
 REGISTER_ITEM(ExtraLife, Powerup) {
@@ -49,7 +49,7 @@ REGISTER_ITEM(ExtraLife, Powerup) {
 
 #ifdef GAMEQC
 MODEL(Invisibility_ITEM, Item_Model("g_strength.md3"));
-SOUND(Invisibility, "misc/powerup");
+SOUND(Invisibility, Item_Sound("powerup"));
 #endif
 
 REGISTER_ITEM(Invisibility, Powerup) {
@@ -67,7 +67,7 @@ REGISTER_ITEM(Invisibility, Powerup) {
 
 #ifdef GAMEQC
 MODEL(Speed_ITEM, Item_Model("g_invincible.md3"));
-SOUND(Speed, "misc/powerup_shield");
+SOUND(Speed, Item_Sound("powerup_shield"));
 #endif
 
 REGISTER_ITEM(Speed, Powerup) {
index 0fb3d6139c64ff3f60750188f0a501a2c821f548..73f22b836ce6485c9a5e9164e96bf5238a14e95e 100644 (file)
@@ -14,7 +14,6 @@ REGISTER_WAYPOINT(RaceFinish, _("Finish"), '1 0.5 0', 1);
 REGISTER_WAYPOINT(RaceStart, _("Start"), '1 0.5 0', 1);
 REGISTER_WAYPOINT(RaceStartFinish, _("Start"), '1 0.5 0', 1);
 
-REGISTER_WAYPOINT(Assault, _("<placeholder>"), '1 0.5 0', 1);
 REGISTER_WAYPOINT(AssaultDefend, _("Defend"), '1 0.5 0', 1);
 REGISTER_WAYPOINT(AssaultDestroy, _("Destroy"), '1 0.5 0', 1);
 REGISTER_WAYPOINT(AssaultPush, _("Push"), '1 0.5 0', 1);
index 69a95be0cce22074d75686a5aaf52c90c017ad80..4394e174067ab93c12236e3f7b00fa574ffb65c6 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "../teams.qh"
 string W_Sound(string w_snd);
+string Item_Sound(string it_snd);
 
 SOUND(ARC_FIRE, W_Sound("arc_fire"));
 SOUND(ARC_LOOP, W_Sound("arc_loop"));
@@ -236,20 +237,20 @@ SOUND(NADE_BEEP, "overkill/grenadebip");
 
 SOUND(BUFF_LOST, "relics/relic_effect");
 
-SOUND(POWEROFF, "misc/poweroff");
-SOUND(POWERUP, "misc/powerup");
-SOUND(SHIELD_RESPAWN, "misc/shield_respawn");
-SOUND(STRENGTH_RESPAWN, "misc/strength_respawn");
+SOUND(POWEROFF, Item_Sound("poweroff"));
+SOUND(POWERUP, Item_Sound("powerup"));
+SOUND(SHIELD_RESPAWN, Item_Sound("shield_respawn"));
+SOUND(STRENGTH_RESPAWN, Item_Sound("strength_respawn"));
 
-SOUND(ARMOR25, "misc/armor25");
+SOUND(ARMOR25, Item_Sound("armor25"));
 SOUND(ARMORIMPACT, "misc/armorimpact");
 SOUND(BODYIMPACT1, "misc/bodyimpact1");
 SOUND(BODYIMPACT2, "misc/bodyimpact2");
 
-SOUND(ITEMPICKUP, "misc/itempickup");
-SOUND(ITEMRESPAWNCOUNTDOWN, "misc/itemrespawncountdown");
-SOUND(ITEMRESPAWN, "misc/itemrespawn");
-SOUND(MEGAHEALTH, "misc/megahealth");
+SOUND(ITEMPICKUP, Item_Sound("itempickup"));
+SOUND(ITEMRESPAWNCOUNTDOWN, Item_Sound("itemrespawncountdown"));
+SOUND(ITEMRESPAWN, Item_Sound("itemrespawn"));
+SOUND(MEGAHEALTH, Item_Sound("megahealth"));
 
 SOUND(LAVA, "player/lava");
 SOUND(SLIME, "player/slime");
index 44b8acb8e7a8ff5fb9ea7e18688e269b3bd66be9..b91a8f4df3e208633e21e0d7ee40ef12fcddffc1 100644 (file)
@@ -464,8 +464,7 @@ void ReadyRestart_force()
 
 void ReadyRestart()
 {
-       // no assault support yet...
-       if (g_assault || gameover || race_completing) localcmd("restart\n");
+       if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || gameover || race_completing) localcmd("restart\n");
        else localcmd("\nsv_hook_gamerestart\n");
 
        // Reset ALL scores, but only do that at the beginning of the countdown if sv_ready_restart_after_countdown is off!
index 3b33b0269db3dc463337dd137fe2b90ea9b7dfca..fb0f977a7254ca145a11dbec70b67f0c815f9301 100644 (file)
@@ -96,6 +96,14 @@ MUTATOR_HOOKABLE(WeaponSound, EV_WeaponSound);
     /**/
 MUTATOR_HOOKABLE(ItemModel, EV_ItemModel);
 
+/** called when an item sound is about to be played, allows custom paths etc. */
+#define EV_ItemSound(i, o) \
+    /** sound       */ i(string, MUTATOR_ARGV_0_string) \
+    /** output      */ i(string, MUTATOR_ARGV_1_string) \
+    /**/               o(string, MUTATOR_ARGV_1_string) \
+    /**/
+MUTATOR_HOOKABLE(ItemSound, EV_ItemSound);
+
 /** called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill */
 #define EV_GiveFragsForKill(i, o) \
     /** attacker   */ i(entity, MUTATOR_ARGV_0_entity) \
@@ -909,3 +917,6 @@ MUTATOR_HOOKABLE(ChatMessage, EV_ChatMessage);
     /** sender */ i(entity, MUTATOR_ARGV_1_entity) \
     /**/
 MUTATOR_HOOKABLE(ChatMessageTo, EV_ChatMessageTo);
+
+/** return true to just restart the match, for modes that don't support readyrestart */
+MUTATOR_HOOKABLE(ReadyRestart_Deny, EV_NO_ARGS);
index d92e77158c3f8b18e011f9347c97df0e3c9edac7..39987414348d0d3a37556741a320eb755e3a1cb3 100644 (file)
@@ -106,7 +106,7 @@ void target_objective_decrease_activate(entity this)
                                it.sprite = NULL; // TODO: just unsetting it?!
                }
 
-               spr = WaypointSprite_SpawnFixed(WP_Assault, 0.5 * (it.absmin + it.absmax), it, assault_sprite, RADARICON_OBJECTIVE);
+               spr = WaypointSprite_SpawnFixed(WP_AssaultDefend, 0.5 * (it.absmin + it.absmax), it, assault_sprite, RADARICON_OBJECTIVE);
                spr.assault_decreaser = this;
                spr.waypointsprite_visible_for_player = assault_decreaser_sprite_visible;
                spr.classname = "sprite_waypoint";
@@ -608,6 +608,12 @@ MUTATOR_HOOKFUNCTION(as, OnEntityPreSpawn)
        }
 }
 
+MUTATOR_HOOKFUNCTION(as, ReadyRestart_Deny)
+{
+       // readyrestart not supported (yet)
+       return true;
+}
+
 // scoreboard setup
 void assault_ScoreRules()
 {
index 8120e1cb348a77e35e545eaa2c78733f41a2ea02..4db911362ecfe0b6b31cbb73dee668b339c492d5 100644 (file)
@@ -155,6 +155,16 @@ void ctf_CaptureRecord(entity flag, entity player)
        }
 }
 
+bool ctf_Immediate_Return_Allowed(entity flag, entity toucher)
+{
+       int num_perteam = 0;
+       FOREACH_CLIENT(IS_PLAYER(it) && SAME_TEAM(toucher, it), { ++num_perteam; });
+
+       // automatically return if there's only 1 player on the team
+       return ((autocvar_g_ctf_flag_return || num_perteam <= 1 || (autocvar_g_ctf_flag_return_carrying && toucher.flagcarried))
+               && flag.team);
+}
+
 bool ctf_Return_Customize(entity this, entity client)
 {
        // only to the carrier
@@ -871,9 +881,7 @@ void ctf_FlagDamage(entity this, entity inflictor, entity attacker, float damage
        if(ITEM_DAMAGE_NEEDKILL(deathtype))
        {
                if(autocvar_g_ctf_flag_return_damage_delay)
-               {
-                       this.ctf_flagdamaged = true;
-               }
+                       this.ctf_flagdamaged_byworld = true;
                else
                {
                        this.health = 0;
@@ -906,17 +914,7 @@ void ctf_FlagThink(entity this)
                LOG_TRACE("wtf the flag got squashed?");
                tracebox(this.origin, CTF_FLAG.m_mins, CTF_FLAG.m_maxs, this.origin, MOVE_NOMONSTERS, this);
                if(!trace_startsolid || this.noalign) // can we resize it without getting stuck?
-                       setsize(this, CTF_FLAG.m_mins, CTF_FLAG.m_maxs); }
-
-       switch(this.ctf_status) // reset flag angles in case warpzones adjust it
-       {
-               case FLAG_DROPPED:
-               {
-                       this.angles = '0 0 0';
-                       break;
-               }
-
-               default: break;
+                       setsize(this, CTF_FLAG.m_mins, CTF_FLAG.m_maxs);
        }
 
        // main think method
@@ -937,6 +935,8 @@ void ctf_FlagThink(entity this)
 
                case FLAG_DROPPED:
                {
+                       this.angles = '0 0 0'; // reset flag angles in case warpzones adjust it
+
                        if(autocvar_g_ctf_flag_dropped_floatinwater)
                        {
                                vector midpoint = ((this.absmin + this.absmax) * 0.5);
@@ -960,7 +960,7 @@ void ctf_FlagThink(entity this)
                                        return;
                                }
                        }
-                       if(this.ctf_flagdamaged)
+                       if(this.ctf_flagdamaged_byworld)
                        {
                                this.health -= ((this.max_flag_health / autocvar_g_ctf_flag_return_damage_delay) * FLAG_THINKRATE);
                                ctf_CheckFlagReturn(this, RETURN_NEEDKILL);
@@ -1051,12 +1051,9 @@ METHOD(Flag, giveTo, bool(Flag this, entity flag, entity toucher))
                        flag.health = 0;
                        ctf_CheckFlagReturn(flag, RETURN_NEEDKILL);
                }
-               if(!flag.ctf_flagdamaged) { return; }
+               if(!flag.ctf_flagdamaged_byworld) { return; }
        }
 
-       int num_perteam = 0;
-       FOREACH_CLIENT(IS_PLAYER(it) && SAME_TEAM(toucher, it), LAMBDA(++num_perteam));
-
        // special touch behaviors
        if(STAT(FROZEN, toucher)) { return; }
        else if(IS_VEHICLE(toucher))
@@ -1108,7 +1105,7 @@ METHOD(Flag, giveTo, bool(Flag this, entity flag, entity toucher))
 
                case FLAG_DROPPED:
                {
-                       if(CTF_SAMETEAM(toucher, flag) && (autocvar_g_ctf_flag_return || num_perteam <= 1 || (autocvar_g_ctf_flag_return_carrying && toucher.flagcarried)) && flag.team) // automatically return if there's only 1 player on the team
+                       if(CTF_SAMETEAM(toucher, flag) && ctf_Immediate_Return_Allowed(flag, toucher))
                                ctf_Handle_Return(flag, toucher); // toucher just returned his own flag
                        else if(is_not_monster && (!toucher.flagcarried) && ((toucher != flag.ctf_dropper) || (time > flag.ctf_droptime + autocvar_g_ctf_flag_collect_delay)))
                                ctf_Handle_Pickup(flag, toucher, PICKUP_DROPPED); // toucher just picked up a dropped enemy flag
@@ -1126,7 +1123,12 @@ METHOD(Flag, giveTo, bool(Flag this, entity flag, entity toucher))
                        if((IS_PLAYER(toucher)) && !IS_DEAD(toucher) && (toucher != flag.pass_sender))
                        {
                                if(DIFF_TEAM(toucher, flag.pass_sender))
-                                       ctf_Handle_Return(flag, toucher);
+                               {
+                                       if(ctf_Immediate_Return_Allowed(flag, toucher))
+                                               ctf_Handle_Return(flag, toucher);
+                                       else if(is_not_monster && (!toucher.flagcarried))
+                                               ctf_Handle_Pickup(flag, toucher, PICKUP_DROPPED);
+                               }
                                else
                                        ctf_Handle_Retrieve(flag, toucher);
                        }
@@ -1183,7 +1185,7 @@ void ctf_RespawnFlag(entity flag)
        flag.ctf_dropper = NULL;
        flag.ctf_pickuptime = 0;
        flag.ctf_droptime = 0;
-       flag.ctf_flagdamaged = 0;
+       flag.ctf_flagdamaged_byworld = false;
 
        ctf_CheckStalemate();
 }
index 65f2937fd978351104f35027d5d81cfd7eb38824..593b0bec34d0930c54b47f9a31cf350e5427495e 100644 (file)
@@ -107,7 +107,7 @@ float ctf_captimerecord; // record time for capturing the flag
 .entity ctf_dropper; // don't allow spam of dropping the flag
 .int max_flag_health;
 .float next_take_time;
-.bool ctf_flagdamaged;
+.bool ctf_flagdamaged_byworld;
 int ctf_teams;
 
 // passing/throwing properties
index 545fb2a85949a1317e8d8cac910101f79dd7f32c..87776d4794bca8099a766b92d709e3c51a7a5923 100644 (file)
@@ -953,20 +953,29 @@ spawnfunc(trigger_race_checkpoint)
 
 spawnfunc(target_checkpoint) // defrag entity
 {
-       vector o;
        if(!g_race && !g_cts) { delete(this); return; }
        defrag_ents = 1;
 
-       EXACTTRIGGER_INIT;
+       // if this is targeted, then it probably isn't a trigger
+       bool is_trigger = !boolean(!this.nottargeted && this.targetname != "");
+
+       if(is_trigger)
+               EXACTTRIGGER_INIT;
 
        this.use = checkpoint_use;
-       if (!(this.spawnflags & 1))
+       if (is_trigger && !(this.spawnflags & 1))
                settouch(this, checkpoint_touch);
 
-       o = (this.absmin + this.absmax) * 0.5;
-       tracebox(o, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), o - '0 0 1' * (o.z - this.absmin.z), MOVE_NORMAL, this);
-       waypoint_spawnforitem_force(this, trace_endpos);
-       this.nearestwaypointtimeout = time + 1000000000;
+       vector org = this.origin;
+
+       // bots should only pathfind to this if it is a valid touchable trigger
+       if(is_trigger)
+       {
+               org = (this.absmin + this.absmax) * 0.5;
+               tracebox(org, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), org - '0 0 1' * (org.z - this.absmin.z), MOVE_NORMAL, this);
+               waypoint_spawnforitem_force(this, trace_endpos);
+               this.nearestwaypointtimeout = time + 1000000000;
+       }
 
        if(this.message == "")
                this.message = "went backwards";
@@ -983,9 +992,9 @@ spawnfunc(target_checkpoint) // defrag entity
        race_timed_checkpoint = 1;
 
        if(this.race_checkpoint == 0)
-               WaypointSprite_SpawnFixed(WP_RaceStart, o, this, sprite, RADARICON_NONE);
+               WaypointSprite_SpawnFixed(WP_RaceStart, org, this, sprite, RADARICON_NONE);
        else
-               WaypointSprite_SpawnFixed(WP_RaceCheckpoint, o, this, sprite, RADARICON_NONE);
+               WaypointSprite_SpawnFixed(WP_RaceCheckpoint, org, this, sprite, RADARICON_NONE);
 
        this.sprite.waypointsprite_visible_for_player = race_waypointsprite_visible_for_player;
 
index dac8f193001de334cd0e19e2838176a86f26721c..7a277df98bc93fbda506d4bba4d410d784b34d83 100644 (file)
@@ -6,8 +6,7 @@ spawnfunc(weapon_electro);
 spawnfunc(weapon_hagar);
 spawnfunc(weapon_machinegun);
 spawnfunc(item_bullets);
-spawnfunc(item_armor_large);
-spawnfunc(item_armor_large);
+spawnfunc(item_armor_mega);
 spawnfunc(item_health_mega);
 spawnfunc(item_health_medium);
 
@@ -20,8 +19,8 @@ spawnfunc(weapon_supershotgun) {spawnfunc_weapon_machinegun(this);}
 
 spawnfunc(item_spikes) {spawnfunc_item_bullets(this);}
 //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_armor2) {spawnfunc_item_armor_large(this);}
-spawnfunc(item_armorInv) {spawnfunc_item_armor_large(this);} // TODO: make sure we actually want this
+spawnfunc(item_armor2) {spawnfunc_item_armor_mega(this);}
+spawnfunc(item_armorInv) {spawnfunc_item_armor_mega(this);} // TODO: make sure we actually want this
 spawnfunc(item_health) {if (this.spawnflags & 2) spawnfunc_item_health_mega(this);else spawnfunc_item_health_medium(this);}
 
 //spawnfunc_item_spikes
index 254130f88c443cd4105e65ed20210faa4bbbb849..85ec325bdf6ea5c7196acaa8073d3aaf4cc832d5 100644 (file)
@@ -18,7 +18,7 @@ spawnfunc(item_shells);
 spawnfunc(item_jetpack);
 
 spawnfunc(item_armor_big);
-spawnfunc(item_armor_large);
+spawnfunc(item_armor_mega);
 spawnfunc(item_armor_small);
 
 spawnfunc(item_health_medium);
@@ -59,7 +59,7 @@ spawnfunc(ammo_bfg)            { spawnfunc_item_cells(this);          }
 spawnfunc(ammo_rockets)        { spawnfunc_item_rockets(this);        }
 
 // Armor
-spawnfunc(item_armor_body)     { spawnfunc_item_armor_large(this);    }
+spawnfunc(item_armor_body)     { spawnfunc_item_armor_mega(this);    }
 spawnfunc(item_armor_combat)   { spawnfunc_item_armor_big(this);      }
 spawnfunc(item_armor_shard)    { spawnfunc_item_armor_small(this);    }
 spawnfunc(item_enviro)         { spawnfunc_item_invincible(this);     }
index 7abe976ae2bc0d6c19f4732e2f05859e8cac96eb..06d5f30851711c5a952ce3935513d870da97d12a 100644 (file)
@@ -23,7 +23,7 @@ void Send_WeaponComplain(entity e, float wpn, float type)
 void Weapon_whereis(Weapon this, entity cl)
 {
        if (!autocvar_g_showweaponspawns) return;
-       IL_EACH(g_items, it.weapon == this.m_id && (it.ItemStatus & ITS_AVAILABLE),
+       IL_EACH(g_items, it.weapon == this.m_id && (!it.team || (it.ItemStatus & ITS_AVAILABLE)),
        {
                if (it.classname == "droppedweapon" && autocvar_g_showweaponspawns < 2)
                        continue;