Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Whoo

chocorenderlimits Platform count fix

Recommended Posts

Mappers in TNT 2 noticed that chocorenderlimits wasn't counting the number of active platforms, but rather the total number activated.

So I went into the source and fixed it.

The problem was located in p_plats.c, in the P_RemoveActivePlat function. The P_AddActivePlat function was adding to the total number of platforms, but P_RemoveActivePlat wasn't removing the active ones. Here is the modified p_plats.c file.

Share this post


Link to post

Hmmm... when I try to run it I get:



The Event log says:

Activation context generation failed for "C:\Doom\Chocorenderlimits\chocorenderlimits_platfix.exe". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found.

I'm not sure how to run sxstrace.exe to get meaningful output so that's everything that I have.

Share this post


Link to post

People should stop assuming that the VC runtime DLLs are available on their target systems. Microsoft sure made it extremely inconvenient to use those at all... :(

Share this post


Link to post

God that's the worst error message since the THORAC-25 fried some people to death while printing out random numbers.

Why the fuck can't they at least print the goddamn file name in there. Jesus Christ on a corndog stick.

Anyway, as Graf says this is a runtime problem (msvcr90.dll probably). However, if you look closely, it is wanting the DebugCRT and that only comes with Visual Studio AFAIK. Only release builds should be distributed to non-programmer users.

Share this post


Link to post
Graf Zahl said:

People should stop assuming that the VC runtime DLLs are available on their target systems. Microsoft sure made it extremely inconvenient to use those at all... :(


Yeah I forgot about the incompatibility problems and I never got around to rebuilding it with Qt or another multi-platform compiler.

chungy said:

I've just rebuilt it with mingw32 instead, no MSVC runtime dependencies. http://dl.dropbox.com/u/13513277/chocorenderlimits_platfix.zip


Thanks for building it with a more friendly compiler!

The Green Herring said:

It might be just me, but it seems you can't use visplane bordering, sneak mode, or the color change function for the HOM detector anymore. All I get are the Save Game menu, the message toggle function, and the "Quit Game?" prompt, respectively. This was using chungy's build. That one wasn't based on an older version, was it?


It looks like chungy and I both used source code from the SVN then, and according to the ChangeLog the SVN hasn't been updated since January. I (or chungy) will have to rebuild it with the patch file from ReMood's site.

Share this post


Link to post

Indeed; I made the build rather quickly without noticing that Ghostly had a patch of further changes than what is in Subversion. I've just updated the same Zip file with the later changes and Whoo's combined.

Share this post


Link to post

The SVN has not been updated because I switch to mercurial! Also Fraggle has stopped bothering patching his copy. So if fraggle is reading this, you could potentially delete that branch and just tell everyone to go to this URL instead, perhaps with a single file in it.

https://bitbucket.org/GhostlyDeath/chocorenderlimits/overview

The actual repo is: https://bitbucket.org/GhostlyDeath/chocorenderlimits

EDIT: If you give me an ACTUAL patch and not an individual file, I will gladly apply it so it would work in a future version of Chocorenderlimits.

Share this post


Link to post

It's a one-line change, really, nothing complicated. (Though you've apparently re-indented the source on bitbucket to your own preferences (I must say, tabs, yuck), so simply diffing his big file would have been difficult)

diff -r 45dcb675005c src/p_plats.c
--- a/src/p_plats.c	Wed Oct 05 13:17:02 2011 -0400
+++ b/src/p_plats.c	Fri Dec 30 21:13:38 2011 -0800
@@ -297,6 +297,7 @@
 			P_RemoveThinker(&(activeplats[i])->thinker);
 			activeplats[i] = NULL;
 			
+			numplats--;
 			return;
 		}
 	I_Error("P_RemoveActivePlat: can't find plat!");

Share this post


Link to post
Whoo said:

Yeah I forgot about the incompatibility problems and I never got around to rebuilding it with Qt or another multi-platform compiler.



The compiler isn't the problem. Just the settings for the runtime library. For simple applications setting it to 'static' is absolutely recommended.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×