1

Topic: Values of player_state

I have noticed a variable called 'player_state'. According to the comment near it, it is the state of the player when they are chatting, accessing a menu, etc. So far these are the only states I have found:

PLAYERSTATE_PLAYING
PLAYERSTATE_UNKNOWN

I presume that these are the others:

PLAYERSTATE_CHATTING
PLAYERSTATE_MENU

Does anyone know for sure?

if($poster["intelligence"] == $intelligence["idiot"])
        deny_post($poster);

2 (edited by shmafoozius 2008-06-17 07:35:08)

Re: Values of player_state

According to g_protocol.def, you're (almost) right:

        // playerstates
        PLAYERSTATE_UNKNOWN=0,
        PLAYERSTATE_PLAYING,
        PLAYERSTATE_IN_MENU,
        PLAYERSTATE_CHATTING,
        NUM_PLAYERSTATES,

/edit: Tested it, it's working.

bam: WARNING:'src/game/server/gamemodes/mod.cpp' comes from the future

3

Re: Values of player_state

Thanks.

if($poster["intelligence"] == $intelligence["idiot"])
        deny_post($poster);