Merge branch 'master' into scripting

Conflicts:
	src/actor.h
	src/g_hexen/a_clericstaff.cpp
	src/p_enemy.cpp
	src/p_interaction.cpp
	src/p_local.h
	src/p_mobj.cpp
	src/thingdef/thingdef_codeptr.cpp
This commit is contained in:
Christoph Oelckers 2016-01-17 20:57:55 +01:00
commit bf747075e8
179 changed files with 10280 additions and 4787 deletions

View file

@ -1179,7 +1179,7 @@ void G_Ticker ()
}
if (players[i].mo)
{
DWORD sum = rngsum + players[i].mo->x + players[i].mo->y + players[i].mo->z
DWORD sum = rngsum + players[i].mo->X() + players[i].mo->Y() + players[i].mo->Z()
+ players[i].mo->angle + players[i].mo->pitch;
sum ^= players[i].health;
consistancy[i][buf] = sum;
@ -1438,13 +1438,13 @@ bool G_CheckSpot (int playernum, FPlayerStart *mthing)
if (!players[playernum].mo)
{ // first spawn of level, before corpses
for (i = 0; i < playernum; i++)
if (players[i].mo && players[i].mo->x == x && players[i].mo->y == y)
if (players[i].mo && players[i].mo->X() == x && players[i].mo->Y() == y)
return false;
return true;
}
oldz = players[playernum].mo->z; // [RH] Need to save corpse's z-height
players[playernum].mo->z = z; // [RH] Checks are now full 3-D
oldz = players[playernum].mo->Z(); // [RH] Need to save corpse's z-height
players[playernum].mo->SetZ(z); // [RH] Checks are now full 3-D
// killough 4/2/98: fix bug where P_CheckPosition() uses a non-solid
// corpse to detect collisions with other players in DM starts
@ -1456,7 +1456,7 @@ bool G_CheckSpot (int playernum, FPlayerStart *mthing)
players[playernum].mo->flags |= MF_SOLID;
i = P_CheckPosition(players[playernum].mo, x, y);
players[playernum].mo->flags &= ~MF_SOLID;
players[playernum].mo->z = oldz; // [RH] Restore corpse's height
players[playernum].mo->SetZ(oldz); // [RH] Restore corpse's height
if (!i)
return false;
@ -1482,8 +1482,7 @@ static fixed_t PlayersRangeFromSpot (FPlayerStart *spot)
if (!playeringame[i] || !players[i].mo || players[i].health <= 0)
continue;
distance = P_AproxDistance (players[i].mo->x - spot->x,
players[i].mo->y - spot->y);
distance = players[i].mo->AproxDistance (spot->x, spot->y);
if (distance < closest)
closest = distance;
@ -1716,6 +1715,8 @@ void G_DoPlayerPop(int playernum)
// [RH] Make the player disappear
FBehavior::StaticStopMyScripts(players[playernum].mo);
// [RH] Let the scripts know the player left
FBehavior::StaticStartTypedScripts(SCRIPT_Disconnect, players[playernum].mo, true, playernum, true);
if (players[playernum].mo != NULL)
{
P_DisconnectEffect(players[playernum].mo);
@ -1729,8 +1730,6 @@ void G_DoPlayerPop(int playernum)
players[playernum].mo = NULL;
players[playernum].camera = NULL;
}
// [RH] Let the scripts know the player left
FBehavior::StaticStartTypedScripts(SCRIPT_Disconnect, NULL, true, playernum);
}
void G_ScreenShot (char *filename)