Merge branch 'master' into gonesolong

Conflicts:
	src/CMakeLists.txt
	src/b_think.cpp
	src/g_doom/a_doomweaps.cpp
	src/g_hexen/a_clericstaff.cpp
	src/g_hexen/a_fighterplayer.cpp
	src/namedef.h
	src/p_enemy.cpp
	src/p_local.h
	src/p_mobj.cpp
	src/p_teleport.cpp
	src/sc_man_tokens.h
	src/thingdef/thingdef_codeptr.cpp
	src/thingdef/thingdef_function.cpp
	src/thingdef/thingdef_parse.cpp
	wadsrc/static/actors/actor.txt
	wadsrc/static/actors/constants.txt
	wadsrc/static/actors/shared/inventory.txt

- Added register reuse to VMFunctionBuilder for FxPick's code emitter.
- Note to self: Need to reimplement IsPointerEqual and CheckClass, which
  were added to thingdef_function.cpp over the past year, as this file no
  longer exists in this branch.
This commit is contained in:
Randy Heit 2014-12-21 20:43:24 -06:00
commit b5e4153c78
182 changed files with 23025 additions and 8730 deletions

View file

@ -92,7 +92,7 @@ bool P_Thing_Spawn (int tid, AActor *source, int type, angle_t angle, bool fog,
mobj->angle = (angle != ANGLE_MAX ? angle : spot->angle);
if (fog)
{
Spawn<ATeleportFog> (spot->x, spot->y, spot->z + TELEFOGHEIGHT, ALLOW_REPLACE);
P_SpawnTeleportFog(mobj, spot->x, spot->y, spot->z + TELEFOGHEIGHT, false);
}
if (mobj->flags & MF_SPECIAL)
mobj->flags |= MF_DROPPED; // Don't respawn
@ -130,8 +130,8 @@ bool P_MoveThing(AActor *source, fixed_t x, fixed_t y, fixed_t z, bool fog)
{
if (fog)
{
Spawn<ATeleportFog> (x, y, z + TELEFOGHEIGHT, ALLOW_REPLACE);
Spawn<ATeleportFog> (oldx, oldy, oldz + TELEFOGHEIGHT, ALLOW_REPLACE);
P_SpawnTeleportFog(source, x, y, z);
P_SpawnTeleportFog(source, oldx, oldy, oldz, false);
}
source->PrevX = x;
source->PrevY = y;
@ -402,13 +402,17 @@ void P_RemoveThing(AActor * actor)
// Don't remove live players.
if (actor->player == NULL || actor != actor->player->mo)
{
// Don't also remove owned inventory items
if (actor->IsKindOf(RUNTIME_CLASS(AInventory)) && static_cast<AInventory*>(actor)->Owner != NULL) return;
// be friendly to the level statistics. ;)
actor->ClearCounters();
actor->Destroy ();
}
}
bool P_Thing_Raise(AActor *thing)
bool P_Thing_Raise(AActor *thing, AActor *raiser)
{
FState * RaiseState = thing->GetRaiseState();
if (RaiseState == NULL)
@ -441,10 +445,50 @@ bool P_Thing_Raise(AActor *thing)
thing->Revive();
if (raiser != NULL)
{
// Let's copy the friendliness of the one who raised it.
thing->CopyFriendliness(raiser, false);
}
thing->SetState (RaiseState);
return true;
}
bool P_Thing_CanRaise(AActor *thing)
{
FState * RaiseState = thing->GetRaiseState();
if (RaiseState == NULL)
{
return false;
}
AActor *info = thing->GetDefault();
// Check against real height and radius
int oldflags = thing->flags;
fixed_t oldheight = thing->height;
fixed_t oldradius = thing->radius;
thing->flags |= MF_SOLID;
thing->height = info->height;
thing->radius = info->radius;
bool check = P_CheckPosition (thing, thing->x, thing->y);
// Restore checked properties
thing->flags = oldflags;
thing->radius = oldradius;
thing->height = oldheight;
if (!check)
{
return false;
}
return true;
}
void P_Thing_SetVelocity(AActor *actor, fixed_t vx, fixed_t vy, fixed_t vz, bool add, bool setbob)
{
if (actor != NULL)