]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix some of the defrag compat code, start with the shotgun only in CTS
authorFruitieX <fruitiex@gmail.com>
Wed, 8 Dec 2010 14:27:26 +0000 (16:27 +0200)
committerFruitieX <fruitiex@gmail.com>
Wed, 8 Dec 2010 14:27:26 +0000 (16:27 +0200)
qcsrc/server/miscfunctions.qc
qcsrc/server/race.qc
qcsrc/server/t_quake3.qc

index 8e052e8377a0688a3b143abaf181375b6090274b..2fee39193f89bbfe983032165510a379994fe5eb 100644 (file)
@@ -881,7 +881,7 @@ float want_weapon(string cvarprefix, entity weaponinfo, float allguns)
                else if(t < -1)
                        t = 0;
                else if (g_race || g_cts)
-                       t = (i == WEP_LASER);
+                       t = (i == WEP_SHOTGUN);
                else if (g_nexball)
                        t = 0; // weapon is set a few lines later
                else
index dd48d7b3b276bf2c1b8bf205ae2e5a25f05286f7..80072a7361e87f003f3c75fa167a539ec1d7d30e 100644 (file)
@@ -742,7 +742,9 @@ void trigger_race_checkpoint_verify()
                for(trigger = world; (trigger = find(trigger, classname, "trigger_multiple")); )
                        for(targ = world; (targ = find(targ, targetname, trigger.target)); )
                                if (targ.classname == "target_checkpoint" || targ.classname == "target_startTimer" || targ.classname == "target_stopTimer") {
-                                       targ.wait = -2;
+                                       trigger.wait = 0;
+                                       trigger.delay = 0;
+                                       targ.wait = 0;
                                        targ.delay = 0;
 
                     // These just make the game crash on some maps with oddly shaped triggers. 
@@ -750,12 +752,15 @@ void trigger_race_checkpoint_verify()
                     // and often one of them just passed through without being registered. Hope it's fixed  in a better way now.
                     // (happened on item triggers too)
                     //
+                                       //targ.wait = -2;
+                                       //targ.delay = 0;
+
                                        //setsize(targ, trigger.mins, trigger.maxs);
                                        //setorigin(targ, trigger.origin);
                                        //remove(trigger);
                                }
        }
-       remove(self);
+       //remove(self);
        self = oldself;
 }
 
index 241b8f76df6cbb85cc53e18a2d2cb3e255005625..c63b4de2fd2c949518c7ee93354bf5870234e312 100644 (file)
@@ -47,11 +47,13 @@ void target_init_verify()
                for(targ = world; (targ = find(targ, targetname, trigger.target)); )
                        if (targ.classname == "target_init" || targ.classname == "target_give" || targ.classname == "target_items")
                        {
-                               targ.wait = -2;
+                               trigger.wait = 0;
+                               trigger.delay = 0;
+                               targ.wait = 0;
                                targ.delay = 0;
 
-                               setsize(targ, trigger.mins, trigger.maxs);
-                               setorigin(targ, trigger.origin);
+                               //setsize(targ, trigger.mins, trigger.maxs);
+                               //setorigin(targ, trigger.origin);
                                //remove(trigger);
                        }
 }
@@ -59,7 +61,7 @@ void target_init_verify()
 void spawnfunc_target_init()
 {
        self.spawnflags = 0; // remove all weapons except the ones listed below
-       self.netname = "laser uzi"; // keep these weapons through the remove trigger
+       self.netname = "shotgun"; // keep these weapons through the remove trigger
        spawnfunc_target_items();
        InitializeEntity(self, target_init_verify, INITPRIO_FINDTARGET);
 }