From: TimePath Date: Thu, 24 Mar 2016 01:04:38 +0000 (+1100) Subject: Bumblebee spawn test X-Git-Tag: xonotic-v0.8.2~1031 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=df66a7c722789d491bdb8cffb72706d15e87e347;p=xonotic%2Fxonotic-data.pk3dir.git Bumblebee spawn test --- diff --git a/qcsrc/server/tests.qc b/qcsrc/server/tests.qc index 0b153fff1..be5d3773c 100644 --- a/qcsrc/server/tests.qc +++ b/qcsrc/server/tests.qc @@ -11,12 +11,12 @@ TEST(Weapons, Hurt) { entity it; - Client a = it = NEW(Client, "A"); + noref Client a = it = NEW(Client, "A"); WITH(float, autocvar_g_spawnshieldtime, 0, Client_Add(it, NUM_TEAM_1)); it.origin = '-100 0 0'; it.angles = '0 0 0'; - Client b = it = NEW(Client, "B"); + noref Client b = it = NEW(Client, "B"); WITH(float, autocvar_g_spawnshieldtime, 0, Client_Add(it, NUM_TEAM_2)); it.origin = '100 0 0'; it.angles = '0 180 0'; @@ -36,3 +36,19 @@ TEST(Weapons, Hurt) SUCCEED(); } + +TEST(Vehicles, Spawn) +{ + entity it; + + noref Client bot = it = NEW(Client, "Rider"); + Client_Add(it, NUM_TEAM_1); + it.origin = '0 0 100'; + + 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); + + SUCCEED(); +} diff --git a/qcsrc/server/tests.qh b/qcsrc/server/tests.qh index 05c8d371f..be6445b48 100644 --- a/qcsrc/server/tests.qh +++ b/qcsrc/server/tests.qh @@ -8,3 +8,4 @@ #include #include #include +#include