ai/ai_event.h
changeset 2759 c2a6fd12b41f
parent 2721 806d0f4ddf32
child 2760 29be62b09f09
equal deleted inserted replaced
2758:9cd8a21e9a7b 2759:c2a6fd12b41f
    11  *   Some compilers on the other hand (MSCV!!) doesn't support variadic macros
    11  *   Some compilers on the other hand (MSCV!!) doesn't support variadic macros
    12  *   causing this to fail. There is no known solution. If you know any, please
    12  *   causing this to fail. There is no known solution. If you know any, please
    13  *   tell us ASAP! */
    13  *   tell us ASAP! */
    14 #	define ai_event(player, event, ...) \
    14 #	define ai_event(player, event, ...) \
    15 		if ((player) < MAX_PLAYERS && _ai_player[(player)].module != NULL) \
    15 		if ((player) < MAX_PLAYERS && _ai_player[(player)].module != NULL) \
    16 			gpmi_event(_ai_player[(player)].module, (event), ##__VA_ARGS__)
    16 			gpmi_event(_ai_player[(player)].module, (event), _ai_current_uid, ##__VA_ARGS__)
    17 
    17 
    18 #else /* GPMI */
    18 #else /* GPMI */
    19 
    19 
    20 /* XXX -- Some compilers (like MSVC :() doesn't support variadic macros,
    20 /* XXX -- Some compilers (like MSVC :() doesn't support variadic macros,
    21  *   which means we have to go to a lot of trouble to get the ai_event() ignored
    21  *   which means we have to go to a lot of trouble to get the ai_event() ignored