Brad Wardell's views about technology, politics, religion, world affairs, and all sorts of politically incorrect topics.
Doh!
Published on March 30, 2006 By Draginol In GalCiv Journals

Well in 1.1BETA I found an annoying bug where social production doesn't get shifted over correctly.  It took me a second to find it.

Here it is:

if(strCurrentImprovement == "")
{
  if(pCiv->lMoney<500)
   
ulProduction = 0;
  ulUnusedSocialProduction = ulProduction;
  ulProduction = 0;
}

So there's the bug.  The CORRECT code would have been -500.  That is, if your treasury is lower than -500 THEN it goes to 0.

Fixed already (in my build but not the one that's on SDC) but just so you know in the beta.  It's mostly cosmetic in that it simply doesn't display the clear shields being sent over. But it's still annoying -- because it's my bug.


Comments (Page 1)
2 Pages1 2 
on Mar 30, 2006
MM sprays brad with bug spray, steps back, smiles and says outloud "that outta take care of yer bug"
on Mar 30, 2006
It makes me sad that you still have to write games in C++ when C# is so pretty
on Mar 30, 2006
Looks more like plain C to me.
on Mar 30, 2006
umm how can you tell by that short code section, the difference between C,C++ and C# ??
on Mar 30, 2006
Well due to the pointer notation I'm pretty sure its not C#

( pCiv->lMoney<500)
on Mar 30, 2006
I have never written in C#, but I know its not C because there is a == operator for string comparison. In pure C, that would be a strcmp() call.

END COMMUNICATION
on Mar 30, 2006
I don't think C# is ready for games yet, just my opinion though.  People thought Java woudl be a good language for game development too.
on Mar 31, 2006
Christ, Java is slower'n molasses.

Not the language, but the virtual machine.

Screw compatability, give me C!
on Mar 31, 2006
Draginol do you guys still have the 'live' version for dowload? The one that you devs are using.. i believe that there was a place to download this. Be nice to get the fix without having to wait for another week
on Mar 31, 2006
I hate when the bug is mine as well... I develop in house software and we have some very bitchy users, so I usually scramble for a quick fix for them and after pushing a new version out (I am a one man dev/QA team ), I realize that, oops, I forgot to clear that variable or that there is another crash-inducing bug. So, then, I am rushing even faster to correct the bug that was caused by the fix to the original issue that wasn't a bug but a cleverly-designed feature...
on Mar 31, 2006
Well due to the pointer notation I'm pretty sure its not C#

( pCiv->lMoney<500)

Blasted pointers kicking you out of Managed mode ...

Technically ... C# allows the use of pointers, it just dumps the application (in toto) out of managed mode and into unmanaged mode. At that point, it becomes C++ w/ some funky syntax.
on Mar 31, 2006
I'm sorry any language that doesn't allow for pointer manipulation will never replace C/C++. There are too many really nifty things that you can do in a few lines of code with pointers that take two or three times that without.

Hehe... bugs... happens to the best of us .
on Mar 31, 2006
I generally find C to be too ineffecient for my needs. But I usually only code micro controllers.

Of course C++ is far less efficient than C, and C# is even less efficient. Assembly is obviously the most efficient, but I like FORTH as well - being a high level language.
on Mar 31, 2006
Assembly? Someone else who likes to code in Assembler!?

Any time I've told people I like Assembler I get looked at like I had just told them I eat glue!

I find that C++ is over engineered, too many things added that - as stated - reduce efficiency.

C is a nice compromise between utility and efficiency.
on Mar 31, 2006
I LOVE Assembly!

And yeah I get the same reaction Kato when I say that hehe.

Of course I haven't gotten to use it in years *sniff*

I'm forced to use Visual Basic around here... damn DoD job. *sigh*

Felk the Forlorn
2 Pages1 2