Ejemplo n.º 1
0
//
// ST_Responder
//
// Respond to keyboard input events, intercept cheats.
// This code is shared by all status bars.
//
bool ST_Responder(const event_t *ev)
{
   // TODO: allow cheat input to be disabled
   // if a user keypress...
   if(ev->type == ev_keydown)         // Try cheat responder in m_cheat.c
      return M_FindCheats(ev->data1); // killough 4/17/98, 5/2/98
   return false;
}
Ejemplo n.º 2
0
void M_DoCheat(char *s)
{
   while(*s)
   {
      M_FindCheats(*s);
      s++;
   }
}
Ejemplo n.º 3
0
void M_CheatProcess(player_t * plyr, event_t * ev)
{
	if (netgame && !(gameflags & GF_ALLOWCHEATS))
		return;

	// if a user keypress...
	if (ev->type == ev_keydown)
		M_FindCheats(plyr, ev->data1);
}
Ejemplo n.º 4
0
// Respond to keyboard input events,
//  intercept cheats.
dboolean ST_Responder(event_t *ev)
{
  // Filter automap on/off.
  if (ev->type == ev_keyup && (ev->data1 & 0xffff0000) == AM_MSGHEADER)
    {
      switch(ev->data1)
        {
        case AM_MSGENTERED:
          st_gamestate = AutomapState;
          st_firsttime = true;
          break;

        case AM_MSGEXITED:
          st_gamestate = FirstPersonState;
          break;
        }
    }
  else  // if a user keypress...
    if (ev->type == ev_keydown)       // Try cheat responder in m_cheat.c
      return M_FindCheats(ev->data1); // killough 4/17/98, 5/2/98
  return false;
}