mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-22 11:41:08 +00:00
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:
parent
234e54d5b1
commit
6f6f0900c8
4 changed files with 25 additions and 17 deletions
|
@ -8061,26 +8061,25 @@ void loadtile(int16_t tilenume)
|
||||||
allocache(&waloff[tilenume],dasiz,&walock[tilenume]);
|
allocache(&waloff[tilenume],dasiz,&walock[tilenume]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!faketile[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] == 1 || (faketile[tilenume] == 2 && faketiledata[tilenume] == NULL))
|
if (faketile[tilenume] == 1 || (faketile[tilenume] == 2 && faketiledata[tilenume] == NULL))
|
||||||
Bmemset((char *)waloff[tilenume],0,dasiz);
|
Bmemset((char *)waloff[tilenume],0,dasiz);
|
||||||
else if (faketile[tilenume] == 2)
|
else if (faketile[tilenume] == 2)
|
||||||
Bmemcpy((char *)waloff[tilenume],faketiledata[tilenume],dasiz);
|
Bmemcpy((char *)waloff[tilenume],faketiledata[tilenume],dasiz);
|
||||||
faketimerhandler();
|
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)
|
void checktile(int16_t tilenume)
|
||||||
|
|
|
@ -7981,8 +7981,16 @@ void G_MoveWorld(void)
|
||||||
{
|
{
|
||||||
int32_t x, y;
|
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;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
x = ((sintable[(s->ang+512)&2047])>>7);
|
x = ((sintable[(s->ang+512)&2047])>>7);
|
||||||
y = ((sintable[(s->ang)&2047])>>7);
|
y = ((sintable[(s->ang)&2047])>>7);
|
||||||
|
|
|
@ -4812,7 +4812,8 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
if ((ud.multimode < 2) || (ud.multimode > 1 && !GTFLAGS(GAMETYPE_DMSWITCHES)))
|
if ((ud.multimode < 2) || (ud.multimode > 1 && !GTFLAGS(GAMETYPE_DMSWITCHES)))
|
||||||
{
|
{
|
||||||
sprite[i].xrepeat = sprite[i].yrepeat = 0;
|
sprite[i].xrepeat = sprite[i].yrepeat = 0;
|
||||||
sprite[i].cstat = SLT = SHT = 0;
|
SLT = SHT = 0;
|
||||||
|
sprite[i].cstat = 32768;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
register intptr_t negateResult = id&(MAXGAMEVARS<<1);
|
||||||
|
|
||||||
if (id >= g_gameVarCount || id < 0)
|
if (id >= g_gameVarCount)
|
||||||
{
|
{
|
||||||
if (id&(MAXGAMEVARS<<2)) // array
|
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);
|
register intptr_t negateResult = id&(MAXGAMEVARS<<1);
|
||||||
|
|
||||||
if (id >= g_gameVarCount || id < 0)
|
if (id >= g_gameVarCount)
|
||||||
{
|
{
|
||||||
if (id&(MAXGAMEVARS<<2)) // array
|
if (id&(MAXGAMEVARS<<2)) // array
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue