lockup with the fps limiter 11/21

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sun Nov 23, 2003 2:05 am

one moment
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sun Nov 23, 2003 2:13 am

Code: Select all

[color=red]
	if (Elapsed)
	{[/color]
		// less than one second?
		if (Elapsed<1000)
		{
			// elapsed 150 ms
			// extrapolate. how many frame arrays would fit in one second?
			FPS=(float)(1000.0f/(float)Elapsed); 
			// 6.66667=1000/150
			// now multiply by the number of frames we've gone through
			// Frames 10
			FPS*=(float)Frames;
			// 66.6667= FPS * 10
	//		FPS=
		}
		else
		{
			// Frames = 100
			// Elapsed = 2000ms
			// FPS = 100 / (2000/1000) = 50

			// interpolate. how many seconds did it take for our frame array?
			FPS=(float)Frames/(float)((float)Elapsed/1000.0f); // Frames / number of seconds
		}
[color=red]	}
	else
		FPS=999.0f;[/color]
	// advance frame count
	CurrentFrame++; 
That should do it. I'll have zip fixed asap
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sun Nov 23, 2003 2:19 am

Bad connection problems tonight I'll fix it in cvs and zip tomorrow
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sun Nov 23, 2003 12:44 pm

http://macroquest2.com/phpBB2/viewtopic ... 8534#28534

The issue should be resolved as of today with this change, please let me know if it is not. Case considered closed until reported otherwise
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

User avatar
psychotik
a ghoul
a ghoul
Posts: 112
Joined: Mon Oct 06, 2003 3:48 am

Post by psychotik » Sun Nov 23, 2003 12:49 pm

still crashing, trying to get spew back :P

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sun Nov 23, 2003 12:57 pm

Ah shit. now I see.

Code: Select all

VOID ProcessFrame()
{
	// Update frame array
	DWORD Now=FrameArray[CurrentFrame]=GetTickCount();

	DWORD FirstFrame=0;
	DWORD Frames=CurrentFrame;
	if (bFrameArrayFilled)
	{
		FirstFrame=CurrentFrame+1;
		if (FirstFrame>FRAME_COUNT)
		{
			FirstFrame=FRAME_COUNT;
		}
		Frames=FRAME_COUNT;
	}
	// Calculate time this frame
	DWORD LastFrame=CurrentFrame-1;
	if (LastFrame>FRAME_COUNT)
	{
		if (bFrameArrayFilled)
		{
			LastFrame=FRAME_COUNT;
			FrameTime=Now-FrameArray[LastFrame];
		}
		else
			FrameTime=0;
	}
	else
		FrameTime=Now-FrameArray[LastFrame];

	// Calculate FPS
	// Get amount of time between first frame and now
	DWORD Elapsed=Now-FrameArray[FirstFrame];


	if (Elapsed)
	{
		// less than one second?
		if (Elapsed<1000)
		{
			// elapsed 150 ms
			// extrapolate. how many frame arrays would fit in one second?
			FPS=(float)(1000.0f/(float)Elapsed); 
			// 6.66667=1000/150
			// now multiply by the number of frames we've gone through
			// Frames 10
			FPS*=(float)Frames;
			// 66.6667= FPS * 10
	//		FPS=
		}
		else
		{
			// Frames = 100
			// Elapsed = 2000ms
			// FPS = 100 / (2000/1000) = 50

			// interpolate. how many seconds did it take for our frame array?
			FPS=(float)Frames/(float)((float)Elapsed/1000.0f); // Frames / number of seconds
		}
	}
	else
		FPS=999.0f;
	// advance frame count
	if (++CurrentFrame>FRAME_COUNT)
	{
		CurrentFrame=0;
		bFrameArrayFilled=1;
	}
}
There you go, that'll fix it. Replace your function with that. Updating zip in a second
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

User avatar
psychotik
a ghoul
a ghoul
Posts: 112
Joined: Mon Oct 06, 2003 3:48 am

Post by psychotik » Sun Nov 23, 2003 1:04 pm

works, thanks for putting up with us lax :)

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sun Nov 23, 2003 1:07 pm

thanks for your patience and help solving the problem ;) Zip updated with this fixed.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

gnome001
a ghoul
a ghoul
Posts: 109
Joined: Fri Jan 24, 2003 1:01 am

Post by gnome001 » Sun Nov 23, 2003 1:57 pm

/cheer. happy to be of service.

been testing for the past hour and is working great

FrankJScott
naggy
naggy
Posts: 2349
Joined: Sun Feb 19, 2023 7:11 am

Excellent Interior Design Advice

Post by FrankJScott » Thu Aug 10, 2023 11:02 pm

Why don't you Google it! before you post

FrankJScott
naggy
naggy
Posts: 2349
Joined: Sun Feb 19, 2023 7:11 am

High Rated Product Guide

Post by FrankJScott » Fri Aug 18, 2023 7:12 pm

Why don't you Google it! before you post

FrankJScott
naggy
naggy
Posts: 2349
Joined: Sun Feb 19, 2023 7:11 am

High Rated Product Site

Post by FrankJScott » Tue Dec 19, 2023 11:35 am

Please try Google before asking about New Product Website 89a61d1

FrankJScott
naggy
naggy
Posts: 2349
Joined: Sun Feb 19, 2023 7:11 am

Recommended Product Website

Post by FrankJScott » Sun Dec 24, 2023 6:17 pm

Please try Google before asking about Best Product Blog 8dec9a8

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: lockup with the fps limiter 11/21

Post by xyilla » Sun Oct 26, 2025 4:54 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: lockup with the fps limiter 11/21

Post by xyilla » Sun Oct 26, 2025 4:56 am