mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- a bit more cleanup
This commit is contained in:
parent
fde6407266
commit
13eae3a7bd
5 changed files with 3 additions and 32 deletions
|
@ -198,10 +198,6 @@ void StartLevel(MapRecord* level)
|
||||||
{
|
{
|
||||||
if (!(gGameOptions.uGameFlags & GF_AdvanceLevel))
|
if (!(gGameOptions.uGameFlags & GF_AdvanceLevel))
|
||||||
{
|
{
|
||||||
if (numplayers == 1)
|
|
||||||
{
|
|
||||||
gProfile[i].skill = gSkill;
|
|
||||||
}
|
|
||||||
playerInit(i, 0);
|
playerInit(i, 0);
|
||||||
}
|
}
|
||||||
playerStart(i, 1);
|
playerStart(i, 1);
|
||||||
|
@ -530,9 +526,6 @@ static void gameInit()
|
||||||
gViewIndex = myconnectindex;
|
gViewIndex = myconnectindex;
|
||||||
gMe = gView = &gPlayer[myconnectindex];
|
gMe = gView = &gPlayer[myconnectindex];
|
||||||
|
|
||||||
PROFILE* pProfile = &gProfile[myconnectindex];
|
|
||||||
pProfile->skill = gSkill;
|
|
||||||
|
|
||||||
UpdateNetworkMenus();
|
UpdateNetworkMenus();
|
||||||
if (gGameOptions.nGameType > 0)
|
if (gGameOptions.nGameType > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -521,9 +521,6 @@ bool GameInterface::LoadGame()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Mus_ResumeSaved();
|
Mus_ResumeSaved();
|
||||||
|
|
||||||
PROFILE* pProfile = &gProfile[myconnectindex];
|
|
||||||
pProfile->skill = gSkill;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
BEGIN_BLD_NS
|
BEGIN_BLD_NS
|
||||||
|
|
||||||
PROFILE gProfile[kMaxPlayers];
|
|
||||||
|
|
||||||
PLAYER gPlayer[kMaxPlayers];
|
PLAYER gPlayer[kMaxPlayers];
|
||||||
PLAYER *gMe, *gView;
|
PLAYER *gMe, *gView;
|
||||||
|
|
||||||
|
@ -603,7 +601,7 @@ void playerSetRace(PLAYER *pPlayer, int nLifeMode)
|
||||||
pPlayer->pSprite->clipdist = pDudeInfo->clipdist;
|
pPlayer->pSprite->clipdist = pDudeInfo->clipdist;
|
||||||
|
|
||||||
for (int i = 0; i < 7; i++)
|
for (int i = 0; i < 7; i++)
|
||||||
pDudeInfo->at70[i] = mulscale8(Handicap[gProfile[pPlayer->nPlayer].skill], pDudeInfo->startDamage[i]);
|
pDudeInfo->at70[i] = mulscale8(Handicap[gSkill], pDudeInfo->startDamage[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void playerSetGodMode(PLAYER *pPlayer, bool bGodMode)
|
void playerSetGodMode(PLAYER *pPlayer, bool bGodMode)
|
||||||
|
@ -2175,7 +2173,6 @@ void PlayerLoadSave::Load(void)
|
||||||
|
|
||||||
Read(team_score, sizeof(team_score));
|
Read(team_score, sizeof(team_score));
|
||||||
Read(&gNetPlayers, sizeof(gNetPlayers));
|
Read(&gNetPlayers, sizeof(gNetPlayers));
|
||||||
Read(&gProfile, sizeof(gProfile));
|
|
||||||
Read(&gPlayer, sizeof(gPlayer));
|
Read(&gPlayer, sizeof(gPlayer));
|
||||||
#ifdef NOONE_EXTENSIONS
|
#ifdef NOONE_EXTENSIONS
|
||||||
Read(&gPlayerCtrl, sizeof(gPlayerCtrl));
|
Read(&gPlayerCtrl, sizeof(gPlayerCtrl));
|
||||||
|
@ -2209,7 +2206,6 @@ void PlayerLoadSave::Save(void)
|
||||||
{
|
{
|
||||||
Write(team_score, sizeof(team_score));
|
Write(team_score, sizeof(team_score));
|
||||||
Write(&gNetPlayers, sizeof(gNetPlayers));
|
Write(&gNetPlayers, sizeof(gNetPlayers));
|
||||||
Write(&gProfile, sizeof(gProfile));
|
|
||||||
Write(&gPlayer, sizeof(gPlayer));
|
Write(&gPlayer, sizeof(gPlayer));
|
||||||
|
|
||||||
#ifdef NOONE_EXTENSIONS
|
#ifdef NOONE_EXTENSIONS
|
||||||
|
|
|
@ -185,12 +185,6 @@ struct PLAYER
|
||||||
POSTURE pPosture[kModeMax][kPostureMax];
|
POSTURE pPosture[kModeMax][kPostureMax];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PROFILE
|
|
||||||
{
|
|
||||||
int skill;
|
|
||||||
//char name[MAXPLAYERNAME];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct AMMOINFO
|
struct AMMOINFO
|
||||||
{
|
{
|
||||||
int max;
|
int max;
|
||||||
|
@ -213,8 +207,6 @@ extern PLAYER *gMe, *gView;
|
||||||
extern bool gBlueFlagDropped;
|
extern bool gBlueFlagDropped;
|
||||||
extern bool gRedFlagDropped;
|
extern bool gRedFlagDropped;
|
||||||
|
|
||||||
extern PROFILE gProfile[kMaxPlayers];
|
|
||||||
|
|
||||||
extern int team_score[kMaxPlayers];
|
extern int team_score[kMaxPlayers];
|
||||||
extern int team_ticker[kMaxPlayers];
|
extern int team_ticker[kMaxPlayers];
|
||||||
extern AMMOINFO gAmmoInfo[];
|
extern AMMOINFO gAmmoInfo[];
|
||||||
|
|
|
@ -429,11 +429,7 @@ private:
|
||||||
int y = 9 * (i / 4);
|
int y = 9 * (i / 4);
|
||||||
int col = gPlayer[p].teamId & 3;
|
int col = gPlayer[p].teamId & 3;
|
||||||
const char* name = PlayerName(p);
|
const char* name = PlayerName(p);
|
||||||
if (gProfile[p].skill == 2)
|
|
||||||
gTempStr.Format("%s", name);
|
gTempStr.Format("%s", name);
|
||||||
else
|
|
||||||
gTempStr.Format("%s [%d]", name, gProfile[p].skill);
|
|
||||||
|
|
||||||
int color = CR_UNDEFINED;// todo: remap the colors. (11+col)
|
int color = CR_UNDEFINED;// todo: remap the colors. (11+col)
|
||||||
SBar_DrawString(this, tinyf, gTempStr, x + 4, y, DI_SCREEN_CENTER_TOP, color, 1., -1, -1, 1, 1);
|
SBar_DrawString(this, tinyf, gTempStr, x + 4, y, DI_SCREEN_CENTER_TOP, color, 1., -1, -1, 1, 1);
|
||||||
gTempStr.Format("%2d", gPlayer[p].fragCount);
|
gTempStr.Format("%2d", gPlayer[p].fragCount);
|
||||||
|
@ -457,10 +453,7 @@ private:
|
||||||
int y = 9 * (i / 4);
|
int y = 9 * (i / 4);
|
||||||
int col = gPlayer[p].teamId & 3;
|
int col = gPlayer[p].teamId & 3;
|
||||||
const char* name = PlayerName(p);
|
const char* name = PlayerName(p);
|
||||||
if (gProfile[p].skill == 2)
|
|
||||||
gTempStr.Format("%s", name);
|
gTempStr.Format("%s", name);
|
||||||
else
|
|
||||||
gTempStr.Format("%s [%d]", name, gProfile[p].skill);
|
|
||||||
gTempStr.ToUpper();
|
gTempStr.ToUpper();
|
||||||
int color = CR_UNDEFINED;// todo: remap the colors.
|
int color = CR_UNDEFINED;// todo: remap the colors.
|
||||||
SBar_DrawString(this, tinyf, gTempStr, x + 4, y, DI_SCREEN_CENTER_TOP, color, 1., -1, -1, 1, 1);
|
SBar_DrawString(this, tinyf, gTempStr, x + 4, y, DI_SCREEN_CENTER_TOP, color, 1., -1, -1, 1, 1);
|
||||||
|
|
Loading…
Reference in a new issue