From df66a7c722789d491bdb8cffb72706d15e87e347 Mon Sep 17 00:00:00 2001 From: TimePath Date: Thu, 24 Mar 2016 12:04:38 +1100 Subject: [PATCH] Bumblebee spawn test --- qcsrc/server/tests.qc | 20 ++++++++++++++++++-- qcsrc/server/tests.qh | 1 + 2 files changed, 19 insertions(+), 2 deletions(-) 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 -- 2.39.2