]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix typo
authorRudolf Polzer <divverent@xonotic.org>
Wed, 2 May 2012 10:16:56 +0000 (12:16 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Wed, 2 May 2012 10:16:56 +0000 (12:16 +0200)
qcsrc/csqcmodellib/sv_model.qc
qcsrc/server/cl_client.qc
qcsrc/server/command/cmd.qc
qcsrc/server/g_damage.qc
qcsrc/server/runematch.qc

index bf6eefa6971b0b0c3f9687c61e60608e9e13ff3d..e6e4cfe43a091e3f2fd1a5efa615a8e2d6132e66 100644 (file)
@@ -29,6 +29,10 @@ float CSQCModel_Send(entity to, float sf)
        float islocalplayer = (self == to);
        float isnolocalplayer = (isplayer && (self != to));
 
+       unused_float = isplayer;
+       unused_float = islocalplayer;
+       unused_float = isnolocalplayer;
+
        WriteByte(MSG_ENTITY, ENT_CLIENT_MODEL);
        WriteShort(MSG_ENTITY, sf);
 
@@ -59,6 +63,10 @@ void CSQCModel_CheckUpdate()
        float islocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags
        float isnolocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags
 
+       unused_float = isplayer;
+       unused_float = islocalplayer;
+       unused_float = isnolocalplayer;
+
 #ifdef CSQCPLAYER_FORCE_UPDATES
        if(isplayer && time > self.csqcmodel_nextforcedupdate)
        {
index fcc1cca97914ab03ecb4ff69ee10afc57bf377df..d6715e95044371e319137f2943e9cf08a40d586f 100644 (file)
@@ -1564,7 +1564,6 @@ void ClientConnect (void)
                        rr = CTS_RECORD;
                else
                        rr = RACE_RECORD;
-               t = stof(db_get(ServerProgsDB, strcat(GetMapname(), rr, "time")));
 
                msg_entity = self;
                race_send_recordtime(MSG_ONE);
index f5510d73f92bf5156cfe1f9e3ebd9f18c937b97e..b659d44ccab532d2c12502fe4dee0e160bc0662e 100644 (file)
@@ -226,40 +226,6 @@ void ClientCommand_ready(float request) // todo: anti-spam for toggling readynes
        }
 }
 
-void ClientCommand_reportcvar(float request, float argc, string command)
-{      
-       switch(request)
-       {
-               case CMD_REQUEST_COMMAND:
-               {
-                       if(argv(1) != "")
-                       {
-                               float tokens;
-                               string s;
-                               
-                               if(substring(argv(2), 0, 1) == "$") // undefined cvar: use the default value on the server then
-                               {
-                                       s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
-                                       tokens = tokenize_console(s);
-                               }
-                               
-                               GetCvars(1);
-                               
-                               return;
-                       }
-               }
-                       
-               default:
-                       sprint(self, "Incorrect parameters for ^2reportcvar^7\n");
-               case CMD_REQUEST_USAGE:
-               {
-                       sprint(self, "\nUsage:^3 cmd reportcvar <cvar>\n");
-                       sprint(self, "  Where 'cvar' is the cvar plus arguments to send to the server.\n");
-                       return;
-               }
-       }
-}
-
 void ClientCommand_say(float request, float argc, string command)
 {
        switch(request)
@@ -398,7 +364,7 @@ void ClientCommand_sentcvar(float request, float argc, string command)
                                if(argc == 2) // undefined cvar: use the default value on the server then
                                {
                                        s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
-                                       tokens = tokenize_console(s);
+                                       tokenize_console(s);
                                }
                                
                                GetCvars(1);
@@ -595,7 +561,6 @@ void ClientCommand_(float request)
        CLIENT_COMMAND("mv_getpicture", ClientCommand_mv_getpicture(request, arguments), "Retrieve mapshot picture from the server") \
        CLIENT_COMMAND("join", ClientCommand_join(request), "Become a player in the game") \
        CLIENT_COMMAND("ready", ClientCommand_ready(request), "Qualify as ready to end warmup stage (or restart server if allowed)") \
-       CLIENT_COMMAND("reportcvar", ClientCommand_reportcvar(request, arguments, command), "Old system for sending a client cvar to the server") \
        CLIENT_COMMAND("say", ClientCommand_say(request, arguments, command), "Print a message to chat to all players") \
        CLIENT_COMMAND("say_team", ClientCommand_say_team(request, arguments, command), "Print a message to chat to all team mates") \
        CLIENT_COMMAND("selectteam", ClientCommand_selectteam(request, arguments), "Attempt to choose a team to join into") \
@@ -683,7 +648,6 @@ void SV_ParseClientCommand(string command)
                case "mv_getpicture": break; // handled by server in this file
                case "pause": break; // handled by engine in host_cmd.c
                case "prespawn": break; // handled by engine in host_cmd.c
-               case "reportcvar": break; // handled by server in this file
                case "sentcvar": break; // handled by server in this file
                case "spawn": break; // handled by engine in host_cmd.c
                
index f0ace5ea889ccd7cfc37ee9f8bd846034438dc2d..a49aad27bdc401027a66ca15a1e181140cf765c4 100644 (file)
@@ -140,7 +140,9 @@ void GiveFrags (entity attacker, entity targ, float f, float deathtype)
                // after a frag, exchange the current weapon (or the culprit, if detectable) by a new random weapon
                float culprit;
                culprit = DEATH_WEAPONOF(deathtype);
-               if(!culprit || !WEPSET_CONTAINS_EW(attacker, culprit))
+               if(!culprit)
+                       culprit = attacker.weapon;
+               else if(!WEPSET_CONTAINS_EW(attacker, culprit))
                        culprit = attacker.weapon;
 
                if(g_weaponarena_random_with_laser && culprit == WEP_LASER)
@@ -645,9 +647,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
 
                                                        if(autocvar_g_mirrordamage_virtual)
                                                        {
-                                                               vector v;
-                                                               v = healtharmor_applydamage(attacker.armorvalue, autocvar_g_balance_armor_blockpercent, mirrordamage);
-                                                               v_z = 0; // fteqcc sucks
+                                                               vector v = healtharmor_applydamage(attacker.armorvalue, autocvar_g_balance_armor_blockpercent, mirrordamage);
                                                                attacker.dmg_take += v_x;
                                                                attacker.dmg_save += v_y;
                                                                attacker.dmg_inflictor = inflictor;
@@ -657,9 +657,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
 
                                                        if(autocvar_g_friendlyfire_virtual)
                                                        {
-                                                               vector v;
-                                                               v = healtharmor_applydamage(targ.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
-                                                               v_z = 0; // fteqcc sucks
+                                                               vector v = healtharmor_applydamage(targ.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
                                                                targ.dmg_take += v_x;
                                                                targ.dmg_save += v_y;
                                                                targ.dmg_inflictor = inflictor;
index c3a9a7390fc45fa4bd2d32bfdeb939221ce55f47..239afb04a81c4d72702fa840078e50dc1928c29f 100644 (file)
@@ -343,7 +343,6 @@ void DropAllRunes(entity pl)
 
        entity curse1, rune1, curse2, rune2;
 
-       rune = curse = world;
        rcount = ccount = r = c = 0;
        rune = find(rune, classname, "rune");
        while(rune)
@@ -363,7 +362,6 @@ void DropAllRunes(entity pl)
        numtodrop = autocvar_g_runematch_drop_runes_max;
        prevent_same = !autocvar_g_runematch_allow_same;
 
-       rune = curse = world;
        do
        {
                rune = find(rune, classname, "rune");