- Switched to a genericly extensible representation for userinfo.

- Fixed: The playerinfo CCMD did not range check the player number.

SVN r4253 (trunk)
This commit is contained in:
Randy Heit 2013-05-12 18:27:03 +00:00
commit 2668988870
37 changed files with 744 additions and 429 deletions

View file

@ -5594,7 +5594,7 @@ scriptwait:
}
if (player)
{
work += player->userinfo.netname;
work += player->userinfo.GetName();
}
else if (activator)
{
@ -7078,14 +7078,14 @@ scriptwait:
userinfo_t *userinfo = &pl->userinfo;
switch (STACK(1))
{
case PLAYERINFO_TEAM: STACK(2) = userinfo->team; break;
case PLAYERINFO_TEAM: STACK(2) = userinfo->GetTeam(); break;
case PLAYERINFO_AIMDIST: STACK(2) = userinfo->GetAimDist(); break;
case PLAYERINFO_COLOR: STACK(2) = userinfo->color; break;
case PLAYERINFO_GENDER: STACK(2) = userinfo->gender; break;
case PLAYERINFO_NEVERSWITCH: STACK(2) = userinfo->neverswitch; break;
case PLAYERINFO_MOVEBOB: STACK(2) = userinfo->MoveBob; break;
case PLAYERINFO_STILLBOB: STACK(2) = userinfo->StillBob; break;
case PLAYERINFO_PLAYERCLASS: STACK(2) = userinfo->PlayerClass; break;
case PLAYERINFO_COLOR: STACK(2) = userinfo->GetColor(); break;
case PLAYERINFO_GENDER: STACK(2) = userinfo->GetGender(); break;
case PLAYERINFO_NEVERSWITCH: STACK(2) = userinfo->GetNeverSwitch(); break;
case PLAYERINFO_MOVEBOB: STACK(2) = userinfo->GetMoveBob(); break;
case PLAYERINFO_STILLBOB: STACK(2) = userinfo->GetStillBob(); break;
case PLAYERINFO_PLAYERCLASS: STACK(2) = userinfo->GetPlayerClassNum(); break;
case PLAYERINFO_DESIREDFOV: STACK(2) = (int)pl->DesiredFOV; break;
case PLAYERINFO_FOV: STACK(2) = (int)pl->FOV; break;
default: STACK(2) = 0; break;
@ -7583,7 +7583,7 @@ int P_StartScript (AActor *who, line_t *where, int script, const char *map, cons
if (!(scriptdata->Flags & SCRIPTF_Net))
{
Printf(PRINT_BOLD, "%s tried to puke %s (\n",
who->player->userinfo.netname, ScriptPresentation(script).GetChars());
who->player->userinfo.GetName(), ScriptPresentation(script).GetChars());
for (int i = 0; i < argcount; ++i)
{
Printf(PRINT_BOLD, "%d%s", args[i], i == argcount-1 ? "" : ", ");