version 1.10 | | version 1.11 |
---|
| | |
/* | | /* |
* static char *rcsid_init_c = | | * static char *rcsid_init_c = |
* "$Id: request.c,v 1.10 2001/04/09 00:57:04 michtoen Exp $"; | | * "$Id: request.c,v 1.11 2001/04/09 06:59:46 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
_setup_map setup_map[] = { | | _setup_map setup_map[] = { |
{"sound", SETUP_SOUND}, | | {"sound", SETUP_SOUND}, |
{"sexp", SETUP_SKILLEXP}, | | |
{"",-1} /* end marker */ | | {"",-1} /* end marker */ |
}; | | }; |
| | |
| | |
ns->sound = atoi(param); | | ns->sound = atoi(param); |
strcat(cmdback, param); | | strcat(cmdback, param); |
break; | | break; |
case SETUP_SKILLEXP: | | |
#ifdef ALLOW_SKILLS /* new experience system */ | | |
ns->skillexp = atoi(param); | | |
strcat(cmdback, param); | | |
#else | | |
strcat(cmdback, "0"); | | |
#endif | | |
break; | | |
}; | | }; |
break; /* we have found cmd, fetch next from setup buffer */ | | break; /* we have found cmd, fetch next from setup buffer */ |
| | |
| | |
{ | | { |
Settings oldsettings; | | Settings oldsettings; |
oldsettings=settings; | | oldsettings=settings; |
| | |
if (ns->status != Ns_Add || add_player(ns)) { | | if (ns->status != Ns_Add || add_player(ns)) { |
Write_String_To_Socket(ns, "addme_failed",12); | | Write_String_To_Socket(ns, "addme_failed",12); |
} else { | | } else { |
| | |
void VersionCmd(char *buf, int len,NewSocket *ns) | | void VersionCmd(char *buf, int len,NewSocket *ns) |
{ | | { |
char *cp; | | char *cp; |
char version_warning[256]; | | |
| | |
if (!buf) { | | if (!buf) { |
LOG(llevError, "CS: received corrupted version command\n"); | | LOG(llevError, "CS: received corrupted version command\n"); |
| | |
} | | } |
cp = strchr(cp+1, ' '); | | cp = strchr(cp+1, ' '); |
if (cp) | | if (cp) |
{ | | LOG(llevDebug,"CS: connection from client of type %s\n", cp); |
LOG(llevDebug,"CS: connection from client of type <%s>\n", cp); | | |
| | |
/* This is first implementation - i skip all beta DX clients with it | | |
* Add later stuff here for other clients | | |
*/ | | |
| | |
if(!strcmp(" CF DX CLIENT", cp)) // these are old dxclients | | |
{ | | |
sprintf(version_warning,"drawinfo %d %s", NDI_RED, "**** VERSION WARNING ****"); | | |
Write_String_To_Socket(ns, version_warning, strlen(version_warning)); | | |
sprintf(version_warning,"drawinfo %d %s", NDI_RED, "**** CLIENT IS TO OLD!! UPDATE THE CLIENT!! ****"); | | |
Write_String_To_Socket(ns, version_warning, strlen(version_warning)); | | |
} | | |
} | | |
} | | } |
| | |
/* | | /* |
| | |
AddIfShort(pl->last_stats.Dex, pl->ob->stats.Dex, CS_STAT_DEX); | | AddIfShort(pl->last_stats.Dex, pl->ob->stats.Dex, CS_STAT_DEX); |
AddIfShort(pl->last_stats.Con, pl->ob->stats.Con, CS_STAT_CON); | | AddIfShort(pl->last_stats.Con, pl->ob->stats.Con, CS_STAT_CON); |
AddIfShort(pl->last_stats.Cha, pl->ob->stats.Cha, CS_STAT_CHA); | | AddIfShort(pl->last_stats.Cha, pl->ob->stats.Cha, CS_STAT_CHA); |
#ifdef ALLOW_SKILLS /* new experience system */ | | |
if(pl->last_stats.exp != pl->ob->stats.exp && pl->socket.skillexp) | | |
{ | | |
int s; | | |
for(s=0;s<pl->last_skill_index;s++) | | |
{ | | |
AddIfInt(pl->last_skill_exp[s],pl->last_skill_ob[s]->stats.exp , pl->last_skill_id[s]); | | |
AddIfInt(pl->last_skill_level[s],pl->last_skill_ob[s]->level , pl->last_skill_id[s]+1); | | |
} | | |
} | | |
#endif | | |
AddIfInt(pl->last_stats.exp, pl->ob->stats.exp, CS_STAT_EXP); | | AddIfInt(pl->last_stats.exp, pl->ob->stats.exp, CS_STAT_EXP); |
AddIfShort(pl->last_level, pl->ob->level, CS_STAT_LEVEL); | | AddIfShort(pl->last_level, pl->ob->level, CS_STAT_LEVEL); |
AddIfShort(pl->last_stats.wc, pl->ob->stats.wc, CS_STAT_WC); | | AddIfShort(pl->last_stats.wc, pl->ob->stats.wc, CS_STAT_WC); |