]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into fruitiex/fruitbalance
authorRudolf Polzer <divverent@alientrap.org>
Sun, 3 Oct 2010 16:17:00 +0000 (18:17 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 3 Oct 2010 16:17:00 +0000 (18:17 +0200)
defaultXonotic.cfg
qcsrc/client/View.qc
qcsrc/server/bot/waypoints.qc
qcsrc/server/cl_client.qc
qcsrc/server/ctf.qc
qcsrc/server/ipban.qc
qcsrc/server/mutators/gamemode_keyhunt.qc

index 5b69cb0a90e271e16f11c6e15758ff7752bd8acb..2e535c3955e0fce1447afe3d4cb7db238ebaf014 100644 (file)
@@ -521,6 +521,7 @@ set g_player_brightness 0   "set to 2 for brighter players"
 seta g_balance_cloaked_alpha 0.25
 
 set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
+set g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
 
 set welcome_message_time 8
 
index 04f300703ca5da0e28b3361849c436bc24333c18..89bc91fbe9178f8b70914cdbbdaeb8e0bfe85459 100644 (file)
@@ -566,7 +566,7 @@ void CSQC_UpdateView(float w, float h)
        // next R_RenderScene call
        drawstring('0 0 0', "", '1 1 0', '1 1 1', 0, 0);
 
-       if(cvar("r_fakelight") >= 2)
+       if(cvar("r_fakelight") >= 2 || cvar("r_fullbright"))
        {
                // apply night vision effect
                vector rgb, tc_00, tc_01, tc_10, tc_11;
index 3cbec876133800b150f002fbc6b6ca7f5fb7dcd6..4f3640e26eac35786e17dea56cdb15bdef6c97c7 100644 (file)
@@ -16,7 +16,7 @@ entity waypoint_spawn(vector m1, vector m2, float f)
        }
 
        w = spawn();
-       w.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
+       w.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
        w.classname = "waypoint";
        w.wpflags = f;
        setorigin(w, (m1 + m2) * 0.5);
index 36606dec70f687a841506e553ffbba6da539816b..c269ce50288ff4c6969aa51f4d795b674aae595a 100644 (file)
@@ -866,10 +866,11 @@ void PutClientInServer (void)
                self.iscreature = TRUE;
                self.movetype = MOVETYPE_WALK;
                self.solid = SOLID_SLIDEBOX;
+               self.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_SOLID;
                if(cvar("g_playerclip_collisions"))
-                       self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
-               else
-                       self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY;
+                       self.dphitcontentsmask |= DPCONTENTS_PLAYERCLIP;
+               if(clienttype(self) == CLIENTTYPE_BOT && cvar("g_botclip_collisions"))
+                       self.dphitcontentsmask |= DPCONTENTS_BOTCLIP;
                self.frags = FRAGS_PLAYER;
                if(independent_players)
                        MAKE_INDEPENDENT_PLAYER(self);
index 6e314c88efd50f223f1c6ef15a8a1ae2a7c721e6..8c0844b2246f26107bfccc482bfaed52909f65ce 100644 (file)
@@ -188,7 +188,7 @@ void place_flag()
        self.nextthink = time + 0.1;
        self.cnt = FLAG_BASE;
        self.mangle = self.angles;
-       self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
+       self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
        //self.effects = self.effects | EF_DIMLIGHT;
        if(self.noalign)
        {
index ebc58cea7e2847982efb41ace84d6089f001ca1c..ad09772a5354548b64bbc12e656622cf1076f83a 100644 (file)
@@ -336,19 +336,27 @@ float Ban_GetClientIP(entity client)
        string s;
 
        s = client.netaddress;
-       
+
        i1 = strstrofs(s, ".", 0);
+       if(i1 < 0)
+               i1 = strstrofs(s, ":", 0);
        if(i1 < 0)
                return FALSE;
        i2 = strstrofs(s, ".", i1 + 1);
+       if(i2 < 0)
+               i2 = strstrofs(s, ":", i1 + 1);
        if(i2 < 0)
                return FALSE;
        i3 = strstrofs(s, ".", i2 + 1);
+       if(i3 < 0)
+               i3 = strstrofs(s, ":", i2 + 1);
        if(i3 < 0)
                return FALSE;
        i4 = strstrofs(s, ".", i3 + 1);
+       if(i4 < 0)
+               i4 = strstrofs(s, ":", i3 + 1);
        if(i4 >= 0)
-               return FALSE;
+               s = substring(s, 0, i4);
        
        ban_ip1 = substring(s, 0, i1);
        ban_ip2 = substring(s, 0, i2);
index cdc4a076f6c5ae5014255b8095852eb6333d5c9f..2b6f54780e51ff98fea12f6c6527e541eba307e5 100644 (file)
@@ -750,7 +750,7 @@ void kh_Key_Spawn(entity initial_owner, float angle, float i)  // runs every tim
        key.modelindex = kh_key_dropped;
        key.model = "key";
        key.kh_dropperteam = 0;
-       key.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
+       key.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
        setsize(key, KH_KEY_MIN, KH_KEY_MAX);
        key.colormod = TeamColor(initial_owner.team) * KH_KEY_BRIGHTNESS;
        key.reset = key_reset;