]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/mirceakitsune/sandbox'
authorRudolf Polzer <divverent@xonotic.org>
Sun, 4 Dec 2011 15:43:10 +0000 (16:43 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 4 Dec 2011 15:43:10 +0000 (16:43 +0100)
Conflicts:
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/base.qh
qcsrc/server/mutators/mutators.qh
qcsrc/server/progs.src

1  2 
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/defs.qh
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/base.qh
qcsrc/server/mutators/mutators.qh
qcsrc/server/progs.src
qcsrc/server/sv_main.qc

Simple merge
Simple merge
Simple merge
index f9a9990a4c4349ca6d018d0283016754b28a9452,87fa4d6274298deefed6d38e18e7d87fa3ef8aca..60644e6f20a4c1e6fda54f09532602865e1b36e5
@@@ -1086,9 -1101,9 +1101,13 @@@ void readlevelcvars(void
                MUTATOR_ADD(mutator_rocketflying);
        if(cvar("g_vampire"))
                MUTATOR_ADD(mutator_vampire);
 +      if(cvar("g_spawn_near_teammate"))
 +              MUTATOR_ADD(mutator_spawn_near_teammate);
 +
++      // is this a mutator? is this a mode?
+       if(cvar("g_sandbox"))
+               MUTATOR_ADD(sandbox);
        if(cvar("sv_allow_fullbright"))
                serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;
  
index e668c1da1ea222bf13f1e300442a81ab078d8b29,621e4db6cb9baa5b1409b7a38da33e8d44cdb7bb..ecec3c87c57a65c107afb09d2b02cf457526d744
@@@ -190,11 -189,5 +190,14 @@@ MUTATOR_HOOKABLE(SV_ParseClientCommand)
                }
        */
  
 +MUTATOR_HOOKABLE(Spawn_Score);
 +      // called when a spawnpoint is being evaluated
 +      // return 1 to make the spawnpoint unusable
 +      // INPUT
 +      entity self; // player wanting to spawn
 +      entity spawn_spot; // spot to be evaluated
 +      // IN+OUT
 +      vector spawn_score; // _x is priority, _y is "distance"
++
+ MUTATOR_HOOKABLE(SV_StartFrame);
+       // runs globally each server frame
index ba7edaeecb2f2dadeb5f13001d3e9c0ff9af12f9,349d945dfa87e6aac7b0ea6818e1864ac227e6ac..b53153f7bfc4048b96fa0124d694670b8662d0ac
@@@ -7,5 -7,5 +7,6 @@@ MUTATOR_DECLARATION(mutator_nix)
  MUTATOR_DECLARATION(mutator_dodging);
  MUTATOR_DECLARATION(mutator_rocketflying);
  MUTATOR_DECLARATION(mutator_vampire);
 +MUTATOR_DECLARATION(mutator_spawn_near_teammate);
+ MUTATOR_DECLARATION(sandbox);
index 30a6d27836205f3eb46615e6ab7ace2ba9d8b50c,c69c54f4685db220ea941b202a40fe3624ded249..6dd08bb1bcab2f0cee10cb2963da90edd8475478
@@@ -195,7 -195,7 +195,8 @@@ mutators/mutator_nix.q
  mutators/mutator_dodging.qc
  mutators/mutator_rocketflying.qc
  mutators/mutator_vampire.qc
 +mutators/mutator_spawn_near_teammate.qc
+ mutators/sandbox.qc
  
  ../warpzonelib/anglestransform.qc
  ../warpzonelib/mathlib.qc
index c4cc090c3b289adcfd77a8fd71ba6733f13c6a93,e0722e7ede78d14773571a2eff866cf1a540677a..7ec4b49d671db22414e9f5b043b9071de1c3a735
@@@ -231,8 -231,19 +231,10 @@@ void StartFrame (void
        RuneMatchGivePoints();
        bot_serverframe();
  
 -      if(autocvar_spawn_debugview)
 -      {
 -              RandomSelection_Init();
 -              for(self = world; (self = find(self, classname, "player")); )
 -                      RandomSelection_Add(self, 0, string_null, 1, 0);
 -              self = RandomSelection_chosen_ent;
 -              SelectSpawnPoint(0);
 -      }
 -
        FOR_EACH_PLAYER(self)
                self.porto_forbidden = max(0, self.porto_forbidden - 1);
+       MUTATOR_CALLHOOK(SV_StartFrame);
  }
  
  .vector originjitter;