1 //***********************
2 //QUAKE 3 ENTITIES - So people can play quake3 maps with the xonotic weapons
3 //***********************
5 // NOTE: for best experience, you need to swap MGs with SGs in the map or it won't have a MG
8 void spawnfunc_ammo_shells() { spawnfunc_item_shells(); }
11 void spawnfunc_weapon_machinegun() { spawnfunc_weapon_uzi(); }
12 void spawnfunc_ammo_bullets() { spawnfunc_item_bullets(); }
15 void spawnfunc_ammo_grenades() { spawnfunc_item_rockets(); }
18 void spawnfunc_weapon_lightning() { spawnfunc_weapon_electro(); }
19 void spawnfunc_ammo_lightning() { spawnfunc_item_cells(); }
22 void spawnfunc_weapon_plasmagun() { spawnfunc_weapon_hagar(); }
23 void spawnfunc_ammo_cells() { spawnfunc_item_rockets(); }
26 void spawnfunc_weapon_railgun() { spawnfunc_weapon_campingrifle(); }
27 void spawnfunc_ammo_slugs() { spawnfunc_item_bullets(); }
30 void spawnfunc_weapon_bfg() { spawnfunc_weapon_crylink(); }
31 void spawnfunc_ammo_bfg() { spawnfunc_item_cells(); }
34 void spawnfunc_ammo_rockets() { spawnfunc_item_rockets(); }
37 void spawnfunc_item_armor_body() { spawnfunc_item_armor_large(); }
38 void spawnfunc_item_armor_combat() { spawnfunc_item_armor_big(); }
39 void spawnfunc_item_armor_shard() { spawnfunc_item_armor_small(); }
40 void spawnfunc_item_enviro() { spawnfunc_item_invincible(); }
42 // weapon remove ent from defrag
43 void spawnfunc_target_init()
45 self.spawnflags = 0; // remove all weapons except the ones listed below
46 self.netname = "laser uzi"; // keep these weapons through the remove trigger
47 spawnfunc_target_items();
50 // weapon give ent from defrag
51 void target_give_init()
54 for (targ = world; (targ = find(targ, targetname, self.target)); ) {
55 if (targ.classname == "weapon_rocketlauncher") {
56 self.ammo_rockets += targ.count * cvar("g_balance_rocketlauncher_ammo");
57 self.netname = "rocketlauncher";
59 else if (targ.classname == "weapon_plasmagun") {
60 self.ammo_rockets += targ.count * cvar("g_balance_hagar_primary_ammo");
61 if(self.netname == "")
62 self.netname = "hagar";
64 self.netname = strcat(self.netname, " hagar");
66 else if (targ.classname == "weapon_bfg") {
67 self.ammo_cells += targ.count * cvar("g_balance_crylink_primary_ammo");
68 if(self.netname == "")
69 self.netname = "crylink";
71 self.netname = strcat(self.netname, " crylink");
73 else if (targ.classname == "weapon_grenadelauncher") {
74 self.ammo_rockets += targ.count * cvar("g_balance_grenadelauncher_primary_ammo");
75 if(self.netname == "")
76 self.netname = "grenadelauncher";
78 self.netname = strcat(self.netname, " grenadelauncher");
80 else if (targ.classname == "item_armor_body")
81 self.armorvalue = 100;
82 else if (targ.classname == "item_health_mega")
87 spawnfunc_target_items();
90 void spawnfunc_target_give()
92 InitializeEntity(self, target_give_init, INITPRIO_FINDTARGET);
95 //void spawnfunc_item_flight() /* not supported */
96 //void spawnfunc_item_haste() /* not supported */
97 //void spawnfunc_item_health() /* handled in t_quake.qc */
98 //void spawnfunc_item_health_large() /* handled in t_items.qc */
99 //void spawnfunc_item_health_small() /* handled in t_items.qc */
100 //void spawnfunc_item_health_mega() /* handled in t_items.qc */
101 //void spawnfunc_item_invis() /* not supported */
102 //void spawnfunc_item_regen() /* not supported */
103 void spawnfunc_team_CTF_redflag() { spawnfunc_item_flag_team1(); }
104 void spawnfunc_team_CTF_blueflag() { spawnfunc_item_flag_team2(); }
105 void spawnfunc_team_CTF_redplayer() { spawnfunc_info_player_team1(); }
106 void spawnfunc_team_CTF_blueplayer() { spawnfunc_info_player_team2(); }
107 void spawnfunc_team_CTF_redspawn() { spawnfunc_info_player_team1(); }
108 void spawnfunc_team_CTF_bluespawn() { spawnfunc_info_player_team2(); }
110 void spawnfunc_item_flight() { spawnfunc_item_jetpack(); }