Home » MODDING HQ 1.13 » v1.13 Bug Reports » Flugente rant #5: useless crap that does nothing
Flugente rant #5: useless crap that does nothing[message #331347] Tue, 18 March 2014 02:44 Go to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
Sometimes, our belove code pisses me off, and spamming the IRC with obscenities won't do. In these cases, I will open such a thread, to let the world know how the code wronged me today :computer2:

Today's lesson: People that have been here longer than me might remember that there once was soemthing called AStar-pathing. I don't know the details... it apparently never worked and got a lot of people pissed?

Anyway, nowadays it is turned off. But not entirely :angry:

I found this gem in worlddef.cpp:
BOOLEAN						gubWorldTileInLight[ MAX_ALLOWED_WORLD_MAX ];
BOOLEAN						gubIsCorpseThere[ MAX_ALLOWED_WORLD_MAX ];
INT32						gubMerkCanSeeThisTile[ MAX_ALLOWED_WORLD_MAX ];
coupled with
#define MAX_ALLOWED_WORLD_MAX		WORLD_COLS_MAX*WORLD_ROWS_MAX // (2000 cols x 2000 rows)
leads to the game potentially allocating ~24 MB.
Which it does... at the end of every turn in Handle Ui.cpp (I've cleaned up the code somewhat. Weird symbols are apparently cyrillic or orkish or whatever):
Captain

Re: Flugente rant #5: useless crap that does nothing[message #331350] Tue, 18 March 2014 04:02 Go to previous messageGo to next message
Anthropoid is currently offline Anthropoid

 
Messages:145
Registered:February 2014
So, you just deleted it? That would be my 'solution!'

Pretty sure those strange characters are the Black Speech, used by the used the Nazg

Report message to a moderator

Sergeant
Re: Flugente rant #5: useless crap that does nothing[message #331355] Tue, 18 March 2014 10:49 Go to previous messageGo to next message
silversurfer

 
Messages:2791
Registered:May 2009
I always wondered why there was a pause at the end of the turn. Glad you could fix that. :thumbsup:

Report message to a moderator

Lieutenant
Re: Flugente rant #5: useless crap that does nothing[message #331364] Tue, 18 March 2014 18:06 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
Registered:October 2005
Location: Austria
good catch flugente

Report message to a moderator

Sergeant Major

Re: Flugente rant #5: useless crap that does nothing[message #331365] Tue, 18 March 2014 18:37 Go to previous messageGo to next message
Gambigobilla

 
Messages:693
Registered:July 2008
I don't know if this counts for something but it's part of sth called "ddd" mod, commited by "bugmonster" in rev3789. Found it in https://ja2svn.no-ip.org/source/ja2/branches/Wanne/JA2%201.13%20MP

Report message to a moderator

First Sergeant
Re: Flugente rant #5: useless crap that does nothing[message #331373] Tue, 18 March 2014 23:08 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
Registered:October 2005
Location: Austria
Gambigobilla
I don't know if this counts for something but it's part of sth called "ddd" mod, commited by "bugmonster" in rev3789. Found it in https://ja2svn.no-ip.org/source/ja2/branches/Wanne/JA2%201.13%20MP


I think the orignal purpose of bugmonsters code was to avoid corpses and light tiles by the enemy pathing, but it did not work correctly.

Report message to a moderator

Sergeant Major

Re: Flugente rant #5: useless crap that does nothing[message #331378] Wed, 19 March 2014 01:15 Go to previous message
Kriplo is currently offline Kriplo

 
Messages:256
Registered:February 2008
Location: Zagreb - Croatia
ADB code will live forever and we should tribute this code and his author with most respect as without it v1.13 would not be the same :party:

Report message to a moderator

Master Sergeant
Previous Topic: So I ran a code analysis in Visual Studio 2013
Next Topic: Scope Range Bonus Bug
Goto Forum:
  


Current Time: Sat Nov 30 13:35:03 GMT+2 2024

Total time taken to generate the page: 0.01355 seconds