]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/tests.qc
Bot AI: fix bots sometimes getting stuck on a ledge above a jumppad (e.g. Mentalspace)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / tests.qc
index 388c4af7b83d57ea13120fb7afb824f98d485026..e52d4fcf1111c67ddd6c17f53b95feed83d605b7 100644 (file)
@@ -2,7 +2,7 @@
 
 void test_weapons_hurt(entity this)
 {
-    EXPECT_NE(100, this.health);
+    EXPECT_NE(100, GetResourceAmount(this, RESOURCE_HEALTH));
     delete(this.enemy);
     delete(this);
 }
@@ -25,9 +25,8 @@ TEST(Weapons, Hurt)
     PHYS_INPUT_BUTTON_ATCK(it) = true;
     it.items |= IT_UNLIMITED_AMMO;
     Weapon wep = WEP_VORTEX;
-    .entity weaponentity = weaponentities[0]; // TODO: unhardcode
     W_GiveWeapon(it, wep.m_id);
-    W_SwitchWeapon_Force(it, wep, weaponentity);
+    W_SwitchWeapon_Force(it, wep, weaponentities[0]);
 
     it = b;
     PHYS_INPUT_BUTTON_JUMP(it) = true;