]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Campaign: give bots a weapon on map start
authorterencehill <piuntn@gmail.com>
Thu, 14 Apr 2022 13:04:53 +0000 (15:04 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 14 Apr 2022 13:04:53 +0000 (15:04 +0200)
qcsrc/server/bot/default/bot.qc

index 79f939196debf87b07d548e39ca96870261b2e0e..509adfdbe6fa2cb54d585bd608b65ee207b728be 100644 (file)
@@ -67,6 +67,12 @@ void bot_think(entity this)
 
        if (!IS_PLAYER(this) || (autocvar_g_campaign && !campaign_bots_may_start))
        {
+               if (IS_PLAYER(this))
+               {
+                       .entity weaponentity = weaponentities[0];
+                       if(this.(weaponentity).m_weapon == WEP_Null)
+                               W_NextWeapon(this, 0, weaponentity);
+               }
                CS(this).movement = '0 0 0';
                this.bot_nextthink = time + 0.5;
                return;