int GAMECLIENT::on_snapinput(int *data) { int val = controls->snapinput(data); if(val && snap.spectate) { NETOBJ_PLAYER_INPUT *inp = (NETOBJ_PLAYER_INPUT *)data; static bool last_fire = false, last_hook = false; if(inp->fire&1 && !last_fire) { find_next_spectable_cid(); last_fire = true; } else if(!(inp->fire&1) && last_fire) last_fire = false; if(inp->hook && !last_hook) { freeview = !freeview; if(!freeview) find_next_spectable_cid(); last_hook = true; } else if(!inp->hook && last_hook) last_hook = false; } return val; }
int GAMECLIENT::on_snapinput(int *data) { return controls->snapinput(data); }