mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- no need to keep AArmor native, now that all child classes have been scriptified.
This commit is contained in:
parent
632a29e365
commit
8256f25a84
15 changed files with 4 additions and 83 deletions
|
@ -31,7 +31,6 @@
|
|||
#include "templates.h"
|
||||
#include "d_net.h"
|
||||
#include "d_event.h"
|
||||
#include "a_armor.h"
|
||||
|
||||
#define QUEUESIZE 128
|
||||
#define MESSAGESIZE 128
|
||||
|
|
|
@ -74,7 +74,6 @@
|
|||
#include "info.h"
|
||||
#include "v_text.h"
|
||||
#include "vmbuilder.h"
|
||||
#include "a_armor.h"
|
||||
|
||||
// [SO] Just the way Randy said to do it :)
|
||||
// [RH] Made this CVAR_SERVERINFO
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
** a_armor.cpp
|
||||
** Implements all variations of armor objects
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 2002-2016 Randy Heit
|
||||
** Copyright 2006-2016 Cheistoph Oelckers
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions
|
||||
** are met:
|
||||
**
|
||||
** 1. Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** 2. Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in the
|
||||
** documentation and/or other materials provided with the distribution.
|
||||
** 3. The name of the author may not be used to endorse or promote products
|
||||
** derived from this software without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**---------------------------------------------------------------------------
|
||||
**
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "info.h"
|
||||
#include "gi.h"
|
||||
#include "a_pickups.h"
|
||||
#include "a_armor.h"
|
||||
#include "templates.h"
|
||||
#include "g_level.h"
|
||||
#include "d_player.h"
|
||||
#include "serializer.h"
|
||||
#include "cmdlib.h"
|
||||
|
||||
IMPLEMENT_CLASS(AArmor, false, false)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
// HexenArmor
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "a_pickups.h"
|
||||
|
||||
// Armor absorbs some damage for the player.
|
||||
class AArmor : public AInventory
|
||||
{
|
||||
DECLARE_CLASS (AArmor, AInventory)
|
||||
};
|
||||
|
|
@ -13,7 +13,6 @@
|
|||
#include "serializer.h"
|
||||
#include "p_enemy.h"
|
||||
#include "d_player.h"
|
||||
#include "a_armor.h"
|
||||
#include "r_data/sprites.h"
|
||||
#include "g_levellocals.h"
|
||||
#include "virtual.h"
|
||||
|
@ -137,7 +136,7 @@ bool P_MorphPlayer (player_t *activator, player_t *p, PClassPlayerPawn *spawntyp
|
|||
for (item = morphed->Inventory; item != nullptr; )
|
||||
{
|
||||
AInventory *next = item->Inventory;
|
||||
if (item->IsKindOf (RUNTIME_CLASS(AArmor)))
|
||||
if (item->IsKindOf (PClass::FindActor(NAME_Armor)))
|
||||
{
|
||||
item->DepleteOrDestroy();
|
||||
}
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#include "st_stuff.h"
|
||||
#include "m_swap.h"
|
||||
#include "a_keys.h"
|
||||
#include "a_armor.h"
|
||||
#include "templates.h"
|
||||
#include "i_system.h"
|
||||
#include "sbarinfo.h"
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "c_cvars.h"
|
||||
#include "w_wad.h"
|
||||
#include "a_keys.h"
|
||||
#include "a_armor.h"
|
||||
#include "sbar.h"
|
||||
#include "sc_man.h"
|
||||
#include "templates.h"
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "m_swap.h"
|
||||
#include "templates.h"
|
||||
#include "a_keys.h"
|
||||
#include "a_armor.h"
|
||||
#include "gi.h"
|
||||
#include "g_level.h"
|
||||
#include "colormatcher.h"
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#include "serializer.h"
|
||||
#include "r_utility.h"
|
||||
#include "a_morph.h"
|
||||
#include "a_armor.h"
|
||||
#include "g_levellocals.h"
|
||||
#include "virtual.h"
|
||||
|
||||
|
|
|
@ -83,7 +83,6 @@
|
|||
#include "serializer.h"
|
||||
#include "thingdef.h"
|
||||
#include "a_pickups.h"
|
||||
#include "a_armor.h"
|
||||
#include "r_data/colormaps.h"
|
||||
#include "g_levellocals.h"
|
||||
#include "stats.h"
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
#include "v_text.h"
|
||||
#include "thingdef.h"
|
||||
#include "math/cmath.h"
|
||||
#include "a_armor.h"
|
||||
#include "g_levellocals.h"
|
||||
|
||||
AActor *SingleActorFromTID(int tid, AActor *defactor);
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
#include "thingdef.h"
|
||||
#include "d_player.h"
|
||||
#include "virtual.h"
|
||||
#include "a_armor.h"
|
||||
#include "g_levellocals.h"
|
||||
#include "a_morph.h"
|
||||
|
||||
|
@ -5698,7 +5697,7 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
|||
}
|
||||
if (dmflags & DF_NO_ARMOR)
|
||||
{
|
||||
if (i->IsDescendantOf (RUNTIME_CLASS(AArmor)))
|
||||
if (i->IsDescendantOf (PClass::FindActor(NAME_Armor)))
|
||||
return NULL;
|
||||
if (i->TypeName == NAME_Megasphere)
|
||||
return NULL;
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
#include "a_morph.h"
|
||||
#include "p_spec.h"
|
||||
#include "virtual.h"
|
||||
#include "a_armor.h"
|
||||
#include "g_levellocals.h"
|
||||
|
||||
static FRandom pr_skullpop ("SkullPop");
|
||||
|
@ -1142,7 +1141,7 @@ void APlayerPawn::FilterCoopRespawnInventory (APlayerPawn *oldplayer)
|
|||
item->Destroy();
|
||||
}
|
||||
else if ((dmflags & DF_COOP_LOSE_ARMOR) &&
|
||||
item->IsKindOf(RUNTIME_CLASS(AArmor)))
|
||||
item->IsKindOf(PClass::FindActor(NAME_Armor)))
|
||||
{
|
||||
if (defitem == NULL)
|
||||
{
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
#include "templates.h"
|
||||
#include "r_defs.h"
|
||||
#include "a_pickups.h"
|
||||
#include "a_armor.h"
|
||||
#include "s_sound.h"
|
||||
#include "cmdlib.h"
|
||||
#include "p_lnspec.h"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
**
|
||||
*/
|
||||
|
||||
class Armor : Inventory native
|
||||
class Armor : Inventory
|
||||
{
|
||||
Default
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue