Merge branch 'master' into scripting

Conflicts:
	src/actor.h
	src/g_doom/a_archvile.cpp
	src/g_shared/a_morph.cpp
	src/p_enemy.h
	src/p_local.h
	src/p_mobj.cpp
	src/sc_man_tokens.h
	src/thingdef/thingdef_codeptr.cpp
	src/thingdef/thingdef_exp.h
	src/thingdef/thingdef_expression.cpp
	src/thingdef/thingdef_states.cpp
	wadsrc/static/actors/actor.txt
This commit is contained in:
Randy Heit 2015-01-29 20:53:08 -06:00
commit 775e33ede7
106 changed files with 8861 additions and 13597 deletions

View file

@ -14,27 +14,27 @@ class ALoreShot : public AActor
{
DECLARE_CLASS (ALoreShot, AActor)
public:
int DoSpecialDamage (AActor *target, int damage, FName damagetype);
int DoSpecialDamage (AActor *victim, int damage, FName damagetype);
};
IMPLEMENT_CLASS (ALoreShot)
int ALoreShot::DoSpecialDamage (AActor *target, int damage, FName damagetype)
int ALoreShot::DoSpecialDamage (AActor *victim, int damage, FName damagetype)
{
FVector3 thrust;
if (this->target != NULL)
if (victim != NULL && target != NULL && !(victim->flags7 & MF7_DONTTHRUST))
{
thrust.X = float(this->target->x - target->x);
thrust.Y = float(this->target->y - target->y);
thrust.Z = float(this->target->z - target->z);
thrust.X = float(target->x - victim->x);
thrust.Y = float(target->y - victim->y);
thrust.Z = float(target->z - victim->z);
thrust.MakeUnit();
thrust *= float((255*50*FRACUNIT) / (target->Mass ? target->Mass : 1));
thrust *= float((255*50*FRACUNIT) / (victim->Mass ? victim->Mass : 1));
target->velx += fixed_t(thrust.X);
target->vely += fixed_t(thrust.Y);
target->velz += fixed_t(thrust.Z);
victim->velx += fixed_t(thrust.X);
victim->vely += fixed_t(thrust.Y);
victim->velz += fixed_t(thrust.Z);
}
return damage;
}