mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
- merged tileinfo and actorinfo.
This commit is contained in:
parent
c5c8ed16a3
commit
947d427a9d
5 changed files with 11 additions and 10 deletions
|
@ -1213,6 +1213,7 @@ int ConCompiler::parsecommand()
|
|||
gs.actorinfo[lnum].scriptaddress = parsing_actor; // TRANSITIONAL should only store an index
|
||||
if (tw == concmd_useractor)
|
||||
{
|
||||
gs.actorinfo[lnum].enemyflags |= EDukeFlags1::FromInt(1);
|
||||
if (j & 1)
|
||||
gs.actorinfo[lnum].enemyflags |= SFLAG_BADGUY | SFLAG_KILLCOUNT;
|
||||
|
||||
|
@ -2008,7 +2009,7 @@ int ConCompiler::parsecommand()
|
|||
|
||||
transnum(LABEL_DEFINE);
|
||||
int n = popscriptvalue();
|
||||
gs.tileinfo[n].loadeventscriptptr = parsing_actor;
|
||||
gs.actorinfo[n].loadeventscriptptr = parsing_actor;
|
||||
checking_ifelse = 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -3190,7 +3190,7 @@ void LoadActor(DDukeActor *actor, int p, int x)
|
|||
s.g_ac = actor;
|
||||
|
||||
if (actor->spr.picnum < 0 || actor->spr.picnum >= MAXTILES) return;
|
||||
auto addr = gs.tileinfo[actor->spr.picnum].loadeventscriptptr;
|
||||
auto addr = gs.actorinfo[actor->spr.picnum].loadeventscriptptr;
|
||||
if (addr == 0) return;
|
||||
|
||||
s.killit_flag = 0;
|
||||
|
|
|
@ -40,7 +40,6 @@ struct DukeGameInfo
|
|||
int impact_damage;
|
||||
int firstdebris;
|
||||
|
||||
TileInfo tileinfo[MAXTILES]; // This is not from EDuke32.
|
||||
ActorInfo actorinfo[MAXTILES];
|
||||
int16_t max_ammo_amount[MAX_WEAPONS];
|
||||
int16_t weaponsandammosprites[15];
|
||||
|
|
|
@ -290,6 +290,12 @@ inline void processinputvel(int snum)
|
|||
p->sync.svel = (float)velvect.Y;
|
||||
}
|
||||
|
||||
inline const ActorInfo* DDukeActor::conInfo() const
|
||||
{
|
||||
auto tn = static_cast<PClassActor*>(GetClass())->ActorInfo()->TypeNum;
|
||||
return tn < 0 ? nullptr : &gs.actorinfo[tn];
|
||||
}
|
||||
|
||||
inline void setPlayerActorViewZOffset(DDukeActor* const pact)
|
||||
{
|
||||
if (!PlayClock)
|
||||
|
|
|
@ -54,6 +54,7 @@ inline TArray<ActorAI> ais;
|
|||
|
||||
struct ActorInfo
|
||||
{
|
||||
uint32_t loadeventscriptptr;
|
||||
uint32_t scriptaddress;
|
||||
EDukeFlags1 enemyflags; // placeholder during parsing. Since CON gets parsed before the spawn type table we cannot copy these to their final location yet.
|
||||
};
|
||||
|
@ -113,7 +114,7 @@ public:
|
|||
|
||||
DDukeActor() = default;
|
||||
size_t PropagateMark() override;
|
||||
const ActorInfo* actorInfo() const;
|
||||
const ActorInfo* conInfo() const;
|
||||
|
||||
// This once was stored in the owner field of the sprite
|
||||
inline DDukeActor* GetOwner()
|
||||
|
@ -178,12 +179,6 @@ struct animwalltype
|
|||
bool overpic;
|
||||
};
|
||||
|
||||
// legacy CON baggage which needs to be refactored later.
|
||||
struct TileInfo
|
||||
{
|
||||
int loadeventscriptptr;
|
||||
};
|
||||
|
||||
struct user_defs
|
||||
{
|
||||
uint8_t god, cashman, eog;
|
||||
|
|
Loading…
Reference in a new issue