- fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'.
With the stricter type checks of the self pointer that were now implemented these all produced errors.
This commit is contained in:
parent
7d49a82963
commit
a2f4cd7cda
38 changed files with 185 additions and 237 deletions
|
|
@ -753,7 +753,7 @@ void DoReadyWeapon(AActor *self)
|
|||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_WeaponReady)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_ACTION_PROLOGUE(AActor);
|
||||
PARAM_INT_DEF(flags);
|
||||
|
||||
DoReadyWeaponToSwitch(self, !(flags & WRF_NoSwitch));
|
||||
|
|
@ -885,7 +885,7 @@ static void P_CheckWeaponButtons (player_t *player)
|
|||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_ReFire)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_ACTION_PROLOGUE(AActor);
|
||||
PARAM_STATE_DEF(state);
|
||||
A_ReFire(self, state);
|
||||
return 0;
|
||||
|
|
@ -923,7 +923,7 @@ void A_ReFire(AActor *self, FState *state)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(AInventory, A_ClearReFire)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_ACTION_PROLOGUE(AActor);
|
||||
player_t *player = self->player;
|
||||
|
||||
if (NULL != player)
|
||||
|
|
@ -945,7 +945,7 @@ DEFINE_ACTION_FUNCTION(AInventory, A_ClearReFire)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(AInventory, A_CheckReload)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_ACTION_PROLOGUE(AActor);
|
||||
|
||||
if (self->player != NULL)
|
||||
{
|
||||
|
|
@ -1133,7 +1133,7 @@ DEFINE_ACTION_FUNCTION(AActor, OverlayID)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(AInventory, A_Lower)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_ACTION_PROLOGUE(AActor);
|
||||
|
||||
player_t *player = self->player;
|
||||
DPSprite *psp;
|
||||
|
|
@ -1181,7 +1181,7 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Lower)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(AInventory, A_Raise)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_ACTION_PROLOGUE(AActor);
|
||||
|
||||
if (self == nullptr)
|
||||
{
|
||||
|
|
@ -1293,7 +1293,7 @@ enum GF_Flags
|
|||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_GunFlash)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_ACTION_PROLOGUE(AActor);
|
||||
PARAM_STATE_DEF(flash);
|
||||
PARAM_INT_DEF(flags);
|
||||
|
||||
|
|
@ -1381,42 +1381,9 @@ void P_GunShot (AActor *mo, bool accurate, PClassActor *pufftype, DAngle pitch)
|
|||
P_LineAttack (mo, angle, PLAYERMISSILERANGE, pitch, damage, NAME_Hitscan, pufftype);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AInventory, A_Light0)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
|
||||
if (self->player != NULL)
|
||||
{
|
||||
self->player->extralight = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AInventory, A_Light1)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
|
||||
if (self->player != NULL)
|
||||
{
|
||||
self->player->extralight = 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AInventory, A_Light2)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
|
||||
if (self->player != NULL)
|
||||
{
|
||||
self->player->extralight = 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_Light)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_ACTION_PROLOGUE(AActor);
|
||||
PARAM_INT(light);
|
||||
|
||||
if (self->player != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue