]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/compat/quake3.qc
target_give: support count fields of speed and invis powerups
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / compat / quake3.qc
index effbbc10caa304c64e65617abc4f8e30dec2a9cc..32c42d35400a151550fd309a038ad2513525900f 100644 (file)
@@ -225,12 +225,16 @@ void target_give_init(entity this)
                                this.invincible_finished += it.invincible_finished;
                        else if (it.strength_finished)
                                this.strength_finished += it.strength_finished;
+                       else if (it.speed_finished)
+                               this.speed_finished += it.speed_finished;
+                       else if (it.invisibility_finished)
+                               this.invisibility_finished += it.invisibility_finished;
                        else if (it.health)
                                this.health += it.health;
                        else if (it.armorvalue)
                                this.armorvalue += it.armorvalue;
 
-                       this.netname = cons(this.netname, it.netname);
+                       this.netname = cons(this.netname, (it.itemdef.m_weapon) ? it.itemdef.m_weapon.netname : it.itemdef.netname);
                }
 
                //remove(it); // removing ents in init functions causes havoc, workaround:
@@ -305,6 +309,7 @@ bool DoesQ3ARemoveThisEntity(entity this)
        if(this.notta)
                return true;
 
+       // FIXME: singleplayer does not use maxclients 1 as that would prevent bots
        if(this.notsingle)
                if(maxclients == 1)
                        return true;