Maintenance: [forced, user-approved] Family G (row 87): remove invented WorldObjects (a std::list<CRenderObject*>& bundle, only ever
Batch #10260 by ragnarok-clanker: forced by an admin (0 lower score(s), 5 changed function(s)); checked with 103 compiled unit(s), including every includer of Source/Contents/World/World.h, Source/Contents/World/WorldObjects.h. Deletes: Source/Contents/World/WorldObjects.h
This commit is contained in:
parent
bd0ade90cd
commit
9acda82ac4
6 changed files with 8 additions and 26 deletions
|
|
@ -54,7 +54,6 @@
|
|||
#include "Utility/Math/AffineMatrix.h"
|
||||
#include "Utility/Cipher/XorBytes.h"
|
||||
#include "Utility/Math/ScalarConversion.h"
|
||||
#include "Contents/World/WorldObjects.h"
|
||||
#include "Contents/ChampionMonsterMgr.h"
|
||||
#include "Contents/Effects/EffectPrim.h"
|
||||
#include "Contents/Ground/TerrainHeight.h"
|
||||
|
|
@ -4821,7 +4820,7 @@ void CGameActor::SpawnDamageDigits(int, int damage, std::uint32_t color, int typ
|
|||
this->ClearUnknown037C(reinterpret_cast<int>(effect));
|
||||
effect->SendMsg(this, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
it = this->unknown_03B0.erase(it);
|
||||
reinterpret_cast<WorldObjects*>(static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene)->Remove(effect);
|
||||
static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->RemoveObject(effect);
|
||||
} else {
|
||||
++it;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include "Contents/World/World.h"
|
||||
#include "Resource/Models/ModelResource.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
#include "Contents/World/WorldObjects.h"
|
||||
#include "Render/Renderer.h"
|
||||
#include "Render/SpriteGeometry.h"
|
||||
#include "Resource/World/TerrainResource.h"
|
||||
|
|
@ -97,7 +96,7 @@ CSkill::~CSkill() {
|
|||
this->ReleaseModel();
|
||||
for (std::uint64_t target : this->m_targets) {
|
||||
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
||||
reinterpret_cast<WorldObjects*>(mode->scene)->SendObjectMessage(this, target, 24, 0, 0, 0, 0);
|
||||
mode->scene->SendObjectMessage(this, target, 24, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
this->m_targets.clear();
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
#include "Contents/Effects/Particle.h"
|
||||
#include "Contents/Sound/SoundMgr.h"
|
||||
#include "Contents/World/World.h"
|
||||
#include "Contents/World/WorldObjects.h"
|
||||
#include "Utility/Math/AffineMatrix.h"
|
||||
|
||||
#include <cmath>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
class BinkMovies;
|
||||
class CItem;
|
||||
class CGameMode;
|
||||
class CGameObject;
|
||||
class CPlayer;
|
||||
class CRenderObject;
|
||||
class GroundGeometry;
|
||||
|
|
@ -53,6 +54,8 @@ public:
|
|||
void AddPcPosFromCell(std::uint32_t aid, const int* cell);
|
||||
void AddPcPosUnindexed(std::uint32_t aid, const CellFloatPos& cell);
|
||||
void InitWorld();
|
||||
void RemoveObject(CRenderObject* object);
|
||||
void SendObjectMessage(CGameObject* sender, std::uint64_t identity, int message, int a, int b, int c, int d);
|
||||
static unsigned long __stdcall LoadDeferredModels(void* parameter);
|
||||
void FinishModelLoading();
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include "Contents/Actors/Item.h"
|
||||
#include "Contents/Actors/GameActor.h"
|
||||
#include "Client/Mode/ModeMgr.h"
|
||||
#include "Contents/World/WorldObjects.h"
|
||||
#include "Contents/World/World.h"
|
||||
#include "Contents/Effects/ArrowEffect.h"
|
||||
#include "Contents/Effects/EffectLists.h"
|
||||
|
|
@ -75,7 +74,7 @@ CRenderObject* CWorld::GetGameActorByAidIncludeMe(std::uint32_t aid) const {
|
|||
|
||||
// OFFSET: 0x00ACA4E0
|
||||
// FUNCTION: fn_17692
|
||||
void WorldObjects::Remove(CRenderObject* object) {
|
||||
void CWorld::RemoveObject(CRenderObject* object) {
|
||||
for (auto entry = this->objects.begin(); entry != this->objects.end(); ++entry) {
|
||||
if (*entry == object) {
|
||||
delete object;
|
||||
|
|
@ -259,7 +258,7 @@ void CWorld::Clear() {
|
|||
|
||||
// OFFSET: 0x00ACA980
|
||||
// FUNCTION: fn_17698
|
||||
void WorldObjects::SendObjectMessage(CGameObject* sender, std::uint64_t identity, int message, int a, int b, int c, int d) {
|
||||
void CWorld::SendObjectMessage(CGameObject* sender, std::uint64_t identity, int message, int a, int b, int c, int d) {
|
||||
if (this == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -922,7 +921,7 @@ bool CWorld::RemoveSkill(std::uint32_t aid) {
|
|||
return false;
|
||||
}
|
||||
|
||||
reinterpret_cast<WorldObjects*>(this)->Remove(skill);
|
||||
this->RemoveObject(skill);
|
||||
this->unknown_0020.erase(entry);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
#ifndef RAGNAROK_SOURCE_CONTENTS_WORLD_WORLDOBJECTS_H
|
||||
#define RAGNAROK_SOURCE_CONTENTS_WORLD_WORLDOBJECTS_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <list>
|
||||
|
||||
class CGameObject;
|
||||
class CRenderObject;
|
||||
|
||||
struct WorldObjects {
|
||||
std::list<CRenderObject*>& objects;
|
||||
|
||||
void Remove(CRenderObject* object);
|
||||
void SendObjectMessage(CGameObject* sender, std::uint64_t identity, int message, int a, int b, int c, int d);
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue