Removed bBindChilds unused variable + added more variables to archive

This commit is contained in:
smallmodel 2023-11-27 20:06:05 +01:00
parent cb23f3bb70
commit 8fc5dacebf
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
2 changed files with 13 additions and 16 deletions

View file

@ -1780,9 +1780,6 @@ Entity::Entity()
m_BlockedPaths = NULL;
m_bHintRequiresLookAt = true;
// Misc
m_bBindChilds = false;
}
Entity::~Entity()
@ -4704,7 +4701,7 @@ qboolean Entity::isBoundTo(Entity *master)
return false;
}
void Entity::bind(Entity *master, qboolean use_my_angles, qboolean bBindChilds)
void Entity::bind(Entity *master, qboolean use_my_angles)
{
float mat[3][3];
float local[3][3];
@ -4721,8 +4718,6 @@ void Entity::bind(Entity *master, qboolean use_my_angles, qboolean bBindChilds)
return;
}
m_bBindChilds = bBindChilds;
// unbind myself from my master
unbind();
@ -4885,17 +4880,10 @@ void Entity::EventUnbind(Event *ev)
void Entity::BindEvent(Event *ev)
{
Entity *ent;
bool bBindChilds;
ent = ev->GetEntity(1);
if (ent) {
if (ev->NumArgs() > 1) {
bBindChilds = ev->GetBoolean(2);
} else {
bBindChilds = false;
}
bind(ent, false, bBindChilds);
bind(ent, false);
}
}
@ -5854,6 +5842,11 @@ void Entity::Archive(Archiver& arc)
ArchiveEnum(takedamage, damage_t);
arc.ArchiveSafePointer(&enemy);
arc.ArchiveFloat(&pain_finished);
arc.ArchiveFloat(&damage_debounce_time);
arc.ArchiveInteger(&damage_type);
arc.ArchiveInteger(&m_iNumGlues);
for (i = 0; i < MAX_GLUE_CHILDREN; i++) {
@ -5863,6 +5856,7 @@ void Entity::Archive(Archiver& arc)
arc.ArchiveObjectPointer((Class **)&m_pGlueMaster);
arc.ArchiveBool(&m_bGlueAngles);
arc.ArchiveBool(&m_bGlueDuckable);
arc.ArchiveBoolean(&detach_at_death);
arc.ArchiveFloat(&stealthMovementScale);

View file

@ -285,10 +285,13 @@ public:
// immune list
Container<int> immunities;
//
// Openmohaa additions
//====
// miscellaneous
qboolean m_bBindChilds;
bool m_bHintRequiresLookAt;
str m_HintString;
//====
Entity();
virtual ~Entity();
@ -538,7 +541,7 @@ public:
void joinTeam(Entity *teammember);
void quitTeam(void);
qboolean isBoundTo(Entity *master);
virtual void bind(Entity *master, qboolean use_my_angles = qfalse, qboolean bBindChilds = qfalse);
virtual void bind(Entity *master, qboolean use_my_angles = qfalse);
virtual void unbind(void);
virtual void glue(Entity *master, qboolean use_my_angles = qtrue, qboolean can_duck = qfalse);
virtual void unglue(void);