give error message to client when no demos available to get
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3149 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+10
-1
@@ -752,7 +752,16 @@ static void cleardemos(int n)
|
||||
void senddemo(int cn, int num)
|
||||
{
|
||||
if(!num) num = demos.length();
|
||||
if(!demos.inrange(num-1)) return;
|
||||
if(!demos.inrange(num-1))
|
||||
{
|
||||
if(demos.empty()) sendservmsg("no demos available", cn);
|
||||
else
|
||||
{
|
||||
s_sprintfd(msg)("no demo %d available", num);
|
||||
sendservmsg(msg, cn);
|
||||
}
|
||||
return;
|
||||
}
|
||||
demofile &d = demos[num-1];
|
||||
sendf(cn, 2, "rim", SV_SENDDEMO, d.len, d.data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user