X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Ft_quake3.qc;h=45ab457f20490060381dd9804c84a74ab4af7345;hb=9d0acc2e4117dc6d1810a034c635a631cec501a8;hp=c63b4de2fd2c949518c7ee93354bf5870234e312;hpb=ee1bc52fd8269edac22ce73ddecc88583fa1d623;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/t_quake3.qc b/qcsrc/server/t_quake3.qc index c63b4de2f..45ab457f2 100644 --- a/qcsrc/server/t_quake3.qc +++ b/qcsrc/server/t_quake3.qc @@ -23,7 +23,7 @@ void spawnfunc_weapon_plasmagun() { spawnfunc_weapon_hagar(); } void spawnfunc_ammo_cells() { spawnfunc_item_rockets(); } // Rail -> Rifle -void spawnfunc_weapon_railgun() { spawnfunc_weapon_campingrifle(); } +void spawnfunc_weapon_railgun() { spawnfunc_weapon_rifle(); } void spawnfunc_ammo_slugs() { spawnfunc_item_bullets(); } // BFG -> Crylink @@ -100,7 +100,9 @@ void target_give_init() self.armorvalue = 100; else if (targ.classname == "item_health_mega") self.health = 200; - remove(targ); + //remove(targ); // removing ents in init functions causes havoc, workaround: + targ.think = SUB_Remove; + targ.nextthink = time; } self.spawnflags = 2; spawnfunc_target_items(); @@ -128,3 +130,54 @@ void spawnfunc_team_CTF_redspawn() { spawnfunc_info_player_team1(); } void spawnfunc_team_CTF_bluespawn() { spawnfunc_info_player_team2(); } void spawnfunc_item_flight() { spawnfunc_item_jetpack(); } + +.float notteam; +.float notsingle; +.float notfree; +.float notq3a; +.float notta; +.string gametype; +float DoesQ3ARemoveThisEntity() +{ + // Q3 style filters (DO NOT USE, THIS IS COMPAT ONLY) + + if(self.notq3a) + if(!teamplay || g_tdm || g_ctf) + return 1; + + if(self.notta) + if not(!teamplay || g_tdm || g_ctf) + return 1; + + if(self.notsingle) + if(maxclients == 1) + return 1; + + if(self.notteam) + if(teamplay) + return 1; + + if(self.notfree) + if(!teamplay) + return 1; + + if(self.gametype) + { + string gametypename; + // static char *gametypeNames[] = {"ffa", "tournament", "single", "team", "ctf", "oneflag", "obelisk", "harvester", "teamtournament"}; + gametypename = "ffa"; + if(teamplay) + gametypename = "team"; + if(g_arena) + gametypename = "tournament"; + if(g_ctf) + gametypename = "ctf"; + if(maxclients == 1) + gametypename = "single"; + // we do not have the other types (oneflag, obelisk, harvester, teamtournament) + if(strstrofs(self.gametype, gametypename, 0) < 0) + return 1; + } + + return 0; +}