]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
do the +use -> use transition PROPERLY
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index 0dca3ab282030c4bc98969ddcbda261b16b2a90b..19465d09dd1a156e397abb29ca4fac14d7633ae8 100644 (file)
@@ -616,6 +616,8 @@ void GetCvars(float f)
        GetCvars_handleFloatOnce(s, f, cvar_cl_gunalign, "cl_gunalign");
        GetCvars_handleFloat(s, f, cvar_cl_allow_uid2name, "cl_allow_uid2name");
        GetCvars_handleFloat(s, f, cvar_cl_allow_uidtracking, "cl_allow_uidtracking");
+       GetCvars_handleFloat(s, f, cvar_cl_movement_track_canjump, "cl_movement_track_canjump");
+       GetCvars_handleFloat(s, f, cvar_cl_newusekeysupported, "cl_newusekeysupported");
 
        // fixup of switchweapon (needed for LMS or when spectating is disabled, as PutClientInServer comes too early)
        if (f > 0)
@@ -1179,7 +1181,6 @@ void readlevelcvars(void)
        g_bloodloss = cvar("g_bloodloss");
        sv_maxidle = cvar("sv_maxidle");
        sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");
-       sv_pogostick = cvar("sv_pogostick");
        g_ctf_reverse = cvar("g_ctf_reverse");
        sv_autotaunt = cvar("sv_autotaunt");
        sv_taunt = cvar("sv_taunt");
@@ -1256,9 +1257,6 @@ void readlevelcvars(void)
     if(!g_weapon_stay)
         g_weapon_stay = cvar("g_weapon_stay");
 
-       if (!g_weapon_stay && (cvar("deathmatch") == 2))
-               g_weapon_stay = 1;
-
        g_ghost_items = cvar("g_ghost_items");
 
        if(g_ghost_items >= 1)
@@ -1673,8 +1671,7 @@ void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration,
                msg_entity = e;
                WRITESPECTATABLE_MSG_ONE({
                        WriteByte(MSG_ONE, SVC_TEMPENTITY);
-                       WriteByte(MSG_ONE, TE_CSQC_NOTIFY);
-                       WriteByte(MSG_ONE, CSQC_CENTERPRINT_GENERIC);
+                       WriteByte(MSG_ONE, TE_CSQC_CENTERPRINT_GENERIC);
                        WriteByte(MSG_ONE, id);
                        WriteString(MSG_ONE, s);
                        if (id != 0 && s != "")
@@ -2476,6 +2473,7 @@ float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, f
 {
     float m, i;
     vector start, org, delta, end, enddown, mstart;
+    entity sp;
 
     m = e.dphitcontentsmask;
     e.dphitcontentsmask = goodcontents | badcontents;
@@ -2528,6 +2526,19 @@ float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, f
         if (trace_fraction >= 1)
             continue;
 
+       // rule 4: we must "see" some spawnpoint
+       for(sp = world; (sp = find(sp, classname, "info_player_deathmatch")); )
+               if(checkpvs(mstart, sp))
+                       break;
+       if(!sp)
+       {
+               for(sp = world; (sp = findflags(sp, flags, FL_ITEM)); )
+                       if(checkpvs(mstart, sp))
+                               break;
+               if(!sp)
+                       continue;
+       }
+
         // find a random vector to "look at"
         end_x = org_x + random() * delta_x;
         end_y = org_y + random() * delta_y;