Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

FPS Bugged 1.5

C:\User\Secondary\Desktop
Joined
Jul 18, 2013
Messages
580
Reaction score
79
How to fix FPS:
i see weird text from fps.
and i have 3 picture from fps bugged.
1.
secondary - FPS Bugged 1.5 - RaGEZONE Forums


2.

secondary - FPS Bugged 1.5 - RaGEZONE Forums


3.

secondary - FPS Bugged 1.5 - RaGEZONE Forums
 
Initiate Mage
Joined
Apr 5, 2012
Messages
46
Reaction score
5
Replace FPSOverlay.cpp with

Code:
/*
    Addon Name: FPSOverlay
	Revision: r1
	Author: Franc[e]sco
*/
 
#include "stdafx.h"
 
#include "FPSOverlay.h"
#include "RealSpace2.h"
#include "Mint4R2.h"
 
extern MDrawContextR2 *g_pDC; // lol the gunz source is a complete mess
 
namespace ZAddons { 
namespace Francesco
{
 
	std::auto_ptr<FPSOverlay> FPSOverlay::instance;
 
	FPSOverlay::FPSOverlay()
		: bEnabled(true) // [todo] add a menu option or chat command to toggle it
	{
		// empty
	}
 
	FPSOverlay::~FPSOverlay()
	{
		// empty
	}
 
	FPSOverlay *FPSOverlay::Get()
	{
		if (!instance.get())
			instance = std::auto_ptr<FPSOverlay>(new FPSOverlay);
 
		return instance.get();
	}
 
	void FPSOverlay::Toggle(bool bEnabled)
	{
		this->bEnabled = bEnabled;
	}
 
	void FPSOverlay::Draw()
	{
		if (!bEnabled)
			return;
 
		//const char *szText;
		int x;
		//std::stringstream ss;
		char buf[512] = {0};

		//ss.precision(3);
		// not sure why, but the string seems to need to be longer than a certain amount to be drawn
		//ss << "            FPS: " << std::fixed << g_fFPS;
		//szText = ss.str().c_str();
		sprintf(buf, "FPS: %g", g_fFPS);

		x = g_pDC->GetClipRect().w - g_pDC->GetFont()->GetWidth(buf) - 10;
		g_pDC->Text(x, 10, buf); // [todo] draw this the same way as the game draws its widgets
	}
 
}}
 
Upvote 0
Back
Top