mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- Fixed: The railgun attack functions still read their puff parameters as names
even though they are now passed as class pointers. SVN r1281 (trunk)
This commit is contained in:
parent
feaa5c3653
commit
edeed7673a
4 changed files with 9 additions and 7 deletions
|
@ -1,4 +1,6 @@
|
|||
October 28, 2008 (Changes by Graf Zahl)
|
||||
- Fixed: The railgun attack functions still read their puff parameters as names
|
||||
even though they are now passed as class pointers.
|
||||
- Fixed: The state parser counted one parameter too many for a varargs function.
|
||||
- Fixed: FStateExpressions could copy unresolved default parameter expressions.
|
||||
When these were resolved and changed later all copied pointers pointed to
|
||||
|
|
|
@ -386,7 +386,7 @@ void P_TraceBleed (int damage, fixed_t x, fixed_t y, fixed_t z, AActor *target,
|
|||
void P_TraceBleed (int damage, AActor *target, angle_t angle, int pitch);
|
||||
void P_TraceBleed (int damage, AActor *target, AActor *missile); // missile version
|
||||
void P_TraceBleed (int damage, AActor *target); // random direction version
|
||||
void P_RailAttack (AActor *source, int damage, int offset, int color1 = 0, int color2 = 0, float maxdiff = 0, bool silent = false, FName puff = NAME_BulletPuff); // [RH] Shoot a railgun
|
||||
void P_RailAttack (AActor *source, int damage, int offset, int color1 = 0, int color2 = 0, float maxdiff = 0, bool silent = false, const PClass *puff = NULL); // [RH] Shoot a railgun
|
||||
bool P_HitFloor (AActor *thing);
|
||||
bool P_HitWater (AActor *thing, sector_t *sec, fixed_t splashz=FIXED_MIN);
|
||||
bool P_CheckMissileSpawn (AActor *missile);
|
||||
|
|
|
@ -2970,7 +2970,7 @@ static bool ProcessRailHit (FTraceResults &res)
|
|||
return true;
|
||||
}
|
||||
|
||||
void P_RailAttack (AActor *source, int damage, int offset, int color1, int color2, float maxdiff, bool silent, FName puff)
|
||||
void P_RailAttack (AActor *source, int damage, int offset, int color1, int color2, float maxdiff, bool silent, const PClass *puffclass)
|
||||
{
|
||||
fixed_t vx, vy, vz;
|
||||
angle_t angle, pitch;
|
||||
|
@ -3063,7 +3063,7 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color
|
|||
|
||||
// Now hurt anything the trace hit
|
||||
unsigned int i;
|
||||
const PClass *puffclass = PClass::FindClass(puff);
|
||||
if (puffclass == NULL) puffclass = PClass::FindClass(NAME_BulletPuff);
|
||||
AActor *puffDefaults = puffclass == NULL? NULL : GetDefaultByType (puffclass);
|
||||
FName damagetype = (puffDefaults == NULL || puffDefaults->DamageType == NAME_None) ? FName(NAME_Railgun) : puffDefaults->DamageType;
|
||||
|
||||
|
|
|
@ -1053,7 +1053,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RailAttack)
|
|||
ACTION_PARAM_COLOR(Color2, 4);
|
||||
ACTION_PARAM_BOOL(Silent, 5);
|
||||
ACTION_PARAM_FLOAT(MaxDiff, 6);
|
||||
ACTION_PARAM_NAME(PuffTypeName, 7);
|
||||
ACTION_PARAM_CLASS(PuffType, 7);
|
||||
|
||||
if (!self->player) return;
|
||||
|
||||
|
@ -1065,7 +1065,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RailAttack)
|
|||
if (!weapon->DepleteAmmo(weapon->bAltFire, true)) return; // out of ammo
|
||||
}
|
||||
|
||||
P_RailAttack (self, Damage, Spawnofs_XY, Color1, Color2, MaxDiff, Silent, PuffTypeName);
|
||||
P_RailAttack (self, Damage, Spawnofs_XY, Color1, Color2, MaxDiff, Silent, PuffType);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -1084,7 +1084,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
|
|||
ACTION_PARAM_BOOL(Silent, 4);
|
||||
ACTION_PARAM_BOOL(aim, 5);
|
||||
ACTION_PARAM_FLOAT(MaxDiff, 6);
|
||||
ACTION_PARAM_NAME(PuffTypeName, 7);
|
||||
ACTION_PARAM_CLASS(PuffType, 7);
|
||||
|
||||
if (aim && self->target == NULL)
|
||||
{
|
||||
|
@ -1122,7 +1122,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
|
|||
}
|
||||
}
|
||||
|
||||
P_RailAttack (self, Damage, Spawnofs_XY, Color1, Color2, MaxDiff, Silent, PuffTypeName);
|
||||
P_RailAttack (self, Damage, Spawnofs_XY, Color1, Color2, MaxDiff, Silent, PuffType);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
Loading…
Reference in a new issue