mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
EDUKE32_STANDALONE guard some more Duke3D-specific behavior
git-svn-id: https://svn.eduke32.com/eduke32@7227 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4861d1fc3d
commit
54bc64ea10
2 changed files with 31 additions and 9 deletions
|
@ -623,6 +623,7 @@ static int32_t VM_GetCeilZOfSlope(void)
|
|||
return getceilzofslope(sectnum, vect.x, vect.y);
|
||||
}
|
||||
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
static int32_t VM_GetFlorZOfSlope(void)
|
||||
{
|
||||
vec2_t const vect = *(vec2_t *)vm.pSprite;
|
||||
|
@ -638,6 +639,7 @@ static int32_t VM_GetFlorZOfSlope(void)
|
|||
#endif
|
||||
return getflorzofslope(sectnum, vect.x, vect.y);
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////
|
||||
|
||||
|
@ -726,6 +728,7 @@ dead:
|
|||
int spriteXvel = vm.pSprite->xvel;
|
||||
int angDiff = vm.pSprite->ang;
|
||||
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
if (badguyp && vm.pSprite->picnum != ROTATEGUN)
|
||||
{
|
||||
if ((vm.pSprite->picnum == DRONE || vm.pSprite->picnum == COMMANDER) && vm.pSprite->extra > 0)
|
||||
|
@ -771,6 +774,10 @@ dead:
|
|||
}
|
||||
}
|
||||
else if (vm.pSprite->picnum != ORGANTIC)
|
||||
#else
|
||||
if (badguyp)
|
||||
{
|
||||
#endif
|
||||
{
|
||||
// All other actors besides ORGANTIC don't update .floorz or
|
||||
// .ceilingz here.
|
||||
|
@ -808,7 +815,10 @@ dead:
|
|||
vm.pPlayer->vel.y = mulscale16(vm.pPlayer->vel.y, vm.pPlayer->runspeed - 0x2000);
|
||||
}
|
||||
}
|
||||
else if (vm.pSprite->picnum != DRONE && vm.pSprite->picnum != SHARK && vm.pSprite->picnum != COMMANDER)
|
||||
else
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
if (vm.pSprite->picnum != DRONE && vm.pSprite->picnum != SHARK && vm.pSprite->picnum != COMMANDER)
|
||||
#endif
|
||||
{
|
||||
if (vm.pPlayer->actorsqu == vm.spriteNum)
|
||||
return;
|
||||
|
@ -2257,7 +2267,16 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
|||
|
||||
int newHealth = sprite[pPlayer->i].extra;
|
||||
|
||||
if (vm.pSprite->picnum != ATOMICHEALTH)
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
if (vm.pSprite->picnum == ATOMICHEALTH)
|
||||
{
|
||||
if (newHealth > 0)
|
||||
newHealth += *insptr;
|
||||
if (newHealth > (pPlayer->max_player_health << 1))
|
||||
newHealth = (pPlayer->max_player_health << 1);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (newHealth > pPlayer->max_player_health && *insptr > 0)
|
||||
{
|
||||
|
@ -2272,13 +2291,6 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
|||
newHealth = pPlayer->max_player_health;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (newHealth > 0)
|
||||
newHealth += *insptr;
|
||||
if (newHealth > (pPlayer->max_player_health << 1))
|
||||
newHealth = (pPlayer->max_player_health << 1);
|
||||
}
|
||||
|
||||
if (newHealth < 0)
|
||||
newHealth = 0;
|
||||
|
@ -3838,6 +3850,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
|||
case CON_DEBRIS:
|
||||
insptr++;
|
||||
{
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
int debrisTile = *insptr++;
|
||||
|
||||
if ((unsigned)vm.pSprite->sectnum < MAXSECTORS)
|
||||
|
@ -3853,6 +3866,9 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
|||
sprite[spriteNum].yvel = (vm.pSprite->picnum == BLIMP && debrisTile == SCRAP1) ? g_blimpSpawnItems[cnt % 14] : -1;
|
||||
sprite[spriteNum].pal = vm.pSprite->pal;
|
||||
}
|
||||
#else
|
||||
insptr++;
|
||||
#endif
|
||||
insptr++;
|
||||
}
|
||||
continue;
|
||||
|
@ -5889,6 +5905,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
|||
insptr++;
|
||||
switch (DYNAMICTILEMAP(vm.pSprite->picnum))
|
||||
{
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
case FEM1__STATIC:
|
||||
case FEM2__STATIC:
|
||||
case FEM3__STATIC:
|
||||
|
@ -5905,6 +5922,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
|||
if (vm.pSprite->yvel)
|
||||
G_OperateRespawns(vm.pSprite->yvel);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
if (vm.pSprite->hitag >= 0)
|
||||
G_OperateRespawns(vm.pSprite->hitag);
|
||||
|
@ -6429,6 +6447,7 @@ void G_RestoreMapState(void)
|
|||
|
||||
screenpeek = myconnectindex;
|
||||
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
if (ud.lockout)
|
||||
{
|
||||
for (native_t x=g_animWallCnt-1; x>=0; x--)
|
||||
|
@ -6447,6 +6466,7 @@ void G_RestoreMapState(void)
|
|||
wall[animwall[x].wallnum].picnum = wall[animwall[x].wallnum].extra;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifdef YAX_ENABLE
|
||||
sv_postyaxload();
|
||||
#endif
|
||||
|
|
|
@ -2252,6 +2252,7 @@ static void postloadplayer(int32_t savegamep)
|
|||
//4
|
||||
if (savegamep)
|
||||
{
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
if (ud.lockout)
|
||||
{
|
||||
for (i=0; i<g_animWallCnt; i++)
|
||||
|
@ -2273,6 +2274,7 @@ static void postloadplayer(int32_t savegamep)
|
|||
if (wall[animwall[i].wallnum].extra >= 0)
|
||||
wall[animwall[i].wallnum].picnum = wall[animwall[i].wallnum].extra;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue