Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 25 Guests
Online:

LATEST FORUM THREADS

»
Call of DutyŽ: WWII
CoD WW2 General
SOF2 Prefabs map
SoFII Mapping
coduo mapping tools
CoDUO Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Soldier of Fortune
Category: SoFII Scripting
Coding related issues dealing with Soldier of Fortune II.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Strange bug
infrequent
General Member
Since: Aug 6, 2004
Posts: 4
Last: Jan 13, 2007
[view latest posts]
Level 0
Category: SoFII Scripting
Posted: Monday, Apr. 11, 2005 09:36 am
The picture below is from my DemoView mod and was shown yesterday in another thread (on the Raven forums). Shortly after posting the picture I experienced that replay of a particular demo froze every single time when the demo reached a certain point and the game crashed shortly after.

After experimenting I found that it did not freeze if I turned off my display before reaching that point. The code that prints the display is 100% bug-free (as you will see). But I commented out a little part of the code and the problem was gone. Strange....

The code for printing the Display is this:

void CG_INFREQ_DrawDemoHUD( void )
{
if ( cg_DrawDemoHUD.integer == 0 ) return;

CG_INFREQ_DrawCVARS();

CG_INFREQ_DrawDebug();

CG_INFREQ_DrawInfo();

CG_INFREQ_DrawView();

CG_INFREQ_DrawToggles();

CG_INFREQ_DrawToggleControls();

CG_INFREQ_DrawViewControls();

CG_INFREQ_DrawThirdPersonControls();

CG_INFREQ_DrawMediaControls();
}

All those functions simply print some text based on some cvar values.

The strange part is that the error dissapeared when I out-commented the last function-call. Ok, the problem lies in CG_INFREQ_DrawMediaControls() ! I then looked closer at that simple function and saw nothing wrong.

void CG_INFREQ_DrawMediaControls( void )
{
char *s;

s = "MEDIA CONTROLS:";
CG_DrawText (10, HUD_Y_CONTROLS4, cgs.media.hudFont, 0.24f, colorWhite, s, 0, DT_OUTLINE);
s = "PAGEUP = Save screenshot (jpg)";
CG_DrawText (15, HUD_Y_CONTROLS4+1*HUD_ITEMSPACE_SMALL, cgs.media.hudFont, 0.24f, colorWhite, s, 0, DT_OUTLINE);
s = "PAGEDOWN = Save screenshot (tga)";
CG_DrawText (15, HUD_Y_CONTROLS4+2*HUD_ITEMSPACE_SMALL, cgs.media.hudFont, 0.24f, colorWhite, s, 0, DT_OUTLINE);

}

There is nothing wrong with the constants HUD_Y_CONTROLS4 and HUD_ITEMSPACE_SMALL ! As you can see on the picture the text is well within the screen-area.

What is wrong then ? I had an idea that I hoped was wrong. I out-commented the 3 s="... lines an inserted a s=" ". IT WORKED !! :(

My only explanation is that I've hit some limit in the VM by having all those s="... although they are in different functions and do not even share stack-space.

What the h*ll do I do ? Any ideas ?

Anyone know of such Q3 engine limitations ?


Share |
angeLL_
General Member
Since: Jun 11, 2006
Posts: 5
Last: Oct 12, 2006
[view latest posts]
Level 0
Category: SoFII Scripting
Posted: Thursday, Oct. 12, 2006 02:19 pm
yo.. where can i get that 3rd person and that is placed on ur screen? :)
Share |
infrequent
General Member
Since: Aug 6, 2004
Posts: 4
Last: Jan 13, 2007
[view latest posts]
Level 0
Category: SoFII Scripting
Posted: Thursday, Oct. 12, 2006 10:27 pm
angeLL_ writes...
Quote:
yo.. where can i get that 3rd person and that is placed on ur screen? :)


Ehhh... what ?
Share |
infrequent
General Member
Since: Aug 6, 2004
Posts: 4
Last: Jan 13, 2007
[view latest posts]
Level 0
Category: SoFII Scripting
Posted: Saturday, Jan. 13, 2007 02:27 am
Needless to say I fixed this bug a long time ago. It was simple memory-trashing in a sprintf() :)
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Soldier of Fortune : SoFII Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»