X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fdefault%2Fbot.qh;h=c4da14a4beeb29c7474c273879b34abc1c8411de;hp=0959307608d3239bd7405bc809c2352467fd1c6c;hb=7d13257ab8cd25177ae7e2991f4e6fae6869d92a;hpb=b7d363a108963ca13647ee25b58c5a531366cf49 diff --git a/qcsrc/server/bot/default/bot.qh b/qcsrc/server/bot/default/bot.qh index 0959307608..c4da14a4be 100644 --- a/qcsrc/server/bot/default/bot.qh +++ b/qcsrc/server/bot/default/bot.qh @@ -3,20 +3,20 @@ * Globals and Fields */ -const int AI_STATUS_ROAMING = BIT(0); // Bot is just crawling the map. No enemies at sight -const int AI_STATUS_ATTACKING = BIT(1); // There are enemies at sight -const int AI_STATUS_RUNNING = BIT(2); // Bot is bunny hopping -const int AI_STATUS_DANGER_AHEAD = BIT(3); // There is lava/slime/trigger_hurt ahead -const int AI_STATUS_OUT_JUMPPAD = BIT(4); // Trying to get out of a "vertical" jump pad -const int AI_STATUS_OUT_WATER = BIT(5); // Trying to get out of water -const int AI_STATUS_WAYPOINT_PERSONAL_LINKING = BIT(6); // Waiting for the personal waypoint to be linked -const int AI_STATUS_WAYPOINT_PERSONAL_GOING = BIT(7); // Going to a personal waypoint -const int AI_STATUS_WAYPOINT_PERSONAL_REACHED = BIT(8); // Personal waypoint reached -const int AI_STATUS_JETPACK_FLYING = BIT(9); -const int AI_STATUS_JETPACK_LANDING = BIT(10); -const int AI_STATUS_STUCK = BIT(11); // Cannot reach any goal - -.float isbot; // true if this client is actually a bot +const int AI_STATUS_ROAMING = BIT(0); // Bot is just crawling the map. No enemies at sight +const int AI_STATUS_ATTACKING = BIT(1); // There are enemies at sight +const int AI_STATUS_RUNNING = BIT(2); // Bot is bunny hopping +const int AI_STATUS_DANGER_AHEAD = BIT(3); // There is lava/slime/trigger_hurt ahead +const int AI_STATUS_OUT_JUMPPAD = BIT(4); // Trying to get out of a "vertical" jump pad +const int AI_STATUS_OUT_WATER = BIT(5); // Trying to get out of water +const int AI_STATUS_WAYPOINT_PERSONAL_LINKING = BIT(6); // Waiting for the personal waypoint to be linked +const int AI_STATUS_WAYPOINT_PERSONAL_GOING = BIT(7); // Going to a personal waypoint +const int AI_STATUS_WAYPOINT_PERSONAL_REACHED = BIT(8); // Personal waypoint reached +const int AI_STATUS_JETPACK_FLYING = BIT(9); +const int AI_STATUS_JETPACK_LANDING = BIT(10); +const int AI_STATUS_STUCK = BIT(11); // Cannot reach any goal + +.bool isbot; // true if this client is actually a bot .int aistatus; // Skill system @@ -62,6 +62,7 @@ entity bot_list; .float bot_pickup; .float bot_pickupbasevalue; +.bool bot_pickup_respawning; .float bot_canfire; .float bot_strategytime; @@ -75,7 +76,12 @@ float botframe_spawnedwaypoints; float botframe_nextthink; float botframe_nextdangertime; float bot_cvar_nextthink; -float bot_ignore_bots; // let bots not attack other bots (only works in non-teamplay) + +int _content_type; +#define IN_LAVA(pos) (_content_type = pointcontents(pos), (_content_type == CONTENT_LAVA || _content_type == CONTENT_SLIME)) +#define IN_LIQUID(pos) (_content_type = pointcontents(pos), (_content_type == CONTENT_WATER || _content_type == CONTENT_LAVA || _content_type == CONTENT_SLIME)) +#define SUBMERGED(pos) IN_LIQUID(pos + autocvar_sv_player_viewoffset) +#define WETFEET(pos) IN_LIQUID(pos + eZ * (m1.z + 1)) /* * Functions @@ -89,6 +95,7 @@ void bot_setnameandstuff(entity this); void bot_custom_weapon_priority_setup(); void bot_endgame(); void bot_relinkplayerlist(); +void bot_clear(entity this); void bot_clientdisconnect(entity this); void bot_clientconnect(entity this); void bot_removefromlargestteam();