]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'Mario/intrusive_2' into 'master'
authorMario <zacjardine@y7mail.com>
Sun, 23 Oct 2016 21:58:36 +0000 (21:58 +0000)
committerMario <zacjardine@y7mail.com>
Sun, 23 Oct 2016 21:58:36 +0000 (21:58 +0000)
Merge branch Mario/intrusive_2 (M merge request)

Ports a few more things to intrusive lists, greatly improving performance on maps with warpzones.

See merge request !363

qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/menu/xonotic/dialog_settings_game_model.qc
qcsrc/server/mutators/events.qh
qcsrc/server/mutators/mutator/gamemode_assault.qc

index 6cd2c2b44e0c955d5a842c3d933621320bb7b66f..b165bb3e481551b5cf5261390832e2a50b55b764 100644 (file)
@@ -900,7 +900,7 @@ bool vehicle_impulse(entity this, int imp)
 
 void vehicles_enter(entity pl, entity veh)
 {
-       // Remove this when bots know how to use vehicles
+   // Remove this when bots know how to use vehicles
        if((IS_BOT_CLIENT(pl) && !autocvar_g_vehicles_allow_bots))
                return;
 
@@ -1225,7 +1225,7 @@ bool vehicle_initialize(entity this, Vehicle info, bool nodrop)
        else
                this.nextthink = time + game_starttime;
 
-       if(!MUTATOR_CALLHOOK(VehicleInit, this))
+       if(MUTATOR_CALLHOOK(VehicleInit, this))
                return false;
 
        return true;
index f0f95d74b95963fb540c5e330a538dc891f58199..b57d7cae8a8f536a643b67d25c1c7275a61801b6 100644 (file)
@@ -50,7 +50,12 @@ void XonoticGameModelSettingsTab_fill(entity me)
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayermodels", _("Force player models to mine")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayercolors", _("Force player colors to mine")));
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Force player colors to mine")));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_forceplayercolors"));
+                       e.addValue(e, _("Never"), "0");
+                       e.addValue(e, _("In non teamplay modes only"), "1");
+                       e.addValue(e, _("Always"), "2");
+                       e.configureXonoticTextSliderValues(e);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Body fading:")));
                me.TD(me, 1, 2, e = makeXonoticSlider(0, 2, 0.2, "cl_deathglow"));
index 88d731e815d155d46e407d1f0a31f9c48179ab1f..9d7d8af916e5d621230698b9accc6b2d1d840bae 100644 (file)
@@ -540,7 +540,7 @@ MUTATOR_HOOKABLE(HelpMePing, EV_HelpMePing);
 
 /**
  * called when a vehicle initializes
- * return false to remove the vehicle
+ * return true to remove the vehicle
  */
 #define EV_VehicleInit(i, o) \
     /** vehicle */ i(entity, MUTATOR_ARGV_0_entity) \
index b032ab01949db9c6453da64da4d96058e9a926ce..1a1d7959fd2799b4e3908d3e13736b314106aced 100644 (file)
@@ -179,8 +179,6 @@ void assault_wall_think(entity this)
 
 // trigger new round
 // reset objectives, toggle spawnpoints, reset triggers, ...
-void vehicles_clearreturn(entity veh);
-void vehicles_spawn(entity this);
 void assault_new_round(entity this)
 {
        //bprint("ASSAULT: new round\n");
@@ -535,9 +533,7 @@ MUTATOR_HOOKFUNCTION(as, VehicleInit)
 {
        entity veh = M_ARGV(0, entity);
 
-       if(veh.active != ACTIVE_NOT)
-               veh.nextthink = time + 0.5;
-       return true;
+       veh.nextthink = time + 0.5;
 }
 
 MUTATOR_HOOKFUNCTION(as, HavocBot_ChooseRole)