]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_player.qc
Bots: define the API boundaries
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_player.qc
index 50ceba31014316ea5cff9e7c0ee528c3d30f681c..a542e6431345095828ccd90dc87dd9ecc081406e 100644 (file)
@@ -1,6 +1,6 @@
 #include "cl_player.qh"
 
-#include "bot/bot.qh"
+#include "bot/api.qh"
 #include "cheats.qh"
 #include "g_damage.qh"
 #include "g_subs.qh"
@@ -91,7 +91,8 @@ void CopyBody(entity this, float keepvelocity)
        clone.modelindex = this.modelindex;
        clone.skin = this.skin;
        clone.species = this.species;
-       clone.movetype = this.movetype;
+       clone.move_qcphysics = false; // don't run gamecode logic on clones, too many
+       set_movetype(clone, this.move_movetype);
        clone.solid = this.solid;
        clone.ballistics_density = this.ballistics_density;
        clone.takedamage = this.takedamage;
@@ -151,7 +152,7 @@ void player_anim(entity this)
        int animbits = deadbits;
        if(STAT(FROZEN, this))
                animbits |= ANIMSTATE_FROZEN;
-       if(this.movetype == MOVETYPE_FOLLOW)
+       if(this.move_movetype == MOVETYPE_FOLLOW)
                animbits |= ANIMSTATE_FOLLOW;
        if(this.crouch)
                animbits |= ANIMSTATE_DUCK;
@@ -531,7 +532,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
                // get rid of kill indicator
                if(this.killindicator)
                {
-                       remove(this.killindicator);
+                       delete(this.killindicator);
                        this.killindicator = NULL;
                        if(this.killindicator_teamchange)
                                defer_ClientKill_Now_TeamChange = true;
@@ -594,7 +595,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
                // view from the floor
                this.view_ofs = '0 0 -8';
                // toss the corpse
-               this.movetype = MOVETYPE_TOSS;
+               set_movetype(this, MOVETYPE_TOSS);
                // shootable corpse
                this.solid = SOLID_CORPSE;
                this.ballistics_density = autocvar_g_ballistics_density_corpse;