aboutsummaryrefslogtreecommitdiff
path: root/advtrains/trainhud.lua
diff options
context:
space:
mode:
authorgpcf <gpcf@gpcf.eu>2024-08-11 23:22:36 +0200
committergpcf <gpcf@gpcf.eu>2024-08-11 23:22:36 +0200
commit46fbf89acfe3d182bf497bfa622cd4876d53d7da (patch)
treee700b011492b499d73051187b97efb754e34db8e /advtrains/trainhud.lua
parent9d7cec6151c0a9eca2454e9d6c85bc5596c5e946 (diff)
downloadadvtrains-46fbf89acfe3d182bf497bfa622cd4876d53d7da.tar.gz
advtrains-46fbf89acfe3d182bf497bfa622cd4876d53d7da.tar.bz2
advtrains-46fbf89acfe3d182bf497bfa622cd4876d53d7da.zip
Fix privilege check when using the PC naming toolrelease-2.4.5
This fix prevents malicious modified clients from using the PC tool without the necessary privileges.
Diffstat (limited to 'advtrains/trainhud.lua')
0 files changed, 0 insertions, 0 deletions
s="hl com">GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef CLOUDS_HEADER #define CLOUDS_HEADER #include "irrlichttypes_extrabloated.h" #include <iostream> #include "constants.h" // Menu clouds class Clouds; extern Clouds *g_menuclouds; // Scene manager used for menu clouds namespace irr{namespace scene{class ISceneManager;}} extern irr::scene::ISceneManager *g_menucloudsmgr; class Clouds : public scene::ISceneNode { public: Clouds( scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id, u32 seed, s16 cloudheight=0 ); ~Clouds(); /* ISceneNode methods */ virtual void OnRegisterSceneNode(); virtual void render(); virtual const aabb3f &getBoundingBox() const { return m_box; } virtual u32 getMaterialCount() const { return 1; } virtual video::SMaterial& getMaterial(u32 i) { return m_material; } /* Other stuff */ void step(float dtime); void update(v2f camera_p, video::SColorf color); void updateCameraOffset(v3s16 camera_offset) { m_camera_offset = camera_offset; m_box = aabb3f(-BS * 1000000, m_cloud_y - BS - BS * camera_offset.Y, -BS * 1000000, BS * 1000000, m_cloud_y + BS - BS * camera_offset.Y, BS * 1000000); } void readSettings(); private: video::SMaterial m_material; aabb3f m_box; s16 m_passed_cloud_y; float m_cloud_y; u16 m_cloud_radius_i; bool m_enable_3d; video::SColorf m_color; u32 m_seed; v2f m_camera_pos; float m_time; v3s16 m_camera_offset; }; #endif