mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-16 17:31:23 +00:00
[OpenAL branch]
- sync with trunk before applying patch. SVN r2533 (openal)
This commit is contained in:
commit
2066842dd0
4 changed files with 74 additions and 3 deletions
|
@ -196,6 +196,7 @@ static void M_ChangeClass (int choice);
|
||||||
static void M_ChangeGender (int choice);
|
static void M_ChangeGender (int choice);
|
||||||
static void M_ChangeSkin (int choice);
|
static void M_ChangeSkin (int choice);
|
||||||
static void M_ChangeAutoAim (int choice);
|
static void M_ChangeAutoAim (int choice);
|
||||||
|
static void M_ChangeSwitchPickup (int choice);
|
||||||
static void PickPlayerClass ();
|
static void PickPlayerClass ();
|
||||||
|
|
||||||
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
||||||
|
@ -203,6 +204,7 @@ static void PickPlayerClass ();
|
||||||
EXTERN_CVAR (String, playerclass)
|
EXTERN_CVAR (String, playerclass)
|
||||||
EXTERN_CVAR (String, name)
|
EXTERN_CVAR (String, name)
|
||||||
EXTERN_CVAR (Int, team)
|
EXTERN_CVAR (Int, team)
|
||||||
|
EXTERN_CVAR(Bool, neverswitchonpickup)
|
||||||
|
|
||||||
extern bool sendpause;
|
extern bool sendpause;
|
||||||
extern int flagsvar;
|
extern int flagsvar;
|
||||||
|
@ -545,7 +547,8 @@ static oldmenuitem_t PlayerSetupMenu[] =
|
||||||
{ 2,0,'t',NULL,M_ChangeClass, CR_UNTRANSLATED},
|
{ 2,0,'t',NULL,M_ChangeClass, CR_UNTRANSLATED},
|
||||||
{ 2,0,'s',NULL,M_ChangeSkin, CR_UNTRANSLATED},
|
{ 2,0,'s',NULL,M_ChangeSkin, CR_UNTRANSLATED},
|
||||||
{ 2,0,'e',NULL,M_ChangeGender, CR_UNTRANSLATED},
|
{ 2,0,'e',NULL,M_ChangeGender, CR_UNTRANSLATED},
|
||||||
{ 2,0,'a',NULL,M_ChangeAutoAim, CR_UNTRANSLATED}
|
{ 2,0,'a',NULL,M_ChangeAutoAim, CR_UNTRANSLATED},
|
||||||
|
{ 2,0,'p',NULL,M_ChangeSwitchPickup, CR_UNTRANSLATED}
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -2360,6 +2363,13 @@ static void M_PlayerSetupDrawer ()
|
||||||
autoaim <= 2 ? "High" :
|
autoaim <= 2 ? "High" :
|
||||||
autoaim <= 3 ? "Very High" : "Always",
|
autoaim <= 3 ? "Very High" : "Always",
|
||||||
DTA_Clean, true, TAG_DONE);
|
DTA_Clean, true, TAG_DONE);
|
||||||
|
|
||||||
|
// Draw Switch on Pickup setting
|
||||||
|
x = SmallFont->StringWidth ("Switch on Pickup") + 8 + PSetupDef.x;
|
||||||
|
screen->DrawText (SmallFont, label, PSetupDef.x, PSetupDef.y + LINEHEIGHT*9+yo, "Switch on Pickup", DTA_Clean, true, TAG_DONE);
|
||||||
|
screen->DrawText (SmallFont, value, x, PSetupDef.y + LINEHEIGHT*9+yo,
|
||||||
|
neverswitchonpickup == false ? "Yes" : "No",
|
||||||
|
DTA_Clean, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// A 32x32 cloud rendered with Photoshop, plus some other filters
|
// A 32x32 cloud rendered with Photoshop, plus some other filters
|
||||||
|
@ -2668,6 +2678,14 @@ static void M_ChangeAutoAim (int choice)
|
||||||
autoaim = aim;
|
autoaim = aim;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void M_ChangeSwitchPickup (int choice)
|
||||||
|
{
|
||||||
|
if (!choice)
|
||||||
|
neverswitchonpickup = (neverswitchonpickup == 1) ? 0 : 1;
|
||||||
|
else
|
||||||
|
neverswitchonpickup = (neverswitchonpickup == 0) ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void M_EditPlayerName (int choice)
|
static void M_EditPlayerName (int choice)
|
||||||
{
|
{
|
||||||
// we are going to be intercepting all chars
|
// we are going to be intercepting all chars
|
||||||
|
|
|
@ -3033,6 +3033,7 @@ enum EACSFunctions
|
||||||
ACSF_SoundSequenceOnPolyobj,
|
ACSF_SoundSequenceOnPolyobj,
|
||||||
ACSF_GetPolyobjX,
|
ACSF_GetPolyobjX,
|
||||||
ACSF_GetPolyobjY,
|
ACSF_GetPolyobjY,
|
||||||
|
ACSF_CheckSight,
|
||||||
};
|
};
|
||||||
|
|
||||||
int DLevelScript::SideFromID(int id, int side)
|
int DLevelScript::SideFromID(int id, int side)
|
||||||
|
@ -3456,6 +3457,54 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args)
|
||||||
}
|
}
|
||||||
return FIXED_MAX;
|
return FIXED_MAX;
|
||||||
|
|
||||||
|
case ACSF_CheckSight:
|
||||||
|
{
|
||||||
|
AActor *source;
|
||||||
|
AActor *dest;
|
||||||
|
|
||||||
|
int flags = SF_IGNOREVISIBILITY;
|
||||||
|
|
||||||
|
if (args[2] & 1) flags |= SF_IGNOREWATERBOUNDARY;
|
||||||
|
if (args[2] & 2) flags |= SF_SEEPASTBLOCKEVERYTHING | SF_SEEPASTSHOOTABLELINES;
|
||||||
|
|
||||||
|
if (args[0] == 0)
|
||||||
|
{
|
||||||
|
source = (AActor *) activator;
|
||||||
|
|
||||||
|
if (args[1] == 0) return 1; // [KS] I'm sure the activator can see itself.
|
||||||
|
|
||||||
|
TActorIterator<AActor> dstiter (args[1]);
|
||||||
|
|
||||||
|
while ( (dest = dstiter.Next ()) )
|
||||||
|
{
|
||||||
|
if (P_CheckSight(source, dest, flags)) return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TActorIterator<AActor> srciter (args[0]);
|
||||||
|
|
||||||
|
if (args[1] == 0) dest = (AActor *) activator;
|
||||||
|
|
||||||
|
while ( (source = srciter.Next ()) )
|
||||||
|
{
|
||||||
|
if (args[1] != 0)
|
||||||
|
{
|
||||||
|
TActorIterator<AActor> dstiter (args[1]);
|
||||||
|
while ( (dest = dstiter.Next ()) )
|
||||||
|
{
|
||||||
|
if (P_CheckSight(source, dest, flags)) return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (P_CheckSight(source, dest, flags)) return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -826,6 +826,7 @@ enum CBA_Flags
|
||||||
CBAF_AIMFACING = 1,
|
CBAF_AIMFACING = 1,
|
||||||
CBAF_NORANDOM = 2,
|
CBAF_NORANDOM = 2,
|
||||||
CBAF_EXPLICITANGLE = 4,
|
CBAF_EXPLICITANGLE = 4,
|
||||||
|
CBAF_NOPITCH = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack)
|
||||||
|
@ -852,7 +853,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack)
|
||||||
|
|
||||||
if (!pufftype) pufftype = PClass::FindClass(NAME_BulletPuff);
|
if (!pufftype) pufftype = PClass::FindClass(NAME_BulletPuff);
|
||||||
|
|
||||||
bslope = P_AimLineAttack (self, bangle, MISSILERANGE);
|
if (!(Flags & CBAF_NOPITCH)) bslope = P_AimLineAttack (self, bangle, MISSILERANGE);
|
||||||
|
|
||||||
S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
|
S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
|
||||||
for (i=0 ; i<NumBullets ; i++)
|
for (i=0 ; i<NumBullets ; i++)
|
||||||
|
@ -994,6 +995,7 @@ enum FB_Flags
|
||||||
FBF_USEAMMO = 1,
|
FBF_USEAMMO = 1,
|
||||||
FBF_NORANDOM = 2,
|
FBF_NORANDOM = 2,
|
||||||
FBF_EXPLICITANGLE = 4,
|
FBF_EXPLICITANGLE = 4,
|
||||||
|
FBF_NOPITCH = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
|
||||||
|
@ -1025,7 +1027,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
|
||||||
|
|
||||||
static_cast<APlayerPawn *>(self)->PlayAttacking2 ();
|
static_cast<APlayerPawn *>(self)->PlayAttacking2 ();
|
||||||
|
|
||||||
bslope = P_BulletSlope(self);
|
if (!(Flags & FBF_NOPITCH)) bslope = P_BulletSlope(self);
|
||||||
bangle = self->angle;
|
bangle = self->angle;
|
||||||
|
|
||||||
if (!PuffType) PuffType = PClass::FindClass(NAME_BulletPuff);
|
if (!PuffType) PuffType = PClass::FindClass(NAME_BulletPuff);
|
||||||
|
|
|
@ -17,11 +17,13 @@ const int CMF_CHECKTARGETDEAD = 8;
|
||||||
const int CBAF_AIMFACING = 1;
|
const int CBAF_AIMFACING = 1;
|
||||||
const int CBAF_NORANDOM = 2;
|
const int CBAF_NORANDOM = 2;
|
||||||
const int CBAF_EXPLICITANGLE = 4;
|
const int CBAF_EXPLICITANGLE = 4;
|
||||||
|
const int CBAF_NOPITCH = 8;
|
||||||
|
|
||||||
// Flags for A_FireBullets
|
// Flags for A_FireBullets
|
||||||
const int FBF_USEAMMO = 1;
|
const int FBF_USEAMMO = 1;
|
||||||
const int FBF_NORANDOM = 2;
|
const int FBF_NORANDOM = 2;
|
||||||
const int FBF_EXPLICITANGLE = 4;
|
const int FBF_EXPLICITANGLE = 4;
|
||||||
|
const int FBF_NOPITCH = 8;
|
||||||
|
|
||||||
// Flags for A_SpawnItemEx
|
// Flags for A_SpawnItemEx
|
||||||
const int SXF_TRANSFERTRANSLATION=1;
|
const int SXF_TRANSFERTRANSLATION=1;
|
||||||
|
|
Loading…
Reference in a new issue