Skip to content

Commit

Permalink
🗑️ Rem. unused MovableText from Actor - using imgui.
Browse files Browse the repository at this point in the history
  • Loading branch information
ohlidalp committed Aug 23, 2021
1 parent 1382087 commit 5ad145a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
9 changes: 0 additions & 9 deletions source/main/physics/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,6 @@ Actor::~Actor()
delete (*it);
}

if (m_net_label_mt)
{
m_net_label_mt->setVisible(false);
delete m_net_label_mt;
m_net_label_mt = nullptr;
}

if (m_intra_point_col_detector)
{
delete m_intra_point_col_detector;
Expand Down Expand Up @@ -4417,8 +4410,6 @@ Actor::Actor(
, m_mouse_grab_node(-1)
, m_mouse_grab_pos(Ogre::Vector3::ZERO)
, m_net_initialized(false)
, m_net_label_node(0)
, m_net_label_mt(0)
, ar_initial_total_mass(0)
, ar_parking_brake(false)
, ar_trailer_parking_brake(false)
Expand Down
3 changes: 0 additions & 3 deletions source/main/physics/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "CmdKeyInertia.h"
#include "Differentials.h"
#include "GfxActor.h"
#include "MovableText.h"
#include "PerVehicleCameraContext.h"
#include "RigDef_Prerequisites.h"
#include "SimData.h"
Expand Down Expand Up @@ -467,8 +466,6 @@ class Actor : public ZeroedMemoryAllocator
Ogre::Vector3 m_mouse_grab_pos;
float m_mouse_grab_move_force;
float m_spawn_rotation;
MovableText* m_net_label_mt;
Ogre::SceneNode* m_net_label_node;
Ogre::UTFString m_net_username;
int m_net_color_num;
Ogre::Timer m_reset_timer;
Expand Down
14 changes: 0 additions & 14 deletions source/main/physics/ActorManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,20 +315,6 @@ void ActorManager::SetupActor(Actor* actor, ActorSpawnRequest rq, std::shared_pt

actor->m_net_username = rq.asr_net_username;
actor->m_net_color_num = rq.asr_net_color;

RoR::Str<100> element_name;
ActorSpawner::ComposeName(element_name, "NetLabel", 0, actor->ar_instance_id);
actor->m_net_label_mt = new MovableText(element_name.ToCStr(), actor->m_net_username);
actor->m_net_label_mt->setTextAlignment(MovableText::H_CENTER, MovableText::V_ABOVE);
#ifdef USE_SOCKETW
actor->m_net_label_mt->setColor(App::GetNetwork()->GetPlayerColor((rq.asr_net_color)));
#endif // USE_SOCKETW
actor->m_net_label_mt->setVisible(true);

actor->m_net_label_node = App::GetGfxScene()->GetSceneManager()->getRootSceneNode()->createChildSceneNode();
actor->m_net_label_node->attachObject(actor->m_net_label_mt);
actor->m_net_label_node->setVisible(true);
actor->m_deletion_scene_nodes.emplace_back(actor->m_net_label_node);
}
else if (App::sim_replay_enabled->GetBool())
{
Expand Down

0 comments on commit 5ad145a

Please # to comment.