mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 15:40:58 +00:00
- clear all collision flags from generic controller sprites
Taken from EDuke32 - there seem to be a few maps which need this. Also consolidate a bit of setup code between Duke and RR.
This commit is contained in:
parent
7e8e6b1cde
commit
1df66f4971
4 changed files with 42 additions and 38 deletions
|
@ -201,6 +201,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors);
|
|||
int startrts(int lumpNum, int localPlayer);
|
||||
|
||||
void pickrandomspot(int pn);
|
||||
void premapcontroller(DDukeActor* ac);
|
||||
void resetinventory(int pn);
|
||||
void resetplayerstats(int pn);
|
||||
void resetweapons(int pn);
|
||||
|
|
|
@ -43,6 +43,41 @@ BEGIN_DUKE_NS
|
|||
|
||||
int which_palookup = 9;
|
||||
|
||||
void premapcontroller(DDukeActor* ac)
|
||||
{
|
||||
switch (ac->spr.picnum)
|
||||
{
|
||||
case ACTIVATOR:
|
||||
case ACTIVATORLOCKED:
|
||||
case LOCATORS:
|
||||
case MASTERSWITCH:
|
||||
case MUSICANDSFX:
|
||||
case RESPAWN:
|
||||
case SECTOREFFECTOR:
|
||||
case TOUCHPLATE:
|
||||
ac->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN | CSTAT_SPRITE_ALIGNMENT_MASK);
|
||||
break;
|
||||
|
||||
case GPSPEED:
|
||||
ac->sector()->extra = ac->spr.lotag;
|
||||
deletesprite(ac);
|
||||
break;
|
||||
|
||||
case CYCLER:
|
||||
if (numcyclers >= MAXCYCLERS)
|
||||
I_Error("Too many cycling sectors.");
|
||||
cyclers[numcyclers].sector = ac->sector();
|
||||
cyclers[numcyclers].lotag = ac->spr.lotag;
|
||||
cyclers[numcyclers].shade1 = ac->spr.shade;
|
||||
cyclers[numcyclers].shade2 = ac->sector()->floorshade;
|
||||
cyclers[numcyclers].hitag = ac->spr.hitag;
|
||||
cyclers[numcyclers].state = (ac->spr.ang == 1536);
|
||||
numcyclers++;
|
||||
deletesprite(ac);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
|
|
@ -285,26 +285,8 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
|
|||
ps[0].exit.X = ac->spr.pos.X;
|
||||
ps[0].exit.Y = ac->spr.pos.Y;
|
||||
}
|
||||
else switch (ac->spr.picnum)
|
||||
{
|
||||
case GPSPEED:
|
||||
ac->sector()->extra = ac->spr.lotag;
|
||||
deletesprite(ac);
|
||||
break;
|
||||
|
||||
case CYCLER:
|
||||
if (numcyclers >= MAXCYCLERS)
|
||||
I_Error("Too many cycling sectors.");
|
||||
cyclers[numcyclers].sector = ac->sector();
|
||||
cyclers[numcyclers].lotag = ac->spr.lotag;
|
||||
cyclers[numcyclers].shade1 = ac->spr.shade;
|
||||
cyclers[numcyclers].shade2 = ac->sector()->floorshade;
|
||||
cyclers[numcyclers].hitag = ac->spr.hitag;
|
||||
cyclers[numcyclers].state = (ac->spr.ang == 1536);
|
||||
numcyclers++;
|
||||
deletesprite(ac);
|
||||
break;
|
||||
}
|
||||
else
|
||||
premapcontroller(ac);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -531,28 +531,14 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
|
|||
}
|
||||
else switch (ac->spr.picnum)
|
||||
{
|
||||
default:
|
||||
premapcontroller(ac);
|
||||
break;
|
||||
|
||||
case NUKEBUTTON:
|
||||
chickenplant = 1;
|
||||
break;
|
||||
|
||||
case GPSPEED:
|
||||
ac->sector()->extra = ac->spr.lotag;
|
||||
deletesprite(ac);
|
||||
break;
|
||||
|
||||
case CYCLER:
|
||||
if (numcyclers >= MAXCYCLERS)
|
||||
I_Error("Too many cycling sectors.");
|
||||
cyclers[numcyclers].sector = ac->sector();
|
||||
cyclers[numcyclers].lotag = ac->spr.lotag;
|
||||
cyclers[numcyclers].shade1 = ac->spr.shade;
|
||||
cyclers[numcyclers].shade2 = ac->sector()->floorshade;
|
||||
cyclers[numcyclers].hitag = ac->spr.hitag;
|
||||
cyclers[numcyclers].state = (ac->spr.ang == 1536);
|
||||
numcyclers++;
|
||||
deletesprite(ac);
|
||||
break;
|
||||
|
||||
case RRTILE18:
|
||||
addtorch(ac);
|
||||
deletesprite(ac);
|
||||
|
|
Loading…
Reference in a new issue