mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- Update scripting branch to latest version of trunk.
SVN r3767 (scripting)
This commit is contained in:
commit
d85604da19
22 changed files with 99 additions and 105 deletions
|
@ -1158,7 +1158,10 @@ void AM_NewResolution()
|
||||||
|
|
||||||
CCMD (togglemap)
|
CCMD (togglemap)
|
||||||
{
|
{
|
||||||
|
if (gameaction == ga_nothing)
|
||||||
|
{
|
||||||
gameaction = ga_togglemap;
|
gameaction = ga_togglemap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
|
@ -174,6 +174,7 @@ class APlayerChunk : public APlayerPawn
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PPF_NOTHRUSTWHENINVUL = 1, // Attacks do not thrust the player if they are invulnerable.
|
PPF_NOTHRUSTWHENINVUL = 1, // Attacks do not thrust the player if they are invulnerable.
|
||||||
|
PPF_CANSUPERMORPH = 2, // Being remorphed into this class can give you a Tome of Power
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -92,7 +92,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BatMove)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle Z movement
|
// Handle Z movement
|
||||||
self->z = self->target->z + 2*FloatBobOffsets[self->args[0]];
|
self->z = self->target->z + 16*finesine[self->args[0] << BOBTOFINESHIFT];
|
||||||
self->args[0] = (self->args[0]+3)&63;
|
self->args[0] = (self->args[0]+3)&63;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,9 +175,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_BishopChase)
|
||||||
{
|
{
|
||||||
PARAM_ACTION_PROLOGUE;
|
PARAM_ACTION_PROLOGUE;
|
||||||
|
|
||||||
self->z -= FloatBobOffsets[self->special2] >> 1;
|
self->z -= finesine[self->special2 << BOBTOFINESHIFT] * 4;
|
||||||
self->special2 = (self->special2 + 4) & 63;
|
self->special2 = (self->special2 + 4) & 63;
|
||||||
self->z += FloatBobOffsets[self->special2] >> 1;
|
self->z += finesine[self->special2 << BOBTOFINESHIFT] * 4;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,17 +146,17 @@ DEFINE_ACTION_FUNCTION(AActor, A_CHolyAttack2)
|
||||||
switch (j)
|
switch (j)
|
||||||
{ // float bob index
|
{ // float bob index
|
||||||
case 0:
|
case 0:
|
||||||
mo->special2 = pr_holyatk2()&7; // upper-left
|
mo->special2 = pr_holyatk2(8 << BOBTOFINESHIFT); // upper-left
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
mo->special2 = 32+(pr_holyatk2()&7); // upper-right
|
mo->special2 = FINEANGLES/2 + pr_holyatk2(8 << BOBTOFINESHIFT); // upper-right
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
mo->special2 = (32+(pr_holyatk2()&7))<<16; // lower-left
|
mo->special2 = (FINEANGLES/2 + pr_holyatk2(8 << BOBTOFINESHIFT)) << 16; // lower-left
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
i = pr_holyatk2();
|
i = pr_holyatk2(8 << BOBTOFINESHIFT);
|
||||||
mo->special2 = ((32+(i&7))<<16)+32+(pr_holyatk2()&7);
|
mo->special2 = ((FINEANGLES/2 + i) << 16) + FINEANGLES/2 + pr_holyatk2(8 << BOBTOFINESHIFT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
mo->z = self->z;
|
mo->z = self->z;
|
||||||
|
@ -463,23 +463,19 @@ void CHolyWeave (AActor *actor, FRandom &pr_random)
|
||||||
int weaveXY, weaveZ;
|
int weaveXY, weaveZ;
|
||||||
int angle;
|
int angle;
|
||||||
|
|
||||||
weaveXY = actor->special2>>16;
|
weaveXY = actor->special2 >> 16;
|
||||||
weaveZ = actor->special2&0xFFFF;
|
weaveZ = actor->special2 & FINEMASK;
|
||||||
angle = (actor->angle+ANG90)>>ANGLETOFINESHIFT;
|
angle = (actor->angle + ANG90) >> ANGLETOFINESHIFT;
|
||||||
newX = actor->x-FixedMul(finecosine[angle],
|
newX = actor->x - FixedMul(finecosine[angle], finesine[weaveXY] * 32);
|
||||||
FloatBobOffsets[weaveXY]<<2);
|
newY = actor->y - FixedMul(finesine[angle], finesine[weaveXY] * 32);
|
||||||
newY = actor->y-FixedMul(finesine[angle],
|
weaveXY = (weaveXY + pr_random(5 << BOBTOFINESHIFT)) & FINEMASK;
|
||||||
FloatBobOffsets[weaveXY]<<2);
|
newX += FixedMul(finecosine[angle], finesine[weaveXY] * 32);
|
||||||
weaveXY = (weaveXY+(pr_random()%5))&63;
|
newY += FixedMul(finesine[angle], finesine[weaveXY] * 32);
|
||||||
newX += FixedMul(finecosine[angle],
|
|
||||||
FloatBobOffsets[weaveXY]<<2);
|
|
||||||
newY += FixedMul(finesine[angle],
|
|
||||||
FloatBobOffsets[weaveXY]<<2);
|
|
||||||
P_TryMove(actor, newX, newY, true);
|
P_TryMove(actor, newX, newY, true);
|
||||||
actor->z -= FloatBobOffsets[weaveZ]<<1;
|
actor->z -= finesine[weaveZ] * 16;
|
||||||
weaveZ = (weaveZ+(pr_random()%5))&63;
|
weaveZ = (weaveZ + pr_random(5 << BOBTOFINESHIFT)) & FINEMASK;
|
||||||
actor->z += FloatBobOffsets[weaveZ]<<1;
|
actor->z += finesine[weaveZ] * 16;
|
||||||
actor->special2 = weaveZ+(weaveXY<<16);
|
actor->special2 = weaveZ + (weaveXY << 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
|
@ -145,8 +145,8 @@ DEFINE_ACTION_FUNCTION(AActor, A_FiredChase)
|
||||||
if (self->threshold) self->threshold--;
|
if (self->threshold) self->threshold--;
|
||||||
|
|
||||||
// Float up and down
|
// Float up and down
|
||||||
self->z += FloatBobOffsets[weaveindex];
|
self->z += finesine[weaveindex << BOBTOFINESHIFT] * 8;
|
||||||
self->special1 = (weaveindex+2)&63;
|
self->special1 = (weaveindex + 2) & 63;
|
||||||
|
|
||||||
// Ensure it stays above certain height
|
// Ensure it stays above certain height
|
||||||
if (self->z < self->floorz + (64*FRACUNIT))
|
if (self->z < self->floorz + (64*FRACUNIT))
|
||||||
|
|
|
@ -420,8 +420,8 @@ DEFINE_ACTION_FUNCTION(AActor, A_PoisonBagDamage)
|
||||||
|
|
||||||
P_RadiusAttack (self, self->target, 4, 40, self->DamageType, true);
|
P_RadiusAttack (self, self->target, 4, 40, self->DamageType, true);
|
||||||
bobIndex = self->special2;
|
bobIndex = self->special2;
|
||||||
self->z += FloatBobOffsets[bobIndex]>>4;
|
self->z += finesine[bobIndex << BOBTOFINESHIFT] >> 1;
|
||||||
self->special2 = (bobIndex+1)&63;
|
self->special2 = (bobIndex + 1) & 63;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,8 +90,8 @@ DEFINE_ACTION_FUNCTION(AActor, A_FogMove)
|
||||||
if ((self->args[3] % 4) == 0)
|
if ((self->args[3] % 4) == 0)
|
||||||
{
|
{
|
||||||
weaveindex = self->special2;
|
weaveindex = self->special2;
|
||||||
self->z += FloatBobOffsets[weaveindex]>>1;
|
self->z += finesine[weaveindex << BOBTOFINESHIFT] * 4;
|
||||||
self->special2 = (weaveindex+1)&63;
|
self->special2 = (weaveindex + 1) & 63;
|
||||||
}
|
}
|
||||||
|
|
||||||
angle = self->angle>>ANGLETOFINESHIFT;
|
angle = self->angle>>ANGLETOFINESHIFT;
|
||||||
|
|
|
@ -186,7 +186,7 @@ void KSpiritInit (AActor *spirit, AActor *korax)
|
||||||
spirit->health = KORAX_SPIRIT_LIFETIME;
|
spirit->health = KORAX_SPIRIT_LIFETIME;
|
||||||
|
|
||||||
spirit->tracer = korax; // Swarm around korax
|
spirit->tracer = korax; // Swarm around korax
|
||||||
spirit->special2 = 32+(pr_kspiritinit()&7); // Float bob index
|
spirit->special2 = FINEANGLES/2 + pr_kspiritinit(8 << BOBTOFINESHIFT); // Float bob index
|
||||||
spirit->args[0] = 10; // initial turn value
|
spirit->args[0] = 10; // initial turn value
|
||||||
spirit->args[1] = 0; // initial look angle
|
spirit->args[1] = 0; // initial look angle
|
||||||
|
|
||||||
|
|
|
@ -246,8 +246,8 @@ DEFINE_ACTION_FUNCTION(AActor, A_WraithChase)
|
||||||
PARAM_ACTION_PROLOGUE;
|
PARAM_ACTION_PROLOGUE;
|
||||||
|
|
||||||
int weaveindex = self->special1;
|
int weaveindex = self->special1;
|
||||||
self->z += FloatBobOffsets[weaveindex];
|
self->z += finesine[weaveindex << BOBTOFINESHIFT] * 8;
|
||||||
self->special1 = (weaveindex+2)&63;
|
self->special1 = (weaveindex + 2) & 63;
|
||||||
// if (self->floorclip > 0)
|
// if (self->floorclip > 0)
|
||||||
// {
|
// {
|
||||||
// P_SetMobjState(self, S_WRAITH_RAISE2);
|
// P_SetMobjState(self, S_WRAITH_RAISE2);
|
||||||
|
|
|
@ -47,6 +47,13 @@ bool P_MorphPlayer (player_t *activator, player_t *p, PClassPlayerPawn *spawntyp
|
||||||
}
|
}
|
||||||
if (p->morphTics)
|
if (p->morphTics)
|
||||||
{ // Player is already a beast
|
{ // Player is already a beast
|
||||||
|
if ((p->mo->GetClass() == spawntype)
|
||||||
|
&& (p->mo->PlayerFlags & PPF_CANSUPERMORPH)
|
||||||
|
&& (p->morphTics < (((duration) ? duration : MORPHTICS) - TICRATE))
|
||||||
|
&& (p->mo->FindInventory (RUNTIME_CLASS(APowerWeaponLevel2), true) == NULL))
|
||||||
|
{ // Make a super chicken
|
||||||
|
p->mo->GiveInventoryType (RUNTIME_CLASS(APowerWeaponLevel2));
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (p->health <= 0)
|
if (p->health <= 0)
|
||||||
|
|
|
@ -385,7 +385,11 @@ void FListMenuItemPlayerDisplay::UpdateRandomClass()
|
||||||
if (++mRandomClass >= (int)PlayerClasses.Size ()) mRandomClass = 0;
|
if (++mRandomClass >= (int)PlayerClasses.Size ()) mRandomClass = 0;
|
||||||
mPlayerClass = &PlayerClasses[mRandomClass];
|
mPlayerClass = &PlayerClasses[mRandomClass];
|
||||||
mPlayerState = GetDefaultByType (mPlayerClass->Type)->SeeState;
|
mPlayerState = GetDefaultByType (mPlayerClass->Type)->SeeState;
|
||||||
mPlayerTics = mPlayerState->GetTics();
|
if (mPlayerState == NULL)
|
||||||
|
{ // No see state, so try spawn state.
|
||||||
|
mPlayerState = GetDefaultByType (mPlayerClass->Type)->SpawnState;
|
||||||
|
}
|
||||||
|
mPlayerTics = mPlayerState != NULL ? mPlayerState->GetTics() : -1;
|
||||||
mRandomTimer = 6;
|
mRandomTimer = 6;
|
||||||
|
|
||||||
// Since the newly displayed class may used a different translation
|
// Since the newly displayed class may used a different translation
|
||||||
|
@ -435,7 +439,11 @@ void FListMenuItemPlayerDisplay::SetPlayerClass(int classnum, bool force)
|
||||||
{
|
{
|
||||||
mPlayerClass = &PlayerClasses[classnum];
|
mPlayerClass = &PlayerClasses[classnum];
|
||||||
mPlayerState = GetDefaultByType (mPlayerClass->Type)->SeeState;
|
mPlayerState = GetDefaultByType (mPlayerClass->Type)->SeeState;
|
||||||
mPlayerTics = mPlayerState->GetTics();
|
if (mPlayerState == NULL)
|
||||||
|
{ // No see state, so try spawn state.
|
||||||
|
mPlayerState = GetDefaultByType (mPlayerClass->Type)->SpawnState;
|
||||||
|
}
|
||||||
|
mPlayerTics = mPlayerState != NULL ? mPlayerState->GetTics() : -1;
|
||||||
mClassNum = classnum;
|
mClassNum = classnum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -557,6 +565,8 @@ void FListMenuItemPlayerDisplay::Drawer(bool selected)
|
||||||
spriteframe_t *sprframe;
|
spriteframe_t *sprframe;
|
||||||
fixed_t scaleX, scaleY;
|
fixed_t scaleX, scaleY;
|
||||||
|
|
||||||
|
if (mPlayerState != NULL)
|
||||||
|
{
|
||||||
if (mSkin == 0)
|
if (mSkin == 0)
|
||||||
{
|
{
|
||||||
sprframe = &SpriteFrames[sprites[mPlayerState->sprite].spriteframes + mPlayerState->GetFrame()];
|
sprframe = &SpriteFrames[sprites[mPlayerState->sprite].spriteframes + mPlayerState->GetFrame()];
|
||||||
|
@ -569,6 +579,7 @@ void FListMenuItemPlayerDisplay::Drawer(bool selected)
|
||||||
scaleX = skins[mSkin].ScaleX;
|
scaleX = skins[mSkin].ScaleX;
|
||||||
scaleY = skins[mSkin].ScaleY;
|
scaleY = skins[mSkin].ScaleY;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (sprframe != NULL)
|
if (sprframe != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3362,6 +3362,10 @@ enum EACSFunctions
|
||||||
ACSF_ACS_NamedLockedExecuteDoor,
|
ACSF_ACS_NamedLockedExecuteDoor,
|
||||||
ACSF_ACS_NamedExecuteWithResult,
|
ACSF_ACS_NamedExecuteWithResult,
|
||||||
ACSF_ACS_NamedExecuteAlways,
|
ACSF_ACS_NamedExecuteAlways,
|
||||||
|
|
||||||
|
// ZDaemon
|
||||||
|
ACSF_GetTeamScore = 19620,
|
||||||
|
ACSF_SetTeamScore,
|
||||||
};
|
};
|
||||||
|
|
||||||
int DLevelScript::SideFromID(int id, int side)
|
int DLevelScript::SideFromID(int id, int side)
|
||||||
|
@ -5292,20 +5296,24 @@ int DLevelScript::RunScript ()
|
||||||
|
|
||||||
case PCD_SCRIPTWAIT:
|
case PCD_SCRIPTWAIT:
|
||||||
statedata = STACK(1);
|
statedata = STACK(1);
|
||||||
|
sp--;
|
||||||
|
scriptwait:
|
||||||
if (controller->RunningScripts.CheckKey(statedata) != NULL)
|
if (controller->RunningScripts.CheckKey(statedata) != NULL)
|
||||||
state = SCRIPT_ScriptWait;
|
state = SCRIPT_ScriptWait;
|
||||||
else
|
else
|
||||||
state = SCRIPT_ScriptWaitPre;
|
state = SCRIPT_ScriptWaitPre;
|
||||||
sp--;
|
|
||||||
PutLast ();
|
PutLast ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCD_SCRIPTWAITDIRECT:
|
case PCD_SCRIPTWAITDIRECT:
|
||||||
state = SCRIPT_ScriptWait;
|
|
||||||
statedata = uallong(pc[0]);
|
statedata = uallong(pc[0]);
|
||||||
pc++;
|
pc++;
|
||||||
PutLast ();
|
goto scriptwait;
|
||||||
break;
|
|
||||||
|
case PCD_SCRIPTWAITNAMED:
|
||||||
|
statedata = -FName(FBehavior::StaticLookupString(STACK(1)));
|
||||||
|
sp--;
|
||||||
|
goto scriptwait;
|
||||||
|
|
||||||
case PCD_CLEARLINESPECIAL:
|
case PCD_CLEARLINESPECIAL:
|
||||||
if (activationline != NULL)
|
if (activationline != NULL)
|
||||||
|
|
|
@ -598,8 +598,9 @@ public:
|
||||||
PCD_STRCPYTOMAPCHRANGE, // [FDARI] input range (copy string to all/part of array)
|
PCD_STRCPYTOMAPCHRANGE, // [FDARI] input range (copy string to all/part of array)
|
||||||
PCD_STRCPYTOWORLDCHRANGE,
|
PCD_STRCPYTOWORLDCHRANGE,
|
||||||
PCD_STRCPYTOGLOBALCHRANGE,
|
PCD_STRCPYTOGLOBALCHRANGE,
|
||||||
PCD_PUSHFUNCTION,
|
PCD_PUSHFUNCTION, // from Eternity
|
||||||
/*360*/ PCD_CALLSTACK,
|
/*360*/ PCD_CALLSTACK, // from Eternity
|
||||||
|
PCD_SCRIPTWAITNAMED,
|
||||||
|
|
||||||
/*361*/ PCODE_COMMAND_COUNT
|
/*361*/ PCODE_COMMAND_COUNT
|
||||||
};
|
};
|
||||||
|
|
|
@ -114,8 +114,6 @@ void P_UnPredictPlayer ();
|
||||||
#define ONCEILINGZ FIXED_MAX
|
#define ONCEILINGZ FIXED_MAX
|
||||||
#define FLOATRANDZ (FIXED_MAX-1)
|
#define FLOATRANDZ (FIXED_MAX-1)
|
||||||
|
|
||||||
extern fixed_t FloatBobOffsets[64];
|
|
||||||
|
|
||||||
APlayerPawn *P_SpawnPlayer (struct FPlayerStart *mthing, int playernum, bool tempplayer=false);
|
APlayerPawn *P_SpawnPlayer (struct FPlayerStart *mthing, int playernum, bool tempplayer=false);
|
||||||
|
|
||||||
void P_ThrustMobj (AActor *mo, angle_t angle, fixed_t move);
|
void P_ThrustMobj (AActor *mo, angle_t angle, fixed_t move);
|
||||||
|
|
|
@ -119,47 +119,6 @@ CUSTOM_CVAR (Float, sv_gravity, 800.f, CVAR_SERVERINFO|CVAR_NOSAVE)
|
||||||
|
|
||||||
CVAR (Bool, cl_missiledecals, true, CVAR_ARCHIVE)
|
CVAR (Bool, cl_missiledecals, true, CVAR_ARCHIVE)
|
||||||
CVAR (Bool, addrocketexplosion, false, CVAR_ARCHIVE)
|
CVAR (Bool, addrocketexplosion, false, CVAR_ARCHIVE)
|
||||||
|
|
||||||
fixed_t FloatBobOffsets[64] =
|
|
||||||
{
|
|
||||||
0, 51389, 102283, 152192,
|
|
||||||
200636, 247147, 291278, 332604,
|
|
||||||
370727, 405280, 435929, 462380,
|
|
||||||
484378, 501712, 514213, 521763,
|
|
||||||
524287, 521763, 514213, 501712,
|
|
||||||
484378, 462380, 435929, 405280,
|
|
||||||
370727, 332604, 291278, 247147,
|
|
||||||
200636, 152192, 102283, 51389,
|
|
||||||
-1, -51390, -102284, -152193,
|
|
||||||
-200637, -247148, -291279, -332605,
|
|
||||||
-370728, -405281, -435930, -462381,
|
|
||||||
-484380, -501713, -514215, -521764,
|
|
||||||
-524288, -521764, -514214, -501713,
|
|
||||||
-484379, -462381, -435930, -405280,
|
|
||||||
-370728, -332605, -291279, -247148,
|
|
||||||
-200637, -152193, -102284, -51389
|
|
||||||
};
|
|
||||||
|
|
||||||
fixed_t FloatBobDiffs[64] =
|
|
||||||
{
|
|
||||||
51389, 51389, 50894, 49909, 48444,
|
|
||||||
46511, 44131, 41326, 38123,
|
|
||||||
34553, 30649, 26451, 21998,
|
|
||||||
17334, 12501, 7550, 2524,
|
|
||||||
-2524, -7550, -12501, -17334,
|
|
||||||
-21998, -26451, -30649, -34553,
|
|
||||||
-38123, -41326, -44131, -46511,
|
|
||||||
-48444, -49909, -50894, -51390,
|
|
||||||
-51389, -50894, -49909, -48444,
|
|
||||||
-46511, -44131, -41326, -38123,
|
|
||||||
-34553, -30649, -26451, -21999,
|
|
||||||
-17333, -12502, -7549, -2524,
|
|
||||||
2524, 7550, 12501, 17334,
|
|
||||||
21998, 26451, 30650, 34552,
|
|
||||||
38123, 41326, 44131, 46511,
|
|
||||||
48444, 49909, 50895
|
|
||||||
};
|
|
||||||
|
|
||||||
CVAR (Int, cl_pufftype, 0, CVAR_ARCHIVE);
|
CVAR (Int, cl_pufftype, 0, CVAR_ARCHIVE);
|
||||||
CVAR (Int, cl_bloodtype, 0, CVAR_ARCHIVE);
|
CVAR (Int, cl_bloodtype, 0, CVAR_ARCHIVE);
|
||||||
|
|
||||||
|
|
|
@ -44,14 +44,15 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define FINEANGLEBITS 13
|
||||||
#define FINEANGLES 8192
|
#define FINEANGLES 8192
|
||||||
#define FINEMASK (FINEANGLES-1)
|
#define FINEMASK (FINEANGLES-1)
|
||||||
|
|
||||||
|
|
||||||
// 0x100000000 to 0x2000
|
// 0x100000000 to 0x2000
|
||||||
#define ANGLETOFINESHIFT 19
|
#define ANGLETOFINESHIFT 19
|
||||||
|
|
||||||
|
#define BOBTOFINESHIFT (FINEANGLEBITS - 6)
|
||||||
|
|
||||||
// Effective size is 10240.
|
// Effective size is 10240.
|
||||||
extern fixed_t finesine[5*FINEANGLES/4];
|
extern fixed_t finesine[5*FINEANGLES/4];
|
||||||
|
|
||||||
|
|
|
@ -355,7 +355,6 @@ int MatchString (const char *in, const char **strings);
|
||||||
struct StateCallData
|
struct StateCallData
|
||||||
{
|
{
|
||||||
FState *State;
|
FState *State;
|
||||||
AActor *Item;
|
|
||||||
bool Result;
|
bool Result;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,6 @@ bool ACustomInventory::CallStateChain (AActor *actor, FState * State)
|
||||||
bool result = false;
|
bool result = false;
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
|
|
||||||
StateCall.Item = this;
|
|
||||||
while (State != NULL)
|
while (State != NULL)
|
||||||
{
|
{
|
||||||
// Assume success. The code pointer will set this to false if necessary
|
// Assume success. The code pointer will set this to false if necessary
|
||||||
|
@ -2790,6 +2789,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckFloor)
|
||||||
// A_CheckCeiling
|
// A_CheckCeiling
|
||||||
// [GZ] Totally copied from A_CheckFloor, jumps if actor touches ceiling
|
// [GZ] Totally copied from A_CheckFloor, jumps if actor touches ceiling
|
||||||
//
|
//
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckCeiling)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckCeiling)
|
||||||
{
|
{
|
||||||
|
@ -2878,7 +2878,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Respawn)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
oktorespawn = P_CheckPosition(self, self->x, self->z, true);
|
oktorespawn = P_CheckPosition(self, self->x, self->y, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oktorespawn)
|
if (oktorespawn)
|
||||||
|
@ -4078,11 +4078,11 @@ void A_Weave(AActor *self, int xyspeed, int zspeed, fixed_t xydist, fixed_t zdis
|
||||||
|
|
||||||
if (xydist != 0 && xyspeed != 0)
|
if (xydist != 0 && xyspeed != 0)
|
||||||
{
|
{
|
||||||
dist = FixedMul(FloatBobOffsets[weaveXY], xydist);
|
dist = MulScale13(finesine[weaveXY << BOBTOFINESHIFT], xydist);
|
||||||
newX = self->x - FixedMul (finecosine[angle], dist);
|
newX = self->x - FixedMul (finecosine[angle], dist);
|
||||||
newY = self->y - FixedMul (finesine[angle], dist);
|
newY = self->y - FixedMul (finesine[angle], dist);
|
||||||
weaveXY = (weaveXY + xyspeed) & 63;
|
weaveXY = (weaveXY + xyspeed) & 63;
|
||||||
dist = FixedMul(FloatBobOffsets[weaveXY], xydist);
|
dist = MulScale13(finesine[weaveXY << BOBTOFINESHIFT], xydist);
|
||||||
newX += FixedMul (finecosine[angle], dist);
|
newX += FixedMul (finecosine[angle], dist);
|
||||||
newY += FixedMul (finesine[angle], dist);
|
newY += FixedMul (finesine[angle], dist);
|
||||||
if (!(self->flags5 & MF5_NOINTERACTION))
|
if (!(self->flags5 & MF5_NOINTERACTION))
|
||||||
|
@ -4099,12 +4099,11 @@ void A_Weave(AActor *self, int xyspeed, int zspeed, fixed_t xydist, fixed_t zdis
|
||||||
}
|
}
|
||||||
self->WeaveIndexXY = weaveXY;
|
self->WeaveIndexXY = weaveXY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zdist != 0 && zspeed != 0)
|
if (zdist != 0 && zspeed != 0)
|
||||||
{
|
{
|
||||||
self->z -= FixedMul(FloatBobOffsets[weaveZ], zdist);
|
self->z -= MulScale13(finesine[weaveZ << BOBTOFINESHIFT], zdist);
|
||||||
weaveZ = (weaveZ + zspeed) & 63;
|
weaveZ = (weaveZ + zspeed) & 63;
|
||||||
self->z += FixedMul(FloatBobOffsets[weaveZ], zdist);
|
self->z += MulScale13(finesine[weaveZ << BOBTOFINESHIFT], zdist);
|
||||||
self->WeaveIndexZ = weaveZ;
|
self->WeaveIndexZ = weaveZ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4441,6 +4440,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Warp)
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// ACS_Named* stuff
|
// ACS_Named* stuff
|
||||||
|
|
||||||
//
|
//
|
||||||
// These are exactly like their un-named line special equivalents, except
|
// These are exactly like their un-named line special equivalents, except
|
||||||
// they take strings instead of integers to indicate which script to run.
|
// they take strings instead of integers to indicate which script to run.
|
||||||
|
|
|
@ -333,6 +333,7 @@ static FFlagDef PlayerPawnFlags[] =
|
||||||
{
|
{
|
||||||
// PlayerPawn flags
|
// PlayerPawn flags
|
||||||
DEFINE_FLAG(PPF, NOTHRUSTWHENINVUL, APlayerPawn, PlayerFlags),
|
DEFINE_FLAG(PPF, NOTHRUSTWHENINVUL, APlayerPawn, PlayerFlags),
|
||||||
|
DEFINE_FLAG(PPF, CANSUPERMORPH, APlayerPawn, PlayerFlags),
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct FFlagList { const PClass * const *Type; FFlagDef *Defs; int NumDefs; } FlagLists[] =
|
static const struct FFlagList { const PClass * const *Type; FFlagDef *Defs; int NumDefs; } FlagLists[] =
|
||||||
|
|
|
@ -68,6 +68,7 @@ ACTOR ChickenPlayer : PlayerPawn native
|
||||||
Speed 1
|
Speed 1
|
||||||
Gravity 0.125
|
Gravity 0.125
|
||||||
+NOSKIN
|
+NOSKIN
|
||||||
|
+CANSUPERMORPH
|
||||||
PainSound "chicken/pain"
|
PainSound "chicken/pain"
|
||||||
DeathSound "chicken/death"
|
DeathSound "chicken/death"
|
||||||
Player.JumpZ 1
|
Player.JumpZ 1
|
||||||
|
|
|
@ -66,6 +66,7 @@ F84AB4557464A383E93F37CD3A82AC48 // MM2 map03
|
||||||
|
|
||||||
71C2E6D9CFA3D8750C6A9599FB2453BD // Hacx map03: There are some switches behind
|
71C2E6D9CFA3D8750C6A9599FB2453BD // Hacx map03: There are some switches behind
|
||||||
96368EB950E33AF62EA6423434E3CEF7 // HacX map17: shootable covers in these levels
|
96368EB950E33AF62EA6423434E3CEF7 // HacX map17: shootable covers in these levels
|
||||||
|
BA530202AF0BA0C6CBAE6A0C7076FB72 // Requiem map04
|
||||||
{
|
{
|
||||||
useblocking
|
useblocking
|
||||||
}
|
}
|
||||||
|
@ -176,3 +177,10 @@ E2B5D1400279335811C1C1C0B437D9C8 // Deathknights of the Dark Citadel, map54
|
||||||
{
|
{
|
||||||
floormove
|
floormove
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// There is a special at the beginning of the level which relies on the Pain Elemental's lost soul limit.
|
||||||
|
811A0C97777A198BC9B2BB558CB46E6A // Hell Revealed map19
|
||||||
|
{
|
||||||
|
limitpain
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue