X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fclient.qc;h=f1f67a7924650492e25b2634684135862dec1a92;hp=9d4df94e77070631dd98a239a37617633895c758;hb=65459f5d1671e5ce33cffcf78f6da10b8966c171;hpb=9c765062f5aa52580c1896462d9593d70550c070 diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 9d4df94e7..f1f67a792 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -12,6 +12,7 @@ #include "teamplay.qh" #include "playerdemo.qh" #include "spawnpoints.qh" +#include "resources.qh" #include "g_damage.qh" #include "g_hook.qh" #include "command/common.qh" @@ -544,6 +545,10 @@ void PutPlayerInServer(entity this) this.health = start_health; this.armorvalue = start_armorvalue; this.weapons = start_weapons; + GiveRandomWeapons(this, random_start_weapons_count, + cvar_string("g_random_start_weapons"), random_start_shells, + random_start_bullets, random_start_rockets, random_start_cells, + random_start_plasma); } SetSpectatee_status(this, 0); @@ -1628,8 +1633,8 @@ void player_regen(entity this) float mina, maxa, limith, limita; maxa = autocvar_g_balance_armor_rotstable; mina = autocvar_g_balance_armor_regenstable; - limith = GetResourceLimit(RESOURCE_HEALTH); - limita = GetResourceLimit(RESOURCE_ARMOR); + limith = GetResourceLimit(this, RESOURCE_HEALTH); + limita = GetResourceLimit(this, RESOURCE_ARMOR); regen_health_rotstable = regen_health_rotstable * max_mod; regen_health_stable = regen_health_stable * max_mod; @@ -1656,7 +1661,7 @@ void player_regen(entity this) maxf = autocvar_g_balance_fuel_rotstable; minf = autocvar_g_balance_fuel_regenstable; - limitf = GetResourceLimit(RESOURCE_FUEL); + limitf = GetResourceLimit(this, RESOURCE_FUEL); this.ammo_fuel = CalcRotRegen(this.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, frametime * (time > this.pauseregen_finished) * ((this.items & ITEM_JetpackRegen.m_itemid) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > this.pauserotfuel_finished), limitf); }