DETOUR_DECL_MEMBER(void, CTFPlayerShared_OnConditionAdded, ETFCond cond) { auto shared = reinterpret_cast<CTFPlayerShared *>(this); auto player = shared->GetOuter(); ClientMsg("[CondDebug] #%d \"%s\" +++ %d %s\n", ENTINDEX(player), player->GetPlayerName(), (int)cond, GetTFConditionName(cond)); DETOUR_MEMBER_CALL(CTFPlayerShared_OnConditionAdded)(cond); }
//--------------------------------------------------------------------------------- // Purpose: Process the nextmap command //--------------------------------------------------------------------------------- PLUGIN_RESULT ProcessMaNextMap(player_t *player_ptr, const char *command_name, const int help_id, const int command_type) { char map_text[128]; if (mani_vote_allow_end_of_map_vote.GetInt() == 1 && gpManiVote->SysMapDecided() == false) { Q_strcpy(map_text, "Map decided by vote"); } else { snprintf(map_text, sizeof (map_text), "Nextmap: %s", next_map); } OutputToConsole(player_ptr, "%s\n", map_text); if (player_ptr) { if (mani_nextmap_player_only.GetInt() == 1) { ClientMsgSinglePlayer(player_ptr->entity, 10, 4, "%s", map_text); } else { Color white(255,255,255,255); ClientMsg(&white, 10, false, 4, "%s", map_text); } } else { Color white(255,255,255,255); ClientMsg(&white, 10, false, 1, "%s", map_text); } return PLUGIN_STOP; }