mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2025-01-31 22:00:36 +00:00
correct the return type of UserInfoCallback and the values. 0 is for reject,
1 is for accept.
This commit is contained in:
parent
c27d98b058
commit
b7c0929c3f
2 changed files with 6 additions and 6 deletions
2
makefile
2
makefile
|
@ -1,4 +1,4 @@
|
|||
qwprogs.dat: preprogs.src *.qc
|
||||
qfpreqcc --warn=error --debug
|
||||
qfpreqcc --warn=error --debug --no-cpp
|
||||
clean:
|
||||
rm -f core *.dat *.pqc *.sym progdefs.h progs.src
|
||||
|
|
10
tforttm.qc
10
tforttm.qc
|
@ -647,7 +647,7 @@ void() TeamFortress_CheckTeamCheats =
|
|||
}
|
||||
};
|
||||
|
||||
void(string key, string value) UserInfoCallback =
|
||||
float(string key, string value) UserInfoCallback =
|
||||
{
|
||||
local string oldval;
|
||||
local string st;
|
||||
|
@ -656,7 +656,7 @@ void(string key, string value) UserInfoCallback =
|
|||
if(value == oldval) // generic reject
|
||||
{
|
||||
bprint(#PRINT_MEDIUM, "[oldval (" + key + ")(" + value + ")(" + oldval + ")]\n");
|
||||
return 1; // rejected!
|
||||
return 0; // rejected!
|
||||
}
|
||||
|
||||
if (key == "topcolor" || key == "bottomcolor")
|
||||
|
@ -668,7 +668,7 @@ void(string key, string value) UserInfoCallback =
|
|||
stuffcmd(self, st);
|
||||
stuffcmd(self, "\n");
|
||||
bprint(#PRINT_MEDIUM, "[color (" + key + ")(" + value + ")(" + oldval + ")]\n");
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
else if (key == "skin")
|
||||
{
|
||||
|
@ -676,12 +676,12 @@ void(string key, string value) UserInfoCallback =
|
|||
stuffcmd(self, oldval);
|
||||
stuffcmd(self, "\n");
|
||||
bprint(#PRINT_MEDIUM, "[skin (" + key + ")(" + value + ")(" + oldval + ")]\n");
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
bprint(#PRINT_MEDIUM, "[default (" + key + ")(" + value + ")(" + oldval + ")]\n");
|
||||
return 0; // accept everything else
|
||||
return 1; // accept everything else
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue