]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/tests.qc
Update default video settings
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / tests.qc
index be5d3773c0a1bfc92fefded156fe985ec669f83f..2f7dc88ba1436fffc693778aba98ddcdfad4100e 100644 (file)
@@ -1,10 +1,10 @@
 #include "tests.qh"
 
-void test_weapons_hurt() {
-    SELFPARAM();
-    EXPECT_NE(100, this.health);
-    remove(this.enemy);
-    remove(this);
+void test_weapons_hurt(entity this)
+{
+    EXPECT_NE(100, GetResource(this, RES_HEALTH));
+    delete(this.enemy);
+    delete(this);
 }
 
 TEST(Weapons, Hurt)
@@ -26,7 +26,7 @@ TEST(Weapons, Hurt)
     it.items |= IT_UNLIMITED_AMMO;
     Weapon wep = WEP_VORTEX;
     W_GiveWeapon(it, wep.m_id);
-    W_SwitchWeapon_Force(it, wep);
+    W_SwitchWeapon_Force(it, wep, weaponentities[0]);
 
     it = b;
     PHYS_INPUT_BUTTON_JUMP(it) = true;
@@ -48,7 +48,8 @@ TEST(Vehicles, Spawn)
     noref entity v = it = new(vehicle);
     Vehicle veh = VEH_BUMBLEBEE;
     it.active = ACTIVE_NOT;
-    WITH(entity, self, it, vehicle_initialize(veh, false); it.nextthink = time);
+    vehicle_initialize(it, veh, false);
+    it.nextthink = time;
 
     SUCCEED();
 }