- BUGS/TODO

- clean up GetNextMapNum, as well as handling an unset maxmapnum
- remove an extra obituary print (leftover from my cleanups)
- cleanup UserInfoCallback a bit
- little tweak to Multi_Finish
- make it so friends{1,2,3,4}_mask infokeys override the map values if
  set, so you can force friendly teams on broken maps
This commit is contained in:
Adam Olsen 2001-10-05 23:05:28 +00:00
parent 01a28bdf9d
commit a1ecc5dda3
7 changed files with 45 additions and 51 deletions

1
BUGS
View file

@ -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

4
TODO
View file

@ -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)

View file

@ -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 =

View file

@ -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)

View file

@ -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
}
};

View file

@ -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);

View file

@ -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