Fix multiplayer switches casting light in single player

git-svn-id: https://svn.eduke32.com/eduke32@1443 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2009-06-27 08:20:09 +00:00
parent 234e54d5b1
commit 6f6f0900c8
4 changed files with 25 additions and 17 deletions

View file

@ -8061,26 +8061,25 @@ void loadtile(int16_t tilenume)
allocache(&waloff[tilenume],dasiz,&walock[tilenume]);
}
if (!faketile[tilenume])
{
if (artfilplc != tilefileoffs[tilenume])
{
klseek(artfil,tilefileoffs[tilenume]-artfilplc,BSEEK_CUR);
faketimerhandler();
}
ptr = (char *)waloff[tilenume];
kread(artfil,ptr,dasiz);
faketimerhandler();
artfilplc = tilefileoffs[tilenume]+dasiz;
}
else
if (faketile[tilenume])
{
if (faketile[tilenume] == 1 || (faketile[tilenume] == 2 && faketiledata[tilenume] == NULL))
Bmemset((char *)waloff[tilenume],0,dasiz);
else if (faketile[tilenume] == 2)
Bmemcpy((char *)waloff[tilenume],faketiledata[tilenume],dasiz);
faketimerhandler();
return;
}
if (artfilplc != tilefileoffs[tilenume])
{
klseek(artfil,tilefileoffs[tilenume]-artfilplc,BSEEK_CUR);
faketimerhandler();
}
ptr = (char *)waloff[tilenume];
kread(artfil,ptr,dasiz);
faketimerhandler();
artfilplc = tilefileoffs[tilenume]+dasiz;
}
void checktile(int16_t tilenume)

View file

@ -7981,8 +7981,16 @@ void G_MoveWorld(void)
{
int32_t x, y;
if (s->cstat & 32768 || !inside(s->x+((sintable[(s->ang+512)&2047])>>9), s->y+((sintable[(s->ang)&2047])>>9), s->sectnum))
if ((s->cstat & 32768) || !inside(s->x+((sintable[(s->ang+512)&2047])>>9), s->y+((sintable[(s->ang)&2047])>>9), s->sectnum))
{
if (ActorExtra[i].lightptr != NULL)
{
polymer_deletelight(ActorExtra[i].lightId);
ActorExtra[i].lightId = -1;
ActorExtra[i].lightptr = NULL;
}
break;
}
x = ((sintable[(s->ang+512)&2047])>>7);
y = ((sintable[(s->ang)&2047])>>7);

View file

@ -4812,7 +4812,8 @@ int32_t A_Spawn(int32_t j, int32_t pn)
if ((ud.multimode < 2) || (ud.multimode > 1 && !GTFLAGS(GAMETYPE_DMSWITCHES)))
{
sprite[i].xrepeat = sprite[i].yrepeat = 0;
sprite[i].cstat = SLT = SHT = 0;
SLT = SHT = 0;
sprite[i].cstat = 32768;
return i;
}
}

View file

@ -536,7 +536,7 @@ int32_t __fastcall Gv_GetVar(register int32_t id, register int32_t iActor, regis
{
register intptr_t negateResult = id&(MAXGAMEVARS<<1);
if (id >= g_gameVarCount || id < 0)
if (id >= g_gameVarCount)
{
if (id&(MAXGAMEVARS<<2)) // array
{
@ -682,7 +682,7 @@ int32_t __fastcall Gv_GetVarX(register int32_t id)
{
register intptr_t negateResult = id&(MAXGAMEVARS<<1);
if (id >= g_gameVarCount || id < 0)
if (id >= g_gameVarCount)
{
if (id&(MAXGAMEVARS<<2)) // array
{