Merge branch 'scripting'

Conflicts:
	src/actor.h
	src/g_doom/a_doomweaps.cpp
	src/g_hexen/a_blastradius.cpp
	src/p_enemy.cpp
	src/p_enemy.h
	src/thingdef/thingdef.h
	src/thingdef/thingdef_codeptr.cpp
	wadsrc/static/actors/constants.txt
This commit is contained in:
Randy Heit 2016-02-04 15:15:29 -06:00
commit b3b0886b64
230 changed files with 24061 additions and 8641 deletions

View file

@ -3655,7 +3655,7 @@ static ETraceStatus CheckForActor(FTraceResults &res, void *userdata)
//==========================================================================
AActor *P_LineAttack(AActor *t1, angle_t angle, fixed_t distance,
int pitch, int damage, FName damageType, const PClass *pufftype, int flags, AActor **victim, int *actualdamage)
int pitch, int damage, FName damageType, PClassActor *pufftype, int flags, AActor **victim, int *actualdamage)
{
fixed_t vx, vy, vz, shootz;
FTraceResults trace;
@ -3919,7 +3919,7 @@ AActor *P_LineAttack(AActor *t1, angle_t angle, fixed_t distance,
AActor *P_LineAttack(AActor *t1, angle_t angle, fixed_t distance,
int pitch, int damage, FName damageType, FName pufftype, int flags, AActor **victim, int *actualdamage)
{
const PClass * type = PClass::FindClass(pufftype);
PClassActor *type = PClass::FindActor(pufftype);
if (victim != NULL)
{
*victim = NULL;
@ -4180,7 +4180,7 @@ static ETraceStatus ProcessRailHit(FTraceResults &res, void *userdata)
//
//
//==========================================================================
void P_RailAttack(AActor *source, int damage, int offset_xy, fixed_t offset_z, int color1, int color2, double maxdiff, int railflags, const PClass *puffclass, angle_t angleoffset, angle_t pitchoffset, fixed_t distance, int duration, double sparsity, double drift, const PClass *spawnclass, int SpiralOffset)
void P_RailAttack(AActor *source, int damage, int offset_xy, fixed_t offset_z, int color1, int color2, double maxdiff, int railflags, PClassActor *puffclass, angle_t angleoffset, angle_t pitchoffset, fixed_t distance, int duration, double sparsity, double drift, PClassActor *spawnclass, int SpiralOffset)
{
fixed_t vx, vy, vz;
angle_t angle, pitch;
@ -4188,7 +4188,10 @@ void P_RailAttack(AActor *source, int damage, int offset_xy, fixed_t offset_z, i
FTraceResults trace;
fixed_t shootz;
if (puffclass == NULL) puffclass = PClass::FindClass(NAME_BulletPuff);
if (puffclass == NULL)
{
puffclass = PClass::FindActor(NAME_BulletPuff);
}
pitch = ((angle_t)(-source->pitch) + pitchoffset) >> ANGLETOFINESHIFT;
angle = (source->angle + angleoffset) >> ANGLETOFINESHIFT;
@ -4837,7 +4840,7 @@ void P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bo
{
points = points * splashfactor;
}
points *= thing->GetClass()->Meta.GetMetaFixed(AMETA_RDFactor, FRACUNIT) / (double)FRACUNIT;
points *= thing->GetClass()->RDFactor / (float)FRACUNIT;
// points and bombdamage should be the same sign
if (((points * bombdamage) > 0) && P_CheckSight(thing, bombspot, SF_IGNOREVISIBILITY | SF_IGNOREWATERBOUNDARY))
@ -4913,7 +4916,7 @@ void P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bo
int damage = Scale(bombdamage, bombdistance - dist, bombdistance);
damage = (int)((double)damage * splashfactor);
damage = Scale(damage, thing->GetClass()->Meta.GetMetaFixed(AMETA_RDFactor, FRACUNIT), FRACUNIT);
damage = Scale(damage, thing->GetClass()->RDFactor, FRACUNIT);
if (damage > 0)
{
int newdam = P_DamageMobj(thing, bombspot, bombsource, damage, bombmod);
@ -5128,10 +5131,9 @@ void P_DoCrunch(AActor *thing, FChangePosition *cpos)
if (!(thing->flags&MF_NOBLOOD))
{
PalEntry bloodcolor = thing->GetBloodColor();
const PClass *bloodcls = thing->GetBloodType();
P_TraceBleed(newdam > 0 ? newdam : cpos->crushchange, thing);
PClassActor *bloodcls = thing->GetBloodType();
P_TraceBleed (newdam > 0 ? newdam : cpos->crushchange, thing);
if (bloodcls != NULL)
{
AActor *mo;
@ -5692,7 +5694,7 @@ msecnode_t *P_AddSecnode(sector_t *s, AActor *thing, msecnode_t *nextnode)
if (s == 0)
{
I_FatalError("AddSecnode of 0 for %s\n", thing->_StaticType.TypeName.GetChars());
I_FatalError("AddSecnode of 0 for %s\n", thing->GetClass()->TypeName.GetChars());
}
node = nextnode;