Merge branch 'master' of https://github.com/raa-eruanna/qzdoom into qzdoom

This commit is contained in:
Magnus Norddahl 2017-02-15 13:26:52 +01:00
commit c95a52166d
10 changed files with 27 additions and 15 deletions

View file

@ -777,7 +777,7 @@ void D_Display ()
viewwindowx + viewwidth, viewwindowy + viewheight); viewwindowx + viewwidth, viewwindowy + viewheight);
// [ZZ] execute event hook that we just started the frame // [ZZ] execute event hook that we just started the frame
E_RenderFrame(); //E_RenderFrame();
// //
Renderer->RenderView(&players[consoleplayer]); Renderer->RenderView(&players[consoleplayer]);
@ -898,7 +898,7 @@ void D_Display ()
NetUpdate (); // send out any new accumulation NetUpdate (); // send out any new accumulation
// normal update // normal update
// draw ZScript UI stuff // draw ZScript UI stuff
E_RenderOverlay(); //E_RenderOverlay();
C_DrawConsole (hw2d); // draw console C_DrawConsole (hw2d); // draw console
M_Drawer (); // menu is drawn even on top of everything M_Drawer (); // menu is drawn even on top of everything
FStat::PrintStat (); FStat::PrintStat ();

View file

@ -155,12 +155,12 @@ public:
double ViewBob; double ViewBob;
// Former class properties that were moved into the object to get rid of the meta class. // Former class properties that were moved into the object to get rid of the meta class.
FName SoundClass; // Sound class FNameNoInit SoundClass; // Sound class
FName Face; // Doom status bar face (when used) FNameNoInit Face; // Doom status bar face (when used)
FName Portrait; FNameNoInit Portrait;
FName Slot[10]; FNameNoInit Slot[10];
FName InvulMode; FNameNoInit InvulMode;
FName HealingRadiusType; FNameNoInit HealingRadiusType;
double HexenArmor[5]; double HexenArmor[5];
BYTE ColorRangeStart; // Skin color range BYTE ColorRangeStart; // Skin color range
BYTE ColorRangeEnd; BYTE ColorRangeEnd;

View file

@ -1529,6 +1529,17 @@ bool PClassPointer::isCompatible(PType *type)
return (other != nullptr && other->ClassRestriction->IsDescendantOf(ClassRestriction)); return (other != nullptr && other->ClassRestriction->IsDescendantOf(ClassRestriction));
} }
//==========================================================================
//
// PClassPointer :: SetPointer
//
//==========================================================================
void PClassPointer::SetPointer(void *base, unsigned offset, TArray<size_t> *special) const
{
// Class pointers do not get added to FlatPointers because they are released from the GC.
}
//========================================================================== //==========================================================================
// //
// PClassPointer :: IsMatch // PClassPointer :: IsMatch

View file

@ -401,6 +401,7 @@ public:
bool isCompatible(PType *type); bool isCompatible(PType *type);
void SetPointer(void *base, unsigned offset, TArray<size_t> *special = NULL) const override;
virtual bool IsMatch(intptr_t id1, intptr_t id2) const; virtual bool IsMatch(intptr_t id1, intptr_t id2) const;
virtual void GetTypeIDs(intptr_t &id1, intptr_t &id2) const; virtual void GetTypeIDs(intptr_t &id1, intptr_t &id2) const;
}; };

View file

@ -1365,7 +1365,7 @@ void G_FinishTravel ()
for (int i = 0; i < pawnsnum; i++) for (int i = 0; i < pawnsnum; i++)
{ {
// [ZZ] fire the enter hook. // [ZZ] fire the enter hook.
E_PlayerEntered(pawns[i]->player - players, true); E_PlayerEntered(int(pawns[i]->player - players), true);
// //
FBehavior::StaticStartTypedScripts(SCRIPT_Return, pawns[i], true); FBehavior::StaticStartTypedScripts(SCRIPT_Return, pawns[i], true);
} }

View file

@ -350,7 +350,7 @@ void cht_DoCheat (player_t *player, int cheat)
// player is now alive. // player is now alive.
// fire E_PlayerRespawned and start the ACS SCRIPT_Respawn. // fire E_PlayerRespawned and start the ACS SCRIPT_Respawn.
E_PlayerRespawned(player - players); E_PlayerRespawned(int(player - players));
// //
FBehavior::StaticStartTypedScripts(SCRIPT_Respawn, player->mo, true); FBehavior::StaticStartTypedScripts(SCRIPT_Respawn, player->mo, true);

View file

@ -611,7 +611,7 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags)
ClientObituary (this, inflictor, source, dmgflags); ClientObituary (this, inflictor, source, dmgflags);
// [ZZ] fire player death hook // [ZZ] fire player death hook
E_PlayerDied(player - players); E_PlayerDied(int(player - players));
// Death script execution, care of Skull Tag // Death script execution, care of Skull Tag
FBehavior::StaticStartTypedScripts (SCRIPT_Death, this, true); FBehavior::StaticStartTypedScripts (SCRIPT_Death, this, true);

View file

@ -143,7 +143,6 @@ IMPLEMENT_POINTERS_START(AActor)
IMPLEMENT_POINTER(LastHeard) IMPLEMENT_POINTER(LastHeard)
IMPLEMENT_POINTER(master) IMPLEMENT_POINTER(master)
IMPLEMENT_POINTER(Poisoner) IMPLEMENT_POINTER(Poisoner)
IMPLEMENT_POINTER(DamageFunc)
IMPLEMENT_POINTER(alternative) IMPLEMENT_POINTER(alternative)
IMPLEMENT_POINTERS_END IMPLEMENT_POINTERS_END
@ -5513,7 +5512,7 @@ APlayerPawn *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags)
{ {
// [ZZ] fire non-hub ENTER event // [ZZ] fire non-hub ENTER event
// level.time is a hack to make sure that we don't call it on dummy player initialization during hub return. // level.time is a hack to make sure that we don't call it on dummy player initialization during hub return.
if (!level.time) E_PlayerEntered(p - players, false); if (!level.time) E_PlayerEntered(int(p - players), false);
FBehavior::StaticStartTypedScripts (SCRIPT_Enter, p->mo, true); FBehavior::StaticStartTypedScripts (SCRIPT_Enter, p->mo, true);
} }
else if (state == PST_REBORN) else if (state == PST_REBORN)

View file

@ -832,7 +832,10 @@ void CopyPlayer(player_t *dst, player_t *src, const char *name)
else else
{ {
dst->userinfo.TransferFrom(uibackup); dst->userinfo.TransferFrom(uibackup);
// The player class must come from the save, so that the menu reflects the currently playing one.
dst->userinfo.PlayerClassChanged(src->mo->GetClass()->DisplayName);
} }
// Validate the skin // Validate the skin
dst->userinfo.SkinNumChanged(R_FindSkin(skins[dst->userinfo.GetSkin()].name, dst->CurrentPlayerClass)); dst->userinfo.SkinNumChanged(R_FindSkin(skins[dst->userinfo.GetSkin()].name, dst->CurrentPlayerClass));

View file

@ -1232,8 +1232,6 @@ const char *APlayerPawn::GetSoundClass() const
return skins[player->userinfo.GetSkin()].name; return skins[player->userinfo.GetSkin()].name;
} }
// [GRB]
auto pclass = GetClass();
return SoundClass != NAME_None? SoundClass.GetChars() : "player"; return SoundClass != NAME_None? SoundClass.GetChars() : "player";
} }