What changes during a 'state change'?

Content and general development discussion, including maps, quests, and server code from the development team.
Post Reply
User avatar
bigglesworth
Novice
Novice
Posts: 211
Joined: 11 Nov 2007, 04:23
Location: Land of Ooo

What changes during a 'state change'?

Post by bigglesworth » 10 Oct 2009, 07:12

What is a 'state change' and what is happening between states?

I'm using linux and the October 7 or 8, 2009 git client.

Code: Select all

milkchan@pc2-jaunty64:~$ ./tmw/bin/tmw
State change: 0 to 1
State change: 1 to 2
State change: 2 to 3
State change: 3 to 4
State change: 4 to -1
State change: -1 to 1
State change: 1 to 2
State change: 2 to 3
State change: 3 to 4
State change: 4 to -1
State change: -1 to 1
State change: 1 to 2
State change: 2 to 3
State change: 3 to 4
State change: 4 to 5
State change: 5 to 7
State change: 7 to 8
State change: 8 to 9
State change: 9 to 10
State change: 10 to 11
State change: 11 to 12
milkchan@pc2-jaunty64:~$
User avatar
bigglesworth
Novice
Novice
Posts: 211
Joined: 11 Nov 2007, 04:23
Location: Land of Ooo

Re: What changes during a 'state change'?

Post by bigglesworth » 10 Oct 2009, 09:43

Image

I'm only a humble player. Under which sub-forum topic do you suggest is best?
User avatar
Ces
Novice
Novice
Posts: 231
Joined: 19 Mar 2008, 23:46
Location: The hemisphere

Re: What changes during a 'state change'?

Post by Ces » 10 Oct 2009, 11:21

Well, Jaxad left in a debug message as usual. :P

Code: Select all

printf("State change: %d to %d\n", oldstate, state);
(http://gitorious.org/tmw/mainline/commi ... 0b899ba414)

Nothing you have to worry about, but if you are curious; what the numbers mean:
http://gitorious.org/tmw/mainline/blobs ... n.h#line86
User avatar
bigglesworth
Novice
Novice
Posts: 211
Joined: 11 Nov 2007, 04:23
Location: Land of Ooo

Re: What changes during a 'state change'?

Post by bigglesworth » 10 Oct 2009, 13:31

The output was something new to me and all I needed was a clear point in the right direction.

Thank you, Ces.
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: What changes during a 'state change'?

Post by Jaxad0127 » 12 Oct 2009, 04:24

It's rather annoying to have to remember to comment that out before committing and uncomment it before developing again. ;)
Image
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 17:08
Location: Germany

Re: What changes during a 'state change'?

Post by Crush » 12 Oct 2009, 16:10

Just make it a proper log message and you can leave it in ;)
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: What changes during a 'state change'?

Post by Jaxad0127 » 12 Oct 2009, 16:33

Crush wrote:Just make it a proper log message and you can leave it in ;)
Rather annoying to have to reload and check the log every second to make sure states are changing appropriately. ;)

Maybe a debug flag that controls such console output....
Image
User avatar
ElvenProgrammer
TMW Adviser
TMW Adviser
Posts: 2526
Joined: 13 Apr 2004, 20:11
Location: Italy
Contact:

Re: What changes during a 'state change'?

Post by ElvenProgrammer » 12 Oct 2009, 16:40

jaxad0127 wrote:Maybe a debug flag that controls such console output....
Indeed
Post Reply