mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +00:00
- use a flag for outer space textures.
This commit is contained in:
parent
006f1b3fdf
commit
1b3f551216
12 changed files with 46 additions and 102 deletions
|
@ -451,7 +451,7 @@ void moveplayers(void)
|
||||||
act->SetHitOwner(act);
|
act->SetHitOwner(act);
|
||||||
|
|
||||||
if (ud.god == 0)
|
if (ud.god == 0)
|
||||||
if (fi.ceilingspace(act->sector()) || fi.floorspace(act->sector()))
|
if (ceilingspace(act->sector()) || floorspace(act->sector()))
|
||||||
quickkill(p);
|
quickkill(p);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -4028,11 +4028,11 @@ void makeitfall(DDukeActor* actor)
|
||||||
{
|
{
|
||||||
double grav;
|
double grav;
|
||||||
|
|
||||||
if( fi.floorspace(actor->sector()) )
|
if( floorspace(actor->sector()) )
|
||||||
grav = 0;
|
grav = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( fi.ceilingspace(actor->sector()) || actor->sector()->lotag == ST_2_UNDERWATER)
|
if( ceilingspace(actor->sector()) || actor->sector()->lotag == ST_2_UNDERWATER)
|
||||||
grav = gs.gravity/6;
|
grav = gs.gravity/6;
|
||||||
else grav = gs.gravity;
|
else grav = gs.gravity;
|
||||||
}
|
}
|
||||||
|
@ -4269,11 +4269,11 @@ void fall_common(DDukeActor *actor, int playernum, int JIBS6, int DRONE, int BLO
|
||||||
double grav;
|
double grav;
|
||||||
|
|
||||||
int sphit = fallspecial? fallspecial(actor, playernum) : 0;
|
int sphit = fallspecial? fallspecial(actor, playernum) : 0;
|
||||||
if (fi.floorspace(actor->sector()))
|
if (floorspace(actor->sector()))
|
||||||
grav = 0;
|
grav = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (fi.ceilingspace(actor->sector()) || actor->sector()->lotag == 2)
|
if (ceilingspace(actor->sector()) || actor->sector()->lotag == 2)
|
||||||
grav = gs.gravity / 6;
|
grav = gs.gravity / 6;
|
||||||
else grav = gs.gravity;
|
else grav = gs.gravity;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,46 +43,6 @@ This file contains parts of DukeGDX by Alexander Makarov-[M210] (m210-2007@mail.
|
||||||
BEGIN_DUKE_NS
|
BEGIN_DUKE_NS
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
bool ceilingspace_d(sectortype* sectp)
|
|
||||||
{
|
|
||||||
if (sectp && (sectp->ceilingstat & CSTAT_SECTOR_SKY) && sectp->ceilingpal == 0)
|
|
||||||
{
|
|
||||||
switch(sectp->ceilingpicnum)
|
|
||||||
{
|
|
||||||
case MOONSKY1:
|
|
||||||
case BIGORBIT1:
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
bool floorspace_d(sectortype* sectp)
|
|
||||||
{
|
|
||||||
if (sectp && (sectp->floorstat & CSTAT_SECTOR_SKY) && sectp->ceilingpal == 0)
|
|
||||||
{
|
|
||||||
switch(sectp->floorpicnum)
|
|
||||||
{
|
|
||||||
case MOONSKY1:
|
|
||||||
case BIGORBIT1:
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -758,10 +718,10 @@ void movefallers_d(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
double grav;
|
double grav;
|
||||||
if (fi.floorspace(act->sector())) grav = 0;
|
if (floorspace(act->sector())) grav = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (fi.ceilingspace(act->sector()))
|
if (ceilingspace(act->sector()))
|
||||||
grav = gs.gravity / 6;
|
grav = gs.gravity / 6;
|
||||||
else
|
else
|
||||||
grav = gs.gravity;
|
grav = gs.gravity;
|
||||||
|
|
|
@ -45,47 +45,6 @@ void resetpins(sectortype* sect);
|
||||||
void resetlanepics(void);
|
void resetlanepics(void);
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
bool ceilingspace_r(sectortype* sectp)
|
|
||||||
{
|
|
||||||
if (sectp && (sectp->ceilingstat & CSTAT_SECTOR_SKY) && sectp->ceilingpal == 0)
|
|
||||||
{
|
|
||||||
switch(sectp->ceilingpicnum)
|
|
||||||
{
|
|
||||||
case MOONSKY1:
|
|
||||||
case BIGORBIT1:
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
bool floorspace_r(sectortype* sectp)
|
|
||||||
{
|
|
||||||
if (sectp && (sectp->floorstat & CSTAT_SECTOR_SKY) && sectp->ceilingpal == 0)
|
|
||||||
{
|
|
||||||
switch(sectp->floorpicnum)
|
|
||||||
{
|
|
||||||
case MOONSKY1:
|
|
||||||
case BIGORBIT1:
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -625,10 +584,10 @@ void movefallers_r(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
double grav;
|
double grav;
|
||||||
if (fi.floorspace(act->sector())) grav = 0;
|
if (floorspace(act->sector())) grav = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (fi.ceilingspace(act->sector()))
|
if (ceilingspace(act->sector()))
|
||||||
grav = gs.gravity / 6;
|
grav = gs.gravity / 6;
|
||||||
else
|
else
|
||||||
grav = gs.gravity;
|
grav = gs.gravity;
|
||||||
|
|
|
@ -380,6 +380,7 @@ enum
|
||||||
TFLAG_SLIME = 1 << 4,
|
TFLAG_SLIME = 1 << 4,
|
||||||
TFLAG_DOORWALL = 1 << 5,
|
TFLAG_DOORWALL = 1 << 5,
|
||||||
TFLAG_BLOCKDOOR = 1 << 6,
|
TFLAG_BLOCKDOOR = 1 << 6,
|
||||||
|
TFLAG_OUTERSPACE = 1 << 7,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -54,10 +54,6 @@ void checkhitdefault_r(DDukeActor* i, DDukeActor* sn);
|
||||||
void checksectors_d(int snum);
|
void checksectors_d(int snum);
|
||||||
void checksectors_r(int snum);
|
void checksectors_r(int snum);
|
||||||
|
|
||||||
bool ceilingspace_d(sectortype*);
|
|
||||||
bool ceilingspace_r(sectortype*);
|
|
||||||
bool floorspace_d(sectortype*);
|
|
||||||
bool floorspace_r(sectortype*);
|
|
||||||
void addweapon_d(player_struct* p, int weapon, bool wswitch);
|
void addweapon_d(player_struct* p, int weapon, bool wswitch);
|
||||||
void addweapon_r(player_struct* p, int weapon, bool wswitch);
|
void addweapon_r(player_struct* p, int weapon, bool wswitch);
|
||||||
void hitradius_d(DDukeActor* i, int r, int hp1, int hp2, int hp3, int hp4);
|
void hitradius_d(DDukeActor* i, int r, int hp1, int hp2, int hp3, int hp4);
|
||||||
|
@ -122,8 +118,6 @@ void SetDispatcher()
|
||||||
checksectors_d,
|
checksectors_d,
|
||||||
spawninit_d,
|
spawninit_d,
|
||||||
|
|
||||||
ceilingspace_d,
|
|
||||||
floorspace_d,
|
|
||||||
addweapon_d,
|
addweapon_d,
|
||||||
hitradius_d,
|
hitradius_d,
|
||||||
lotsofmoney_d,
|
lotsofmoney_d,
|
||||||
|
@ -164,8 +158,6 @@ void SetDispatcher()
|
||||||
checksectors_r,
|
checksectors_r,
|
||||||
spawninit_r,
|
spawninit_r,
|
||||||
|
|
||||||
ceilingspace_r,
|
|
||||||
floorspace_r,
|
|
||||||
addweapon_r,
|
addweapon_r,
|
||||||
hitradius_r,
|
hitradius_r,
|
||||||
lotsoffeathers_r,
|
lotsoffeathers_r,
|
||||||
|
|
|
@ -86,8 +86,6 @@ struct Dispatcher
|
||||||
void (*checksectors)(int low);
|
void (*checksectors)(int low);
|
||||||
DDukeActor* (*spawninit)(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>* actors);
|
DDukeActor* (*spawninit)(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>* actors);
|
||||||
|
|
||||||
bool (*ceilingspace)(sectortype* sectp);
|
|
||||||
bool (*floorspace)(sectortype* sectp);
|
|
||||||
void (*addweapon)(player_struct *p, int weapon, bool wswitch);
|
void (*addweapon)(player_struct *p, int weapon, bool wswitch);
|
||||||
void (*hitradius)(DDukeActor* i, int r, int hp1, int hp2, int hp3, int hp4);
|
void (*hitradius)(DDukeActor* i, int r, int hp1, int hp2, int hp3, int hp4);
|
||||||
void (*lotsofmoney)(DDukeActor *s, int n);
|
void (*lotsofmoney)(DDukeActor *s, int n);
|
||||||
|
|
|
@ -21,6 +21,9 @@ void addtorch(sectortype* sect, int shade, int lotag);
|
||||||
void addlightning(sectortype* sect, int shade);
|
void addlightning(sectortype* sect, int shade);
|
||||||
int addambient(int hitag, int lotag);
|
int addambient(int hitag, int lotag);
|
||||||
|
|
||||||
|
bool ceilingspace(sectortype* sectp);
|
||||||
|
bool floorspace(sectortype* sectp);
|
||||||
|
|
||||||
void movecyclers(void);
|
void movecyclers(void);
|
||||||
void movedummyplayers(void);
|
void movedummyplayers(void);
|
||||||
void resetlanepics(void);
|
void resetlanepics(void);
|
||||||
|
|
|
@ -2507,7 +2507,7 @@ int ParseState::parse(void)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case concmd_ifinspace:
|
case concmd_ifinspace:
|
||||||
parseifelse(fi.ceilingspace(g_ac->sector()));
|
parseifelse(ceilingspace(g_ac->sector()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case concmd_spritepal:
|
case concmd_spritepal:
|
||||||
|
@ -2815,7 +2815,7 @@ int ParseState::parse(void)
|
||||||
insptr++;
|
insptr++;
|
||||||
break;
|
break;
|
||||||
case concmd_ifinouterspace:
|
case concmd_ifinouterspace:
|
||||||
parseifelse( fi.floorspace(g_ac->sector()));
|
parseifelse( floorspace(g_ac->sector()));
|
||||||
break;
|
break;
|
||||||
case concmd_ifnotmoving:
|
case concmd_ifnotmoving:
|
||||||
parseifelse( g_ac->movflag > kHitSector );
|
parseifelse( g_ac->movflag > kHitSector );
|
||||||
|
|
|
@ -44,6 +44,29 @@ BEGIN_DUKE_NS
|
||||||
|
|
||||||
static int interptype[] = { Interp_Sect_Floorz, Interp_Sect_Ceilingz, Interp_Wall_X, Interp_Wall_Y };
|
static int interptype[] = { Interp_Sect_Floorz, Interp_Sect_Ceilingz, Interp_Wall_X, Interp_Wall_Y };
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bool ceilingspace(sectortype* sectp)
|
||||||
|
{
|
||||||
|
return (sectp && (sectp->ceilingstat & CSTAT_SECTOR_SKY) && sectp->ceilingpal == 0 && (tileflags(sectp->ceilingpicnum) & TFLAG_OUTERSPACE));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bool floorspace(sectortype* sectp)
|
||||||
|
{
|
||||||
|
return (sectp && (sectp->floorstat & CSTAT_SECTOR_SKY) && sectp->floorpal == 0 && (tileflags(sectp->floorpicnum) & TFLAG_OUTERSPACE));
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
|
@ -8,3 +8,4 @@ define TFLAG_CLEARINVENTORY 8
|
||||||
define TFLAG_SLIME 16
|
define TFLAG_SLIME 16
|
||||||
define TFLAG_DOORWALL 32
|
define TFLAG_DOORWALL 32
|
||||||
define TFLAG_BLOCKDOOR 64
|
define TFLAG_BLOCKDOOR 64
|
||||||
|
define TFLAG_OUTERSPACE 128
|
||||||
|
|
|
@ -187,3 +187,8 @@ tileflag TFLAG_DOORWALL {
|
||||||
DOORTILE22
|
DOORTILE22
|
||||||
DOORTILE23
|
DOORTILE23
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tileflag TFLAG_OUTERSPACE {
|
||||||
|
MOONSKY1
|
||||||
|
BIGORBIT1
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
include "engine/defines.def"
|
||||||
|
|
||||||
spawnclasses
|
spawnclasses
|
||||||
{
|
{
|
||||||
2430 = RedneckCactusLargeYellow
|
2430 = RedneckCactusLargeYellow
|
||||||
|
|
Loading…
Reference in a new issue