X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Ft_quake3.qc;h=b0f4f1ab4c3571395025ac04c35e5eb20cabc501;hb=13a3ce5cdf01a322755b2f0e74d168cd5247d789;hp=a7a2c18748c3685a8daab4d1971c96efa9ef83e4;hpb=941f9685a555aba3415d2975f1e3b5596d36475c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/t_quake3.qc b/qcsrc/server/t_quake3.qc index a7a2c1874..b0f4f1ab4 100644 --- a/qcsrc/server/t_quake3.qc +++ b/qcsrc/server/t_quake3.qc @@ -1,3 +1,14 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qh" + #include "../dpdefs/dpextensions.qh" + #include "../common/buffs.qh" + #include "../common/weapons/weapons.qh" + #include "defs.qh" + #include "../common/mapinfo.qh" +#endif + //*********************** //QUAKE 3 ENTITIES - So people can play quake3 maps with the xonotic weapons //*********************** @@ -70,9 +81,9 @@ void target_give_init() { entity targ; for (targ = world; (targ = find(targ, targetname, self.target)); ) { - if (targ.classname == "weapon_rocketlauncher") { + if (targ.classname == "weapon_rocketlauncher" || targ.classname == "weapon_devastator") { self.ammo_rockets += targ.count * WEP_CVAR(devastator, ammo); - self.netname = "rocketlauncher"; + self.netname = "devastator"; } else if (targ.classname == "weapon_plasmagun") { self.ammo_rockets += targ.count * WEP_CVAR_PRI(hagar, ammo); // WEAPONTODO @@ -82,18 +93,18 @@ void target_give_init() self.netname = strcat(self.netname, " hagar"); } else if (targ.classname == "weapon_bfg") { - self.ammo_cells += targ.count * autocvar_g_balance_crylink_primary_ammo; + self.ammo_cells += targ.count * WEP_CVAR_PRI(crylink, ammo); if(self.netname == "") self.netname = "crylink"; else self.netname = strcat(self.netname, " crylink"); } - else if (targ.classname == "weapon_grenadelauncher") { - self.ammo_rockets += targ.count * autocvar_g_balance_mortar_primary_ammo; // WEAPONTODO + else if (targ.classname == "weapon_grenadelauncher" || targ.classname == "weapon_mortar") { + self.ammo_rockets += targ.count * WEP_CVAR_PRI(mortar, ammo); // WEAPONTODO if(self.netname == "") - self.netname = "grenadelauncher"; + self.netname = "mortar"; else - self.netname = strcat(self.netname, " grenadelauncher"); + self.netname = strcat(self.netname, " mortar"); } else if (targ.classname == "item_armor_body") self.armorvalue = 100; @@ -113,18 +124,24 @@ void spawnfunc_target_give() InitializeEntity(self, target_give_init, INITPRIO_FINDTARGET); } -//void spawnfunc_item_flight() /* not supported */ -//void spawnfunc_item_haste() /* not supported */ +//void spawnfunc_item_flight() /* handled by buffs mutator or jetpack */ +//void spawnfunc_item_haste() /* handled by buffs mutator */ //void spawnfunc_item_health() /* handled in t_quake.qc */ //void spawnfunc_item_health_large() /* handled in t_items.qc */ //void spawnfunc_item_health_small() /* handled in t_items.qc */ //void spawnfunc_item_health_mega() /* handled in t_items.qc */ -//void spawnfunc_item_invis() /* not supported */ -//void spawnfunc_item_regen() /* not supported */ +//void spawnfunc_item_invis() /* handled by buffs mutator */ +//void spawnfunc_item_regen() /* handled by buffs mutator */ // CTF spawnfuncs handled in mutators/gamemode_ctf.qc now -void spawnfunc_item_flight() { spawnfunc_item_jetpack(); } +void spawnfunc_item_flight() +{ + if(!cvar("g_buffs") || !cvar("g_buffs_flight")) + spawnfunc_item_jetpack(); + else + buff_Init_Compat(self, BUFF_FLIGHT); +} .float notteam; .float notsingle;