Retire global 'lastvisinc'.

It was only ever used as upper bound to the time that a visibility change
decays, but since it does that in an exponential fashion, there's really
no point.

git-svn-id: https://svn.eduke32.com/eduke32@3961 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-07-18 18:08:13 +00:00
parent 19b85dc5ee
commit 4f88aaf4d2
10 changed files with 5 additions and 14 deletions

View file

@ -150,8 +150,6 @@ char **g_clipMapFiles = NULL;
int32_t g_clipMapFilesNum = 0;
#endif
extern int32_t lastvisinc;
int32_t g_Shareware = 0;
#define MAXUSERQUOTES 6
@ -7810,7 +7808,6 @@ skip:
if (t->picnum == EXPLOSION2)
{
g_player[screenpeek].ps->visibility = -127;
lastvisinc = totalclock+32;
//g_restorePalette = 1; // JBF 20040101: why?
}
t->shade = -127;

View file

@ -280,7 +280,6 @@ extern int32_t g_restorePalette;
extern int32_t g_usingAddon;
extern int32_t hud_glowingquotes;
extern int32_t hud_showmapname;
extern int32_t lastvisinc;
extern int32_t rts_numlumps;
extern int32_t quotebot;
extern int32_t quotebotgoal;

View file

@ -60,7 +60,6 @@ extern intptr_t *apScriptGameEvent[MAXGAMEEVENTS];
#endif
extern int32_t otherp;
extern int32_t lastvisinc;
extern char CheatStrings[][MAXCHEATLEN];
extern char g_szScriptFileName[BMAX_PATH];
extern int32_t g_totalLines,g_lineNumber;

View file

@ -3499,7 +3499,6 @@ nullquote:
insptr++;
sprite[vm.g_i].shade = -127;
g_player[vm.g_p].ps->visibility = -127;
lastvisinc = totalclock+32;
continue;
case CON_SAVEMAPSTATE:

View file

@ -1270,6 +1270,10 @@ void Gv_FinalizeWeaponDefaults(void)
#undef FINISH_WEAPON_DEFAULT_X
#undef POSTADDWEAPONVAR
#if !defined LUNATIC
static int32_t lastvisinc;
#endif
static void Gv_AddSystemVars(void)
{
// only call ONCE

View file

@ -1634,8 +1634,7 @@ end
function _flash(spr, ps)
spr.shade = -127
ps.visibility = -127 -- XXX
ffiC.lastvisinc = ffiC.totalclock+32
ps.visibility = -127 -- NOTE: negative value not a problem anymore
end
function _G_OperateRespawns(tag)

View file

@ -634,7 +634,6 @@ struct
char *ScriptQuotes[];
const int32_t playerswhenstarted;
int32_t lastvisinc;
int16_t g_spriteDeleteQueueSize;
int16_t BlimpSpawnSprites[15];
int32_t g_scriptVersion;

View file

@ -155,7 +155,6 @@ ScriptQuotes;
screenpeek;
hudweap;
playerswhenstarted;
lastvisinc;
g_spriteDeleteQueueSize;
BlimpSpawnSprites;
g_scriptVersion;

View file

@ -1971,7 +1971,6 @@ static void P_FireWeapon(DukePlayer_t *p)
s->x -= x;
s->y -= y;
#endif // POLYMER
lastvisinc = totalclock+32;
p->visibility = 0;
}
}

View file

@ -324,8 +324,6 @@ typedef struct {
extern input_t inputfifo[MOVEFIFOSIZ][MAXPLAYERS];
extern playerspawn_t g_playerSpawnPoints[MAXPLAYERS];
extern playerdata_t g_player[MAXPLAYERS];
//extern char dashow2dsector[(MAXSECTORS+7)>>3];
//extern int16_t searchsect[MAXSECTORS],searchparent[MAXSECTORS];
extern int16_t WeaponPickupSprites[MAX_WEAPONS];
extern hudweapon_t hudweap;
extern int32_t g_levelTextTime;
@ -333,7 +331,6 @@ extern int32_t g_myAimMode;
extern int32_t g_numObituaries;
extern int32_t g_numSelfObituaries;
extern int32_t g_emuJumpTics;
extern int32_t lastvisinc;
extern int32_t mouseyaxismode;
extern int32_t ticrandomseed;