diff --git a/quakec/fallout2/defs.qc b/quakec/fallout2/defs.qc index 424d581fb..aff51f80b 100644 --- a/quakec/fallout2/defs.qc +++ b/quakec/fallout2/defs.qc @@ -665,6 +665,7 @@ float red_armor; .float vote7; .float vote8; .float vote9; +.float spamdelay; .string armornoise; .string ammotype1; diff --git a/quakec/fallout2/items.qc b/quakec/fallout2/items.qc index bc185c494..f709b3234 100644 --- a/quakec/fallout2/items.qc +++ b/quakec/fallout2/items.qc @@ -316,8 +316,12 @@ void () health_touch = return; if (!TryGiveStackable(other, IID_CHEM_STIMPACK, 1)) + { + if (self.spamdelay < time) + sprint(other, 2, "full inventory.\n"); + self.spamdelay = time + 1; return; - + } sprint (other, PRINT_HIGH, "picked up a stimpack.\n"); if (random()*4 <= 2) diff --git a/quakec/fallout2/world.qc b/quakec/fallout2/world.qc index 9f37459a3..5e71ede98 100644 --- a/quakec/fallout2/world.qc +++ b/quakec/fallout2/world.qc @@ -6,6 +6,35 @@ void() hostage_pain; void() hostage_think; void() hostage_die; void(entity stuff) spawn_zombie; +void() GameControl; +void() VoteBoy; + +void () create_referees = +{ + newmis = spawn (); + newmis.owner = self; + newmis.movetype = MOVETYPE_NONE; + setsize (newmis, VEC_ORIGIN, VEC_ORIGIN); + newmis.solid = SOLID_BBOX; + newmis.velocity = VEC_ORIGIN; + newmis.touch = SUB_Null; + setorigin (newmis, '0 0 -300'); + newmis.nextthink = (time + WEAPON_SHOTGUN); + newmis.think = GameControl; + newmis.classname = "referee"; + newmis = spawn (); + newmis.owner = self; + newmis.movetype = MOVETYPE_NONE; + setsize (newmis, VEC_ORIGIN, VEC_ORIGIN); + newmis.solid = SOLID_BBOX; + newmis.velocity = VEC_ORIGIN; + newmis.touch = SUB_Null; + setorigin (newmis, '0 0 -300'); + newmis.nextthink = (time + MULTICAST_PVS_R); + newmis.think = VoteBoy; + newmis.classname = "voteboy"; + newmis.vote_time = (time + MULTICAST_PVS_R); +}; void() main = { @@ -1322,7 +1351,7 @@ void() worldspawn = lastspawn = world; InitBodyQue (); coop = 1; - + create_referees(); SetupStats(); // custom map attributes