diff --git a/BUGS b/BUGS index b7855f5..74626f9 100644 --- a/BUGS +++ b/BUGS @@ -16,3 +16,4 @@ - topcolor gets reset every time you respawn (?), even though it shouldn't be. ditto for skin? - prematch shouldn't force autoteam when it's done - sometimes ID doesn't work. this may be because impulses are unreliable though :/ +- minp/maxp are broken. possibly compiler !string bug diff --git a/TODO b/TODO index 522f848..a89633b 100644 --- a/TODO +++ b/TODO @@ -25,3 +25,7 @@ o allow more variation in skins o Make it so '1' repairs/reloads on all building menus o Teammates should be able to destroy fieldgens when they've been hacked to hurt teammates o Possibly berserker shouldn't make detpacks do more damage +o give airborn pipebombs a different death message +o Health should be given automatically based on the amount of money you have left. That'd get rid of the "can't undo health" problem +o Hitting 0 when customizing should give you a confirmation screen, instead of exiting immedietly +o Make 50 frag (upgrade from frags? maybe not) teslas change color or do something special. (not yellow though, as that can happen normally) diff --git a/client.qc b/client.qc index 44bbc9f..fa4c239 100644 --- a/client.qc +++ b/client.qc @@ -986,30 +986,31 @@ float() GetNextMapNum = local float desc; local string st; local string infostring; - local float infonum; + local float num; + local string maxmapnum; infostring = infokey (world, "n"); - infonum = stof(infostring); + num = stof (infostring); + maxmapnum = infokey (world, "maxmapnum"); - if (infostring != "") // always use info when available - return infonum; - - if (cvar("crudefile_quota") < 0) - return infonum; - - desc = cfopen("nextmapnum", "r"); - if (desc < 0) - return infonum; - - st = cfread(desc); - if (st == "") - { - cfclose(desc); - return infonum; + if (!infostring) { // always use info when available + if (cvar ("crudefile_quota") >= 0) { + desc = cfopen ("nextmapnum", "r"); + if (desc >= 0) { + st = cfread (desc); + if (st) + num = stof (st); + cfclose (desc); + } + } } - cfclose(desc); - return stof(st); + if (!maxmapnum) + return num; + else if (num > stof (maxmapnum)) + return 0; + else + return num; }; void(float mapnum) SetNextMapNum = diff --git a/obituary.qc b/obituary.qc index f41231c..020f03e 100644 --- a/obituary.qc +++ b/obituary.qc @@ -586,8 +586,6 @@ void (entity targ, entity attacker) Obituary_Player_by_Player = // killed self Give_Frags_Out (attacker, attacker, -1, 0, 1, 1, 1); - bprint (PRINT_MEDIUM, targ.netname); - if (deathmsg == DMSG_GREN_HAND) deathstring = " grenades himself\n"; else if (deathmsg == DMSG_MARTYR) diff --git a/tforttm.qc b/tforttm.qc index 001e20d..0ced12f 100644 --- a/tforttm.qc +++ b/tforttm.qc @@ -557,41 +557,30 @@ void (entity pl, float topcolor, float bottomcolor) SetPlayerColor = void (string key, string value) UserInfoCallback = { // FIXME: remove the cheat poller local string oldval; - oldval = infokey(self, key); + oldval = infokey (self, key); - if(value == oldval) { // generic reject + if (value == oldval) { // generic reject // dprint ("[oldval [" + self.netname + "](" + key + ")(" + value + ")(" + oldval + ")]\n"); - return; } // dprint ("[[" + self.netname + "](" + key + ")(" + value + ")(" + oldval + ")]\n"); -/* if (key == "topcolor") { // FIXME: some topcolors may be allowed +/* else if (key == "topcolor") { // FIXME: some topcolors may be allowed setinfokey(self, "topcolor", oldval); stuffcmd(self, "color \"" + oldval + "\"\n"); - return; - }*/ - if (key == "bottomcolor") { + }*/ else if (key == "bottomcolor") { setinfokey (self, "bottomcolor", oldval); stuffcmd (self, "bottomcolor \"" + oldval + "\"\n"); - return; - } - else if (key == "skin") { // FIXME: some other skins may be allowed + } else if (key == "skin") { // FIXME: some other skins may be allowed stuffcmd(self, "skin \"" + oldval + "\"\n"); - return; - } - else if (key == "name") { + } else if (key == "name") { self.netname = value; setinfokey (self, key, value); - return; - } - else if (key == "team") { + } else if (key == "team") { stuffcmd (self, "team \"" + oldval + "\"\n"); - return; - } - else { + } else { + // accept everything else setinfokey (self, key, value); // dprint ("[default [" + self.netname + "](" + key + ")(" + value + ")(" + oldval + ")]\n"); - return; // accept everything else } }; diff --git a/weapons.qc b/weapons.qc index 1493a53..2c06b97 100644 --- a/weapons.qc +++ b/weapons.qc @@ -1120,7 +1120,6 @@ void(entity hit, float damage) AddMultiDamage = void (integer big) Multi_Finish = { - /* WK Save spam SB ok, you save spam*/ if (puff_count) { WriteByte (MSG_MULTICAST, SVC_TEMPENTITY); @@ -1165,7 +1164,7 @@ void (float damage, vector dir) TraceAttack = vel = vel + 2 * trace_plane_normal; vel = vel * 200; - org = trace_endpos - dir * 4; + org = trace_endpos - v_forward * 4; //WK Sweep mines at the end of the attack GuerillaMineSweep (trace_endpos); diff --git a/world.qc b/world.qc index b84bb67..0ac52ab 100644 --- a/world.qc +++ b/world.qc @@ -254,14 +254,16 @@ void() worldspawn = team_with_flag = 0; //KK initial global sets - //friends1_mask = stof(infokey(world,"friends1_mask")); - //friends2_mask = stof(infokey(world,"friends2_mask")); - //friends3_mask = stof(infokey(world,"friends3_mask")); - //friends4_mask = stof(infokey(world,"friends4_mask")); - friends1_mask = stof(self.noise1); - friends2_mask = stof(self.noise2); - friends3_mask = stof(self.noise3); - friends4_mask = stof(self.noise4); + // We load the masks from the map, overriding it with infokeys if + // they exist + st = infokey (world, "friends1_mask"); + friends1_mask = stof (st ? st : self.noise1); + st = infokey (world, "friends2_mask"); + friends2_mask = stof (st ? st : self.noise2); + st = infokey (world, "friends3_mask"); + friends3_mask = stof (st ? st : self.noise3); + st = infokey (world, "friends4_mask"); + friends4_mask = stof (st ? st : self.noise4); // the area based ambient sounds MUST be the first precache_sounds